Class and object's properties

Posted by alextrs on 24-Nov-2009 08:12

Hi Guys,

Is there in progress any statement or something to get all methods/properties(like OpenEdge Architect does) from class at run-time.

Thank you.

All Replies

Posted by Peter Judge on 24-Nov-2009 08:21

Is there in progress any statement or something to get all

methods/properties(like OpenEdge Architect does) from class at run-time.

Not at the moment.

-- peter

Posted by Peter Judge on 24-Nov-2009 08:41


Is there in progress any statement or something to get all

methods/properties(like OpenEdge Architect does) from class at run-time.

Not at the moment.

-- peter

This will probably make no difference to the answer, but for my own curiosity: I assumed you were asking about a listing of the (public? private?) members. And if so, what did you plan to do with it/them?

Thanks,

-- peter

Posted by alextrs on 24-Nov-2009 09:27

Yes, I need to know what public/private methods/properties are available in class.
reasons:
1) I use DYNAMIC-INVOKE statement for some processes and want to add to user rights add/delete/edit actions (for example for MouseClick in TreeView in .NET I want to allow user to change available actions like Add new/Delete/Edit/... but I want to show/check what methods are available in class before allow them to do this and also it's safer to know what methods are available in class before using DYNAMIC-INVOKE.
2) Also I want to use dynamically .NET interface and save to DB properties for elements like positions/size/... I think this option can help to do this (like get data from DB and then check that this parameter is still there and assign value).

P.S. I know that I can use properties and get list from them but I try to find easier/more flexible way

Posted by Admin on 24-Nov-2009 10:05

I'd rather use Interfaces:

ISupportsAdd, ISupportsDelete, ISupportsUpdate along with the TYPE-OF method.

DYNAMIC-INVOKE and so the need to query a classes methods does not exist in my understanding of good OO coding practices (my personal oppinion).

For .NET Objects, you may use the .NET reflection API to query class members and get/set properties and invoke methods.

This thread is closed