[MacRuby-devel] Problem with a window controller

Jim Getzen jim at getzen.name
Fri Nov 30 06:47:27 PST 2012


Hi David,

You might check out this Stack Overflow entry to see if it solves your problem:

http://stackoverflow.com/questions/2695671/nswindowcontroller-windowdidload-not-called

Jim


On Nov 29, 2012, at 6:50 PM, 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/20121130/94a74624/attachment-0001.html>


More information about the MacRuby-devel mailing list