Hi Matthew,
 
Your Set_Items method is expecting a reference to an interface (IDataSightVariable).  You're passing it a string ('MyValue') in the example you gave.  The example you gave about creating an interface and setting the property values is therefore the expected behaviour.
 
Do you want to give a bit more code for us to have a look at?
 
Cheers,
 
Conor
   
-----Original Message-----
From: Matthew Evans [mailto:[EMAIL PROTECTED]]
 
Here's my problem, I have a property that returns an interface. The interface has several properties. I can read these properties fine showmessage(Items[i].MyProp); for example. However if I want to set said interface property I can't. Items[i].MyProp:= 'MyValue'; will not call the set method. So the only way I can set Interface values is first create an interface set the property values then assign it to the items list items[i]:= MyInterface;

Only been playing with these for a small amount of time and wondering how I should be going about this so I can read and write the interface properties right off the list? Any takers.

 

function Get_Items(Index: Integer): IDataSightVariable; safecall;

procedure Set_Items(Index: Integer; const Value: IDataSightVariable); safecall;

property Items[Index: Integer]: IDataSightVariable read Get_Items write Set_Items;

Reply via email to