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
, 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
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)
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.
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
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
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
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