Calling a method to a Container to from another Container

I’m sure I’ve seen this topic and solution before but can not find it. And the AddHandler example is no help, for me.

I’m having difficult understanding how to use AddHandler.

I want to call “PopLB” method in “Container1” from an event in “Container2”, same window.

Any help would be appreciated.

Hello Jim,

please can you elaborate about what the AddHandler does not do for you?
It is something related to the syntax, on how to link the event handler or what else?

Regards.

[quote=199388:@Jim Smith]I want to call “PopLB” method in “Container1” from an event in “Container2”, same window.
[/quote]

Container1.PoplLB

should work from anywhere on the window…

I fail to see what you want to do with addHandler in that case.

OK. Let me start over, I don’t know that I need Addhandler.
Hope this makes sense.
Have a container: ccCGHistList which is embeded as ccCGHistList1 in win1.
Have a container: ccCGHist which is embeded as ccCGHist1 in win1.

At "Save button - action event in ccCGHist1, I want to call ccCGHistList1’s method PopLP. With line of code :

ccCGHistList.PopLB

I get a compile error:

Static reference to instance method: call this on an instance of class ccCGHistList
ccCGHistList.PopLB

I thought I needed AddHandler, but I don’t know.

replace this with:
ccCGHistList1.PopLB
and it should work. The instance is the same name with a ‘1’ added.

[quote=199413:@Andre Kuiper]ccCGHistList1.PopLB
and it should work. The instance is the same name with a ‘1’ added.[/quote]

Had to add (prefix) window name and works ok.

Thanks Andre and Michel.