[ANN] HOOT: Hacked Object Oriented Transcript
Geoff Canyon
gcanyon at inspiredlogic.com
Mon Feb 27 07:00:41 EST 2006
http://www.inspiredlogic.com/hoot/HOOT.html
Download: http://www.inspiredlogic.com/hoot/How%20It%20Works_files/
hoot.zip
Note this is a 0.1 release. In other words, it's a thought
experiment. Feel free to try it out and make comments or suggestions.
regards,
Geoff
From the rushed-together web page:
HOOT is a quick implementation of many of the features a true Object-
Oriented implementation would provide, using less than 50 lines of
Transcript. (I’m embarrassed at how simple it was to get this far.)
Revolution already provides:
•Encapsulation (understand that I am using these terms loosely. if
you think too loosely to make sense, let me know)
•Inheritance -- container based rather than class based
•Polymorphism
HOOT provides:
•Classes for objects
•Inheritance -- class-based, single inheritance, to any depth
•Class variables
HOOT To-Dos:
•Handle functions in classes
•Improve management of classes
How it works:
HOOT takes advantage of the container based inheritance that
Revolution provides, by representing your class hierarchy as a set of
nested groups on a card. Each group is named for the class it
represents. Groups are nested to make the enclosed group a subclass
of the group that contains it. Other properties of the groups: color,
size, position -- are irrelevant.
To start the library, mark the checkbox “Installed.” To disable,
click the checkbox to uncheck it.
Each group must have a custom property called uCustomHandlers that
contains a comma-based list of the handler messages the group will
define.
Each group’s script should contain the handlers it needs to do its
job. Note that native messages should be prefixed with an “x”:
“xMouseUp,xMouseDown,” etc.
Each group’s handlers should follow this format:
on xMouseUp pID
delete char -1 of pID
-- do the work here
end xMouseUp
More information about the use-livecode
mailing list