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
 MOCA example WORKSHEET doesn't work

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 - 07/05/2002 : 05:17:07 AM
Hi,

I just try to code my own MOCA style dll.
Unfortunately I met some problem:

I tried to start with the example worksheet from Origins ATI\MOCA\ tree. Compile and everything works. But for some reason I seem to have a problem with the

MOCA_SIMPLE_PROP_STR(m_WksName, "WksName")!!!

This was set in the property map, but for some reason the following script will crash if I enable the outcommented line:

 
[WorksheetTest]
{
dll -a worksheet ATI\MOCA\worksheet\Debug\worksheet;
// worksheet.WksName=data1; // still causes crash
worksheet.WksName=;
dll -r worksheet;
}

since the output of the worksheet.WksName doesn't create an error, just outputs "--", but assigning something to the variable makes the script finish and so the object wouldn't be deleted as well.

My question: did somebody else also encounter this strange behaviour of the simple property in Origin 6.1 Pro SR4?

Marko

7   L A T E S T    R E P L I E S    (Newest First)
marko Posted - 07/08/2002 : 10:58:50 AM
Thanks again, eparent!!!
That's the solution. Only now I remember this "feature of Origin". I just checked one of my older scripts and found exactly this behaviour there as well and the same workaround with a buffer string in between.

thanks a lot.

Marko

marko Posted - 07/08/2002 : 10:58:45 AM
Thanks again, eparent!!!
That's the solution. Only now I remember this "feature of Origin". I just checked one of my older scripts and found exactly this behaviour there as well and the same workaround with a buffer string in between.

thanks a lot.

Marko

marko Posted - 07/08/2002 : 10:58:37 AM
Thanks again, eparent!!!
That's the solution. Only now I remember this "feature of Origin". I just checked one of my older scripts and found exactly this behaviour there as well and the same workaround with a buffer string in between.

thanks a lot.

Marko

eparent Posted - 07/08/2002 : 10:28:55 AM
LabTalk can not output a string property directly. You have to assign the value to a string variable and then output the string variable. For example:

Worksheet.WksName$=data1; // set prop
%z=Worksheet.WksName$; // prop to str var
%z=; // output str var

Another option is to output the DLL's list of methods and properties with the following:

Worksheet.=;

This will list all the DLL's methods and properties and their current values.


marko Posted - 07/05/2002 : 10:13:27 AM
the upper example code still includes the comment with "crash", which is not correct anymore as you see from context of previous post.

marko Posted - 07/05/2002 : 10:10:49 AM
Thanks eparent for your response!

to 1)
I meant that Origin just silently stops processing the given script. But this is history, since

to 2)
Well, of course you are right!! So I made the following change:

 
[WorksheetTest]
{
dll -a worksheet ATI\MOCA\worksheet\Debug\worksheet;
worksheet.WksName$=data1; // still causes crash
worksheet.WksName$=;
dll -r worksheet;
}



inserting the dollar signs.

This time the script is executed up to the end, BUT still the output looks like this:

WORKSHEET.WKSNAME$=--

although there was the assignment to the property just the line before!

Any idea what this might be?
Marko

eparent Posted - 07/05/2002 : 09:02:33 AM
1. Is there really a crash or do you mean a Command Error?
2. When accessing a string property be sure to suffix the name with a dollar sign ('$').



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