Author |
Topic  |
|
peter.cook
UK
356 Posts |
Posted - 03/12/2002 : 10:48:57 AM
|
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
|
doc -s;
CP Yang
|
 |
|
peter.cook
UK
356 Posts |
Posted - 03/13/2002 : 07:10:03 AM
|
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 |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/13/2002 : 08:28:54 AM
|
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
|
 |
|
peter.cook
UK
356 Posts |
Posted - 03/15/2002 : 04:16:21 AM
|
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 |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/15/2002 : 07:28:59 AM
|
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
|
 |
|
|
Topic  |
|
|
|