It seems like you are asking the wrong question.
the first thing you should check is MyProp is read only or read write
 
IDataSightVariable = interface
  function GetMyProp:string;
  procedure SetMyProp(Value:string);
  property MyProp:string read GetMyProp write SetMyProp;
end;
-----Original Message-----
From: Matthew Evans [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 28 January 2003 10:16 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Interface question

Hi all.

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