Hi Mathias,
On Apr 4, 2009, at 7:49 PM, Mathias Sulser wrote:
I started working on this. I have a failing test case and figured a
way to hook in the objc lookup inside the ivar_get function.
However, I haven't figured out how I can call
object_getInstanceVariable with an ROBJECT.. any hints
I started working on this. I have a failing test case and figured a
way to hook in the objc lookup inside the ivar_get function.
However, I haven't figured out how I can call
object_getInstanceVariable with an ROBJECT.. any hints appreciated.
Regards, Mathias
On 3 Apr 2009, at 19:29, Laurent
On Apr 1, 2009, at 8:07 AM, Benjamin Stiglitz wrote:
Is there a way to access instance variables defined in an
Objective-C
class from a Ruby extension?
It is currently not implemented, but it's technically possible. A
good work-around is to define accessors (properties) as John
mentione
Is there a way to access instance variables defined in an
Objective-C
class from a Ruby extension?
It is currently not implemented, but it's technically possible. A
good work-around is to define accessors (properties) as John
mentioned.
Maybe we need MacRuby::Runtime to bubble up the Obj
Accessors, it's s obvious (after you all pointed the way ;^)
Thanks,
Ed
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
In this case, you could use the KVC[1] (key-value coding) accessor
(#valueForKey:) to access the ivar.
class Example
def methodB
self.valueForKey("instVarB")
end
end
[1]:
http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/Compliant.html
Brian
On Mon, Mar
Hi John & Edward,
On Mar 30, 2009, at 11:27 AM, John Shea wrote:
Hello Edward,
well since no one else has answered i will speculate a bit (it might
provoke someone wiser).
I assume that the Ruby and the Objective C class are magically married
together perhaps via some sort of proxy class - si
Hello Edward,
well since no one else has answered i will speculate a bit (it might
provoke someone wiser).
I assume that the Ruby and the Objective C class are magically married
together perhaps via some sort of proxy class - since you cant as far
as i know add to an objective C class more instan
Is there a way to access instance variables defined in an Objective-C
class from a Ruby extension? I'm porting some of Apple's example code
to MacRuby as a learning experience and would like to do so
incrementally. Porting the code one class at a time works fine, but
for some of the large