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
 reactivate script window

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
cjfraz Posted - 04/29/2004 : 9:56:58 PM
I have a really simple OC function that I am running from the script window. It has a body basiclaly like this:

 
void merge(string strSource, string strTarget){
Worksheet wksSource;
Worksheet wksTarget;
wksSource.Attach(strSource);
wksTarget.Attach(strTarget);

// do some other stuff.

wksSource.Destroy();
}



The wksSource.Destroy(); line has the desired effect of deleting the source worksheet, but it aslo seems to remove the focus from the script window. Is this by design?

How can I run this code and still have a blinking cursor in the script window waiting for new input when it is done?

Thanks for any help.

J...
4   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 05/04/2004 : 6:42:00 PM
Yes, thanks, I can see the problem now.
I am not sure about the solution yet, but we will look further, trackered as 6382.

CP




Edited by - cpyang on 05/08/2004 02:52:54 AM
cjfraz Posted - 04/29/2004 : 11:51:22 PM
hmmmm...

It seems that the relative index of the source sheet vs. the target sheet may be the difference, such that everything is fine if the target has the higher index, but not if the source does.

So for example, using the code in my orginal post and a brand new project with 2 empty worksheets,

typing 'merge data2 data1' into the script window will cause a loss of focus on the script window, but 'merge data1 data2' will not.

This general principle seems to hold for larger numbers of worksheets.

J...
cjfraz Posted - 04/29/2004 : 11:36:47 PM
No... no close event or anything else that I have set up.

I can copy the code right out of the above message, run just that bit on empty new worksheets, and get the problem.

I'm using OriginPro 7.5 SR2 (7.5817).

J...
cpyang Posted - 04/29/2004 : 10:49:41 PM
Does a wks being destroy execute some LT script on Window Close? As I was not able to see the problem with just empty new worksheets.

CP



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