Inheritance and Custom Properties

Dick Kriesel dick.kriesel at
Wed Apr 22 20:18:19 EDT 2009

On 4/21/09 3:38 AM, "David Bovill" <david.bovill at> wrote:

> Actually you don't need to use "do' dick. One of the great things about
> custom properties is that you can do this:
> put "test_Prop" into myCustomPropvar
>> put the myCustomPropvar of btn 1
> You can also do this with params:  so in Dicks case
> put pCustomPropertySetName & "[" & quote & pCustomPropertyName & quote & "]
>> into myCustomPropvar
>> put the myCustomPropvar of tRevObject into tValue

The first suggestion works, but not the second.  The second works too after
removing both occurrences of "& quote."

Thanks for the suggestions, David.

The new, improved function follows.

-- Dick

function effectiveValue
   if pCustomPropertySetName is empty then
      put pCustomPropertyName into tProperty
      put pCustomPropertySetName & "[" & pCustomPropertyName & "]" into
   end if
   if pRevObject is empty then
      put long id of the target into tRevObject
      put long id of pRevObject into tRevObject
   end if
   lock messages
   repeat until tRevObject is empty
      put the tProperty of tRevObject into tValue
      if tValue is empty then
         if word 1 of tRevObject is "stack" then
            delete word 1 to 3 of tRevObject
            delete word 1 to 4 of tRevObject
         end if
         exit repeat
      end if
   end repeat
   unlock messages
   return tValue
end effectiveValue

More information about the use-livecode mailing list