pimento 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/{spec/spec.opts → .rspec} +0 -0
- data/Gemfile +4 -0
- data/README.rdoc +6 -5
- data/Rakefile +6 -41
- data/examples/banner.rb +74 -0
- data/lib/pimento.rb +4 -2
- data/lib/pimento/canvas.rb +55 -13
- data/lib/pimento/component.rb +69 -0
- data/lib/pimento/component/bevel_button.rb +5 -0
- data/lib/pimento/component/check_box.rb +5 -0
- data/lib/pimento/component/circular_progress_indicator.rb +7 -0
- data/lib/pimento/component/disclosure_button.rb +5 -0
- data/lib/pimento/component/disclosure_triangle.rb +5 -0
- data/lib/pimento/component/help_button.rb +5 -0
- data/lib/pimento/component/horizontal_slider.rb +5 -0
- data/lib/pimento/component/popup_button.rb +5 -0
- data/lib/pimento/component/progress_indicator.rb +7 -0
- data/lib/pimento/component/round_button.rb +5 -0
- data/lib/pimento/component/rounded_rect_button.rb +5 -0
- data/lib/pimento/component/search_field.rb +5 -0
- data/lib/pimento/component/vertical_slider.rb +5 -0
- data/lib/pimento/renderable.rb +8 -0
- data/lib/pimento/util.rb +11 -0
- data/pimento.gemspec +17 -59
- data/spec/fixtures/1dot.xib +207 -222
- data/spec/fixtures/empty.xib +164 -174
- data/spec/pimento_spec.rb +2 -0
- data/spec/spec_helper.rb +7 -4
- data/template/bevel_button_ro.xml.erb +24 -0
- data/template/{canvas.xib.erb → canvas.xml.erb} +15 -52
- data/template/check_box_ro.xml.erb +31 -0
- data/template/circular_progress_indicator_ro.xml.erb +10 -0
- data/template/disclosure_button_ro.xml.erb +44 -0
- data/template/disclosure_triangle_ro.xml.erb +24 -0
- data/template/help_button_ro.xml.erb +24 -0
- data/template/horizontal_slider_ro.xml.erb +27 -0
- data/template/or_1.xml.erb +5 -0
- data/template/or_2.xml.erb +14 -0
- data/template/popup_button_ro.xml.erb +23 -0
- data/template/progress_indicator_ro.xml.erb +10 -0
- data/template/round_button_ro.xml.erb +24 -0
- data/template/rounded_rect_button_ro.xml.erb +24 -0
- data/template/search_field_ro.xml.erb +39 -0
- data/template/vertical_slider_ro.xml.erb +26 -0
- metadata +98 -69
- data/.document +0 -5
- data/examples/hello.rb +0 -32
- data/lib/pimento/dot.rb +0 -12
data/spec/fixtures/empty.xib
CHANGED
@@ -1,177 +1,167 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
|
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
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
</object>
|
168
|
-
</object>
|
169
|
-
<nil key="sourceID"/>
|
170
|
-
<int key="maxID">2</int>
|
171
|
-
</object>
|
172
|
-
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
173
|
-
<int key="IBDocument.localizationMode">0</int>
|
174
|
-
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
|
175
|
-
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
176
|
-
</data>
|
3
|
+
<data>
|
4
|
+
<int key="IBDocument.SystemTarget">1050</int>
|
5
|
+
<string key="IBDocument.SystemVersion">9L30</string>
|
6
|
+
<string key="IBDocument.InterfaceBuilderVersion">677</string>
|
7
|
+
<string key="IBDocument.AppKitVersion">949.54</string>
|
8
|
+
<string key="IBDocument.HIToolboxVersion">353.00</string>
|
9
|
+
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
10
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
11
|
+
<integer value="1" id="9"/>
|
12
|
+
</object>
|
13
|
+
<object class="NSArray" key="IBDocument.PluginDependencies">
|
14
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
15
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
16
|
+
</object>
|
17
|
+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
18
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
19
|
+
<object class="NSArray" key="dict.sortedKeys">
|
20
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
21
|
+
</object>
|
22
|
+
<object class="NSMutableArray" key="dict.values">
|
23
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
24
|
+
</object>
|
25
|
+
</object>
|
26
|
+
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
27
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
28
|
+
<object class="NSCustomObject" id="1001">
|
29
|
+
<string key="NSClassName">NSObject</string>
|
30
|
+
</object>
|
31
|
+
<object class="NSCustomObject" id="1003">
|
32
|
+
<string key="NSClassName">FirstResponder</string>
|
33
|
+
</object>
|
34
|
+
<object class="NSCustomObject" id="1004">
|
35
|
+
<string key="NSClassName">NSApplication</string>
|
36
|
+
</object>
|
37
|
+
<object class="NSWindowTemplate" id="1005">
|
38
|
+
<int key="NSWindowStyleMask">15</int>
|
39
|
+
<int key="NSWindowBacking">2</int>
|
40
|
+
<string key="NSWindowRect">{{120, 240}, {100, 200}}</string>
|
41
|
+
<int key="NSWTFlags">536870912</int>
|
42
|
+
<string key="NSWindowTitle">Window</string>
|
43
|
+
<string key="NSWindowClass">NSWindow</string>
|
44
|
+
<nil key="NSViewClass"/>
|
45
|
+
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
46
|
+
<object class="NSView" key="NSWindowView" id="1006">
|
47
|
+
<reference key="NSNextResponder"/>
|
48
|
+
<int key="NSvFlags">256</int>
|
49
|
+
<object class="NSMutableArray" key="NSSubviews">
|
50
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
51
|
+
</object>
|
52
|
+
<string key="NSFrameSize">{100, 200}</string>
|
53
|
+
<reference key="NSSuperview"/>
|
54
|
+
</object>
|
55
|
+
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
|
56
|
+
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
57
|
+
</object>
|
58
|
+
</object>
|
59
|
+
<object class="IBObjectContainer" key="IBDocument.Objects">
|
60
|
+
<object class="NSMutableArray" key="connectionRecords">
|
61
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
62
|
+
</object>
|
63
|
+
<object class="IBMutableOrderedSet" key="objectRecords">
|
64
|
+
<object class="NSArray" key="orderedObjects">
|
65
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
66
|
+
<object class="IBObjectRecord">
|
67
|
+
<int key="objectID">0</int>
|
68
|
+
<object class="NSArray" key="object" id="1002">
|
69
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
70
|
+
</object>
|
71
|
+
<reference key="children" ref="1000"/>
|
72
|
+
<nil key="parent"/>
|
73
|
+
</object>
|
74
|
+
<object class="IBObjectRecord">
|
75
|
+
<int key="objectID">-2</int>
|
76
|
+
<reference key="object" ref="1001"/>
|
77
|
+
<reference key="parent" ref="1002"/>
|
78
|
+
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
|
79
|
+
</object>
|
80
|
+
<object class="IBObjectRecord">
|
81
|
+
<int key="objectID">-1</int>
|
82
|
+
<reference key="object" ref="1003"/>
|
83
|
+
<reference key="parent" ref="1002"/>
|
84
|
+
<string key="objectName">First Responder</string>
|
85
|
+
</object>
|
86
|
+
<object class="IBObjectRecord">
|
87
|
+
<int key="objectID">-3</int>
|
88
|
+
<reference key="object" ref="1004"/>
|
89
|
+
<reference key="parent" ref="1002"/>
|
90
|
+
<string key="objectName">Application</string>
|
91
|
+
</object>
|
92
|
+
<object class="IBObjectRecord">
|
93
|
+
<int key="objectID">1</int>
|
94
|
+
<reference key="object" ref="1005"/>
|
95
|
+
<object class="NSMutableArray" key="children">
|
96
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
97
|
+
<reference ref="1006"/>
|
98
|
+
</object>
|
99
|
+
<reference key="parent" ref="1002"/>
|
100
|
+
</object>
|
101
|
+
<object class="IBObjectRecord">
|
102
|
+
<int key="objectID">2</int>
|
103
|
+
<reference key="object" ref="1006"/>
|
104
|
+
<object class="NSMutableArray" key="children">
|
105
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
106
|
+
</object>
|
107
|
+
<reference key="parent" ref="1005"/>
|
108
|
+
</object>
|
109
|
+
</object>
|
110
|
+
</object>
|
111
|
+
<object class="NSMutableDictionary" key="flattenedProperties">
|
112
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
113
|
+
<object class="NSMutableArray" key="dict.sortedKeys">
|
114
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
115
|
+
<string>-1.IBPluginDependency</string>
|
116
|
+
<string>-2.IBPluginDependency</string>
|
117
|
+
<string>-3.IBPluginDependency</string>
|
118
|
+
<string>1.IBEditorWindowLastContentRect</string>
|
119
|
+
<string>1.IBPluginDependency</string>
|
120
|
+
<string>1.IBWindowTemplateEditedContentRect</string>
|
121
|
+
<string>1.NSWindowTemplate.visibleAtLaunch</string>
|
122
|
+
<string>1.WindowOrigin</string>
|
123
|
+
<string>1.editorWindowContentRectSynchronizationRect</string>
|
124
|
+
<string>2.IBPluginDependency</string>
|
125
|
+
</object>
|
126
|
+
<object class="NSMutableArray" key="dict.values">
|
127
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
128
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
129
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
130
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
131
|
+
<string>{{0, 475}, {100, 200}}</string>
|
132
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
133
|
+
<string>{{0, 475}, {100, 200}}</string>
|
134
|
+
<reference ref="9"/>
|
135
|
+
<string>{120, 240}</string>
|
136
|
+
<string>{{357, 418}, {100, 200}}</string>
|
137
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
138
|
+
</object>
|
139
|
+
</object>
|
140
|
+
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
141
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
142
|
+
<object class="NSArray" key="dict.sortedKeys">
|
143
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
144
|
+
</object>
|
145
|
+
<object class="NSMutableArray" key="dict.values">
|
146
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
147
|
+
</object>
|
148
|
+
</object>
|
149
|
+
<nil key="activeLocalization"/>
|
150
|
+
<object class="NSMutableDictionary" key="localizations">
|
151
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
152
|
+
<object class="NSArray" key="dict.sortedKeys">
|
153
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
154
|
+
</object>
|
155
|
+
<object class="NSMutableArray" key="dict.values">
|
156
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
157
|
+
</object>
|
158
|
+
</object>
|
159
|
+
<nil key="sourceID"/>
|
160
|
+
<int key="maxID">3</int>
|
161
|
+
</object>
|
162
|
+
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
163
|
+
<int key="IBDocument.localizationMode">0</int>
|
164
|
+
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
|
165
|
+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
166
|
+
</data>
|
177
167
|
</archive>
|
data/spec/pimento_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
|
3
|
+
require 'rubygems'
|
3
4
|
require 'pimento'
|
4
|
-
require 'spec'
|
5
|
-
require 'spec/autorun'
|
6
5
|
|
7
|
-
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
8
|
+
config.run_all_when_everything_filtered = true
|
9
|
+
config.filter_run :focus
|
10
|
+
|
8
11
|
def fixture(filename)
|
9
12
|
File.dirname(__FILE__) + '/fixtures/' + filename
|
10
13
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<object class="NSButton" id="<%= options[:id_offset] %>">
|
2
|
+
<reference key="NSNextResponder" ref="1006"/>
|
3
|
+
<int key="NSvFlags">268</int>
|
4
|
+
<string key="NSFrame">{{<%= x - 12 %>, <%= @canvas.height - y - height - 10 %>}, {25, <%= height + 20 %>}}</string>
|
5
|
+
<reference key="NSSuperview" ref="1006"/>
|
6
|
+
<bool key="NSEnabled">YES</bool>
|
7
|
+
<object class="NSButtonCell" key="NSCell" id="<%= options[:id_offset] + 1 %>">
|
8
|
+
<int key="NSCellFlags">67239424</int>
|
9
|
+
<int key="NSCellFlags2">134217728</int>
|
10
|
+
<string key="NSContents"/>
|
11
|
+
<object class="NSFont" key="NSSupport">
|
12
|
+
<string key="NSName">LucidaGrande</string>
|
13
|
+
<double key="NSSize">1.000000e+01</double>
|
14
|
+
<int key="NSfFlags">16</int>
|
15
|
+
</object>
|
16
|
+
<reference key="NSControlView" ref="<%= options[:id_offset] %>"/>
|
17
|
+
<int key="NSButtonFlags">-2033958657</int>
|
18
|
+
<int key="NSButtonFlags2">130</int>
|
19
|
+
<string key="NSAlternateContents"/>
|
20
|
+
<string key="NSKeyEquivalent"/>
|
21
|
+
<int key="NSPeriodicDelay">400</int>
|
22
|
+
<int key="NSPeriodicInterval">75</int>
|
23
|
+
</object>
|
24
|
+
</object>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<string key="IBDocument.HIToolboxVersion">353.00</string>
|
9
9
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
10
10
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
11
|
-
<% if @
|
11
|
+
<% if @components.empty? %>
|
12
12
|
<integer value="1" id="9"/>
|
13
13
|
<% else %>
|
14
14
|
<integer value="2"/>
|
@@ -52,32 +52,7 @@
|
|
52
52
|
<int key="NSvFlags">256</int>
|
53
53
|
<object class="NSMutableArray" key="NSSubviews">
|
54
54
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
55
|
-
|
56
|
-
<object class="NSButton" id="<%= dot.id %>">
|
57
|
-
<reference key="NSNextResponder" ref="1006"/>
|
58
|
-
<int key="NSvFlags">268</int>
|
59
|
-
<string key="NSFrame">{{<%= dot.x - 19 %>, <%= @height - dot.y - 19 %>}, {39, 38}}</string>
|
60
|
-
<reference key="NSSuperview" ref="1006"/>
|
61
|
-
<bool key="NSEnabled">YES</bool>
|
62
|
-
<object class="NSButtonCell" key="NSCell" id="<%= dot.cell_id %>">
|
63
|
-
<int key="NSCellFlags">67239424</int>
|
64
|
-
<int key="NSCellFlags2">0</int>
|
65
|
-
<string key="NSContents"/>
|
66
|
-
<object class="NSFont" key="NSSupport">
|
67
|
-
<string key="NSName">LucidaGrande</string>
|
68
|
-
<double key="NSSize">1.000000e+01</double>
|
69
|
-
<int key="NSfFlags">2843</int>
|
70
|
-
</object>
|
71
|
-
<reference key="NSControlView" ref="<%= dot.id %>"/>
|
72
|
-
<int key="NSButtonFlags">-2037645057</int>
|
73
|
-
<int key="NSButtonFlags2">135</int>
|
74
|
-
<string key="NSAlternateContents"/>
|
75
|
-
<string key="NSKeyEquivalent"/>
|
76
|
-
<int key="NSPeriodicDelay">200</int>
|
77
|
-
<int key="NSPeriodicInterval">25</int>
|
78
|
-
</object>
|
79
|
-
</object>
|
80
|
-
<% end %>
|
55
|
+
<%= render_objects %>
|
81
56
|
</object>
|
82
57
|
<string key="NSFrameSize">{<%= @width %>, <%= @height %>}</string>
|
83
58
|
<reference key="NSSuperview"/>
|
@@ -133,28 +108,14 @@
|
|
133
108
|
<reference key="object" ref="1006"/>
|
134
109
|
<object class="NSMutableArray" key="children">
|
135
110
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
136
|
-
<% @
|
137
|
-
<reference ref="<%=
|
111
|
+
<% index = Pimento::Canvas::FIRST_ID; @components.each do |component| %>
|
112
|
+
<reference ref="<%= index %>"/>
|
113
|
+
<% index += component.num_objects %>
|
138
114
|
<% end %>
|
139
115
|
</object>
|
140
116
|
<reference key="parent" ref="1005"/>
|
141
117
|
</object>
|
142
|
-
|
143
|
-
<object class="IBObjectRecord">
|
144
|
-
<int key="objectID"><%= index += 1 %></int>
|
145
|
-
<reference key="object" ref="<%= dot.id %>"/>
|
146
|
-
<object class="NSMutableArray" key="children">
|
147
|
-
<bool key="EncodedWithXMLCoder">YES</bool>
|
148
|
-
<reference ref="<%= dot.cell_id %>"/>
|
149
|
-
</object>
|
150
|
-
<reference key="parent" ref="1006"/>
|
151
|
-
</object>
|
152
|
-
<object class="IBObjectRecord">
|
153
|
-
<int key="objectID"><%= index += 1 %></int>
|
154
|
-
<reference key="object" ref="<%= dot.cell_id %>"/>
|
155
|
-
<reference key="parent" ref="<%= dot.id %>"/>
|
156
|
-
</object>
|
157
|
-
<% end %>
|
118
|
+
<%= render_object_records %>
|
158
119
|
</object>
|
159
120
|
</object>
|
160
121
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
@@ -171,9 +132,10 @@
|
|
171
132
|
<string>1.WindowOrigin</string>
|
172
133
|
<string>1.editorWindowContentRectSynchronizationRect</string>
|
173
134
|
<string>2.IBPluginDependency</string>
|
174
|
-
<% index =
|
175
|
-
|
176
|
-
<string><%= index
|
135
|
+
<% index = Pimento::Canvas::FIRST_OBJ + 1; @components.each do |component| %>
|
136
|
+
<% component.num_objects.times do |i| %>
|
137
|
+
<string><%= index + i %>.IBPluginDependency</string>
|
138
|
+
<% end %>
|
177
139
|
<% end %>
|
178
140
|
</object>
|
179
141
|
<object class="NSMutableArray" key="dict.values">
|
@@ -185,7 +147,7 @@
|
|
185
147
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
186
148
|
<string>{{0, 475}, {<%= @width %>, <%= @height %>}}</string>
|
187
149
|
|
188
|
-
<% if @
|
150
|
+
<% if @components.empty? %>
|
189
151
|
<reference ref="9"/>
|
190
152
|
<% else %>
|
191
153
|
<integer value="1"/>
|
@@ -193,9 +155,10 @@
|
|
193
155
|
<string>{<%= @top %>, <%= @left %>}</string>
|
194
156
|
<string>{{357, 418}, {<%= @width %>, <%= @height %>}}</string>
|
195
157
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
196
|
-
<% @
|
197
|
-
|
158
|
+
<% @components.each do |component| %>
|
159
|
+
<% component.num_objects.times do |i| %>
|
198
160
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
161
|
+
<% end %>
|
199
162
|
<% end %>
|
200
163
|
</object>
|
201
164
|
</object>
|
@@ -219,7 +182,7 @@
|
|
219
182
|
</object>
|
220
183
|
</object>
|
221
184
|
<nil key="sourceID"/>
|
222
|
-
<int key="maxID"><%= (@
|
185
|
+
<int key="maxID"><%= (@components.inject(0) {|memo, component| memo + component.num_objects }) + 3 %></int>
|
223
186
|
</object>
|
224
187
|
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
225
188
|
<int key="IBDocument.localizationMode">0</int>
|