I am attempting to make a self-contained search field using the MBS controls.
In the examples it shows that there are two classes used, CocoaControlMBS and a sub-classed CustomNSSearchFieldMBS. The sub-classed class uses its Action method to communicate with the application.
What I want to do is make the Action event available to the application from the CocoaControlMBS class. What I have done is created a new Class which inherits from CocoaControlMBS. In the new class’s GetView event I have placed the following code:
[code] intFld = new CustomNSSearchFieldMBS(0,0,me.Width,me.Height)
’ Various intFld settings made here
AddHandler intFld.Action, AddressOf DoIt
Return intFld
[/code]
I have added a new method to my new Class called ‘DoIt(sender As CustomNSSearchFieldMBS)’. Inside ‘DoIt’ is the following code:
RaiseEvent Action(sender.StringValue)
I have added an Event Definition of ‘Action’ to the Class.
I would have thought that the internal CustomNSSearchFieldMBS would now send its Action event to My class’s DoIt which, in turn, will send it to the Action event definition but nothing happens in a compiled test.
Any thoughts, please?