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

Reply via email to