> > How do I use an Object property (declared as TObject) to do
> this? Do I
> > create my own class and put an integer field in it? Or use
> something like
> > this example in Delphi help, which casts things to TObjects
> and then later
> > casts them back to the appropriate type

> The above code assumes that pointer and integer are the same
> size... This is
> currently
> true but may not remain so...

While this is true, it is unlikely that a future version of Delphi would
introduce a pointer size that is smaller than an integer, so the above code
ought to work - in any case, you can always declare an explicit sized
integer (say 32-bits) and assume that future versions of Delphi will not
have pointer sizes less than 32-bits.

> It's still the best option
> available...

This I don't necessarily agree - it might be the best option for a quick and
dirty hack, but if I was to design the application, I would use an business
object model and make the combobox list a view of the data only - so your
business logic code is not dependent on the UI.

Regards,
Dennis.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to