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 for Programming
 LabTalk Forum
 Problems with LabTalk upgrading from 6.0 to 7.0
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mjconvey

Germany
Posts

Posted - 03/11/2004 :  02:50:10 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I've written a LabTalk program which works perfectly in 6.0 but it gets stuck when I try to run it on 7.0. I think I've found the problem but I don't know what to do about it.

The program starts by calling up a couple graph templates. Then a loop is defined, which includes a "pointproc" macro, and a getyesno to continue the loop or not:
[start]
{
\\\Graphic Templates called\\\;
def GrafikBereich_Loop \\\Loop defined\\\;
{
\\\Worksheet Template called\\\;
getfile*.*; \\\Data file loaded, graphed onto template I have labled %J\\\;
open -w %A;
window -a %J;
layer -i201 %N_B;
layer -a;
%C=%N_B;
\\\!!!Loop stops here second time around!!!\\ dotool 4; \\\Data marked on %J\\ def pointproc
{ P1=mks1; P2=mks2;
win -a %N;
get %N_B -e P3;
mark -d %N_B -b (P2+1) -e P3;

//////CALCULATIONS//////;
//////MASKING OF DATA//////;

dotool 0;
getyesno (Another Dataset?) Antwort2 [Repeat];
if (Antwort2==1)
{
repeat 1 {GrafikBereich_Loop;}
}
else
{
menu -e 57651;
break [Antwort2+1]
};
};
};
GrafikBereich_Loop;
};
In 6.0 the loop can be repeated without any difficulty. In 7.0, the loop runs completely once, repeats after the getyesno promt, loads another data set into the worksheet template, but stops once it reaches "dotool" or "def pointproc". I'm not able to mark the data; there aren't moveable cursors but brackets at both end of the data set, as if the data had already been selected.

Does any one have any idea what the problem could be?

Thanks a million...Martin J.

Mike Buess

USA
3037 Posts

Posted - 03/11/2004 :  2:09:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Martin,

First glance comment: MenuID's sometimes change from one Origin version to the next. I don't know what menuID 57651 refers to but you might verify that it's what you think it is.

...And I don't understand the purpose of

repeat 1 {GrafikBereich_Loop;}

If you only execute it once why don't you just use

GrafikBereich_Loop;

Perhaps it's a transcription error?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/11/2004 3:22:41 PM
Go to Top of Page

mjconvey

Germany
Posts

Posted - 03/17/2004 :  05:39:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the tip Mike.

Actually the problem did have to do with the command

"repeat 1 {GrafikBereich_Loop;}",

but simply calling the loop with "GrafikBereich_Loop;" runs into the same problem (Although a "repeat" command is indeed superfluous).

It was a queueing problem, as I was told by the Origin Support people.

I would need an extra semicolon in calling the loop, as:

";GrafikBereich_Loop;" or "repeat 1 {;GrafikBereich_Loop;}"

It's interesting that the semicolon in front isn't needed in Origin 6.0.

Thanks again.

Martin J.
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