Thursday, June 04, 2015

Summary of Recent Progress

The current nightly build sees a range of enacements to Gnocl as a whole. A number of issues have been addressed as itemized in the extract from the NEWS document below. This nightly update sees the -name option taking on a greater role in the control of widgets. Ordinarily used for specifying ojects in a Gtk CSS file, or in a builder/glade XML file, using the name option will cause the interpretor to create a command for the widget using the string specified by the -name option. Ordinarily a widget instance would be created as follows:

set myButton [gnocl::button -text "Hello World"]

And modified with:

$myButton configure -onClicked { puts %w }

But now,  the following will produce similar results.

gnocl::button -text "Hell World" -name myButton

Modification can also be handled too,

myButton configure -onClicked {puts %w}

This approach provides a neat and efficient way of creating widgets as objects within namespaces. Using the same example the following could be used:

gnocl::button -text "Hell World" -name myprocs::myButton

The creation of widget with command names in this way does not eliminate the process of registering widgets with a unique id. Using the same example, to access this simply use:


and the widget id will be returned.

Substitution strings also unclude the %g and %w parameters to extract the (glade) name and w(idget-id) of the object.

New Extract

        o added extra percentage subtitution strings to -onPageAdded, -onPageRemoved
                %l page label
    gnocl::comboBox/comboEntry added new sub-commands: get, set, prepend, append, insert and remove.
    gnocl::box/hBox/vBox fixed problem with cget -children
    gnocl::window, gnocl::expander, gnocl::fontSelection, gnocl::gammaCurve,
    gnocl::curve, gnocl::handleBox, gnocl::level, gnocl::popupEntry, gnocl::recentChooser
        o added -name