Hello,
I need to store references to interfaces in a list so that when the user
selects a list item I can easily access the interface that relates to
that item. I've been casting the interface as a pointer and adding it as
the list items object. Now when I try to retrieve it I try to cast it
back and the compiler moans that you cant cast a TObject to an
interface. I tried casting it to a pointer first and then to the
interface type which the compiler likes (see code below). The problem I
have then is that when the code runs, when the following line runs it
throws an exception. My question is, Is there a better way to do what I
need to do and what is causing the problem with this code. I must say
that I'm not 100% when it comes to interfaces.
Item := IJanusDataSourceItem (pointer (ListItemObject)) ;
This email is intended solely for the person to whom it is addressed and may
contain confidential or legally privileged information. If you are not the
intended recipient, be advised that you have received this email in error and
that any use, dissemination, forwarding, printing or copying of this email is
strictly prohibited. Please notify the author by replying to this email and
destroying all copies of the email and attachments. Access to this email by
anyone else is unauthorised.
Email may be susceptible to data corruption, interception, unauthorised
amendment, viruses and delays or the consequences thereof. Any views or opinions
presented are solely those of the author and do not necessarily represent those
of Grosvenor Technology Ltd.
Grosvenor Technology Ltd. (incorp. Newmark Technology Ltd.) is a company
registered in England with company number 2412554.
The Grosvenor Technology Ltd. Registered Office address is Millars Three,
Southmill Road, Bishop's Stortford, Herts, CM23
[Non-text portions of this message have been removed]