Forum Discussion

tim_faron's avatar
tim_faron
Contributor
11 years ago

adding method to a object

Hi,



So in my .NET application we use lots of DevExpress controls and are plugged into a 3rd party application.



For many of the DevExpress controls I have found great information from SmartBear and forums when a method does not exist or is not working .



A problem I am running into is having to make some functions to handle actions on certain object and I would like to be able to just add a method.. 



For my development I am trying to stay away from NameMapping an using Sys.Process and Find to get objects..



Here is one common scenario:

In my product we have a button of type: VMware.CustomControls.ButtonEx



I can click, getCaption, but one thing I cannot get is weather the button is pressed/Active ... 

I found a property 'State_3' which displays what i need ... 



So i created a function 'getState' which polls the property, manipulates and returns true or false.

Say i call this function 'isItPressed()'



I Want to be able to do the follwing:

var x = MyObj.IsItPressed();



How do i go about doing this

























1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Tim,


     


    I found out that you submitted this question on SQAforums: here.


     


    There are several replies there. Can you sum up the discussion and post here the approach you are going to use?