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
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@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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
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@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@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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Works for me on a recent trunk version. Which version are you on? Otherwise try trunk or a nightly build. Eloy On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@spiralix.org> wrote: Hi all,
I have a funny problem, I have a framework I created, 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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Oops, forgot to paste the result: % macirb irb(main):001:0> framework '/Users/eloy/Documents/DEVELOPMENT/MacRuby/ObjCHiredis/ObjCHiredis/build/Debug/ObjCHiredis.framework' => true irb(main):002:0> redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200226600> irb(main):003:0> redis.connect("127.0.0.1", on:6379) 2010-11-04 19:20:32.892 macruby[4656:903] Connection error: connect: Connection refused => 0 Nevermind the connection refused, I haven't actually got redis running :) On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@spiralix.org> wrote: Hi all,
I have a funny problem, I have a framework I created, 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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Thanks Eloy! I was starting to poke myself, trying to wakeup from a bad dream... and your answer helped me to get it right: what works:
framework 'ObjCHiredis.framework' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200232880> redis.connect("127.0.0.1", on:6379) => 1
what doesn't:
framework 'ObjCHiredis' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x2000fed40> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0) so I guess that is a bug, isn't it?
2010/11/4 Eloy Duran <eloy.de.enige@gmail.com>
Oops, forgot to paste the result:
% macirb irb(main):001:0> framework '/Users/eloy/Documents/DEVELOPMENT/MacRuby/ObjCHiredis/ObjCHiredis/build/Debug/ObjCHiredis.framework' => true irb(main):002:0> redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200226600> irb(main):003:0> redis.connect("127.0.0.1", on:6379) 2010-11-04 19:20:32.892 macruby[4656:903] Connection error: connect: Connection refused => 0
Nevermind the connection refused, I haven't actually got redis running :)
On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Yep, that's a bug. Can you file a ticket? Thanks :) On 4 nov 2010, at 19:44, Louis-Philippe wrote:
Thanks Eloy! I was starting to poke myself, trying to wakeup from a bad dream... and your answer helped me to get it right:
what works:
framework 'ObjCHiredis.framework' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200232880> redis.connect("127.0.0.1", on:6379) => 1
what doesn't:
framework 'ObjCHiredis' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x2000fed40> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0)
so I guess that is a bug, isn't it?
2010/11/4 Eloy Duran <eloy.de.enige@gmail.com> Oops, forgot to paste the result:
% macirb irb(main):001:0> framework '/Users/eloy/Documents/DEVELOPMENT/MacRuby/ObjCHiredis/ObjCHiredis/build/Debug/ObjCHiredis.framework' => true irb(main):002:0> redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200226600> irb(main):003:0> redis.connect("127.0.0.1", on:6379) 2010-11-04 19:20:32.892 macruby[4656:903] Connection error: connect: Connection refused => 0
Nevermind the connection refused, I haven't actually got redis running :)
On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@spiralix.org> wrote: Hi all,
I have a funny problem, I have a framework I created, 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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
ok! done! Thanks! 2010/11/4 Eloy Duran <eloy.de.enige@gmail.com>
Yep, that's a bug. Can you file a ticket? Thanks :)
On 4 nov 2010, at 19:44, Louis-Philippe wrote:
Thanks Eloy! I was starting to poke myself, trying to wakeup from a bad dream... and your answer helped me to get it right:
what works:
framework 'ObjCHiredis.framework' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200232880> redis.connect("127.0.0.1", on:6379) => 1
what doesn't:
framework 'ObjCHiredis' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x2000fed40> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0) so I guess that is a bug, isn't it?
2010/11/4 Eloy Duran <eloy.de.enige@gmail.com>
Oops, forgot to paste the result:
% macirb irb(main):001:0> framework '/Users/eloy/Documents/DEVELOPMENT/MacRuby/ObjCHiredis/ObjCHiredis/build/Debug/ObjCHiredis.framework' => true irb(main):002:0> redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200226600> irb(main):003:0> redis.connect("127.0.0.1", on:6379) 2010-11-04 19:20:32.892 macruby[4656:903] Connection error: connect: Connection refused => 0
Nevermind the connection refused, I haven't actually got redis running :)
On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi Louis-Philippe, I replied to the bug but I'm not sure if comments are propagated to your e-mail address. In short, where did you install ObjCHiredis.framework in your system? Laurent On Nov 4, 2010, at 12:23 PM, Louis-Philippe wrote:
ok! done! Thanks!
2010/11/4 Eloy Duran <eloy.de.enige@gmail.com> Yep, that's a bug. Can you file a ticket? Thanks :)
On 4 nov 2010, at 19:44, Louis-Philippe wrote:
Thanks Eloy! I was starting to poke myself, trying to wakeup from a bad dream... and your answer helped me to get it right:
what works:
framework 'ObjCHiredis.framework' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200232880> redis.connect("127.0.0.1", on:6379) => 1
what doesn't:
framework 'ObjCHiredis' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x2000fed40> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0)
so I guess that is a bug, isn't it?
2010/11/4 Eloy Duran <eloy.de.enige@gmail.com> Oops, forgot to paste the result:
% macirb irb(main):001:0> framework '/Users/eloy/Documents/DEVELOPMENT/MacRuby/ObjCHiredis/ObjCHiredis/build/Debug/ObjCHiredis.framework' => true irb(main):002:0> redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200226600> irb(main):003:0> redis.connect("127.0.0.1", on:6379) 2010-11-04 19:20:32.892 macruby[4656:903] Connection error: connect: Connection refused => 0
Nevermind the connection refused, I haven't actually got redis running :)
On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@spiralix.org> wrote: Hi all,
I have a funny problem, I have a framework I created, 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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Excellent, thanks. I just looked and we appear to honor the DYLD_FRAMEWORK_PATH environment variable already, but there is probably a bug somewhere. I will have a look later. Thanks for reporting the problem :) Laurent On Nov 4, 2010, at 1:31 PM, Louis-Philippe wrote:
while I was replying to the ticket comment ;)
so:
my use case is one of TDD, where the framework is not installed but in the build folder. Even if I: ENV['DYLD_FRAMEWORK_PATH'] = ENV['BUILT_PRODUCTS_DIR'] the framework doesn't load properly.
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Actually I can't reproduce that either: I've copied the framework into the load path at: /Library/Frameworks/ObjCHiredis.framework % macirb irb(main):001:0> framework 'ObjCHiredis' => true irb(main):002:0> r = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200239500> irb(main):003:0> r.connect('127.0.0.1', on:1234) 2010-11-04 20:16:13.586 macruby[6386:903] Connection error: connect: Connection refused => 0 On 4 nov 2010, at 19:44, Louis-Philippe wrote:
Thanks Eloy! I was starting to poke myself, trying to wakeup from a bad dream... and your answer helped me to get it right:
what works:
framework 'ObjCHiredis.framework' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200232880> redis.connect("127.0.0.1", on:6379) => 1
what doesn't:
framework 'ObjCHiredis' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x2000fed40> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0)
so I guess that is a bug, isn't it?
2010/11/4 Eloy Duran <eloy.de.enige@gmail.com> Oops, forgot to paste the result:
% macirb irb(main):001:0> framework '/Users/eloy/Documents/DEVELOPMENT/MacRuby/ObjCHiredis/ObjCHiredis/build/Debug/ObjCHiredis.framework' => true irb(main):002:0> redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200226600> irb(main):003:0> redis.connect("127.0.0.1", on:6379) 2010-11-04 19:20:32.892 macruby[4656:903] Connection error: connect: Connection refused => 0
Nevermind the connection refused, I haven't actually got redis running :)
On 4 nov 2010, at 17:44, Louis-Philippe wrote:
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@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@spiralix.org> wrote: Hi all,
I have a funny problem, I have a framework I created, 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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (4)
-
Eloy Duran
-
Laurent Sansonetti
-
Louis-Philippe
-
Matt Aimonetti