Re: Function completion for GVariant maybe types?




How are you using variants?

I would like to achieve a mapping of nullable objects to indeterminate checkboxes for example.


What data structure are they stored in?

Candidate: template class "Gtk::TreeModelColumn"


Why are you using a 'maybe' type, as opposed to a GVariant * that may be NULL?

I would like to point out that a null pointer has got a different meaning in comparison to a specific object which was marked to contain "nothing" (representation for an "unknown" value). Such a nullable object can store valuable data type information, can't it?


https://bugzilla.gnome.org/review?bug=621677&attachment=205643
I don't see anything in that patch that has anything to do with variants.

You are right. - I could not introduce the affected feature so far because the class library "gtkmm" does not support nullable containers yet, does it?

http://developer.gnome.org/glibmm/2.34/classGlib_1_1VariantBase.html

See also discussion on a topic like "Clarification for the application of GVariant/Glib::Variant maybe types":
https://mail.gnome.org/archives/gtkmm-list/2011-October/msg00051.html
http://article.gmane.org/gmane.comp.gnome.gtkmm/25571


If you're dealing with GVariants that mean something to your code,
then your code should already know the right type.

I have got a different opinion for this design detail. I am also interested in generic programming for the design pattern "Model-View-Controller".
http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

Regards,
Markus


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