Re: How to store perl object in GObject's property?
- From: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
- To: Xi Yang <jiandingzhe msn com>
- Cc: gtk-perl-list gnome org
- Subject: Re: How to store perl object in GObject's property?
- Date: Thu, 15 Apr 2010 19:14:06 +0200
2010/4/15 Xi Yang
<jiandingzhe msn com>
For example:
###### in Extended.pm ######
package Extended;
use strict;
use test::Foo;
use Glib::Object::Subclass 'Goo::Canvas::Rect',
ÂÂÂ properties => [
ÂÂÂ ÂÂÂ Glib::ParamSpec->object(
ÂÂÂ ÂÂÂ ÂÂÂ 'foo','','',
ÂÂÂ ÂÂÂ ÂÂÂ 'Foo',
ÂÂÂ ÂÂÂ ÂÂÂ [qw/readable writable/]
ÂÂÂ ÂÂÂ )
ÂÂÂ ]
;
Glib::ParamSpec->object is for GObject and derivatives, since you just want to pass a pure perl object useÂGlib::ParamSpec->scalar ($name, $nick, $blurb, $flags) instead.
Â
--
Emmanuel Rodriguez
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]