Programming forms in cadence

Discussion in 'Cadence' started by Guenther Sohler, Aug 10, 2007.

  1. I have been programming forms the last days.
    This process is as follows, that the user fills in some fields and
    presses "OK".
    Then the callback is called and processes the input given.

    The issue is following: if the user gives incorrect data, the callback
    cannot execute correctly and has to quit. Thus the user has to start
    the form again to reenter all the data.
    How can this be prevented ?

    if the callback detects invalid data, how can the user be sent back to the
    already-filled-out form, correct it and try "OK" again ?


    rds
     
    Guenther Sohler, Aug 10, 2007
    #1
  2. Isn't this why there is always an 'Apply' button in Cadence forms?
    This would apply the data without closing the window.
     
    Svenn Are Bjerkem, Aug 10, 2007
    #2
  3. Guenther Sohler

    Guest Guest

    When the form is created, pass:

    ?unmapAfterCB t

    as one of the arguments to hiCreateAppForm().

    This ensures the form is not unmapped until after the form callback. If,
    during the callback, you determine the form should stay up, call:

    hiSetCallbackStatus( r_form nil )

    before returning. If it is OK and should close, call:

    hiSetCallbackStatus( r_form t )

    -Pete Zakel
    ()

    The Abrams' Principle:
    The shortest distance between two points is off the wall.
     
    Guest, Aug 11, 2007
    #3
  4. , correct it and try "OK" again ?
    .... works perfect!
    thank you man!
     
    Guenther Sohler, Aug 13, 2007
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.