Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 GUI 

Last post Mon, Feb 23 2009 7:59 PM by leongec. 2 replies.
Started by leongec 20 Feb 2009 01:27 AM. Topic has 2 replies and 1459 views
Page 1 of 1 (3 items)
Sort Posts:
  • Fri, Feb 20 2009 1:27 AM

    • leongec
    • Top 500 Contributor
    • Joined on Sun, Feb 1 2009
    • Posts 20
    • Points 265
    GUI Reply

    hi All, i am newbiee to SKILL, and i need your help.

    i have some  problem when creating GUI

    i use hiCreateAppForm for displaying the GUI and use hiCreateFloatField for user to input data. 

    in the hiCreateAppForm, the layout button is OKCancel, my call back is link to another procedure.

    ?callback list('okCB 'cancelCB)

    In the cancelCB procedure, i use exit(), but the program straightly exit the icfb& when i click cancel button. How can i modify my problem? i cant find the command break(), is it available in skill?

    i tried to use "nil" but the data will straightly print in to the outfile. I dont know why.. 

     

    thanks for your help

    regards,

    leongec

     

    • Post Points: 20
  • Fri, Feb 20 2009 7:49 AM

    Re: GUI Reply

     Exit - the fast way to leave Virtuoso. Hit a major a bug - even faster!

     You do not have to return from a procedure, the execution of the cancelCB procedure will automatically terminate at the end and return the value of the last expression. The form should automatically close and your callback can do the cleanup. If you don't have anything to clean up, you can set your callback to be a single symbol (or string) and that will be the OK/apply action. 

    Often callbacks are confusing, the programmer embeds the form in the program and which processes the values set in the form instead of using the callback to do the processing.  If the form is embeded, the return value of the form is t if OK/Apply is chosen, nil if Cancelis chosen. The calling program must react to the t/nil return value of the form.

    If you use callbacks, the okCB handles the write to your output file, the cancelCB closes the file and removes the form. In this case, the calling program displays the form and then does no further processing.

     Ted

    • Post Points: 20
  • Mon, Feb 23 2009 7:59 PM

    • leongec
    • Top 500 Contributor
    • Joined on Sun, Feb 1 2009
    • Posts 20
    • Points 265
    Re: GUI Reply

     hi Austin, thank you for your clear explanation ! :)

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by leongec at 20 Feb 2009 01:27 AM. Topic has 2 replies.