[Gambas-user] method $load , any wiki for explain it ?
zainudin ahmad
author.ilmi at ...626...
Mon Jun 6 18:50:20 CEST 2016
> This is a (very) hidden method added by ...
a good explanation, thanks.
> In any case, you should be fine if you follow a sensible naming scheme :^)
Private $sAddress as String ($ -> private variable class, s -> String,
Address -> Variable Name)
Private $lOad as Long ($ -> private variable class, l -> Long, Oad
-> Variable Name)
:)
On Mon, Jun 6, 2016 at 4:10 AM, Tobias Boege <taboege at ...626...> wrote:
> On Mon, 06 Jun 2016, zainudin ahmad wrote:
> > > Is this what you are looking for?
> >
> > No
> >
> > doing : $ gbc3 -v /tmp/test
> >
> > the project contain Main form (without any code). I get the result :
> >
> > ------------------------------------------------------------------------
> > Compiling Main.class...
> > Inherits Form
> >
> >
> > Private Sub {$load}() << (what I mean)
> >
> > With Me
> > .MoveScaled(0,0,64,64)
> > End With
> >
> > End
> >
> > Adding class Form Unused Exported
> >
> > Switching class Form to Used
> > CLASS Main
> > CLASS INHERITS Form
> >
> > Static size : 0 octets
> > Dynamic size : 0 octets
> >
> > Private Procedure $load()
> >
> > Compiling @init()...
> >
> > 0000 : 1000 RETURN (0)
> >
> > Compiling @new()...
> >
> > 0000 : B802 PUSH FUNCTION $load
> > 0001 : 1C00 CALL (0)
> > 0002 : 1A01 DROP (1)
> > 0003 : 1000 RETURN (0)
> >
> > Compiling $load()...
> >
> > 0000 : 1500 PUSH ME
> > 0001 : 0E00 POP CTRL 0
> > 0002 : 0100 PUSH LOCAL 0
> > 0003 : 0400 0000 PUSH UNKNOWN MoveScaled
> > 0005 : F000 PUSH QUICK 0
> > 0006 : F000 PUSH QUICK 0
> > 0007 : F040 PUSH QUICK 64
> > 0008 : F040 PUSH QUICK 64
> > 0009 : 1C04 CALL (4)
> > 0010 : 1A01 DROP (1)
> > 0011 : 1002 RETURN (2)
> >
> > 0 local(s) 1 control(s) 6 stack
> >
> > OK
> >
>
> This is a (very) hidden method added by the compiler when it processes
> Form files. As you can see, it is automatically called first thing in the
> constructor and is responsible for creating and initialising all the
> controls inside the form and setting the form's properties. It basically
> applies all the things you did in the IDE's graphical form editor.
>
> I doubt it is documented anywhere, but the function name is hardcoded into
> the compiler. I also don't know off the top of my head if there are other
> hidden functions like this. In any case, you should be fine if you follow
> a sensible naming scheme :^)
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> 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