Good code samples, guys. But Ben should know (and probably does) that this will NOT work in a standalone since stacks in standalones can't be updated. (Well, of course what I mean is that it can't be used in a stack in a standalone if that stack is included/embedded in the app.)

Dan

On Feb 4, 2005, at 5:59 AM, Mark Smith wrote:


On 4 Feb 2005, at 04:59, [EMAIL PROTECTED] wrote:

on saveArray

   global gBigArray

   -- target a specific custom property set
   set the customPropertySet of stack "allMyArrays" to "uBigArray"

   -- replace all elements of 'uBigArray' CPS with 'gBigArray'
   set the customProperties of stack "allMyArrays" to gBigArray

   -- save it
   save stack "allMyArrays"

end saveArray

In fact, it isn't necessary to set the the customPropertySet if you don't need to access elements of it directly. If you simply want to store an array you can do this:


on saveArray tMyArray
set the customProperties["storedArray1"] of this stack to tMyArray
end saveArray

to retrieve:

function getArray
put the customProperties["storedArray1"] of this stack into tMyArray
return tMyArray
end getArray

you can store as many arrays as you like this way, as customPropertySets are creatable and accessible using the above array notation.
--


cheers,

Mark

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to