Re: gperl_try_convert_enum() from perl

On 12.12.2009 23:54, Kevin Ryde wrote:
I wanted to check if GdkCursorType has the 'blank-cursor' value
available, new in 2.16 or some such.  Is there a perl-level interface to

I don't think there is.  How would such an interface look like?

I got the effect I wanted just by using blank-cursor with an eval to
catch when unavailable, but I thought it might be cleaner to enquire
what's available.  I know I can do Gtk2::Gdk::CursorType->list_values
and grep (and in fact I did that for some .t test code), but wondered
"why can't someone else do it" :-), when gperl_try_convert_enum is there

Both approaches seem perfectly fine to me. And checking for the availability of an enum value doesn't strike me as something you would want to do so often that it needs a short form.

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