[MacRuby-devel] Problem with a window controller

Andy Park sohocoke at gmail.com
Fri Nov 30 17:00:24 PST 2012


Without being able to verify anything for accuracy at the moment, it looks like your window's delegate is not set to the controller at the time the events are occurring. 

Check if you need to set this - try tracing the window's delegate at different points of the controller's lifecycle.

On 30 Nov 2012, at 00:50, david kramf <dakr.012 at gmail.com> wrote:

> 
> Hi, 
> In the copied below code only the awakeFromNib is executed . Can someone explain me what do I do wrong ?  Window is displayed and I expected all other methods to be called.
> Thanks, David
> 
> 
> class MyController < NSWindowController
>     attr_accessor :window
>     
>     def awakeFromNib
>         @window.delegate = self
>         puts " at end of awake from nib. title is #{@window.title}"
>     end
>     
>     def windowWillLoad
>         puts "window  will be soon loaded"
>     end
>     
>     def windowDidLoad
>         puts "window loaded"
>     end
>     def windowTitleForDocumentDisplayName(displayName)
>         "Hello World"
>     end
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20121201/14c8980c/attachment.html>


More information about the MacRuby-devel mailing list