custom properties vs. RR IDE properties

Stephen Barncard stephenREVOLUTION at barncard.com
Sun May 14 16:24:58 EDT 2006


Tom,

setProp and Getprop work great. Just follow some rules about custom props:

don't name your custom property or setProp handler to the exact name 
of an existing object property. Ever.

Your pTest works because it is unique. Since a good part of Rev is a 
database itself, and all the keys are words, one need to watch out 
for this.

Rev no likeee one using 'visible' for a property name. Or 'Name'. or 'End'
same rule should apply to variables. use one's own prefixes and 
suffixes to differentiate. If your user needs to name custom props 
via dialog, make sure these names are not used. There's a rev call to 
get all the handler names.

set it to tVisible or MyVisible or ShmengieVisible, just not visible.

At 11:30 +0200 5/14/06, Ton Kuypers wrote:
>And I really need to know when a stack is visible,


also... 'get the visible of stack x' doesn't work for you?

regards,
sqb


>mmmm...
>
>and I thought I had it all figured out...
>
>Is there a way to use SETPROP to interact on setting properties like 
>hiding a window?
>
>I tried setting 2 properties :
>	ON mouseUp
>	    put empty into fld "Status1"
>	    put empty into fld "Status2"
>	    set the visible of stack "HideThis" to true
>	    set the pTest of stack "HideThis" to "Here I Am"
>	END mouseUp
>
>The stack "HideThis" contains the following scripts:
>	SETPROP visible newValue
>	    put newValue into fld "Status1"
>	END visible
>
>	SETPROP pTest newValue
>	    put newValue into fld "Status2"
>	END pTest
>
>After hiding and showing the stack, field "Status1" remains empty 
>while field "Status2" has got the text "Here I Am"
>
>And I really need to know when a stack is visible, I am working on 
>an app that is being used by another program that only can write 
>files to a harddisk or launch a program. At first I was thinking to 
>read the "in-file" every-time my app was launched, but this takes to 
>long. Now I want to read the "in-file" every-time my app is 
>re-launched but I'm stuck...
>
>Any help is welcome :-)
>
>
>Warm regards,
>
>Ton Kuypers

-- 
stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -



More information about the use-livecode mailing list