Re: [MacRuby-devel] Problem with a window controller

2013-03-06 Thread Robert Carl Rice
To: MacRuby development discussions. macruby-devel@lists.macosforge.org Subject: Re: [MacRuby-devel] Problem with a window controller Message-ID: 1f1681c7-9de6-4971-8d17-722f5ec63...@gmail.com Content-Type: text/plain; charset=us-ascii Hi Bob, As you become more familiar with IB, you

Re: [MacRuby-devel] Problem with a window controller

2012-12-10 Thread david kramf
, Jean-Denis MUYS wrote: On 7 déc. 2012, at 19:48:39, david kramf dakr@gmail.com wrote: Message: 1 Date: Fri, 7 Dec 2012 19:48:39 +0200 From: david kramf dakr@gmail.com To: MacRuby development discussions. macruby-devel@lists.macosforge.org Subject: Re: [MacRuby-devel

Re: [MacRuby-devel] Problem with a window controller

2012-12-09 Thread david kramf
Hi Bob What I don't like is the way MacRuby supports… - I hope that MacRuby will improve on that point. I have not encountered that problem yet. myClass = MyClass.alloc.initWithArgument( argument )… - I believe this will work fine but this is not Ruby. In Ruby( to the best of my knowledge)

Re: [MacRuby-devel] Problem with a window controller

2012-12-07 Thread david kramf
Hi Bob, As you become more familiar with IB, you will probably do more initialization of objects in IB and less in MacRuby. Nib file expansion instantiates objects and then makes calls to initialize the objects using the same methods that you are using to initialize objects in MacRuby.

Re: [MacRuby-devel] Problem with a window controller

2012-12-07 Thread Robert Carl Rice
Hi David, IB will use the default Obj C initialization and, yes, the default Obj C initialization is a little different from Ruby initialization so I have to make minor changes when I change a class from MacRuby instantiation to IB instantiation. The default Obj C initialization calls init

Re: [MacRuby-devel] Problem with a window controller

2012-12-03 Thread Robert Carl Rice
Hi David, You should consider the window Objective C property to be owned by NSWindowController and it's confusing to define a Ruby class variable with the same name. It should automatically appear as an IB outlet for your NSWindowController subclass that you would hook up in IB just as you

Re: [MacRuby-devel] Problem with a window controller

2012-12-03 Thread david kramf
Hi Bob I never programmed in Objective-C. When I open a MacRuby project I automatically get a window attar_accessor defined in my AppDelegate created code, but not in the controller which I write by my own. If I connect, using IB , the window to my controller parameter (object variable) , I

Re: [MacRuby-devel] Problem with a window controller

2012-12-02 Thread david kramf
Thank you very much Andy and Jim I followed your remarks , played with the code and I am still surprised. It turns out that awakeFromNib is called before applicationDidFinishLaunching so there MyController is already initialized and has the correct window as the his instance variable. NSWindow