[MacRuby-devel] Objective-c Class -> methods
András Zalavári
zalavariandris at gmail.com
Sun Nov 21 09:55:28 PST 2010
Hi there!
I'm having problems of getting a list of methods from Classes, declared in
Objective-C.
I have a class compiled, and fully working, look like this:
// Vector.h
@interface Vector : NSObject {
float x,y,z;
}
@property float x,y,z;
@property float length;
@end
// Vector.m
@implementation Vector
@synthesize x,y,z;
-(Vector*)vectorByAdd:(Vector*)vector{
Vector* newVector=[[Vector new] autorelease];
newVector.x=self.x+vector.x;
newVector.y=self.y+vector.y;
newVector.z=self.z+vector.z;
return newVector;
}
[...]
@end
when I call the ruby method :methods on a Vector, it returns the methods of
an Object class, and I cant get neither the accesors of the x,y,z property, nor
the other methods appears
Once I read something about how to get the obj-c methods, but I couldn-t
find it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101121/4de48405/attachment.html>
More information about the MacRuby-devel
mailing list