Inheritance and Custom Properties
Richmond Mathewson
geradamas at yahoo.com
Wed Apr 15 05:22:47 EDT 2009
Yup, it's Richmond, 2-3 years behind the times :)
Well, to be honest, I've never really had the need of custom properties
before.
Reading the EXCELLENT RevolutionUsersGuide.pdf (and, by EXCELLENT, I mean
far better in many respects than the online Documentation) I find that
whether a property is inherited or not depends on mysterious decisions
taken 'on high', err, well, Edinburgh; or, decisions taken along time
ago by the oft-reviled Scott Rossi in MetaCard days.
--------------------------------------------------------------------
I know that heritable properties can be over-ridden;
What is unclear to me is if properties that are not normally inherited
can be set to be inherited.
--------------------------------------------------------------------
Now, I have started to learn about custom properties, not through any
real need for them, as all I need for the goofy content delivery programs
for my school I already know, but for intellectual stimulus (a bit short
of that teaching kids EFL).
So, I set up a stack with a card called 'WUN' and
a button called 'CusProp';
and typed this into the Message box:
set the porkNbeans of btn "CusProp" to 547
all very straightforward; and when I open the properties editor I can see
the custom property 'porkNbeans' quite clearly.
Decided to be clever and typed this into the Message box:
set the custardTart of card "WUN" to 99
same as the button: worked like a charm.
The made a field. and put this in the button 'CusProp':
on mouseUp
put "the porkNbeans of btn" && quote & "CusProp" & quote && "is" && the porkNbeans of me into line 1 of fld "Props"
put "the custardTart of btn" && quote & "CusProp" & quote && "is" && the custardTart of me into line 2 of fld "Props"
put " " into line 3 of fld "Props"
put "the custardTart of card" && quote & "WUN" & quote && "is" && the custardTart of card "WUN" into line 4 of fld "Props"
end mouseUp
and found that 'custardTart' of btn 'CusProp' is empty
(meaning it does not have a custom property 'custardTart')
so learnt that custom properties are not inherited (or, at least not
'custardTart').
--------------------------------------------------------------------
Is it possible to set up custom properties so that they can be inherited?
--------------------------------------------------------------------
sincerely, Richmond Mathewson.
____________________________________________________________
A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________
More information about the use-livecode
mailing list