[Gambas-user] EXPORT and INHERITANCE

Benoit Minisini gambas at ...1...
Fri Sep 26 00:09:48 CEST 2008


On jeudi 25 septembre 2008, Kari Laine wrote:
> Hi,
>
> still learning gb.form
> What conceptual difference has the following
>
> FileView
> ----------------------------
> INHERITS UserControl
> EXPORT
> ----------------------------
>
> DirView
> ----------------------------
> EXPORT
> INHERITS UserControl
> ----------------------------

No difference.

>
> I noticed that _new is not called in DirView. But what's the real
> difference in these two cases?

Are you sure? _new() is always called when an object is created. The _new() 
calls follow an algorithm depicted in the "Gambas object model" wiki page.

>
> I also cannot still figure out how  Stock-classes   _get   function gets
> called. Does Gambas call it for some reason? If so how it knows to call
> it in Stock-class?

It is called from the C++ code of the GUI component by the Picture class. When 
you call Picture["icon:/XXX"], the Picture class calls Stock[] in return. 
There is one step more in gb.gtk, because GTK+ has an internal icon stock, 
whereas QT does not.

Why do you want to know that?

-- 
Benoit Minisini




More information about the User mailing list