Title: Re: Custom Properties anyone?
I'll have a quick go -:)

Custom properties are arranged in sets, each set is effectively an array which you can store name:value pairs in. In fact I often use this feature to save and retrieve arrays that scripts generate for later use.

The method I use to deal with custom properties is to first think of them in the context of arrays of properties. There are short cuts and more direct syntax available but this gets confusing in my experience when you are starting off. Therefore if you want to retrieve the current property set as an array use:

   put the customProperties of someObject into propertyArray

You can then manipulate that array as you want:

   put "Hello" into propertyArray[somePropertyName]
   delete propertyArray[propertyYouDontNeedAnymore]

And finally "save" or rather set the property array for the object:

   set the customProperties of someObject to propertyArray

The final feature which can cause initial confusing is the ability to attach different sets of custom properties to objcts. By default, when you start to "get" and "set" the customProperties of an object you are manipulating the "empty" custom property set - that is the custom property set that has no name, or more precisely the custom property set which has the name value: "", or empty.

You only need to use this feature if you need to store more than one set of properties (ie more than one named array) of an object. You do this simply by using the syntax:

   set the customPropertySet of someObject to "Whatever I want to call the set"

You can then use the same syntax as above for the new sustom property set that you have now made "active":

   put the customProperties of someObject into propertyArray

   put "Hello" into propertyArray[somePropertyName]delete

   propertyArray[propertyYouDontNeedAnymore]

   set the customProperties of someObject to propertyArray

You can then set the custom property set back to the default empty set if you want by using:

   set the customPropertySet of someObject to ""

There are a few quirks (as always) with the Starter Kit interface, but the language works a treat. Hope this helps, and that I haven't made any mistakes in the syntax myself,

David
   

From: "MisterX" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Wed, 21 Mar 2001 06:52:28 +0100
To: [EMAIL PROTECTED]
Subject: RE: Custom Properties anyone?


does someone know how to change the propertyset of a custompropertykey?

having troubles in this department too...
but it seems so promissing!

cheers,
Xavier

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Blair Moxon
Sent: Tuesday, March 20, 2001 10:29 PM
To: [EMAIL PROTECTED]
Subject: Custom Properties anyone?


Within the past year or so, someone submitted a great posting that explained how to use the "Custom Properties" feature in MC. This was the first time I actually understood what those two empty unlabelled fields were all about! Anyway I seem to have lost it and cannot find the posting in the mail archives.

If anyone has it could they repost it please?
Thanks,
Blair



Reply via email to