[Gambas-user] Super Events. Are they posible?

Jorge Carrión shordi at ...626...
Wed Feb 12 22:10:59 CET 2014


Oh, Fabien... I don't understand.
At the begining of the fMain class in a simple proyect with a textbox in
the fMain form. and a second form, Helpform, that  just contains a label.
I've declared this

Static Public Sub Application_Read()

    Dim f As Helpform

    If key.code = Key.F1 Then
        f = New Helpform
        f.showmodal
    Endif

End

But the Application_Read sub never is called....
I don't understand.
The doc on gambasdoc is not very clear. it's suppoused Application_Read
catch the Standard Input... ¿From the Shell? ¿From the keyboard? I don't
understand...
Is ask too much ask for a little example?
Thanks in advance.

Regards


2014-02-12 18:54 GMT+01:00 Fabien Bodard <gambas.fr at ...626...>:

> http://gambasdoc.org/help/comp/gb/application?v3
>
> These event handlers must be defined in the startup class as static
> methods to be taken into account by the interpreter.
>
> Application_ReadCatches data sent to the standard input.
>
> If that static method is defined in the project startup class, then
> the standard input is watched by the interpreter, and the method is
> called each time there is something to read on the standard input
>
>
> Static public Sub Application_Read()
>
>
>
> endif
>
> 2014-02-12 18:43 GMT+01:00 Jorge Carrión <shordi at ...626...>:
> > It's posible to raise a Super Event? ("Super" like in Superman, not in
> > oop).
> > I mean to create a Event that works in every part of the application.
> > I am developing a very large proyect with docens of forms and I've a form
> > calle HelpForm wich implements a Help system for the user sensible to
> last
> > control used for search help about it .
> >
> > What I want is a method like this
> >
> > Public sub SUPER_Key_Release( key as integer)
> >
> >  dim help as formHelp
> >
> >   if key.code=key.F1 then
> >        fHelp = new formHelp(lastcontrol)
> >        fHelp.show
> >   endif
> > end
> >
> >  Press F1 in whatever Form inside or outside of whatever control and get
> > acces to a FormHelp.
> >
> > In other words: a Event that I must declare only once in Application or,
> at
> > least, once in form and affect all controls.
> > It's posible to do somenthing like that?
> >
> > Thanks in advance.
> >
> > Regards
> >
> ------------------------------------------------------------------------------
> > Android apps run on BlackBerry 10
> > Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> > Now with support for Jelly Bean, Bluetooth, Mapview and more.
> > Get your Android app in front of a whole new audience.  Start now.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> --
> Fabien Bodard
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list