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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Does TimerProc break?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

marko

Germany
112 Posts

Posted - 02/01/2005 :  04:32:44 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 02/01/2005 :  07:57:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

marko

Germany
112 Posts

Posted - 02/01/2005 :  08:55:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000