inheriting any custom property
Dan Shafer
revdan at danshafer.com
Sat Sep 24 15:18:09 EDT 2005
Dick...
I like this a lot. I've added it to my Scripter's Scrapbook and will
find frequent use for it, I'm sure.
On Sep 23, 2005, at 3:03 PM, Dick Kriesel wrote:
> Here’s a function that (I think) lets any object inherit any custom
> property. It works for me, but does anyone see trouble with it?
>
> function effectiveValue pPropertyName
> put the long id of the target into tObject
> put "put the" && pPropertyName && "of tObject into tValue" into
> tStatement
> lock messages
> repeat until tObject is empty
> do tStatement
> if tValue is not empty then exit repeat
> if word 1 of tObject is "stack" then delete word 1 to 3 of tObject
> else delete word 1 to 4 of tObject
> end repeat
> unlock messages
> return tValue
> end effectiveValue
>
> As an example application, here's a getProp handler for
> uSampleProperty:
>
> getProp uSampleProperty
> return effectiveValue(param(0))
> end uSampleProperty
>
> Thanks in advance for your consideration...
>
> -- Dick
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Information Product Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
From http://www.shafermediastore.com/tech_main.html
More information about the use-livecode
mailing list