Forum: Ruby Gnome::CanvasItem.affine_absolute

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6afb1a1f7f5fc5fff8b898309c317945?d=identicon&s=25 FireAphis (Guest)
on 2007-07-30 09:22
(Received via mailing list)
Hello

I'm trying to assign an affine transformation to CanvasItem in my Ruby/
Gnome2 application. Apparently there is a method called
'affine_absolute' that I should use. The problem is that my ruby
doesn't recognize it. When I type 'Gnome::CanvasItem.methods' it isn't
in the list either. On the other hand when I google it I see this
method used by others. I checked the source code of the library
(http://sourceforge.krugle.com/files/cvs/cvs.source...
gnome2/ruby-gnome2/gnomecanvas/src/rbgnome-canvas-item.c) and the
method *is* defined there. I'm using the latest (0.16) release of the
library. Does anybody know what's wrong? Am I missing something?

Thanks

FireAphis
6afb1a1f7f5fc5fff8b898309c317945?d=identicon&s=25 FireAphis (Guest)
on 2007-07-30 15:51
(Received via mailing list)
On Jul 30, 10:16 am, FireAphis <FireAp...@gmail.com> wrote:
> method *is* defined there. I'm using the latest (0.16) release of the
> library. Does anybody know what's wrong? Am I missing something?
>
> Thanks
>
> FireAphis

As I suspected it was totally my mistake. I tried to see the method in
irb and used 'Gnome::CanvasItem.methods' for that. But
'affine_absolute' can be called only on instance so I should have used
'Gnome::CanvasItem.instance_methods'. For the same reason I had to
create an instance first and not to call
'Gnome::CanvasItem.affine_absolute'.

Silly me :)

FireAphis
This topic is locked and can not be replied to.