It's been a while, but I've finally put the nastiness of planning, executing and getting caught for a double murder (whodunit theatre restaurant I organized) behind and am back looking at FreeCard. The most pressing question on my mind is one of how to support the various types of buttons and fields.
HyperCard subscribes to the "buttons with types" style, where there is one button class that has a type attribute which determines a huge amount of it's settings. This is actually pretty poor design as a popup button is really quite different to a push button. However, buttons like rectangle and shadow are really just rectangular push buttons with or without a shadow (shadow property set to true/false).
The way I'd like to do it in FreeCard is the types of buttons approach. So we'd have separate types of buttons that could be added - you could add a push button or a popup button and they would be different things rather than just changing depending on the type attribute. In terms of code, we'd have a base class "Button" which provides a bunch of useful code for anyone implementing new button types but it wouldn't be seen by the end user normally.
In terms of interface, you could fairly easily represent it either way you want, you could still use the same button tool interface that HyperCard has with the types of buttons approach, just the GUI would be hiding the way things actually worked.
A slightly bigger problem is the HyperCard syntax:
"get card button 1"
Button is now somewhat ambiguous since there are multiple classes that implement Button. This is definitely not insurmountable, a couple of ways I can think of to support this would be (all item programmer level, not visible to the user):
* Utilize and support inheritance, so the FreeCard engine would pay attention to the Java object inheritance structure of the item implementation. This way, anything that extends the Button class is applicable to the reference "button".
* Allow multiple item types to be recognized by the same HyperTalk type identifier, so all the different button types would report that they match the type identifier "button" (and "btn") and FreeCard would just respect that. We'll probably need to support this anyway just to avoid problems with type names clashing when there are a whole range of different third party items available.
Personally, I think the second option is the way to go.
Anyway, let me know if you see any issues with this approach.
Regards,
Adrian Sutton.
---------------------------------------------- Intencha "tomorrow's technology today" Ph: 38478913 0422236329 Suite 8/29 Oatland Crescent Holland Park West 4121 Australia QLD www.intencha.com
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ Freecard-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freecard-general