How to store objects into a file

Jan Sælid janselid at broadpark.no
Tue Aug 1 12:08:23 EDT 2006


This is something I grabbed from my application. You can of course exchange
the functions doFile... with a mouseup handler or anything you want.

I don't know if this is good coding, but it works for me

on doFileSaveAs
  Create invisible stack "Scopy"
  copy button Yourbutton to stack "Scopy"
  ask file empty with "untitled"
  save stack "Scopy" as it
  delete stack "Scopy"
end doFileSaveAs

on doFileOpen
 answer file empty with filter "*.*"
 lock screen
 toplevel stack it
 copy button yourbutton to this stack 
 if there is a stack "Scopy" then delete stack "Scopy"
end doFileOpen


-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of KALANGI Vijay
BABU
Sent: 1. august 2006 17:57
To: use-revolution at lists.runrev.com
Subject: How to store objects into a file

            Hi all,

            This is Vijay. New entry into this mailing list!!! 

 

Can someone plzz suggest some way to store a complete object into a file and
then retrieve it again? 

 

            Not by actually saving each n every property of the object into
the file and recreating it again but by storing the object as a whole ...

            

 

Thanks in advance,

            Vijay

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list