[Gambas-user] calling back to the caller

Doriano Blengino doriano.blengino at ...1909...
Thu Mar 18 20:12:55 CET 2010


Charlie Reinl ha scritto:

>Salut,
>
>is it possible to run from a (gambas2) component, a Sub/Function of the
>component using the 'parent' program?
>
>Something parent.NewsFromMyComponent(TRUE) like I would do with public
>elements on a form: MyForm.NewsFromTheSecondForm(Me.Width)
>
>
>  
>
Mmm... it is really not clear what you want to do - anyway, I think you 
should use events: they are portable, clean and safe.

If, instead, you are writing a component which should be aware of other 
controls in the same form, or the same parent, without the intervention 
of the main program, you can travel the "Parent" property.

If you really want to peek & poke with fantasy, take a look at the 
Object and Class classes (don't remember the exact names). You can 
discover all the loaded classes, and invoke any method discovered at 
runtime. But it may be a bad idea...

If this does not help, give more information.

Regards,
Doriano






More information about the User mailing list