object scripts

Dick Kriesel dick.kriesel at mail.com
Sun Feb 26 15:35:57 EST 2006


On 2/26/06 10:08 AM, "Mark Wieder" <mwieder at ahsoftware.net> wrote:

> Inheritance is actually fairly
> easy. The hard part is that scripts are associated with screen objects
> - you can't have objects that don't have screen representations.

Another approach distinguishes between Rev objects and domain objects, and
creates a Rev group for each domain object, with the new group's owner being
the domain object's class.  A domain class has a Rev group whose owner is
the superclass.  Then single inheritance, with inherited scripts, is nearly
free when one sends a message to any domain object's group.

A new stack, according to "Get Info" on OS X, takes 4KB on disk.  Adding
1000 groups makes the stack take 84KB.  That's 80 bytes per domain object.
On my 2GHz PowerMac, that takes 8 milliseconds per domain object.

Simple, cheap, and effective, right?

-- Dick





More information about the use-livecode mailing list