-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSecondWindowController.rb
More file actions
executable file
·55 lines (42 loc) · 951 Bytes
/
SecondWindowController.rb
File metadata and controls
executable file
·55 lines (42 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SecondWindowController.rb
# WindowControllerRuby
#
# Created by koji on 11/02/24.
# Copyright 2011 __MyCompanyName__. All rights reserved.
class SecondWindowController < NSWindowController
attr_accessor :view
def awakeFromNib
end
def setProcessor(processor)
@processor = processor
NSLog("Processor obtained")
if (@view.nil?)
#we pending to windowDidLoad()
else
@view.setProcessor(@processor)
NSLog("processor setted on view")
end
end
def init
super.initWithWindowNibName("secondwindow")
NSLog "#{self.class} initialized"
self
end
def windowWillLoad()
puts "windowWillLoad"
puts " nib name is " + windowNibName
end
def windowDidLoad()
puts "windowDidLoad"
#self.window.delegate = self
#we do set processor
@view.setProcessor(@processor)
end
def close()
puts "Second Window Now Closes"
self.window.performClose nil
end
def windowShouldClose(sender)
true
end
end