Author |
Topic  |
|
peter.cook
UK
356 Posts |
Posted - 05/23/2005 : 5:16:12 PM
|
Origin Version (Select Help-->About Origin): Origin 7.5 SR5 Operating System: Win 2000
Hi,
My big problem with dialogs using origin C has been explained. Essentially, (eg using the tabs example provided), if you call the dialog from a text button control you have to click on each tab in order to 'initialise' it. This is demonstrated by having to click twice on the OK button.
if you call it from a text label set to Button Up or via script window then no problem.
This really annoying bug has cost me a few days work and I would apreciate a look at this as I really want to use the (multiple) text button control!
Cheers,
pete
|
|
eparent
118 Posts |
Posted - 05/23/2005 : 6:03:46 PM
|
Pete,
Can you output a string, using printf or out_str, in each tab's OnInit function to output the tab's name. Then we can see what tab's get initialized. All pages for a wizard will get initialized even if you click Finish on the first page. Tab dialogs should do the same.
|
 |
|
peter.cook
UK
356 Posts |
Posted - 05/24/2005 : 08:20:24 AM
|
Hi Eric,
To show this - simply use the tabs example you provided.
If I load the dialog via 'tabs' I get :
OriginStorage Tab1 CheckBox = 0 Tab2 EditBox = Enter Text to Upper Case Tab3 ComboBoxSel = 0 Tabbed Dialog Init Tab1 Init
Clicking on Tab2, Tab3 and OK I get (in order) :
Tab2 Init Tab2 Active
then
Tab3 Init Tab3 Active
then
Click OK Button OriginStorage Tab1 CheckBox = 0 Tab2 EditBox = Enter Text to Upper Case Tab3 ComboBoxSel = 0
This is the same no mater whether I use script window or text button control.
If I just load and click OK then I get :
OriginStorage Tab1 CheckBox = 0 Tab2 EditBox = Enter Text to Upper Case Tab3 ComboBoxSel = 0 Tabbed Dialog Init Tab1 Init
then
Click OK Button OriginStorage Tab1 CheckBox = 0 Tab2 EditBox = Enter Text to Upper Case Tab3 ComboBoxSel = 0
the same no matter how I load, only, as stated in previous note first click on OK button does nothing when loaded via text control button.
I assume you've checked this out too?
The same applies to eg Radio Buttons example & my simple dialog.
Cheers,
pete
|
 |
|
easwar
USA
1965 Posts |
Posted - 05/24/2005 : 10:46:27 AM
|
Hi Pete,
We could reproduced your problem - so the problem exactly is that all tabs do get initialized properly, but when the dialog is launched from a UIM Text Control button, the very first time you click on a control or a tab, nothing happens - but all subsequent clicks work fine.
The solution to the problem is to place a ; in front of the script command.
So for example if you were launching the dialog using the script statement Tabs(); then just change that to ;Tabs();
The ; ensures that the focus is current in the case of the UIM Text Control button. Again, this change is necessary only when launching from a UIM Text Control button - not necessary if launching from a simple text label that has been converted to a button.
Easwar OriginLab
|
 |
|
cpyang
USA
1406 Posts |
Posted - 05/24/2005 : 10:57:19 AM
|
This has to do with Origin's internal handling of mouse events. For text label derived buttons, we have additional code to run LT with a PostMessage processing, so the mouse button will finished with left-button-up processing before LT is executed, but apparently this handling was not put into UIM buttons.
What we usually do with ANY buttons to execute LT, is to put all LT codes in some ogs file and then do the following inside button
;run.section(myOGSfile, mySection);
so the entire LT code will be executed in a delayed (PostMessage) fashion.
CP
|
 |
|
peter.cook
UK
356 Posts |
Posted - 05/24/2005 : 3:29:47 PM
|
Hi,
Thanks for replies...all this solved with a ';' Wish I'd known earlier but thanks for explanation.
Cheers,
Pete
|
 |
|
|
Topic  |
|
|
|