setProp and Lock messages

Todd Geist todd at geistinteractive.com
Sat Dec 3 17:42:09 EST 2011


yeah I get it now.  But I really prefer the property driven code syntax.
Plus in my current experiments I am try to use buttons and behaviors to
simulate code only Objects.

   //creates a new database object. just a button with a behavior.

   put defineDatabase( \

         "Contacts", \

         tServer, \

         tAccount, \

         tPassword, \

         ) into tDatabase // this var now has the object ref of the New
Object



    // nice property driven syntax

   get the cVersion of tDatabase



   // vs accessors

   dispatch function "getVersion" to tDatabase

   get the result



   // although I need to use this anyway for commands

   dispatch "Command" to tDatabase with pData

   get the result


But I like all of these more than the alternative of using accessors on
library stacks with name spaced accessors

   db_Contacts_getVersion

   // or

   db_getVersion("Contacts")


Although this is a lot less typing, I just don't care for it. Maybe I am
stupid...

On Sat, Dec 3, 2011 at 1:53 PM, Richard Gaskin
<ambassador at fourthworld.com>wrote:
>
>
> I just use accessor handlers.  Nothing fancy, just explicit calls to
> commands and functions to get and set values and trigger other behaviors
> where once upon a time I might have used getProp/setProp.
>
> Extra bonus points: it often requires less typing as well. :)

-- 
Todd Geist


(805) 419-9382



More information about the use-livecode mailing list