Sunday, September 08, 2024

Using GnoclOption functions to Return Values for Customised Widget Options.

What to do...

Make changes to the widgetFunc function to enable the GnoclOption function for that option to return a value by setting the ret to point ot a TclObj.


/* this is a gnocl option handler ?? */

case GNOCL_CGET_NOTHANDLED: {

/* cget for gnocl options handled in option function
* the caveat here is that different widgets with the same option name may act differently,
* if this is the case, then would it be more practical to create specific option functions?
* (08/09/25)
*/

Tcl_Obj *ret = NULL;

options[idx2].func ( interp, &options[idx2], G_OBJECT ( area ), &ret );

Tcl_SetObjResult (interp, ret);

}




No comments: