From: | Jean-Michel Forgeas |
Date: | 29 Aug 2000 at 19:28:54 |
Subject: | Re: AMIOPEN: TagLists (was: Object allocated on stack - init and/or open) |
From: Aaron Optimizer Digulla <digulla@hepe.com>, August 29, 2000 3:33 PM
> The problem is that TagLists are untyped
Well, I did my own taglist functions too, and because I agree with you I
reserved some bits of the ti_Tag field giving information about ti_Data :
- type1 : bool / byte / word / long / float / date / object
- type2 : number / string (of type1) / string array / pointer (to type1)
- signed or not
- ignore or not (one can tell "ignore it" without destructing the value)
- tmp (bit for client use)
- owner type : system / local / public
- buffer allocated (can be replaced, and to free when taglist is no more
needed)
Just to say that this has shown as being useful : it is the heart of OO (my
portable Objects Organizer inspired from BOOPSI, thanks to Jim Mackraz
(sp?)) around of which are classes for application, event handlers, gui, 2d,
3d, and sound.
Typed tags allows also automatic conversions (float <-> int) and nice string
comparaison (taking in account type, null pointers, and different addresses
with same text). This makes possible generic notification propagation
without programer intervention.
Even if this way of programming works for applications, I didn't ever think
that a whole system like Elate would be built. It is admirable. Nice to have
2 distinct methods for _new and init, and nice that the system handles the
dispatch method.
Best regards,
Jean-Michel Forgeas
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html