[Gambas-user] "Proxy" for any class
Bruce
adamnt42 at gmail.com
Mon Feb 22 11:58:39 CET 2021
On 25/11/18 2:49 pm, Bruce wrote:
> Is there a way for any normal class to declare a "Proxy" for itself like
> UI classes can?
>
> I have a heirachical set of classes, each of which has an event
> "UIMessage" the intent of which is to pass status messages back up the
> chain. At the moment I have to re-raise events from lower level classes
> as this levels own "UIMessage".
>
> This is based on the wiki statement "When a control has a proxy, it will
> duplicate all mouse and keyboard events of the proxy for itself. I.e.,
> if the proxy raises a KeyPress event, then the control will raise it too."
>
> tia
> Bruce
(Found this now I have text-to-speech working on tmy mail!)
The simplest way I found to achieve this is via a Module.It can be as
simple or complex as you wish but needs methods to add messages, status
codes etc. Then evryone up and down the call chain can see or use the
messages as tehy will.
For example to raise a message MMsgChain.Add("some text")
regards
bruce (via Joanne)
More information about the User
mailing list