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?
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?

See also discussion on a topic like "Clarification for the application of GVariant/Glib::Variant maybe types":

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".


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