Forum Discussion

Cipherlad's avatar
15 years ago

Difficulty getting property values of a TPanel

I'm creating a C# test for a Connected Application.  I'm trying to read the property values of a TPanel object, but am consistently getting the following error:



Delegate 'VarDelegate' does not take 2 arguments



...when I try to run...



var obj = Connect.Aliases["MyProject"]["MyApp"]["MainForm"]["MyTPanel"];

bool result = Connect.aqObject["GetPropertyValue"](obj, "Enabled");



Obviously not verbatim, but these are the objects and the methods I'm using.  I've tried several things, including casting the result.  I can call GetPropertyValue for Static objects, and call methods on the TPanel. 



Calling:



obj["PropertyExists"]("Enabled")



...gives a similar error.

1 Reply


  • Hello Random,





    I have reproduced the problem and registered it in our DB - we will investigate it and let you know our results. 





    Currently,  try calling the object properties directly:

    var obj = Connect.Aliases["MyProject"]["MyApp"]["MainForm"]["MyTPanel"];

    bool result = obj["Enabled"];





    Please let us know whether this helps.