The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Bug calling dialog from text buttons

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peter.cook 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

5   L A T E S T    R E P L I E S    (Newest First)
peter.cook 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

cpyang 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


easwar 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

peter.cook 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

eparent 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.



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000