Hi,
I bound an array to an NSArrayController and realized that not all array
manipulation methods trigger the binding observer.
These trigger:
+=
-=
This does not trigger
<<
Is there a list which ruby methods cocoa can automatically register as
observer for the classes Array, Hash, etc ?
Thanks,
The following code crashes with a segmentation fault.
Any idea whether I misunderstood the usage or it is a macruby bug?
thanks,
ALex.
---code---
framework 'Foundation'
class Foo
def bar
puts 'bar'
end
end
operation = NSInvocationOperation.alloc.i
The xcode documentation states that if the method
performSelectorOnMainThread has the argument withObject:nil, then the nil
means that the target method takes no arguments.
The following code throws an ArgumentError wrong number of arguments (1
for 0):
def foo
self.performSelectorOnMainThrea
here an update:
the problem seems to be with the notifier, because if I use the following
code without the NSNotificationCenter, then, everything works fine, like
the following sample code:
task = NSTask.alloc.init
task.currentDirectoryPath = "/"
task.launchPath = "/bin/bash"
task.
Hi
I tried the subprocess sample with the AsyncHandler from
http://ofps.oreilly.com/titles/9781449380373/_foundation.html
and found the following problem:
if I execute the code many times (I tried 20 times) in my terminal with
$ macruby sample.rb
then 2-3 times it does not print any output. In th
In the macirb I forgot to import 'Cocoa'. ANd in my App it seems that I
had a typo.
it now works now.
Thanks
> I even tried it on lion with the latest nightly build, and even there I
> get "false" for the respond_to?
>
> Do I have to install something else beside macruby?
> Or Why is the protoc
I even tried it on lion with the latest nightly build, and even there I
get "false" for the respond_to?
Do I have to install something else beside macruby?
Or Why is the protocol not automatically added to the NSObject class?
Thanks,
Alex.
> Have you got the right signature? Looking at
>
> http:
I am on 10.6.8
I tried with the 0.10 and the nightly build from 2011.9.27 and with both
versions I get a "false" for the following statements in the macruby irb
I have installed Xcode 3.2.4
Any Ideas why this does not work?
- 0.10 -
$ macirb
irb(main):001:0>
NSObject.alloc.i
The following code prints false twice
So it seems that the protocol is not applied correctly.
Is this a bug or do I need some other require/framework statements?
BTW the result is the same if i use "framework 'Cocoa'"
code -
framework 'AppKit'
puts NSObject.alloc.init.conform
would think it is a problem
> importing `AppKit.framework` somewhere.
>
> On Sep 27, 2011, at 3:22 PM, Alex Greif wrote:
>
>> I want to bind my NSTextField to my model object. In objective-c I would
>> do something like
>> [mytextfield bind:@"value" toObject:m
I want to bind my NSTextField to my model object. In objective-c I would
do something like
[mytextfield bind:@"value" toObject:myperson withKeyPath:@"address"
options:nil];
But I have problems doing this in MacRuby with the following snippet:
mytextfield = NSTextField.alloc.initWithFrame [20, 200
11 matches
Mail list logo