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
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.
hi Austin, thank you for your clear explanation ! :)