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
 Origin Forum
 Does TimerProc break?

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
marko Posted - 02/01/2005 : 04:32:44 AM
Origin Version (Select Help-->About Origin): O7.5P
Operating System: W2k

Hi,

I am having a weird problem while running a timerproc. The proc defined in a worksheet window (in a button) is used to reload data (from path %l%k) into that worksheet (%m) every some seconds to display them:
def timerproc {
win -a %m;
open -w %l%k;
wks.col1.format=3;
};


These data get redisplayed automatically in some graphs also contained in the project. I also have some buttons on my graphs which move the scale around to zoom back and forward in the data.

Now the problem:

While the timer is running it occurs that all of Origin's userdefined buttons on my graphs and worksheets stop working in case I press a button right in the moment the timerproc acutally gets carried out.
Only hiding Origin's main window and maximizing it again restores the
button actions... Weird!

So I am afraid that the way my timerproc is written it is breakable due to selection of another active window! Is it possible? At the beginning of the proc I set the active window, but by pressing a button in a graph window a moment after the "win -a %m"-command it might happen that the script tries to execute one of the two following commands on the now active graph window, which might fail...

Is this so? I thought that these timerprocs are sort of isolated? Perhaps not?!

Marko

2   L A T E S T    R E P L I E S    (Newest First)
marko Posted - 02/01/2005 : 08:55:01 AM
Hi Mike,

your are an ace!

Thanks for the hint. The wks-command I did modify right after my post to the forum already, but of course that wasn't enough. I couldn't find an option for the window to run the open-command in, but now I see it has to be done with an extra command. Gosh!

Thanks a lot!

Marko

Mike Buess Posted - 02/01/2005 : 07:57:10 AM
Hi Marko,

You can avoid that by applying your commands to a particular object rather than the active window. The following version of your macro should not be affected by graph activation.
def timerproc {
win -o %M {open -w %L%K};
%M!wks.col1.format=3;
};


Mike Buess
Origin WebRing Member

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