[Vala] What is the internal access specification (Re: A couple of Vala questions)



On 01/29/18 07:31, Nor Jaidi Tuah wrote:

b) I can't make out any difference between GTK.Window and

GTK.ApplicationWindow. Should an application's window derive from

GTK.Window or from GTK.ApplicationWindow? They both seem to work

perfectly same.

If you're using Gtk.Application, the official doc recommends
Gtk.ApplicationWindow even though Gtk.Window also works.

https://developer.gnome.org/gtk3/stable/GtkApplicationWindow.html


Nice day
Nor Jaidi Tuah

Hi Nor,

Thanks for replying to the original query. I had guessed pretty much the same -- use ApplicationWindow for an application's main window, and Window for other windows.

That leaves me struggling with the new access specifier that has popped up in Vala - internal. The official doc says internal means the member won't be available in the public API. That's pretty confusing. I can always declare a constructor as internal, and access it from static main(), which I suppose can only use the public API.

Does 'internal' hook into the Vala package system, meaning internal members cannot be accessed from a different package ?

--
Tx and Regards,

Manish Jain


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]