Re: GLib/perl and GArray, GType
- From: Wouter Verhelst <wouter nixsys be>
- To: muppet <scott asofyet org>
- Cc: gtk-perl-list gnome org
- Subject: Re: GLib/perl and GArray, GType
- Date: Fri, 12 Dec 2008 14:04:50 +0100
On Fri, Dec 12, 2008 at 12:56:04AM -0500, muppet wrote:
On Dec 11, 2008, at 9:47 AM, Wouter Verhelst wrote:
On Thu, Dec 11, 2008 at 12:31:09AM -0500, muppet wrote:
Now, it's fairly easy for you to create a function that knows how to
convert an array of whatever, and create a typemap for that. Then
you
can use that all over the place in your own code.
Sounds like that could work. Having said that, I've not done much XS
code beyond this project, and since your code has generated all my
typemaps there (thanks, BTW), I wouldn't know where to start. Care to
give me a pointer? ;-)
Clue * clue_p = &a_big_clue;
[Okay, that was a horrible joke, i have to admit.]
I've been known to make worse ones :-)
[... thanks for the explanation; will look at it in more detail when I
have more time than now...]
I had knocked together a patch that implements this, but working the
kinks out of value coercion in the unit test expanded to fill all my
available time for the evening, which was about half an hour. :-(
I'll
try to get you a working patch later this week.
That'd be great, thanks; and if you don't make it this week, there's
no
rush -- I know what's going on, and this is (mostly) a hobby project
anyway.
I seem to be misunderstanding the GParamSpecGType docs when they talk
about how is_a_type works when it's G_TYPE_NONE. So, the unit test is a
bit incomplete, and i can't guarantee that this works as intended.
Please try it out and let me know what you think. The patch is against
SVN trunk HEAD, but should be easy to apply to a recent release -- not
much has actually changed in these parts.
Doesn't seem to work the way it should. When I do this:
$model->set("type" => "Nspos::Db::Order");
the warning message looks like this:
Glib-GObject-WARNING **: value "((gpointer) 0x1c)" of type `GType' is invalid or out of range for property
`type' of type `GType' at (...)
At least it's progress (it no longer talks about invalid numbers or
anything), but not quite there yet, I'd say.
(if you need anything further in order to debug this, please do ask)
--
Wouter Verhelst
NixSys BVBA
Louizastraat 14, 2800 Mechelen
T: +32 15 27 69 50 / F: +32 15 27 69 51 / M: +32 486 836 198
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]