xbarns
11th March 2008 15:42 UTC
Reuse nsDialogs
I have to gather some information from a user, in this case the path to some operating system files and other information. All in all i have to do this between 0 and 5 times.
I am wondering if i can reuse nsDialog forms and only slightly changing some labels (design stays the same).
Any Ideas?
Thanks in advance.
Afrow UK
11th March 2008 18:55 UTC
Sure have a counter and use the same show function for each page.
Stu
xbarns
12th March 2008 07:47 UTC
Would i then call the page 5 times? like this?
Page custom GetOSDetails LeaveGetOSDetails
Page custom GetOSDetails LeaveGetOSDetails
Page custom GetOSDetails LeaveGetOSDetails
Page custom GetOSDetails LeaveGetOSDetails
Page custom GetOSDetails LeaveGetOSDetails
Page custom GetOSDetails LeaveGetOSDetails
Or would i only call it once and once i am at the "end" of the dialog i check if i need to "goto thetop" another time? Will that call the "Leave" function every time?
Thanks for the help!
Yathosho
12th March 2008 09:50 UTC
calling the page once should do the job, have a look at nsDialog's onClick/onChange functions. i'd also suggest you indicate the progress by changing a label - otherwise the user might think he's doing something wrong
xbarns
12th March 2008 10:37 UTC
Thanks, i now use a seperate Function that i call into. And yes i have thought of changing the label so noone gets confused.
:D