candle 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +27 -2
- data/VERSION +1 -1
- data/lib/candle/generators/blank.rb +3 -2
- data/lib/candle/generators/help.rb +3 -1
- data/lib/candle/generators/table.rb +129 -0
- data/lib/candle/generators/{lua → templates/blank}/scripts/AppDelegate.lua +0 -0
- data/lib/candle/generators/{lua → templates/blank}/scripts/tests/init.lua +0 -0
- data/lib/candle/generators/{lua → templates/blank}/scripts/tests/someTest.lua +0 -0
- data/lib/candle/generators/templates/project.rake +158 -0
- data/lib/candle/generators/templates/table/WaxApplication/ProtocolLoader.h +12 -0
- data/lib/candle/generators/templates/table/WaxApplication/WaxApplication-Info.plist.tt +36 -0
- data/lib/candle/generators/templates/table/WaxApplication/WaxApplication-Prefix.pch.tt +14 -0
- data/lib/candle/generators/templates/table/WaxApplication/en.lproj/InfoPlist.strings +2 -0
- data/lib/candle/generators/templates/table/WaxApplication/main.m.tt +20 -0
- data/lib/candle/generators/templates/table/WaxApplication.xcodeproj/project.pbxproj +851 -0
- data/lib/candle/generators/templates/table/WaxApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/lib/candle/generators/templates/table/WaxApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/lib/candle/generators/templates/table/WaxApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/WaxApplication.xcscheme +86 -0
- data/lib/candle/generators/templates/table/WaxApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/xcschememanagement.plist +22 -0
- data/lib/candle/generators/templates/table/scripts/AppDelegate.lua +33 -0
- data/lib/candle/generators/templates/table/scripts/CapitalsTable.lua +36 -0
- data/lib/candle/generators/templates/table/scripts/StatesTable.lua +50 -0
- data/lib/candle/generators/templates/table/scripts/states.plist +606 -0
- data/lib/candle/generators/templates/table/scripts/tests/init.lua +6 -0
- data/lib/candle/generators/templates/table/scripts/tests/someTest.lua +12 -0
- data/lib/candle/generators/templates/xib/WaxApplication/ProtocolLoader.h +12 -0
- data/lib/candle/generators/templates/xib/WaxApplication/WaxApplication-Info.plist.tt +36 -0
- data/lib/candle/generators/templates/xib/WaxApplication/WaxApplication-Prefix.pch.tt +14 -0
- data/lib/candle/generators/templates/xib/WaxApplication/en.lproj/InfoPlist.strings +2 -0
- data/lib/candle/generators/templates/xib/WaxApplication/main.m.tt +20 -0
- data/lib/candle/generators/templates/xib/WaxApplication.xcodeproj/project.pbxproj +855 -0
- data/lib/candle/generators/templates/xib/WaxApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/lib/candle/generators/templates/xib/WaxApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/lib/candle/generators/templates/xib/WaxApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/WaxApplication.xcscheme +86 -0
- data/lib/candle/generators/templates/xib/WaxApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/xcschememanagement.plist +22 -0
- data/lib/candle/generators/templates/xib/scripts/AppDelegate.lua +32 -0
- data/lib/candle/generators/templates/xib/scripts/BlueViewController.lua +23 -0
- data/lib/candle/generators/templates/xib/scripts/BlueViewController.xib +176 -0
- data/lib/candle/generators/templates/xib/scripts/OrangeViewController.lua +24 -0
- data/lib/candle/generators/templates/xib/scripts/OrangeViewController.xib +177 -0
- data/lib/candle/generators/templates/xib/scripts/tests/init.lua +6 -0
- data/lib/candle/generators/templates/xib/scripts/tests/someTest.lua +12 -0
- data/lib/candle/generators/xib.rb +128 -0
- data/lib/candle/version.rb +2 -4
- data/lib/candle.rb +1 -1
- metadata +365 -307
Binary file
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Scheme
|
3
|
+
LastUpgradeVersion = "0460"
|
4
|
+
version = "1.3">
|
5
|
+
<BuildAction
|
6
|
+
parallelizeBuildables = "YES"
|
7
|
+
buildImplicitDependencies = "YES">
|
8
|
+
<BuildActionEntries>
|
9
|
+
<BuildActionEntry
|
10
|
+
buildForTesting = "YES"
|
11
|
+
buildForRunning = "YES"
|
12
|
+
buildForProfiling = "YES"
|
13
|
+
buildForArchiving = "YES"
|
14
|
+
buildForAnalyzing = "YES">
|
15
|
+
<BuildableReference
|
16
|
+
BuildableIdentifier = "primary"
|
17
|
+
BlueprintIdentifier = "C57ED6E516E59BF400F57BA4"
|
18
|
+
BuildableName = "WaxApplication.app"
|
19
|
+
BlueprintName = "WaxApplication"
|
20
|
+
ReferencedContainer = "container:WaxApplication.xcodeproj">
|
21
|
+
</BuildableReference>
|
22
|
+
</BuildActionEntry>
|
23
|
+
</BuildActionEntries>
|
24
|
+
</BuildAction>
|
25
|
+
<TestAction
|
26
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
27
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
28
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
29
|
+
buildConfiguration = "Debug">
|
30
|
+
<Testables>
|
31
|
+
</Testables>
|
32
|
+
<MacroExpansion>
|
33
|
+
<BuildableReference
|
34
|
+
BuildableIdentifier = "primary"
|
35
|
+
BlueprintIdentifier = "C57ED6E516E59BF400F57BA4"
|
36
|
+
BuildableName = "WaxApplication.app"
|
37
|
+
BlueprintName = "WaxApplication"
|
38
|
+
ReferencedContainer = "container:WaxApplication.xcodeproj">
|
39
|
+
</BuildableReference>
|
40
|
+
</MacroExpansion>
|
41
|
+
</TestAction>
|
42
|
+
<LaunchAction
|
43
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
44
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
45
|
+
launchStyle = "0"
|
46
|
+
useCustomWorkingDirectory = "NO"
|
47
|
+
buildConfiguration = "Debug"
|
48
|
+
ignoresPersistentStateOnLaunch = "NO"
|
49
|
+
debugDocumentVersioning = "YES"
|
50
|
+
allowLocationSimulation = "YES">
|
51
|
+
<BuildableProductRunnable>
|
52
|
+
<BuildableReference
|
53
|
+
BuildableIdentifier = "primary"
|
54
|
+
BlueprintIdentifier = "C57ED6E516E59BF400F57BA4"
|
55
|
+
BuildableName = "WaxApplication.app"
|
56
|
+
BlueprintName = "WaxApplication"
|
57
|
+
ReferencedContainer = "container:WaxApplication.xcodeproj">
|
58
|
+
</BuildableReference>
|
59
|
+
</BuildableProductRunnable>
|
60
|
+
<AdditionalOptions>
|
61
|
+
</AdditionalOptions>
|
62
|
+
</LaunchAction>
|
63
|
+
<ProfileAction
|
64
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
65
|
+
savedToolIdentifier = ""
|
66
|
+
useCustomWorkingDirectory = "NO"
|
67
|
+
buildConfiguration = "Release"
|
68
|
+
debugDocumentVersioning = "YES">
|
69
|
+
<BuildableProductRunnable>
|
70
|
+
<BuildableReference
|
71
|
+
BuildableIdentifier = "primary"
|
72
|
+
BlueprintIdentifier = "C57ED6E516E59BF400F57BA4"
|
73
|
+
BuildableName = "WaxApplication.app"
|
74
|
+
BlueprintName = "WaxApplication"
|
75
|
+
ReferencedContainer = "container:WaxApplication.xcodeproj">
|
76
|
+
</BuildableReference>
|
77
|
+
</BuildableProductRunnable>
|
78
|
+
</ProfileAction>
|
79
|
+
<AnalyzeAction
|
80
|
+
buildConfiguration = "Debug">
|
81
|
+
</AnalyzeAction>
|
82
|
+
<ArchiveAction
|
83
|
+
buildConfiguration = "Release"
|
84
|
+
revealArchiveInOrganizer = "YES">
|
85
|
+
</ArchiveAction>
|
86
|
+
</Scheme>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>SchemeUserState</key>
|
6
|
+
<dict>
|
7
|
+
<key>WaxApplication.xcscheme</key>
|
8
|
+
<dict>
|
9
|
+
<key>orderHint</key>
|
10
|
+
<integer>0</integer>
|
11
|
+
</dict>
|
12
|
+
</dict>
|
13
|
+
<key>SuppressBuildableAutocreation</key>
|
14
|
+
<dict>
|
15
|
+
<key>C57ED6E516E59BF400F57BA4</key>
|
16
|
+
<dict>
|
17
|
+
<key>primary</key>
|
18
|
+
<true/>
|
19
|
+
</dict>
|
20
|
+
</dict>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
waxClass{"AppDelegate", protocols = {"UIApplicationDelegate"}}
|
2
|
+
|
3
|
+
-- Well done! You are almost ready to run a lua app on your iPhone!
|
4
|
+
--
|
5
|
+
-- Just run the app (⌘↵) in the simulator or on a device!
|
6
|
+
-- You will see a dull, bland "hello world" app (it is your job to spice it up.)
|
7
|
+
--
|
8
|
+
-- If your prefer using TextMate to edit the Lua code just type
|
9
|
+
-- 'rake tm' from the command line to setup a wax TextMate project.
|
10
|
+
--
|
11
|
+
-- What's next?
|
12
|
+
-- 1. Check out some of the example apps to learn how to do
|
13
|
+
-- more complicated apps.
|
14
|
+
-- 2. Then you start writing your app!
|
15
|
+
-- 3. Let us know if you need any help at http://groups.google.com/group/iphonewax
|
16
|
+
|
17
|
+
require "BlueViewController"
|
18
|
+
require "OrangeViewController"
|
19
|
+
|
20
|
+
waxClass{"AppDelegate", protocols = {"UIApplicationDelegate"}}
|
21
|
+
|
22
|
+
function applicationDidFinishLaunching(self, application)
|
23
|
+
local frame = UIScreen:mainScreen():bounds()
|
24
|
+
self.window = UIWindow:initWithFrame(frame)
|
25
|
+
blue = BlueViewController:init()
|
26
|
+
self.window:addSubview(blue:view())
|
27
|
+
self.window:makeKeyAndVisible()
|
28
|
+
puts("")
|
29
|
+
puts("-------------------------------------------------")
|
30
|
+
puts("- You can print stuff to the console like this! -")
|
31
|
+
puts("-------------------------------------------------")
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
waxClass{"BlueViewController", UIViewController}
|
2
|
+
|
3
|
+
function init(self)
|
4
|
+
self.super:initWithNibName_bundle("BlueViewController", nil)
|
5
|
+
return self
|
6
|
+
end
|
7
|
+
|
8
|
+
function viewDidLoad(self)
|
9
|
+
-- The button and textField varibles are automatically created and added to the class via IB
|
10
|
+
self.button = self:view():viewWithTag(100)
|
11
|
+
self.button:addTarget_action_forControlEvents(self,"btnClicked:",UIControlEventTouchUpInside);
|
12
|
+
end
|
13
|
+
|
14
|
+
-- Put IBAction next to, or above a function to make it appear in IB
|
15
|
+
function btnClicked(self, sender) -- IBAction
|
16
|
+
local parentView = self:view():superview()
|
17
|
+
UIView:beginAnimations_context(nil, nil)
|
18
|
+
UIView:setAnimationTransition_forView_cache(UIViewAnimationTransitionFlipFromLeft, parentView, true)
|
19
|
+
self:view():removeFromSuperview()
|
20
|
+
orangeController = OrangeViewController:init()
|
21
|
+
parentView:addSubview(orangeController:view())
|
22
|
+
UIView:commitAnimations()
|
23
|
+
end
|
@@ -0,0 +1,176 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
3
|
+
<data>
|
4
|
+
<int key="IBDocument.SystemTarget">1552</int>
|
5
|
+
<string key="IBDocument.SystemVersion">12C60</string>
|
6
|
+
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
7
|
+
<string key="IBDocument.AppKitVersion">1187.34</string>
|
8
|
+
<string key="IBDocument.HIToolboxVersion">625.00</string>
|
9
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
10
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
11
|
+
<string key="NS.object.0">2083</string>
|
12
|
+
</object>
|
13
|
+
<array key="IBDocument.IntegratedClassDependencies">
|
14
|
+
<string>IBProxyObject</string>
|
15
|
+
<string>IBUIButton</string>
|
16
|
+
<string>IBUIView</string>
|
17
|
+
</array>
|
18
|
+
<array key="IBDocument.PluginDependencies">
|
19
|
+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
20
|
+
</array>
|
21
|
+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
22
|
+
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
23
|
+
<integer value="1" key="NS.object.0"/>
|
24
|
+
</object>
|
25
|
+
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
26
|
+
<object class="IBProxyObject" id="372490531">
|
27
|
+
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
28
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
29
|
+
</object>
|
30
|
+
<object class="IBProxyObject" id="975951072">
|
31
|
+
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
32
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
33
|
+
</object>
|
34
|
+
<object class="IBUIView" id="191373211">
|
35
|
+
<reference key="NSNextResponder"/>
|
36
|
+
<int key="NSvFlags">274</int>
|
37
|
+
<array class="NSMutableArray" key="NSSubviews">
|
38
|
+
<object class="IBUIButton" id="861937949">
|
39
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
40
|
+
<int key="NSvFlags">292</int>
|
41
|
+
<string key="NSFrame">{{20, 70}, {280, 37}}</string>
|
42
|
+
<reference key="NSSuperview" ref="191373211"/>
|
43
|
+
<reference key="NSWindow"/>
|
44
|
+
<object class="NSColor" key="IBUIBackgroundColor">
|
45
|
+
<int key="NSColorSpace">3</int>
|
46
|
+
<bytes key="NSWhite">MCAwAA</bytes>
|
47
|
+
</object>
|
48
|
+
<bool key="IBUIOpaque">NO</bool>
|
49
|
+
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
50
|
+
<int key="IBUITag">100</int>
|
51
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
52
|
+
<int key="IBUIContentHorizontalAlignment">0</int>
|
53
|
+
<int key="IBUIContentVerticalAlignment">0</int>
|
54
|
+
<int key="IBUIButtonType">1</int>
|
55
|
+
<string key="IBUINormalTitle">Show Orange View</string>
|
56
|
+
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
57
|
+
<int key="NSColorSpace">3</int>
|
58
|
+
<bytes key="NSWhite">MQA</bytes>
|
59
|
+
</object>
|
60
|
+
<object class="NSColor" key="IBUINormalTitleColor">
|
61
|
+
<int key="NSColorSpace">1</int>
|
62
|
+
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
|
63
|
+
</object>
|
64
|
+
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
65
|
+
<int key="NSColorSpace">3</int>
|
66
|
+
<bytes key="NSWhite">MC41AA</bytes>
|
67
|
+
</object>
|
68
|
+
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
69
|
+
<string key="name">Helvetica-Bold</string>
|
70
|
+
<string key="family">Helvetica</string>
|
71
|
+
<int key="traits">2</int>
|
72
|
+
<double key="pointSize">15</double>
|
73
|
+
</object>
|
74
|
+
<object class="NSFont" key="IBUIFont">
|
75
|
+
<string key="NSName">Helvetica-Bold</string>
|
76
|
+
<double key="NSSize">15</double>
|
77
|
+
<int key="NSfFlags">16</int>
|
78
|
+
</object>
|
79
|
+
</object>
|
80
|
+
</array>
|
81
|
+
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
|
82
|
+
<reference key="NSSuperview"/>
|
83
|
+
<reference key="NSWindow"/>
|
84
|
+
<object class="NSColor" key="IBUIBackgroundColor">
|
85
|
+
<int key="NSColorSpace">1</int>
|
86
|
+
<bytes key="NSRGB">MCAwLjggMQA</bytes>
|
87
|
+
</object>
|
88
|
+
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
89
|
+
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
|
90
|
+
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
|
91
|
+
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
|
92
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
93
|
+
<array key="dict.sortedKeys">
|
94
|
+
<integer value="1"/>
|
95
|
+
<integer value="3"/>
|
96
|
+
</array>
|
97
|
+
<array key="dict.values">
|
98
|
+
<string>{320, 568}</string>
|
99
|
+
<string>{568, 320}</string>
|
100
|
+
</array>
|
101
|
+
</object>
|
102
|
+
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
|
103
|
+
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
|
104
|
+
<int key="IBUIType">2</int>
|
105
|
+
</object>
|
106
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
107
|
+
</object>
|
108
|
+
</array>
|
109
|
+
<object class="IBObjectContainer" key="IBDocument.Objects">
|
110
|
+
<array class="NSMutableArray" key="connectionRecords">
|
111
|
+
<object class="IBConnectionRecord">
|
112
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
113
|
+
<string key="label">view</string>
|
114
|
+
<reference key="source" ref="372490531"/>
|
115
|
+
<reference key="destination" ref="191373211"/>
|
116
|
+
</object>
|
117
|
+
<int key="connectionID">3</int>
|
118
|
+
</object>
|
119
|
+
</array>
|
120
|
+
<object class="IBMutableOrderedSet" key="objectRecords">
|
121
|
+
<array key="orderedObjects">
|
122
|
+
<object class="IBObjectRecord">
|
123
|
+
<int key="objectID">0</int>
|
124
|
+
<array key="object" id="0"/>
|
125
|
+
<reference key="children" ref="1000"/>
|
126
|
+
<nil key="parent"/>
|
127
|
+
</object>
|
128
|
+
<object class="IBObjectRecord">
|
129
|
+
<int key="objectID">1</int>
|
130
|
+
<reference key="object" ref="191373211"/>
|
131
|
+
<array class="NSMutableArray" key="children">
|
132
|
+
<reference ref="861937949"/>
|
133
|
+
</array>
|
134
|
+
<reference key="parent" ref="0"/>
|
135
|
+
</object>
|
136
|
+
<object class="IBObjectRecord">
|
137
|
+
<int key="objectID">-1</int>
|
138
|
+
<reference key="object" ref="372490531"/>
|
139
|
+
<reference key="parent" ref="0"/>
|
140
|
+
<string key="objectName">File's Owner</string>
|
141
|
+
</object>
|
142
|
+
<object class="IBObjectRecord">
|
143
|
+
<int key="objectID">-2</int>
|
144
|
+
<reference key="object" ref="975951072"/>
|
145
|
+
<reference key="parent" ref="0"/>
|
146
|
+
</object>
|
147
|
+
<object class="IBObjectRecord">
|
148
|
+
<int key="objectID">4</int>
|
149
|
+
<reference key="object" ref="861937949"/>
|
150
|
+
<array class="NSMutableArray" key="children"/>
|
151
|
+
<reference key="parent" ref="191373211"/>
|
152
|
+
</object>
|
153
|
+
</array>
|
154
|
+
</object>
|
155
|
+
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
156
|
+
<string key="-1.CustomClassName">BlueViewController</string>
|
157
|
+
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
158
|
+
<string key="-2.CustomClassName">UIResponder</string>
|
159
|
+
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
160
|
+
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
161
|
+
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
162
|
+
</dictionary>
|
163
|
+
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
164
|
+
<nil key="activeLocalization"/>
|
165
|
+
<dictionary class="NSMutableDictionary" key="localizations"/>
|
166
|
+
<nil key="sourceID"/>
|
167
|
+
<int key="maxID">11</int>
|
168
|
+
</object>
|
169
|
+
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
170
|
+
<int key="IBDocument.localizationMode">0</int>
|
171
|
+
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
172
|
+
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
173
|
+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
174
|
+
<string key="IBCocoaTouchPluginVersion">2083</string>
|
175
|
+
</data>
|
176
|
+
</archive>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
waxClass{"OrangeViewController", UIViewController}
|
2
|
+
|
3
|
+
IBOutlet "textField" -- This makes the property visible from IB
|
4
|
+
|
5
|
+
function init(self)
|
6
|
+
self.super:initWithNibName_bundle("OrangeViewController", nil)
|
7
|
+
return self
|
8
|
+
end
|
9
|
+
|
10
|
+
function viewDidLoad(self)
|
11
|
+
-- The button and textField varibles are automatically created and added to the class via IB
|
12
|
+
self.button = self:view():viewWithTag(100)
|
13
|
+
self.button:addTarget_action_forControlEvents(self,"btnClicked:",UIControlEventTouchUpInside);
|
14
|
+
end
|
15
|
+
|
16
|
+
function btnClicked(self, sender)
|
17
|
+
local parentView = self:view():superview()
|
18
|
+
UIView:beginAnimations_context(nil, nil)
|
19
|
+
UIView:setAnimationTransition_forView_cache(UIViewAnimationTransitionFlipFromRight, parentView, true)
|
20
|
+
self:view():removeFromSuperview()
|
21
|
+
blueController = BlueViewController:init()
|
22
|
+
parentView:addSubview(blueController:view())
|
23
|
+
UIView:commitAnimations()
|
24
|
+
end
|
@@ -0,0 +1,177 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
3
|
+
<data>
|
4
|
+
<int key="IBDocument.SystemTarget">1552</int>
|
5
|
+
<string key="IBDocument.SystemVersion">12C60</string>
|
6
|
+
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
7
|
+
<string key="IBDocument.AppKitVersion">1187.34</string>
|
8
|
+
<string key="IBDocument.HIToolboxVersion">625.00</string>
|
9
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
10
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
11
|
+
<string key="NS.object.0">2083</string>
|
12
|
+
</object>
|
13
|
+
<array key="IBDocument.IntegratedClassDependencies">
|
14
|
+
<string>IBProxyObject</string>
|
15
|
+
<string>IBUIButton</string>
|
16
|
+
<string>IBUIView</string>
|
17
|
+
</array>
|
18
|
+
<array key="IBDocument.PluginDependencies">
|
19
|
+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
20
|
+
</array>
|
21
|
+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
22
|
+
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
23
|
+
<integer value="1" key="NS.object.0"/>
|
24
|
+
</object>
|
25
|
+
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
26
|
+
<object class="IBProxyObject" id="372490531">
|
27
|
+
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
28
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
29
|
+
</object>
|
30
|
+
<object class="IBProxyObject" id="975951072">
|
31
|
+
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
32
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
33
|
+
</object>
|
34
|
+
<object class="IBUIView" id="191373211">
|
35
|
+
<reference key="NSNextResponder"/>
|
36
|
+
<int key="NSvFlags">274</int>
|
37
|
+
<array class="NSMutableArray" key="NSSubviews">
|
38
|
+
<object class="IBUIButton" id="326028175">
|
39
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
40
|
+
<int key="NSvFlags">292</int>
|
41
|
+
<string key="NSFrame">{{20, 70}, {280, 37}}</string>
|
42
|
+
<reference key="NSSuperview" ref="191373211"/>
|
43
|
+
<reference key="NSWindow"/>
|
44
|
+
<object class="NSColor" key="IBUIBackgroundColor">
|
45
|
+
<int key="NSColorSpace">3</int>
|
46
|
+
<bytes key="NSWhite">MCAwAA</bytes>
|
47
|
+
</object>
|
48
|
+
<bool key="IBUIOpaque">NO</bool>
|
49
|
+
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
50
|
+
<int key="IBUITag">100</int>
|
51
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
52
|
+
<int key="IBUIContentHorizontalAlignment">0</int>
|
53
|
+
<int key="IBUIContentVerticalAlignment">0</int>
|
54
|
+
<int key="IBUIButtonType">1</int>
|
55
|
+
<string key="IBUINormalTitle">Show Blue View</string>
|
56
|
+
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
57
|
+
<int key="NSColorSpace">3</int>
|
58
|
+
<bytes key="NSWhite">MQA</bytes>
|
59
|
+
</object>
|
60
|
+
<object class="NSColor" key="IBUINormalTitleColor">
|
61
|
+
<int key="NSColorSpace">1</int>
|
62
|
+
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
|
63
|
+
</object>
|
64
|
+
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
65
|
+
<int key="NSColorSpace">3</int>
|
66
|
+
<bytes key="NSWhite">MC41AA</bytes>
|
67
|
+
</object>
|
68
|
+
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
69
|
+
<string key="name">Helvetica-Bold</string>
|
70
|
+
<string key="family">Helvetica</string>
|
71
|
+
<int key="traits">2</int>
|
72
|
+
<double key="pointSize">15</double>
|
73
|
+
</object>
|
74
|
+
<object class="NSFont" key="IBUIFont">
|
75
|
+
<string key="NSName">Helvetica-Bold</string>
|
76
|
+
<double key="NSSize">15</double>
|
77
|
+
<int key="NSfFlags">16</int>
|
78
|
+
</object>
|
79
|
+
</object>
|
80
|
+
</array>
|
81
|
+
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
|
82
|
+
<reference key="NSSuperview"/>
|
83
|
+
<reference key="NSWindow"/>
|
84
|
+
<reference key="NSNextKeyView" ref="326028175"/>
|
85
|
+
<object class="NSColor" key="IBUIBackgroundColor">
|
86
|
+
<int key="NSColorSpace">1</int>
|
87
|
+
<bytes key="NSRGB">MSAwLjYgMC4yAA</bytes>
|
88
|
+
</object>
|
89
|
+
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
90
|
+
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
|
91
|
+
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
|
92
|
+
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
|
93
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
94
|
+
<array key="dict.sortedKeys">
|
95
|
+
<integer value="1"/>
|
96
|
+
<integer value="3"/>
|
97
|
+
</array>
|
98
|
+
<array key="dict.values">
|
99
|
+
<string>{320, 568}</string>
|
100
|
+
<string>{568, 320}</string>
|
101
|
+
</array>
|
102
|
+
</object>
|
103
|
+
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
|
104
|
+
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
|
105
|
+
<int key="IBUIType">2</int>
|
106
|
+
</object>
|
107
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
108
|
+
</object>
|
109
|
+
</array>
|
110
|
+
<object class="IBObjectContainer" key="IBDocument.Objects">
|
111
|
+
<array class="NSMutableArray" key="connectionRecords">
|
112
|
+
<object class="IBConnectionRecord">
|
113
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
114
|
+
<string key="label">view</string>
|
115
|
+
<reference key="source" ref="372490531"/>
|
116
|
+
<reference key="destination" ref="191373211"/>
|
117
|
+
</object>
|
118
|
+
<int key="connectionID">3</int>
|
119
|
+
</object>
|
120
|
+
</array>
|
121
|
+
<object class="IBMutableOrderedSet" key="objectRecords">
|
122
|
+
<array key="orderedObjects">
|
123
|
+
<object class="IBObjectRecord">
|
124
|
+
<int key="objectID">0</int>
|
125
|
+
<array key="object" id="0"/>
|
126
|
+
<reference key="children" ref="1000"/>
|
127
|
+
<nil key="parent"/>
|
128
|
+
</object>
|
129
|
+
<object class="IBObjectRecord">
|
130
|
+
<int key="objectID">1</int>
|
131
|
+
<reference key="object" ref="191373211"/>
|
132
|
+
<array class="NSMutableArray" key="children">
|
133
|
+
<reference ref="326028175"/>
|
134
|
+
</array>
|
135
|
+
<reference key="parent" ref="0"/>
|
136
|
+
</object>
|
137
|
+
<object class="IBObjectRecord">
|
138
|
+
<int key="objectID">-1</int>
|
139
|
+
<reference key="object" ref="372490531"/>
|
140
|
+
<reference key="parent" ref="0"/>
|
141
|
+
<string key="objectName">File's Owner</string>
|
142
|
+
</object>
|
143
|
+
<object class="IBObjectRecord">
|
144
|
+
<int key="objectID">-2</int>
|
145
|
+
<reference key="object" ref="975951072"/>
|
146
|
+
<reference key="parent" ref="0"/>
|
147
|
+
</object>
|
148
|
+
<object class="IBObjectRecord">
|
149
|
+
<int key="objectID">4</int>
|
150
|
+
<reference key="object" ref="326028175"/>
|
151
|
+
<array class="NSMutableArray" key="children"/>
|
152
|
+
<reference key="parent" ref="191373211"/>
|
153
|
+
</object>
|
154
|
+
</array>
|
155
|
+
</object>
|
156
|
+
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
157
|
+
<string key="-1.CustomClassName">OrangeViewController</string>
|
158
|
+
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
159
|
+
<string key="-2.CustomClassName">UIResponder</string>
|
160
|
+
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
161
|
+
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
162
|
+
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
163
|
+
</dictionary>
|
164
|
+
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
165
|
+
<nil key="activeLocalization"/>
|
166
|
+
<dictionary class="NSMutableDictionary" key="localizations"/>
|
167
|
+
<nil key="sourceID"/>
|
168
|
+
<int key="maxID">11</int>
|
169
|
+
</object>
|
170
|
+
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
171
|
+
<int key="IBDocument.localizationMode">0</int>
|
172
|
+
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
173
|
+
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
174
|
+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
175
|
+
<string key="IBCocoaTouchPluginVersion">2083</string>
|
176
|
+
</data>
|
177
|
+
</archive>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
describe["Some Test"] = function()
|
2
|
+
it["can test!"] = function()
|
3
|
+
expect(1).should_be(1)
|
4
|
+
expect(1).should_not_be(2)
|
5
|
+
expect("hi mystery person123").should_match("person%d+")
|
6
|
+
expect(string.match).should_exist()
|
7
|
+
expect(string.crazy).should_not_exist()
|
8
|
+
|
9
|
+
local func = function() empty.nothing() end
|
10
|
+
expect(func).should_error()
|
11
|
+
end
|
12
|
+
end
|