Custom Properties

Mark Smith mark at maseurope.net
Wed Apr 12 14:31:41 EDT 2006


One example, that reformats an addition to a custom prop containing  
some data might be

setProp someData aValue
  set the someData of me to the someData of me & reformat(aValue)
end someData

similarly, to ensure that you only ever get a formatted version of a  
custom prop

getProp someValue
   return format("%8.2f",the someValue of me)
end someValue

You can also use them to create dummy custom props:

getProp Area
  return the width of me * the height of me
end Area

so you can now script : get the Area of fld 1


I'm sure other people have lots of other uses....

Best,

Mark


On 12 Apr 2006, at 18:44, Thomas McGrath III wrote:

> Does anyone have any examples on the get/setProps in real usage? I  
> have been using custom props but not the setProp etc. I would love  
> some more insightful ideas on it's usage.
>
> Thanks
>
> Tom
>
>
> On Apr 11, 2006, at 3:41 PM, Devin Asay wrote:
>
>>
>> On Apr 11, 2006, at 1:14 PM, Dan Shafer wrote:
>>
>>> Cutom Properties were one of the primary features of Rev that  
>>> attracted me
>>> back into the xTalk fold. They are immensely powerful. Even my  
>>> eBook (thanks
>>> for the plug, Scott!) only scratches the surface. Every time I  
>>> find a new
>>> use for one of these puppies I get more astonished.
>>>
>>> Example: You can put a complete binary file into a custom prop  
>>> and ship it
>>> as a single unit. That's how I embed the PDFs in my SmartEBooks. So
>>> convenient. SO fast.
>>
>> I had the same reaction when I finally "got" custom properties. My  
>> favorite recent discovery is the setProp structure. Any time some  
>> obscure handler in my project changes a property's value all I  
>> have to do is include a setProp structure to tell my stack what's  
>> supposed to happen. So often we HyperCard refugees have long- 
>> ingrained habits for working around issues, and all of a sudden we  
>> discover extremely powerful elements of Transcript--oops, I mean  
>> Revolution, I mean the scripting language formerly known as  
>> Transcript-- that transform our scripting lives.
>>
>> Devin
>>
>> Devin Asay
>> Humanities Technology and Research Support Center
>> Brigham Young University
>>
>> _______________________________________________
>> 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
>
> Thomas J McGrath III
> 3mcgrath at adelphia.net
>
> Lazy River Software™ - http://www.lazyriversoftware.com
>
> Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html
>
> Meeting Wear™ - http://www.cafepress.com/meetingwear
>
> Semantic Compaction Systems - http://www.minspeak.com
>
> SCIconics, LLC - http://www.sciconics.com/sciindex.html
>
>
>
>
>
>
>
> _______________________________________________
> 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




More information about the use-livecode mailing list