Call back for Close

B

BUS

Guest
Hello all,

Is there any procedure to create a form with out using the base
button list in the ?buttonLayout tab.
For ex here I used 'Close , can I create without using that.

?buttonLayout list('Close
list('Save "SaveToFile()")
list('Load "LoadFile()"))

If I remove the 'Close in the
?buttonLayout list. I am getting an error as
*Error* hiCreateAppForm: first arg must be a symbol specifying the
base button list
Or else Can I have a userdefined callback for the base button list
functions. So that I can remove the save button and add the save
callback to 'Close button
I want this because there is a chance to close the form with out
saving the form (the below procedure shows the Close Save and Load
buttons)

procedure(testform()
broname=list("Schematic Library" "Cell" "View" "Layout Library" "Cell"
"View")
testtable=makeTable("browse")
for(Count 1 5
bronamet=nth(Count-1 broname)
testtable[Count]=hiCreateStringField(?name gensym('b)
?prompt bronamet
)
)
testform=hiCreateAppForm(?name 'testform
?formTitle "TestForm"
?fields list(testtable[1] testtable[2] testtable[3]
testtable[4]
testtable[5])
?buttonLayout list('Close
list('Save "SaveToFile()")
list('Load "LoadFile()"))

)
if(hiIsFormDisplayed(testform)==t
then
printf("Already **TestForm is Open**")
else
hiDisplayForm(testform list(0 0))
)
);procedure
 
In article <93dfef6a-550f-4228-a431-af8077a54b51@d21g2000yqn.googlegroups.com> BUS <sridhartv25@gmail.com> writes:
Hello all,

Is there any procedure to create a form with out using the base
button list in the ?buttonLayout tab.
Yes. You can use 'Empty as the first member of the list.

Or else Can I have a userdefined callback for the base button list
functions. So that I can remove the save button and add the save
callback to 'Close button
Yes. The ?callback argument specifies the callbacks for the default actions,
Apply, Done (or OK or Close), and Cancel. If you specify a single callback,
that's called for Apply and Done. If you specify a list of two callbacks, the
first is called for Apply and Done, the second is called for Cancel. Closing
the form using the window frame or the window manager/desktop is the same as
selecting Cancel (except for forms that don't have a Cancel button).

This is all in the documentation for hiCreateAppForm().

-Pete Zakel
(phz@seeheader.nospam)

"Don't tell me I'm burning the candle at both ends -- tell me where to
get more wax!!"
 
HI Pete Zakel ,

By using 'Empty as the argument in the list I am lossing all the
user defined buttons (here itis Save and Load).

Regards,
Sridhar.
 
In article <6d7a43bf-86f5-4390-9e03-65a3131438d4@j14g2000yqm.googlegroups.com> BUS <sridhartv25@gmail.com> writes:
By using 'Empty as the argument in the list I am lossing all the
user defined buttons (here itis Save and Load).
Ah, you must be using IC 5.1.41 then. In IC 6.1.X that has been fixed.

-Pete Zakel
(phz@seeheader.nospam)

"Real engineers buy their husbands matching screwdrivers for Christmas,
but use them more than he does."
 
Hi Pete Zakel,

Yes , I am using IC 5.1.41.
Can you please suggest me any other idea of doing this.
Can I give a callback for 'Close such that it calls its default action
Close and also a user defined call back such as saving.

Regards,
Sridhar.
 
In article <569d5798-c278-4eff-b101-823547c8db2c@o10g2000yqa.googlegroups.com> BUS <sridhartv25@gmail.com> writes:
Hi Pete Zakel,

Yes , I am using IC 5.1.41.
Can you please suggest me any other idea of doing this.
Can I give a callback for 'Close such that it calls its default action
Close and also a user defined call back such as saving.
Yes, the ?callback argument should be called when the Close button is pressed.

-Pete Zakel
(phz@seeheader.nospam)

"You must realize that the computer has it in for you. The irrefutable
proof of this is that the computer always does what you tell it to do."
 

Welcome to EDABoard.com

Sponsor

Back
Top