Re: Single Point Property Creation/Assignment
Stephen, I took a little different approach to using custom properties and sets to avoid the use of the Do. I leave the default set as the normal operating mode and access a few "global" parameters in the normal way: get myParam of object I create sets to hold other sets of parameters, but I access them all using array notation: get the custSetArray[myParam] of object That way I can construct the name "myParam" directly without using a do command: get the custSetArray[varWithNameOfParam] of object Dennis On Aug 4, 2005, at 12:02 AM, Stephen Barncard wrote: Hi gang, I'm creating a central management system for settings using user properties. I want to use one central routine to access the preferences stack. To do that, I am working with a handler that creates and sets a custom property INSIDE a custom property set - all set at once. I got the below code to work. My question is -- is the use of 'do' the only or best way to accomplish the use of variables for assigning property names and data? Or am I missing the obvious? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Single Point Property Creation/Assignment
On Aug 3, 2005, at 10:03 PM, Ken Ray wrote: Well, as long as the variable holds a value, you don't need to use "do" for the *variable* part of it, i.e. this: put "Test" into tProp set the uPropSet[tProp] of this stack to "Hello" is the same as: put "Test" into tProp do "set the uPropSet[" & quote & tProp & quote & "] of this stack to" && quote & "Hello" & quote However you can't get away with it for property sets or values... so the only way to do this is with "do", as you've put in your email. Though you can't do something like this: put "uSet" into tSet put "uProp" into tProp set the tSet[tProp] of me to "test" You can do this: set the customPropertySet of me to tSet set the tProp of me to "test" -- Trevor DeVore Blue Mango Multimedia [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Single Point Property Creation/Assignment
On 8/3/05 11:02 PM, "Stephen Barncard" <[EMAIL PROTECTED]> wrote: > Hi gang, > I'm creating a central management system for settings using user properties. > I want to use one central routine to access the preferences stack. > > To do that, I am working with a handler that creates and sets a > custom property INSIDE a custom property set - all set at once. I got > the below code to work. > > My question is -- is the use of 'do' the only or best way to > accomplish the use of variables for assigning property names and > data? Or am I missing the obvious? Well, as long as the variable holds a value, you don't need to use "do" for the *variable* part of it, i.e. this: put "Test" into tProp set the uPropSet[tProp] of this stack to "Hello" is the same as: put "Test" into tProp do "set the uPropSet[" & quote & tProp & quote & "] of this stack to" && quote & "Hello" & quote However you can't get away with it for property sets or values... so the only way to do this is with "do", as you've put in your email. Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Single Point Property Creation/Assignment
Hi gang, I'm creating a central management system for settings using user properties. I want to use one central routine to access the preferences stack. To do that, I am working with a handler that creates and sets a custom property INSIDE a custom property set - all set at once. I got the below code to work. My question is -- is the use of 'do' the only or best way to accomplish the use of variables for assigning property names and data? Or am I missing the obvious? Would SetProp be better for this? any suggestions welcome... thanks on test -- beep 5 put "cats" into pPropSet put "kadiska" INTO pProp put "kitten" into pData put returnTheDefaultPrefsFileName() into pPath dataToProp pPropSet,pProp,pData,pPath end test on dataToProp pPropSet,pProp,pData,pPath if pPath is empty then put returnTheDefaultPrefsFileName() into pPath end if do "set the" && pPropSet & "[" & quote & pProp & quote & "] of stack " & quote & pPath & quote & " to " & pData end dataToProp function returnTheDefaultPrefsFileName put specialFolderPath("Preferences") into sfp put "/" & "preference.rev after sfp return sfp end returnTheDefaultPrefsFileName ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution