Donone
12-01-2007, 07:30 PM
This is a simple example of OOP using two classes, one calling the other, to produce a status bar with up to four built-in panels.
It is left without events and other accoutrements in order to be straightforward for use with the short introductory tutorial on OOP and Class for anybody who feels a need.
For a more in depth example with events see the earlier posted example of PathSprite.
I hope this proves useful for somebody who hasn't and wants to get off the ground, Classing.
The code is documented.
It has only been tested on the desktop because it is to demonstrate principles.
The other docs are in PDF and DOC format.[br]1196537414_231_FT0_oop_example.zip[br]1196537415_231_FT0_oop-docs.zip
This is intended to be a progressive series that builds up the Status Bar (but it could be anything) and indicate where earlier decisions will need changing in order to implement later adaptations.
The next version will modify the surface used and permit text to be added to any panel, this will require modifying the panel structure.
In doing so it will illustrate the golden rule that a Class must always be backwards compatible so as not to break any existing user programs. We can change the internals but the interface must remain the same except for additions.
It is left without events and other accoutrements in order to be straightforward for use with the short introductory tutorial on OOP and Class for anybody who feels a need.
For a more in depth example with events see the earlier posted example of PathSprite.
I hope this proves useful for somebody who hasn't and wants to get off the ground, Classing.
The code is documented.
It has only been tested on the desktop because it is to demonstrate principles.
The other docs are in PDF and DOC format.[br]1196537414_231_FT0_oop_example.zip[br]1196537415_231_FT0_oop-docs.zip
This is intended to be a progressive series that builds up the Status Bar (but it could be anything) and indicate where earlier decisions will need changing in order to implement later adaptations.
The next version will modify the surface used and permit text to be added to any panel, this will require modifying the panel structure.
In doing so it will illustrate the golden rule that a Class must always be backwards compatible so as not to break any existing user programs. We can change the internals but the interface must remain the same except for additions.