[MacRuby-devel] MacRuby methods with external frameworks

Louis-Philippe default at spiralix.org
Thu Nov 4 09:44:37 PDT 2010


There are no non OO structure at all, at least I think...  One public Objc
class with 4 methods total.  Thats it.

and by the way, methods from foundation framework work:

>> framework "foundation"
=> true
>> base = NSURL.URLWithString("/usr/local/bin")
=> #<NSURL:0x2002b84a0>
>> myurl = NSURL.URLWithString("myapp/prefs", relativeToURL:base)
=> #<NSURL:0x2002aee40>

2010/11/4 Matt Aimonetti <mattaimonetti at gmail.com>

> I'm not really sure what's going on there and to be honest, I didn't check
> your code, but did you try to generate a BridgeSupport file to expose non OO
> structures?
>
> - Matt
>
> On Thu, Nov 4, 2010 at 9:05 AM, Louis-Philippe <default at spiralix.org>wrote:
>
>> Hi all,
>>
>> I have a funny problem,
>> I have a framework I created, ObjCHiredis<http://github.com/lp/ObjCHiredis>,
>> which works with MacRuby.  Except I can't use methods with more than one
>> arguments in it???
>> like:  ObjCHiredis.redis works fine but ObjCHiredis.redis("127.0.0.1",
>> on:6379) doesn't.  ???  I know from my methods are OK as my Framework test
>> suite, in Objective-C passes the test, and I tried it in an other
>> Objective-C runtime language, Nu, which handles it flawlessly.
>>
>> I first thought this problem was related to methods arguments overload,
>> but an other very unique method also does it:
>>
>> framework "ObjCHiredis"
>>
>> p redis = ObjCHiredis.alloc.init
>> p redis.connect("127.0.0.1", on:6379)
>>
>> => #<ObjCHiredis:0x2000d5c80>
>> => wrong number of arguments (2 for 0) (ArgumentError)
>>
>> I feel like the error must be mine... but it works elsewhere and I looked
>> everywhere for a solution inside my code without avail.
>>
>> thanks!
>>
>> L-P
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101104/d8648698/attachment-0001.html>


More information about the MacRuby-devel mailing list