• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Persistence of Properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Persistence of Properties


  • Subject: Re: Persistence of Properties
  • From: Jolly Roger <email@hidden>
  • Date: Mon, 15 Oct 2001 15:02:13 -0500

On 10/15/2001 1:28 PM, "Paul Skinner" <email@hidden> wrote:

>> Is there a relatively easy way to specify that the properties are to be
>> saved in a file other than the script itself ? One way would be to loop
>> through the properties themselves, but I'm hoping for something simpler.

Hi Irwin,

I use Akua Sweets "save resource" command to store my properties in the
resource fork of a preferences file like so:

save resource allData in file plugDataFile of type "data" numbered 1

I use these Akua Sweets commands to make the file a preferences file:

set basicInfo to basic info for file plugDataFile
set the file creator of basicInfo to "hmmm" -- my creator code
set the file type of basicInfo to "pref" -- pref file type code
apply catalog info basicInfo to file plugDataFile

Then I retrieve the data from the file like so:

set allData to the resource of type "data" as list in file plugDataFile
numbered 1

To store multiple properties, just increment the resource number for each
property (save resource...numbered x, or the resource...numbered x). Another
way to store multiple properties would be to create a list to hold all of
the properties and then store the list into the resource. Whatever floats
your boat. ;)

HTH

JR


References: 
 >Re: Persistance of Properties (From: Paul Skinner <email@hidden>)

  • Prev by Date: Re: QTVRAS and Applescript
  • Next by Date: Re: Date weirdness from Finder
  • Previous by thread: Re: Persistance of Properties
  • Next by thread: Re: Persistance of Properties
  • Index(es):
    • Date
    • Thread