Re: [MacRuby-devel] NSEvent MacRuby (updated)

2010-11-16 Thread Eloy Duran
You can check which macruby version you have, like so: % macruby -v MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] Also: * which OS versions do you have? * did you install the BridgeSupport preview pkg? Eloy On 15 nov 2010, at 13:51, András Zalavári wrote: > (I'm not sure if the previ

Re: [MacRuby-devel] Conforming to a protocol

2010-11-16 Thread Eloy Duran
I don't have an example of a class that uses conformsToProtocol: on the delegate, so I can't give you a code example, but I would try to override the conformsToProtocol: class and instance methods and return true for those you support. On 15 nov 2010, at 00:15, Martijn Walraven wrote: > Hi, >

Re: [MacRuby-devel] calling Objective-C method with block parameter

2010-11-16 Thread Matt Aimonetti
Did you install BridgeSupport preview 1? http://www.macruby.org/blog/2010/10/08/bridgesupport-preview.html It is required to use C blocks. Thanks, - Matt On Mon, Nov 15, 2010 at 2:51 AM, Alan Skipp wrote: > Hello everyone, > I'm attempting to call a method on an Objective-C object which takes

Re: [MacRuby-devel] Weird behaviour for a weird line of code

2010-11-16 Thread Eric Christopherson
On Mon, Nov 15, 2010 at 3:50 PM, Ryan Davis wrote: > > On Nov 14, 2010, at 18:37 , Mark Rada wrote: > >> Now, when I try this out in macirb: (Case #3) >> >>   require 'uri' >>   test = URI.parse url unless (url = 'http://macruby.org/').nil?  # error >>   test = URI.parse url unless (url = 'http://

Re: [MacRuby-devel] calling Objective-C method with block parameter

2010-11-16 Thread Thibault Martin-Lagardette
Also, it is to note that if the block lives inside a framework you've made (or downladed – one that is not part of the system), you'll have to generate the BridgeSupport files yourselves. This is important because the runtime needs to know that you're trying to use blocks, and you instruct it to

Re: [MacRuby-devel] Weird behaviour for a weird line of code

2010-11-16 Thread Jeff Cohen
On Tue, Nov 16, 2010 at 4:14 PM, Eric Christopherson < echristopher...@gmail.com> wrote: > On Mon, Nov 15, 2010 at 3:50 PM, Ryan Davis > wrote: > > First off, I hate this style of coding. If you didn't assign in a > conditional you'd avoid all of this crap to begin with. Assigning in > conditiona

Re: [MacRuby-devel] Weird behaviour for a weird line of code

2010-11-16 Thread Ryan Davis
On Nov 16, 2010, at 14:14 , Eric Christopherson wrote: > I'm not sure I understand what you mean. Are you saying it's bad to do > the *first* assignment to a variable inside a conditional? Or it's bad > to assign inside a conditional in any case? I can understand the > first, but I'm not sure how

Re: [MacRuby-devel] Weird behaviour for a weird line of code

2010-11-16 Thread Caio Chassot
On 2010-11-16, at 21:22 , Ryan Davis wrote: > > an assignment inside a conditional is > > do_something(x) if x = logical_statement I'm particularly fond of: x = logical_statement and do_something(x) Hate me now. ___ MacRuby-devel mailing list MacR

[MacRuby-devel] Weird xcode / macruby differences

2010-11-16 Thread Ashley Towns
Hey would anyone be able to fill me in on whats going wrong here (or how to find out more on whats up) ~ ∴ macgem list --local *** LOCAL GEMS *** rake (0.8.7) sqlite3-ruby (1.3.2) ~ ∴ macruby -e "require 'rubygems'; require 'sqlite3'; p $:" ["/Users/ashleyis/.rvm/gems/macruby-0.7.1/gems/sqlite