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
 Open new Project without save prompt
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 03/12/2002 :  10:48:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
HI,

Can someone please remind me how to open a new project (eg labtalk doc -o etc..)without being prompted to save the current one? I have done this in the past but forgotten how. Some variable or property associated with the project I think..

Thanks,

Pete

cpyang

USA
1406 Posts

Posted - 03/12/2002 :  11:21:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
doc -s;

CP Yang



Go to Top of Page

peter.cook

UK
356 Posts

Posted - 03/13/2002 :  07:10:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks,

I'd tried this, unsuccessfully at first. If I run the code

doc -o test1.opj;
doc -s;
create AZRappid -s 1;
AZRappid[1]$="test1";
doc -o test2.opj;
doc -s;
create AZRappid -s 1;
AZRappid[1]$="test2";
doc -o test1.opj;
doc -s;
create AZRappid -s 1;
AZRappid[1]$="test1";

Then i'm prompted to save test1.opj and test2.opj

If however I run:

doc -o test1.opj;
doc -s;
create AZRappid -s 1;
//AZRappid[1]$="test1";
doc -o test2.opj;
doc -s;
create AZRappid -s 1;
//AZRappid[1]$="test2";
doc -o test1.opj;
doc -s;
create AZRappid -s 1;
/AZRappid[1]$="test1";

or doc -o test1.opj;
create AZRappid -s 1;
AZRappid[1]$="test1";
doc -s;
doc -o test2.opj;
create AZRappid -s 1;
AZRappid[1]$="test2";
doc -s;
doc -o test1.opj;
create AZRappid -s 1;
AZRappid[1]$="test1";
doc -s;

then no problem ie assign a value to azrappid string (after doc -s) causes doc -s to fail.

Cheers,

Pete
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 03/13/2002 :  08:28:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The use of script command like Create will the current project "dirty", so you should always put that "doc -s" command to the very end of your script.

CP


Go to Top of Page

peter.cook

UK
356 Posts

Posted - 03/15/2002 :  04:16:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the reply. I'm slightly concerned by the wording 'use of script command like Create will (make) the current project "dirty"'. Is the problem with the doc -s command, the project or create comand. Are there any other (uncdocumented) scenarios that we need to be aware of to avoid 'dirtying' projects or related advice? We routinely use old projects with saved variables and datasets. The above example allows us to identify the (customised) application type and hence enable the user to open the old project and load the required macros for that application via the generic menu.

Cheers,

Pete
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 03/15/2002 :  07:28:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When a project is loaded, it is considered "clean", or not yet modified. Any action that change the project in anyway, especially action that will add to the project, which is what a Create command would do, will set the internal flag to indicate the project is modified, or typically referred to as "dirty". The reason a Create command will modify a project is because whatever is created, it is added to the project. Now all these talks about a project being modified is only refereeing to the project loaded into memory, so as long as the project is not saved, your original project is not changed.

Hope this helps.


CP


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