save file

2006-10-11 Thread Wil Dijkstra
Title: save file






Hi all,

Here is a strange problem I stumbled upon.
In my app I use a safe save procedure to save datafiles created by the app, used to save a datafile that was opened earlier, with the same name; and hence the file already exists on disk (the common situation if you opened for example a Word file, makes some changes, and selects Save from the File menu).
System: OSX4
- first I create some temporary file name (let's say tName)
- next I rename the file on disk (let's say fName) to tName
- next I save the file from the app as fName, setting the filetype to my app's creator and file type 4 character strings.
- finally I delete file tName
Works perfectly! Except...
If the file is at the start up disk, and I try to reopen the file (with the filetype to correct four character code of course), it's disabled (grayed). Actually, creator and filetype are all question marks. If the file is at any other place (another hard disk, the desktop, a folder on the startup disk), no problem; not grayed and creator and filetype have the correct characters.
Stated simple: if the file is at the startup disk, the creator and type become question marks; if it is anywhere else, creator and type codes are correct. A save procedure without replacing ('save as') always yields correct creator and filetypes.
Anybody any idea?

Wil Dijkstra




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


mc can't open stack - mc can't save stack

2005-10-21 Thread Reinhold Venzl-Schubert

Hi!

I wrote a script to export some cards of a stack A:
It creates a new stack B, copies the cards from A to B and save stack  
B after it.


I repeated this process several times with different cards and  
different stacks B1, B2, B3 and so on.


Later I tried to copy the cards of stack B1, B2, ... back to stack A.  
Most of the stacks B1, B2, ... could be opened and imported well, but  
one of the stacks can't not be opened with the importscript that I  
wrote. In the fileselector this strange stack is grey colored instead  
of black, so that I can't select it.


I can open this strange stack directly with mc, but than I could not  
save them again later.
I get the error message: Can't save stack, error was: can't open  
stack backup file.
The icons of the strange stack is different. It is a page with sharp  
bend at the right top, but it is empty, without the symbol of metacard.


Do anybody has an idea, what might be the reason for this strange  
behavior?


Reinhold

I have a Mac with OS 10.4







___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


mc can't open stack - mc can't save stack 2

2005-10-21 Thread Reinhold Venzl-Schubert
Hi!I can open this strange stack directly with mc, but than I could not save them again later.I get the error message: "Can't save stack, error was: can't open stack backup file."The icons of the strange stack is different. It is a page with sharp bend at the right top, but it is empty, without the symbol of metacard.Just now I see, that metacard can open this strang stack only with 2lz3.mc, the plugin of Klaus Major (Hi ;-)Reinhold___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: mc can't open stack - mc can't save stack 3

2005-10-21 Thread J. Landman Gay

Reinhold Venzl-Schubert wrote:


I found the reason myself: The filename was too long!!!


I sure wish they'd fix that. It comes up all the time.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Save stack as...

2002-10-12 Thread Shari

What happens if you:
   set the destroyStack of stack origStack to true
   close stack origStack
   wait for messages -- to assure that the mem-resident copy was destroyed
   delete file origStack
   save stack newerStack as origStack
   delete file newerStack

??

Phil

I think I found the difficulty, or at least part of it.  The full 
objective is to replace older versions of a stack, with newer 
versions.  I put version numbers on the scripts.

# see which stack is newer version, replace if necessary, delete oldest version

  exit to top # testing where the error occurs

   put word 3 of line 1 of the script of stack streetStack into 
origStack  # version number
   put word 3 of line 1 of the script of stack newGold into 
installStack  # version number

THE ERROR INITIALLY OCCURS HERE
I get a purge memory, and it opens the stacks.  Apparently it cannot 
retrieve the script of a stack, without opening the stack?

   exit to top # testing where the error occurs

   if installStack  origStack then
 # replace file goldstreet

 delete file streetStack
  save stack newGold as streetStack
 delete file newGold

 # set the destroyStack of stack streetStack to true
 # close stack streetStack
 # wait for messages # to assure that the mem-resident copy was destroyed
 # delete file streetStack
 # save stack newGold as streetStack
 # delete file newGold

   else
 # delete new goldstreet
 delete file newGold
   end if
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-12 Thread Shari

*sigh*  One problem leads to another

Now it works without dialogs or opening windows, but it appears to be 
using the script from streetStack in both cases.  It doesn't seem to 
be purging the info, because the stacks have different version 
numbers, but when I test it with answer, the version numbers are 
the same, from the first stack.

I tried using a custom property instead of a script for storing 
version numbers.  No difference.


# see which stack is newer version, replace if necessary, delete oldest version
   lock screen
   lock messages
   # put word 3 of line 1 of the script of stack streetStack into origStack
   put the gVersion of stack streetStack into origStack
   close stack streetStack
   wait for messages
   # put word 3 of line 1 of the script of stack newGold into installStack
   put the gVersion of stack newGold into installStack
   close stack newGold
   wait for messages
   set the lockMessages to false
   unlock screen

   wait for messages
   answer installStack  origStack
   exit to top
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-12 Thread Shari

Tried turning the lock messages off, as a test.  Now it retrieves the 
correct info.  But we're back to the purge dialog, and opening the 
stack.

This is really peeving me!  It should be so blasted simple.




# see which stack is newer version, replace if necessary, delete oldest version
   lock screen
   # lock messages
   # put word 3 of line 1 of the script of stack streetStack into origStack
   put the gVersion of stack streetStack into origStack
   close stack streetStack
   wait for messages
   # put word 3 of line 1 of the script of stack newGold into installStack
   put the gVersion of stack newGold into installStack
   close stack newGold
   wait for messages
   set the lockMessages to false
   unlock screen

   wait for messages
   answer installStack  origStack
   exit to top
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-12 Thread Ken Ray
Shari,

You're right... you can't get the script of a stack or even check the custom
properties of a closed stack without opening it. Best approach is to lock
messages, open the stack invisibly, get the script, close it (making sure
its destroystack and destroywindow are true), and then run the rest of your
script.

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

- Original Message -
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 9:03 AM
Subject: Re: Save stack as...


 What happens if you:
set the destroyStack of stack origStack to true
close stack origStack
wait for messages -- to assure that the mem-resident copy was
destroyed
delete file origStack
save stack newerStack as origStack
delete file newerStack
 
 ??
 
 Phil

 I think I found the difficulty, or at least part of it.  The full
 objective is to replace older versions of a stack, with newer
 versions.  I put version numbers on the scripts.

 # see which stack is newer version, replace if necessary, delete oldest
version

   exit to top # testing where the error occurs

put word 3 of line 1 of the script of stack streetStack into
 origStack  # version number
put word 3 of line 1 of the script of stack newGold into
 installStack  # version number

 THE ERROR INITIALLY OCCURS HERE
 I get a purge memory, and it opens the stacks.  Apparently it cannot
 retrieve the script of a stack, without opening the stack?

exit to top # testing where the error occurs

if installStack  origStack then
  # replace file goldstreet

  delete file streetStack
   save stack newGold as streetStack
  delete file newGold

  # set the destroyStack of stack streetStack to true
  # close stack streetStack
  # wait for messages # to assure that the mem-resident copy was
destroyed
  # delete file streetStack
  # save stack newGold as streetStack
  # delete file newGold

else
  # delete new goldstreet
  delete file newGold
end if
 --
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-12 Thread Ken Ray
Shari,

Try:

-- assumes 'streetStack' is the full filename to the stack
lock messages
open inv stack streetStack
put the gVersion of stack streetStack into origStack
close stack streetStack -- make sure destroyStack/destroywindow are true
delete file streetStack
save stack newGold as streetStack

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

- Original Message -
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 9:33 AM
Subject: Re: Save stack as...


 Tried turning the lock messages off, as a test.  Now it retrieves the
 correct info.  But we're back to the purge dialog, and opening the
 stack.

 This is really peeving me!  It should be so blasted simple.

 


 # see which stack is newer version, replace if necessary, delete oldest
version
lock screen
# lock messages
# put word 3 of line 1 of the script of stack streetStack into
origStack
put the gVersion of stack streetStack into origStack
close stack streetStack
wait for messages
# put word 3 of line 1 of the script of stack newGold into installStack
put the gVersion of stack newGold into installStack
close stack newGold
wait for messages
set the lockMessages to false
unlock screen

wait for messages
answer installStack  origStack
exit to top
 --
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-12 Thread Shari
Try:

-- assumes 'streetStack' is the full filename to the stack
lock messages
open inv stack streetStack
put the gVersion of stack streetStack into origStack
close stack streetStack -- make sure destroyStack/destroywindow are true
delete file streetStack
save stack newGold as streetStack

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/



Didn't quite do it but it gave me ideas to try.  My next programming 
day is Wednesday, so I'll be quiet for a few days :-)

I did solve a biggie today :-)  One of my beta testers for Phase I 
reported that nothing worked.  Talk about a bummer.  And on my 
birthday of all days.

He was testing on OSX and my first thought was, oh man, you mean it 
doesn't work on OSX??

But he tried the Classic version and got the same result (bigger 
bummer, you mean it only works on MY computer)

But it turned out to be a very small bug.  An option he chose that 
put 0 into a variable that should have been a very large number.

He figured it out on his own, to uncheck that option, and now he's 
happily testing away :-)

Interesting that my best luck with beta testers always come from my 
Macintosh Users Group.  So far I've gotten not one word of feedback 
from the beta testers who surfed into my website and applied.

I'm sitting on the Windows version until I know all is well with the 
Mac version.  Decided it's better to get one of them out the door, 
and THEN take time for the other one.

Current project (streetStack etc.) is a plug in for Phase I.  An 
addition.  Rather than trusting people to install the newer stacks 
(they may have a combination, where this stack is newer but that one 
is older), I'm creating an installer button that deletes the oldest 
stacks and replaces with the newest ones.

Well I'm off to celebrate my birthday :-)

Shari C



--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Save stack as...

2002-10-12 Thread Shari
Not quite there, but figured something out (birthday postponed an 
hour or so more... the fella is still at work and they won't let go 
of him).

As both stacks have the same name, they are the same stack with a few 
minor changes, so they are versioned differently...

I tried setting the name of one of the stacks to something else, 
before retrieving the script, and that seems to have prevented the 
purge dialog.  The purge dialog was causing the second stack to open, 
visibly, regardless of lock screen, invisible, etc.

So I think we're on our way to a solution...

--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Save stack as...

2002-10-12 Thread Ken Ray
Happy Birthday, Shari!  Have a great one...

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

- Original Message - 
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 12:38 PM
Subject: Re: Save stack as...


 Try:
 
 -- assumes 'streetStack' is the full filename to the stack
 lock messages
 open inv stack streetStack
 put the gVersion of stack streetStack into origStack
 close stack streetStack -- make sure destroyStack/destroywindow are true
 delete file streetStack
 save stack newGold as streetStack
 
 Ken Ray
 Sons of Thunder Software
 Email: [EMAIL PROTECTED]
 Web Site: http://www.sonsothunder.com/
 
 
 Didn't quite do it but it gave me ideas to try.  My next programming 
 day is Wednesday, so I'll be quiet for a few days :-)
 
 I did solve a biggie today :-)  One of my beta testers for Phase I 
 reported that nothing worked.  Talk about a bummer.  And on my 
 birthday of all days.
 
 He was testing on OSX and my first thought was, oh man, you mean it 
 doesn't work on OSX??
 
 But he tried the Classic version and got the same result (bigger 
 bummer, you mean it only works on MY computer)
 
 But it turned out to be a very small bug.  An option he chose that 
 put 0 into a variable that should have been a very large number.
 
 He figured it out on his own, to uncheck that option, and now he's 
 happily testing away :-)
 
 Interesting that my best luck with beta testers always come from my 
 Macintosh Users Group.  So far I've gotten not one word of feedback 
 from the beta testers who surfed into my website and applied.
 
 I'm sitting on the Windows version until I know all is well with the 
 Mac version.  Decided it's better to get one of them out the door, 
 and THEN take time for the other one.
 
 Current project (streetStack etc.) is a plug in for Phase I.  An 
 addition.  Rather than trusting people to install the newer stacks 
 (they may have a combination, where this stack is newer but that one 
 is older), I'm creating an installer button that deletes the oldest 
 stacks and replaces with the newest ones.
 
 Well I'm off to celebrate my birthday :-)
 
 Shari C
 
 
 
 -- 
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard
 
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Save stack as...

2002-10-11 Thread Shari
The goal:

To replace a stack that exists, with a newer version of the same stack.

The full filepaths to the stacks are in the variables, and the stacks 
are in different directories.

delete file origStack
save stack newerStack as origStack
delete file newerStack

This prompts the a stack exists, do you want to purge or save 
dialog.  Even though the stacks were all originally closed.  How do I 
bypass the dialog?   I don't want to open the stacks.  I simply want 
to replace file origStack with file newerStack, deleting the unneeded 
copies.  And do this behind the scenes.

Anybody?


--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Save stack as...

2002-10-11 Thread Ken Ray
Shari,

You need to make sure the destroyStack and destroyWindow of the stack is set
to true. This way it should purge itself as soon as it's closed.

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

- Original Message -
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 6:57 PM
Subject: Save stack as...


 The goal:

 To replace a stack that exists, with a newer version of the same stack.

 The full filepaths to the stacks are in the variables, and the stacks
 are in different directories.

 delete file origStack
 save stack newerStack as origStack
 delete file newerStack

 This prompts the a stack exists, do you want to purge or save
 dialog.  Even though the stacks were all originally closed.  How do I
 bypass the dialog?   I don't want to open the stacks.  I simply want
 to replace file origStack with file newerStack, deleting the unneeded
 copies.  And do this behind the scenes.

 Anybody?


 --
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-11 Thread Phil Davis
What happens if you:
  set the destroyStack of stack origStack to true
  close stack origStack
  wait for messages -- to assure that the mem-resident copy was destroyed
  delete file origStack
  save stack newerStack as origStack
  delete file newerStack

??

Phil

- Original Message - 
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 4:57 PM
Subject: Save stack as...


 The goal:
 
 To replace a stack that exists, with a newer version of the same stack.
 
 The full filepaths to the stacks are in the variables, and the stacks 
 are in different directories.
 
 delete file origStack
 save stack newerStack as origStack
 delete file newerStack
 
 This prompts the a stack exists, do you want to purge or save 
 dialog.  Even though the stacks were all originally closed.  How do I 
 bypass the dialog?   I don't want to open the stacks.  I simply want 
 to replace file origStack with file newerStack, deleting the unneeded 
 copies.  And do this behind the scenes.
 
 Anybody?
 
 
 -- 
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-11 Thread Shari
Shari,

You need to make sure the destroyStack and destroyWindow of the stack is set
to true. This way it should purge itself as soon as it's closed.

Ken Ray


They are.  Both boxes in the stack object dialog are checked.
--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Confirming a Save command

2002-09-17 Thread Shari

I've tested this procedure out, and have found that on the Macintosh
platform, if the stack being saved is locked, the save command produces a
copy of the stack with the same name and followed by a tilde.  One also
gets a message in the result variable which says Can't open stack file.
If you save a second time, the message in result is Can't open stack
backup file.

If it's the wording that bothers you, you can go into the Metacard 
Menu Bar stacks and change the wording.  I did that with the Save 
dialog stack, to use File instead of Stack.  I have not used it in a 
standalone yet, but it works fine in development mode.

Then just make sure to embed/import that stack into your project.

Also, my current project has a save file.  This file is critical to 
the program.  It reads the file on launch, pulls out a bunch of 
information such as user preferences, high scores, etc. and puts them 
into the program, since a standalone cannot remember.  The program 
saves to this file often, behind the scenes.  If the file gets 
mangled, the program will follow.

So I have a set of data on card 2 of the save stack, a set of 
default information.  When it launches, it checks the status of the 
saved data on card 1.  Making sure numbers are numbers, if there are 
supposed to be 5 items, there are.  If a value is supposed to be A or 
B, it is one of them.  And if this check fails, the stack will pull 
the default data from card 2, which doesn't change, put it into 
card 1, and launch in default mode.  The user will have to reset 
preferences and create new high scores, but at least they won't have 
to reinstall the program, if the data gets mangled.

Shari C
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Save As protocol

2002-01-20 Thread Sivakatirswami

on 1/20/02 7:07 AM, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:

 My 
 current copy is always named someProgramName.mc, while the copies are
 someProgramName-2.mc, someProgramName-3.mc etc.  Those number don't
 mean anything at all, except to show that they are copies of the
 original, in case I ball up the original.  But the original, I want
 to keep working in, and just save copies as I go, for safekeeping.

Having worked in a professional editorial environment for 30 years, where
numerous galleys (previous versions)  of any given document must be
maintained for safety sake and revision control, I want to affirm the
above... PLEASE don't change it... the current Mac way of implementing
Save As means that you end up in a new document and the old document as
it was disappears. This has bitten our editors more than once, where the
current document gets corrupted and there is no file on disc with the latest
revisions. To overcome this we have a policy that before you start work on a
new document you should make a copy of it... name it with a new revision
number and continue working in the original...this is a big nuisance. And a
lot of grief would be saved if Quark Express did it the Metacard/Rev way.

 

Om shanti,
Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Read The Master Course Lesson of the Day at
http://www.gurudeva.org/lesson.shtml

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: save

2002-01-09 Thread jbv



Phil Davis :

 (To test it, you could add a beep or 'put CLOSING ' statement in the handler and 
see if anything new happens upon close.)

Although it's a clever suggestion, I find it quite funny (and refreshing) that ppl
use statements as simple as beep to check if anything happens...
Jus like in good old  early days of Hypercard...

JB

P.S. : I do that myself quite often, and it's one of the best debugging tool I know...

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



save

2002-01-08 Thread MMessieh

New data placed in my MC standalone is not saved despite placing on 
closestack save this stack end closestack placed in the stack script
Any ideas?
mike
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: save

2002-01-08 Thread Phil Davis

Have you verified that the script is in fact being executed? Maybe there's another 
'closeStack' handler somewhere along the message path? (To test it, you could add a 
beep or 'put CLOSING ' statement in the handler and see if anything new happens 
upon close.)

Another possibility: have you verified that 'this stack' is the stack you think it is? 
To test, you could add put the name of this stack in the handler.

Hope this helps.

Phil


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 1:36 PM
Subject: save


 New data placed in my MC standalone is not saved despite placing on 
 closestack save this stack end closestack placed in the stack script
 Any ideas?
 mike
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard