State variable saved?
24-Feb-94 02:56:00
Sb: #85923-State variable saved?
Fm: Martin Enthed 100277,1272
To: Jonas Ruikis [ADESK] 73172,1351
<<There is no state variables when you use the new style dialog-Jim>>.
They are used in the ORBIT_I.KXP sample C file and in that KXP they
seem to be saved when exiting the function ClientDoCustomDialog(). If
the "dlgResult"==1 its saved otherwice not. The thing is that I am
making a PXP and there are no sample C files that saves there
settings. I have made sure that i set the state variables myself in
the dialog so they have the right settings when leaving the PXP, but
they dont get saved anyway!!
DLGTEST,EDTEST,GAMMA and INFO none of them do or should save there
settings to the next session! I have included a part of the
sourcecode from ORBIT_I.PXP that does save its settings!!
—-End of ClientDoCustomDialog—-raw 394-406 of ORBIT.C ———
/* if the user cancelled, terminate. */
if( !dlgResult ) {
return 0;
}
/* save the results from the dialog. */
state.frames = atoi( mainedit[0].string );
state.keys = atoi( mainedit[1].string );
state.tiltLR = slid[0].value;
state.tiltFB = slid[1].value;
return 1;
}
———————————————
<<See the doc or any examples with a new style dialog.-Jim>>
I'm doing that !!!!!
<<If he wants to same them from session to session, he should make
them global variables. I'm pretty sure this will work.-Jim>> How do
I make global variables?