Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated IBExample

  • Loading branch information...
commit adf5a3dd4fcf7816cdb7bca287a64035a7ae95a0 1 parent 37cbea3
@probablycorey authored
Showing with 898 additions and 437 deletions.
  1. +2 −2 bin/update-xibs
  2. +93 −43 examples/IBExample/BlueView.xib
  3. +18 −0 examples/IBExample/Classes/IBExampleAppDelegate.h
  4. +27 −0 examples/IBExample/Classes/IBExampleAppDelegate.m
  5. +0 −12 examples/IBExample/Classes/ProtocolLoader.h
  6. +0 −71 examples/IBExample/Classes/WaxTextField.h
  7. +0 −8 examples/IBExample/Entitlements.plist
  8. +3 −3 examples/IBExample/IBExample-Info.plist
  9. +51 −145 examples/IBExample/IBExample.xcodeproj/project.pbxproj
  10. BIN  examples/IBExample/Icon.png
  11. +262 −0 examples/IBExample/MainWindow.xib
  12. +68 −60 examples/IBExample/OrangeView.xib
  13. +0 −1  examples/IBExample/Rakefile
  14. +1 −0  examples/IBExample/Rakefile
  15. +0 −18 examples/IBExample/data/scripts/AppDelegate.lua
  16. +0 −23 examples/IBExample/data/scripts/BlueController.lua
  17. +0 −34 examples/IBExample/data/scripts/OrangeController.lua
  18. +4 −17 examples/IBExample/main.m
  19. +24 −0 examples/IBExample/scripts/BlueController.lua
  20. +23 −0 examples/IBExample/scripts/OrangeController.lua
  21. +29 −0 examples/IBExample/scripts/init.lua
  22. 0  examples/IBExample/{data → }/scripts/tests/init.lua
  23. +1 −0  lib/project.rake
  24. +3 −0  tools/Framework/Scripts/package
  25. +157 −0 tools/Framework/done/bin/hammer
  26. +131 −0 tools/Framework/done/bin/update-xibs
  27. BIN  tools/Framework/done/bin/waxsim
  28. +1 −0  tools/Framework/wax/bin
View
4 bin/update-xibs
@@ -4,7 +4,7 @@ require 'rubygems'
require 'xml'
require 'erb'
-PROJECT_DIR = File.expand_path("../../..", __FILE__)
+PROJECT_DIR = Dir.pwd
XML.indent_tree_output = true
XML.default_tree_indent_string = "\t"
@@ -15,7 +15,7 @@ class LuaClass
attr :actions
def self.all
- lua_files = Dir["#{PROJECT_DIR}/data/**/*.lua"]
+ lua_files = Dir["#{PROJECT_DIR}/**/*.lua"]
lua_files.map {|f| parse(open(f).read)}.compact
end
View
136 examples/IBExample/BlueView.xib
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10C540</string>
- <string key="IBDocument.InterfaceBuilderVersion">740</string>
- <string key="IBDocument.AppKitVersion">1038.25</string>
- <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">62</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -31,9 +30,11 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
@@ -45,6 +46,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 45}, {280, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor" id="563072086">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
@@ -52,6 +54,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUITag">1</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<object class="NSFont" key="IBUIFont">
@@ -79,11 +82,13 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 125}, {280, 193}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<reference key="IBUIBackgroundColor" ref="563072086"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUITag">2</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string type="base64-UTF8" key="IBUIText">RmlsZSdzIE93bmVyIGlzIHNldCB0byBnZW5lcmljICdVSVZpZXdDb250cm9sbGVyJwoKVGFncyBhcmUg
c2V0IHVzaW5nIHRoZSBJbnNwZWN0aW9uIHdpbmRvdy4gVGhpcyB0ZXh0Ym94IGhhcyBhIHRhZyBvZiAy
LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
@@ -103,13 +108,14 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<int key="IBUITextAlignment">1</int>
</object>
</object>
- <string key="NSFrameSize">{320, 460}</string>
+ <string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC40MDAwMDAwMDYgMC44MDAwMDAwMTE5IDEAA</bytes>
</object>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -121,7 +127,24 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="191373211"/>
</object>
- <int key="connectionID">6</int>
+ <int key="connectionID">8</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">textField</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="848650548"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">buttonTouched:</string>
+ <reference key="source" ref="504711114"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">10</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -179,9 +202,9 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>UIViewController</string>
+ <string>BlueController</string>
<string>UIResponder</string>
- <string>{{354, 412}, {320, 480}}</string>
+ <string>{{575, 427}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -203,9 +226,42 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6</int>
+ <int key="maxID">10</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">BlueController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">buttonTouched:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">buttonTouched:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">buttonTouched:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">textField</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">textField</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">textField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
@@ -247,13 +303,6 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
@@ -261,13 +310,6 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
@@ -275,13 +317,6 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
@@ -303,13 +338,6 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
@@ -376,6 +404,13 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -398,6 +433,20 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
@@ -412,9 +461,10 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="768" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -423,6 +473,6 @@ LCB0aGUgYnV0dG9uJ3MgdGFnIGlzIDEuA</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">IBExample.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">3.1</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
View
18 examples/IBExample/Classes/IBExampleAppDelegate.h
@@ -0,0 +1,18 @@
+//
+// IBExampleAppDelegate.h
+// IBExample
+//
+// Created by Corey on 1/3/11.
+// Copyright 2011 me. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface IBExampleAppDelegate : NSObject <UIApplicationDelegate> {
+ UIWindow *window;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+
+@end
+
View
27 examples/IBExample/Classes/IBExampleAppDelegate.m
@@ -0,0 +1,27 @@
+//
+// IBExampleAppDelegate.m
+// IBExample
+//
+// Created by Corey on 1/3/11.
+// Copyright 2011 me. All rights reserved.
+//
+
+#import "IBExampleAppDelegate.h"
+#import "wax/wax.h"
+
+@implementation IBExampleAppDelegate
+
+@synthesize window;
+
+- (void)dealloc {
+ [window release];
+ [super dealloc];
+}
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [self.window makeKeyAndVisible];
+ wax_start("init.lua", nil);
+ return YES;
+}
+
+@end
View
12 examples/IBExample/Classes/ProtocolLoader.h
@@ -1,12 +0,0 @@
-// Many protocols will work from wax out of the box. But some need to be preloaded.
-// If the protocol you are using isn't found, just add the protocol to this object
-//
-// This seems to be a bug, or there is a runtime method I'm unaware of
-
-#import <Foundation/Foundation.h>
-
-@interface ProtocolLoader : NSObject <UIApplicationDelegate, UIWebViewDelegate, UIActionSheetDelegate, UIAlertViewDelegate, UISearchBarDelegate, UITextViewDelegate, UITabBarControllerDelegate> {}
-@end
-
-@implementation ProtocolLoader
-@end
View
71 examples/IBExample/Classes/WaxTextField.h
@@ -1,71 +0,0 @@
-// UITextInputTraits are inaccessable via the runtime (not sure why).
-// This is a hack to access them via wax
-
-#import <Foundation/Foundation.h>
-
-@interface WaxTextField : UITextField {}
-
-@end
-
-@implementation WaxTextField
-- (UITextAutocapitalizationType)autocapitalizationType {
- return [super autocapitalizationType];
-}
-
-- (void)setAutocapitalizationType:(UITextAutocapitalizationType)value {
- return [super setAutocapitalizationType:value];
-}
-
-
-- (void)autocorrectionType:(UITextAutocorrectionType)value {
- [super autocorrectionType];
-}
-
-- (void)setAutocorrectionType:(UITextAutocorrectionType)value {
- [super setAutocorrectionType:value];
-}
-
-
-- (UIKeyboardType)keyboardType {
- return [super keyboardType];
-}
-
-- (void)setKeyboardType:(UIKeyboardType)value {
- [super setKeyboardType:value];
-}
-
-- (UIKeyboardAppearance)keyboardAppearance {
- return [super keyboardAppearance];
-}
-
-- (void)setKeyboardAppearance:(UIKeyboardAppearance)value {
- [super setKeyboardAppearance:value];
-}
-
-
-- (UIReturnKeyType)returnKeyType {
- return [super returnKeyType];
-}
-
-- (void)setReturnKeyType:(UIReturnKeyType)value {
- [super setReturnKeyType:value];
-}
-
-
-- (BOOL)enablesReturnKeyAutomatically {
- return [super enablesReturnKeyAutomatically];
-}
-
-- (void)setEnablesReturnKeyAutomatically:(BOOL)value {
- [super setEnablesReturnKeyAutomatically:value];
-}
-
-- (BOOL)isSecureTextEntry {
- return [super isSecureTextEntry];
-}
-
-- (void)setSecureTextEntry:(BOOL)value {
- [super setSecureTextEntry:value];
-}
-
-@end
View
8 examples/IBExample/Entitlements.plist
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>get-task-allow</key>
- <false/>
-</dict>
-</plist>
View
6 examples/IBExample/IBExample-Info.plist
@@ -6,12 +6,10 @@
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
- <key>CFBundleDocumentTypes</key>
- <array/>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
- <string>Icon.png</string>
+ <string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
@@ -26,5 +24,7 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
</dict>
</plist>
View
196 examples/IBExample/IBExample.xcodeproj/project.pbxproj
@@ -7,49 +7,37 @@
objects = {
/* Begin PBXBuildFile section */
- 0413C4A41201DE830069C579 /* wax.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0413C4A31201DE830069C579 /* wax.framework */; };
- 0422EC721135DFE6007F6343 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0422EC711135DFE6007F6343 /* libxml2.dylib */; };
- 04DC160F114708B7009D71CC /* OrangeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 04DC160E114708B7009D71CC /* OrangeView.xib */; };
- 04DC1611114708BF009D71CC /* BlueView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 04DC1610114708BF009D71CC /* BlueView.xib */; };
+ 0444900512D253C800E8D955 /* wax.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0444900412D253C800E8D955 /* wax.framework */; };
+ 0444901F12D2543B00E8D955 /* BlueView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0444901D12D2543B00E8D955 /* BlueView.xib */; };
+ 0444902012D2543B00E8D955 /* OrangeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0444901E12D2543B00E8D955 /* OrangeView.xib */; };
+ 0444902712D255D000E8D955 /* init.lua in Resources */ = {isa = PBXBuildFile; fileRef = 0444902412D255D000E8D955 /* init.lua */; };
+ 0444902812D255D000E8D955 /* BlueController.lua in Resources */ = {isa = PBXBuildFile; fileRef = 0444902512D255D000E8D955 /* BlueController.lua */; };
+ 0444902912D255D000E8D955 /* OrangeController.lua in Resources */ = {isa = PBXBuildFile; fileRef = 0444902612D255D000E8D955 /* OrangeController.lua */; };
+ 1D3623260D0F684500981E51 /* IBExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* IBExampleAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
- 91373B241066B2B30089FEE3 /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 91373B231066B2B30089FEE3 /* Entitlements.plist */; };
- 91373BF01066C8930089FEE3 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 91373BEF1066C8930089FEE3 /* Icon.png */; };
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
/* End PBXBuildFile section */
-/* Begin PBXBuildRule section */
- 91373AF61066AFD70089FEE3 /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.proxy.script;
- filePatterns = "*.lua";
- fileType = pattern.proxy;
- isEditable = 1;
- outputFiles = (
- );
- script = "echo \"Ignoring ${INPUT_FILE}\"";
- };
-/* End PBXBuildRule section */
-
/* Begin PBXFileReference section */
- 0413C4A31201DE830069C579 /* wax.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = wax.framework; sourceTree = "<group>"; };
- 0422EC711135DFE6007F6343 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
- 0482723B1125E152003DFACB /* ProtocolLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtocolLoader.h; sourceTree = "<group>"; };
- 0482723C1125E152003DFACB /* WaxTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaxTextField.h; sourceTree = "<group>"; };
- 0482731611260912003DFACB /* AppDelegate.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AppDelegate.lua; sourceTree = "<group>"; };
- 0482731811260912003DFACB /* init.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.lua; sourceTree = "<group>"; };
- 04DC160E114708B7009D71CC /* OrangeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrangeView.xib; sourceTree = "<group>"; };
- 04DC1610114708BF009D71CC /* BlueView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BlueView.xib; sourceTree = "<group>"; };
+ 0444900412D253C800E8D955 /* wax.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = wax.framework; sourceTree = SOURCE_ROOT; };
+ 0444901D12D2543B00E8D955 /* BlueView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BlueView.xib; sourceTree = "<group>"; };
+ 0444901E12D2543B00E8D955 /* OrangeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrangeView.xib; sourceTree = "<group>"; };
+ 0444902412D255D000E8D955 /* init.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = init.lua; path = scripts/init.lua; sourceTree = "<group>"; };
+ 0444902512D255D000E8D955 /* BlueController.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = BlueController.lua; path = scripts/BlueController.lua; sourceTree = "<group>"; };
+ 0444902612D255D000E8D955 /* OrangeController.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OrangeController.lua; path = scripts/OrangeController.lua; sourceTree = "<group>"; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623240D0F684500981E51 /* IBExampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBExampleAppDelegate.h; sourceTree = "<group>"; };
+ 1D3623250D0F684500981E51 /* IBExampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IBExampleAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* IBExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IBExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* IBExample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBExample_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* IBExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "IBExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
- 91373B231066B2B30089FEE3 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = "<group>"; };
- 91373BEF1066C8930089FEE3 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -60,37 +48,28 @@
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */,
- 0422EC721135DFE6007F6343 /* libxml2.dylib in Frameworks */,
- 0413C4A41201DE830069C579 /* wax.framework in Frameworks */,
+ 0444900512D253C800E8D955 /* wax.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 0482731511260912003DFACB /* scripts */ = {
+ 0444901212D253ED00E8D955 /* Scripts */ = {
isa = PBXGroup;
children = (
- 0482731611260912003DFACB /* AppDelegate.lua */,
- 0482731711260912003DFACB /* tests */,
+ 0444902412D255D000E8D955 /* init.lua */,
+ 0444902512D255D000E8D955 /* BlueController.lua */,
+ 0444902612D255D000E8D955 /* OrangeController.lua */,
);
- name = scripts;
- path = data/scripts;
- sourceTree = "<group>";
- };
- 0482731711260912003DFACB /* tests */ = {
- isa = PBXGroup;
- children = (
- 0482731811260912003DFACB /* init.lua */,
- );
- path = tests;
+ name = Scripts;
sourceTree = "<group>";
};
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
- 0482723B1125E152003DFACB /* ProtocolLoader.h */,
- 0482723C1125E152003DFACB /* WaxTextField.h */,
+ 1D3623240D0F684500981E51 /* IBExampleAppDelegate.h */,
+ 1D3623250D0F684500981E51 /* IBExampleAppDelegate.m */,
);
path = Classes;
sourceTree = "<group>";
@@ -106,9 +85,8 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
- 29B97316FDCFA39411CA2CEA /* main.m */,
+ 0444901212D253ED00E8D955 /* Scripts */,
080E96DDFE201D6D7F000001 /* Classes */,
- 0482731511260912003DFACB /* scripts */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
@@ -121,6 +99,7 @@
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* IBExample_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
@@ -128,11 +107,10 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
- 91373B231066B2B30089FEE3 /* Entitlements.plist */,
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */,
+ 0444901D12D2543B00E8D955 /* BlueView.xib */,
+ 0444901E12D2543B00E8D955 /* OrangeView.xib */,
8D1107310486CEB800E47090 /* IBExample-Info.plist */,
- 91373BEF1066C8930089FEE3 /* Icon.png */,
- 04DC160E114708B7009D71CC /* OrangeView.xib */,
- 04DC1610114708BF009D71CC /* BlueView.xib */,
);
name = Resources;
sourceTree = "<group>";
@@ -140,8 +118,7 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
- 0413C4A31201DE830069C579 /* wax.framework */,
- 0422EC711135DFE6007F6343 /* libxml2.dylib */,
+ 0444900412D253C800E8D955 /* wax.framework */,
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
288765FC0DF74451002DB57D /* CoreGraphics.framework */,
@@ -159,10 +136,8 @@
1D60588D0D05DD3D006BFB54 /* Resources */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
- 91E31E0110644C62009BA4E9 /* Run Wax Scripts */,
);
buildRules = (
- 91373AF61066AFD70089FEE3 /* PBXBuildRule */,
);
dependencies = (
);
@@ -178,7 +153,14 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "IBExample" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectRoot = "";
@@ -193,38 +175,24 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 91373B241066B2B30089FEE3 /* Entitlements.plist in Resources */,
- 91373BF01066C8930089FEE3 /* Icon.png in Resources */,
- 04DC160F114708B7009D71CC /* OrangeView.xib in Resources */,
- 04DC1611114708BF009D71CC /* BlueView.xib in Resources */,
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
+ 0444901F12D2543B00E8D955 /* BlueView.xib in Resources */,
+ 0444902012D2543B00E8D955 /* OrangeView.xib in Resources */,
+ 0444902712D255D000E8D955 /* init.lua in Resources */,
+ 0444902812D255D000E8D955 /* BlueController.lua in Resources */,
+ 0444902912D255D000E8D955 /* OrangeController.lua in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
-/* Begin PBXShellScriptBuildPhase section */
- 91E31E0110644C62009BA4E9 /* Run Wax Scripts */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Wax Scripts";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"$PROJECT_DIR/wax.framework/resources/copy-scripts\"";
- };
-/* End PBXShellScriptBuildPhase section */
-
/* Begin PBXSourcesBuildPhase section */
1D60588E0D05DD3D006BFB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ 1D3623260D0F684500981E51 /* IBExampleAppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -244,8 +212,6 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = IBExample_Prefix.pch;
- GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
- HEADER_SEARCH_PATHS = "$(SDK_ROOT)/usr/include/libxml2";
INFOPLIST_FILE = "IBExample-Info.plist";
PRODUCT_NAME = IBExample;
};
@@ -262,80 +228,22 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = IBExample_Prefix.pch;
- HEADER_SEARCH_PATHS = "$(SDK_ROOT)/usr/include/libxml2";
INFOPLIST_FILE = "IBExample-Info.plist";
PRODUCT_NAME = IBExample;
+ VALIDATE_PRODUCT = YES;
};
name = Release;
};
- 91373B1B1066B28C0089FEE3 /* Ad Hoc */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- GCC_C_LANGUAGE_STANDARD = c99;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
- SDKROOT = iphoneos4.0;
- };
- name = "Ad Hoc";
- };
- 91373B1C1066B28C0089FEE3 /* Ad Hoc */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_ENTITLEMENTS = Entitlements.plist;
- COPY_PHASE_STRIP = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)\"",
- );
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = IBExample_Prefix.pch;
- HEADER_SEARCH_PATHS = "$(SDK_ROOT)/usr/include/libxml2";
- INFOPLIST_FILE = "IBExample-Info.plist";
- PRODUCT_NAME = IBExample;
- };
- name = "Ad Hoc";
- };
- 91373B201066B2980089FEE3 /* Distribution */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- GCC_C_LANGUAGE_STANDARD = c99;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
- SDKROOT = iphoneos4.0;
- };
- name = Distribution;
- };
- 91373B211066B2980089FEE3 /* Distribution */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- COPY_PHASE_STRIP = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)\"",
- );
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = IBExample_Prefix.pch;
- HEADER_SEARCH_PATHS = "$(SDK_ROOT)/usr/include/libxml2";
- INFOPLIST_FILE = "IBExample-Info.plist";
- PRODUCT_NAME = IBExample;
- };
- name = Distribution;
- };
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = iphoneos4.0;
+ SDKROOT = iphoneos;
};
name = Debug;
};
@@ -343,11 +251,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PREBINDING = NO;
- SDKROOT = iphoneos4.0;
+ SDKROOT = iphoneos;
};
name = Release;
};
@@ -359,8 +269,6 @@
buildConfigurations = (
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
- 91373B1C1066B28C0089FEE3 /* Ad Hoc */,
- 91373B211066B2980089FEE3 /* Distribution */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -370,8 +278,6 @@
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
- 91373B1B1066B28C0089FEE3 /* Ad Hoc */,
- 91373B201066B2980089FEE3 /* Distribution */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
View
BIN  examples/IBExample/Icon.png
Deleted file not rendered
View
262 examples/IBExample/MainWindow.xib
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">800</int>
+ <string key="IBDocument.SystemVersion">10D540</string>
+ <string key="IBDocument.InterfaceBuilderVersion">760</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">81</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="2"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIWindow" id="380026005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="380026005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>2.IBAttributePlaceholdersKey</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <object class="NSMutableDictionary">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <string>{{198, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>IBExampleAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">9</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">AppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">BlueController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">OrangeController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">BlueController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>textField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>buttonTouched:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">OrangeController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>textField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>buttonTouched:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">IBExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">81</string>
+ </data>
+</archive>
View
128 examples/IBExample/OrangeView.xib
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10C540</string>
- <string key="IBDocument.InterfaceBuilderVersion">740</string>
- <string key="IBDocument.AppKitVersion">1038.25</string>
- <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">62</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -31,9 +31,11 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
@@ -52,6 +54,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUITag">1</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<object class="NSFont" key="IBUIFont">
@@ -84,6 +87,7 @@
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUITag">2</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">File's Owner is set to the custom class OrangeController</string>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
@@ -101,13 +105,13 @@
<int key="IBUITextAlignment">1</int>
</object>
</object>
- <string key="NSFrameSize">{320, 460}</string>
+ <string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAwLjgwMDAwMDAxMTkgMC40MDAwMDAwMDYAA</bytes>
</object>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -115,27 +119,28 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">view</string>
+ <string key="label">textField</string>
<reference key="source" ref="372490531"/>
- <reference key="destination" ref="191373211"/>
+ <reference key="destination" ref="201944532"/>
</object>
- <int key="connectionID">5</int>
+ <int key="connectionID">9</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">button</string>
+ <string key="label">view</string>
<reference key="source" ref="372490531"/>
- <reference key="destination" ref="307630100"/>
+ <reference key="destination" ref="191373211"/>
</object>
- <int key="connectionID">6</int>
+ <int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">textField</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="201944532"/>
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">buttonTouched:</string>
+ <reference key="source" ref="307630100"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
</object>
- <int key="connectionID">8</int>
+ <int key="connectionID">11</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -217,7 +222,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">8</int>
+ <int key="maxID">11</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -225,17 +230,26 @@
<object class="IBPartialClassDescription">
<string key="className">OrangeController</string>
<string key="superclassName">UIViewController</string>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>button</string>
- <string>textField</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">buttonTouched:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">buttonTouched:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">buttonTouched:</string>
+ <string key="candidateClassName">id</string>
</object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">textField</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">textField</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">textField</string>
+ <string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -285,13 +299,6 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
@@ -299,13 +306,6 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
@@ -313,13 +313,6 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
@@ -341,13 +334,6 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
@@ -414,6 +400,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -436,6 +429,20 @@
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
@@ -450,9 +457,10 @@
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="768" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -461,6 +469,6 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">IBExample.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">3.1</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
View
1  examples/IBExample/Rakefile
@@ -1 +0,0 @@
-import "wax/lib/project.rake"
View
1  examples/IBExample/Rakefile
View
18 examples/IBExample/data/scripts/AppDelegate.lua
@@ -1,18 +0,0 @@
-require "BlueController"
-require "OrangeController"
-
--- these are global just to make the code smaller... IT'S GENERALLY A BAD IDEA
-blueController = BlueController:init()
-orangeController = OrangeController:init()
-
-waxClass{"AppDelegate", protocols = {"UIApplicationDelegate"}}
-
-function applicationDidFinishLaunching(self, application)
- local frame = UIScreen:mainScreen():bounds()
- self.window = UIWindow:initWithFrame(frame)
-
-
- self.window:addSubview(blueController:view())
-
- self.window:makeKeyAndVisible()
-end
View
23 examples/IBExample/data/scripts/BlueController.lua
@@ -1,23 +0,0 @@
-waxClass{"BlueController", UIViewController}
-
-function init(self)
- self.super:initWithNibName_bundle("BlueView", nil)
-
- return self
-end
-
-function viewDidLoad(self)
- -- All IB views are accessed through tags. You set a view's tag with the
- -- inspector window in IB
-
- self.button = self:view():viewWithTag(1)
- self.button:addTarget_action_forControlEvents(self, "buttonTouched:", UIControlEventTouchUpInside)
-
- self.textField = self:view():viewWithTag(2)
- self.textField:setText("This was created in Lua!")
-end
-
-function buttonTouched(self, sender)
- self:view():superview():addSubview(orangeController:view())
- self:view():removeFromSuperview()
-end
View
34 examples/IBExample/data/scripts/OrangeController.lua
@@ -1,34 +0,0 @@
-waxClass{"OrangeController", UIViewController}
-
-function init(self)
- self.super:initWithNibName_bundle("OrangeView", nil)
-
- return self
-end
-
-function viewDidLoad(self)
- -- All outlets are dynamically set to values on the lua object. To do this you
- -- need to create a custom 'OrangeController' class in IB's Library Window.
- --
- -- Here are the steps I took to bind the views to this lua object
- -- 1.) Click the 'classes' tab in the Library Windown
- -- 2.) Find the UIViewController class, right click and choose 'New Subclass...'
- -- 3.) Name the subclass 'OrangeController'
- -- 4.) The class editor for 'OrangeController' is now at the bottom of the
- -- Library Window, click on the 'Outlets' tab
- -- 5.) Add an outlet named 'button'
- -- 6.) Add an outlet named 'textfield'
- -- 7.) Set the File's Owner to 'OrangeController'
- -- 8.) Hookup the views like you normally would in IB
- --
- -- I wish I could automate these steps like macruby does, but I'm not sure how
- -- to tap into IB
-
- self.button:addTarget_action_forControlEvents(self, "buttonTouched:", UIControlEventTouchUpInside)
- self.textField:setText("This was also created in Lua!")
-end
-
-function buttonTouched(self, sender)
- self:view():superview():addSubview(blueController:view())
- self:view():removeFromSuperview()
-end
View
21 examples/IBExample/main.m
@@ -2,29 +2,16 @@
// main.m
// IBExample
//
-// Created by Corey Johnson on 3/9/10.
-// Copyright Probably Interactive 2010. All rights reserved.
+// Created by Corey on 1/3/11.
+// Copyright 2011 me. All rights reserved.
//
-// This where the magic happens!
-// Wax doesn't use nibs to load the main view, everything is done within the
-// AppDelegate.lua file
#import <UIKit/UIKit.h>
-#import "ProtocolLoader.h"
-#import "WaxTextField.h"
-
-#import "wax/wax.h"
-#import "wax/wax_http.h"
-#import "wax/wax_json.h"
-#import "wax/wax_xml.h"
-
int main(int argc, char *argv[]) {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- wax_startWithExtensions(luaopen_wax_http, luaopen_wax_json, luaopen_wax_xml, nil);
-
- int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
View
24 examples/IBExample/scripts/BlueController.lua
@@ -0,0 +1,24 @@
+waxClass{"BlueController", UIViewController}
+
+IBOutlet "textField" -- This makes the property visible from IB
+
+function init(self)
+ self.super:initWithNibName_bundle("BlueView", nil)
+
+ return self
+end
+
+function viewDidLoad(self)
+ -- The button and textField varibles are automatically created and added to the class via IB
+ self.textField:setText("This text was created in Lua!")
+end
+
+-- Put IBAction next to, or above a function to make it appear in IB
+function buttonTouched(self, sender) -- IBAction
+ local parentView = self:view():superview()
+ UIView:beginAnimations_context(nil, nil)
+ UIView:setAnimationTransition_forView_cache(UIViewAnimationTransitionFlipFromLeft, parentView, true)
+ self:view():removeFromSuperview()
+ parentView:addSubview(orangeController:view())
+ UIView:commitAnimations()
+end
View
23 examples/IBExample/scripts/OrangeController.lua
@@ -0,0 +1,23 @@
+waxClass{"OrangeController", UIViewController}
+
+IBOutlet "textField" -- This makes the property visible from IB
+
+function init(self)
+ self.super:initWithNibName_bundle("OrangeView", nil)
+ return self
+end
+
+function viewDidLoad(self)
+ -- The button and textField varibles are automatically created and added to the class via IB
+ self.textField:setText("This was also created in Lua!")
+end
+
+-- Put IBAction next to, or above a function to make it appear in IB
+function buttonTouched(self, sender) -- IBAction
+ local parentView = self:view():superview()
+ UIView:beginAnimations_context(nil, nil)
+ UIView:setAnimationTransition_forView_cache(UIViewAnimationTransitionFlipFromRight, parentView, true)
+ self:view():removeFromSuperview()
+ parentView:addSubview(blueController:view())
+ UIView:commitAnimations()
+end
View
29 examples/IBExample/scripts/init.lua
@@ -0,0 +1,29 @@
+-- How does this work?
+-- 1.) If you created your wax project from the xcode template, you can skip to
+-- step #2.
+-- If you are using the wax.framework copy the rakefile into your project
+-- root like this:
+--
+-- ln -s wax.framework/Resources/project.rake Rakefile
+--
+-- 2.) Use IBOutlet and IBAction to make variables visible to IB. Look at
+-- BlueController.lua and OrangeController.lua for examples of this.
+--
+-- 3.) From the shell, cd into your project dir and type:
+--
+-- rake ib
+--
+-- This will register your waxClasses and their Outlets and Actions
+-- with IB
+--
+-- 4.) Open up IB and connect the outlets and actions!
+
+require "BlueController"
+require "OrangeController"
+
+-- these are global just to make the code smaller... IT'S GENERALLY A BAD IDEA!
+blueController = BlueController:init()
+orangeController = OrangeController:init()
+
+local window = UIApplication:sharedApplication():keyWindow()
+window:addSubview(blueController:view())
View
0  examples/IBExample/data/scripts/tests/init.lua → examples/IBExample/scripts/tests/init.lua
File renamed without changes
View
1  lib/project.rake
@@ -1,5 +1,6 @@
TEXTMATE_FILE="TEXTMATE"
WAX_PATH = File.expand_path("wax")
+WAX_PATH = File.expand_path("wax.framework/Resources") if not File.exists?(WAX_PATH)
desc "Create a Wax TextMate project"
task :tm => "TEXTMATE" do
View
3  tools/Framework/Scripts/package
@@ -63,6 +63,9 @@ cp wax/lib/extensions/filesystem/wax_filesystem.h $FRAMEWORK_DIR/Headers/
cp Framework.plist $FRAMEWORK_DIR/Resources/Info.plist
cp wax/lib/build-scripts/copy-scripts.sh $FRAMEWORK_DIR/Resources/
+cp wax/lib/project.rake $FRAMEWORK_DIR/Resources/
+cp -RL wax/bin $FRAMEWORK_DIR/Resources/
+
# Copy into wax's framework dir
WAX_FRAMEWORK_DIR="../../framework"
View
157 tools/Framework/done/bin/hammer
@@ -0,0 +1,157 @@
+#!/usr/bin/env ruby
+
+# ---------------------
+# Builds xcode projects
+# ---------------------
+
+require 'optparse'
+require 'ostruct'
+require 'fileutils'
+require 'open3'
+require 'stringio'
+
+$stdout.sync = true
+
+class Hammer
+ @args = {"-configuration" => "Debug"}
+ @settings = {}
+
+ @should_run_headless = false
+ @should_run = false
+ @verbose = false
+ @device = "iphone"
+
+ def self.setup
+ opts = OptionParser.new do |opts|
+ opts.banner = "Description: Builds an iPhone app and optionaly will run it in the simulator"
+ opts.banner = "Usage: hammer [options]"
+ opts.on("-h", "--help", "Help stuff") do
+ puts opts
+ exit
+ end
+
+ opts.on("-c", "--configuration ARG", "Debug? Release?") do |v|
+ @args["-configuration"] = v
+ end
+
+ opts.on("-o", "--outputname ARG", "Name of the executable") do |v|
+ v.gsub!(/\.app$/, "") # .app is automatically added by xcode
+ @settings["CONFIGURATION_BUILD_DIR"]= "."
+ @settings["PRODUCT_NAME"] = v
+ end
+
+ opts.on("-h", "--headless", "Just runs the app from the command line, no simulator") do
+ @should_run_headless = true
+ end
+
+ opts.on("-r", "--run", "Run the app in the simulator") do
+ @should_run = true
+
+ end
+
+ opts.on("-d", "--device ARG", "Choose what device to run on (iphone/ipad)") do |v|
+ @device = v
+ end
+
+ opts.on("-s", "--sdk ARG", "Choose he SDK. Use --showsdks to see options.") do |v|
+ v = "iphonesimulator#{v}" if v =~ /^[\d\.]+/ # if only the version is given... assume user wants a simulator build
+ @args["-sdk"] = v
+ end
+
+ opts.on("-v", "--verbose", "blah blah blah.") do |v|
+ @verbose = v
+ end
+
+ opts.on("--showsdks", "Lists available SDKS.") do
+ output = `xcodebuild -showsdks`
+ sdks = output.scan(/-sdk (.*?$)/m)
+ puts "Availible sdks:"
+ sdks.each {|sdk| puts " #{sdk}"}
+
+ exit
+ end
+ end.parse!
+
+ # if no sdk given, default to the most recent simulator build
+ if !@args["-sdk"]
+ output = `xcodebuild -showsdks`
+ sdks = output.scan(/-sdk (.*?$)/m).map {|a| a.join}
+
+ if @device !~ /pad/i # remove sdk version 3.2, it is ipad only
+ sdks.reject! {|a| a =~ /3.2$/}
+ end
+
+ @args["-sdk"] = sdks.find_all {|sdk| sdk =~ /iphonesimulator/}.sort.last
+ end
+ end
+
+ def self.build # Build the app
+ extra_args = ARGV
+
+ extra_args += ["build"] if extra_args.empty?
+ arg_string = @args.collect {|k, v| v ? "#{k} #{v}" : k}.join(" ")
+ setting_string = @settings.collect {|k, v| v ? "#{k}=#{v}" : k}.join(" ")
+ cmd = "xcodebuild #{arg_string} #{setting_string} #{extra_args.join(' ')}"
+ puts cmd if @verbose
+
+ output = `#{cmd}`
+ successful = ($? == 0)
+
+ if @verbose or not successful
+ puts output
+ if not successful
+ puts("** BUILD FAILED **")
+ exit 1
+ end
+ end
+
+ # Take on the builds ENV
+ output.scan(/^\s*setenv\s+(\w+)\s+(.*?)$/).each {|k,v| ENV[k] = v}
+
+ return output
+ end
+
+ def self.headless
+ return if not @should_run_headless
+ if ENV["PLATFORM_NAME"] !~ /simulator/
+ puts "Can only run tests on the simulator not #{ENV["PLATFORM_NAME"]}"
+ exit 1
+ end
+
+ `/usr/bin/killall "iPhone Simulator" 2> /dev/null` #make sure the simulator is killed
+
+ # See http://developer.apple.com/technotes/tn2004/tn2124.html for an explanation of these environment variables.
+ ENV["DYLD_ROOT_PATH"] = ENV["SDKROOT"]
+ ENV["DYLD_FRAMEWORK_PATH"] = ENV["CONFIGURATION_BUILD_DIR"]
+ ENV["IPHONE_SIMULATOR_ROOT"] = ENV["SDKROOT"]
+ ENV["CFFIXED_USER_HOME"] = ENV["TEMP_FILES_DIR"] + "/iPhone Simulator User Dir"
+
+ FileUtils.rm_rf(ENV["CFFIXED_USER_HOME"]) if File.exists?(ENV["CFFIXED_USER_HOME"])
+ FileUtils.mkdir_p(ENV["CFFIXED_USER_HOME"] + "/Documents")
+
+ system("#{self.app_path}/#{ENV['EXECUTABLE_NAME']} -RegisterForSystemEvents")
+
+ exit 0
+ end
+
+ def self.run
+ return if not @should_run
+ `/usr/bin/killall "iPhone Simulator" 2> /dev/null` #make sure the simulator is killed
+ sdk_version = @args["-sdk"][/([\d\.]+)/, 1]
+ cmd = "wax/bin/waxsim -d #{@device} -s #{sdk_version} #{self.app_path} #{File.expand_path('.')}"
+ puts cmd
+ system cmd
+ end
+
+ def self.app_path
+ return "#{ENV['TARGET_BUILD_DIR']}/#{ENV['EXECUTABLE_FOLDER_PATH']}"
+ end
+end
+
+Hammer.setup
+
+Hammer.build
+
+Hammer.headless
+
+Hammer.run
View
131 tools/Framework/done/bin/update-xibs
@@ -0,0 +1,131 @@
+#!/usr/bin/env ruby
+
+require 'rubygems'
+require 'xml'
+require 'erb'
+
+PROJECT_DIR = Dir.pwd
+XML.indent_tree_output = true
+XML.default_tree_indent_string = "\t"
+
+class LuaClass
+ attr :class_name
+ attr :superclass_name
+ attr :outlets
+ attr :actions
+
+ def self.all
+ lua_files = Dir["#{PROJECT_DIR}/data/**/*.lua"]
+ lua_files.map {|f| parse(open(f).read)}.compact
+ end
+
+ def self.parse(string)
+ if string =~ /waxClass[{(\s]+(.*?)[})\s]+$/
+ arguments = $1.split(/\s*,\s*/).map {|a| a.sub(/^['"]([^'"]+).*/, "\\1")}
+
+ class_name = arguments[0]
+ superclass_name = arguments[1]
+ superclass_name = nil if arguments[1] and arguments[1] =~ /=/ # Don't want no protocols!
+
+ return new(class_name, superclass_name, string)
+ end
+
+ return nil
+ end
+
+ def initialize(class_name, superclass_name, contents)
+ @class_name = class_name
+ @superclass_name = superclass_name
+ @outlets = contents.scan(/IBOutlet\s+[\s"'(]+([^"']+)[\s)"']/).map {|o| o[0]}
+ @actions = contents.scan(/function\s+(\w+).*?--\s*IBA/i).map {|o| o[0]}
+ end
+
+ def to_xml
+ @@template ||= DATA.read
+
+ xml = ERB.new(@@template, 0, "-").result(binding)
+ doc = XML::Parser.string(xml, :encoding => XML::Encoding::UTF_8, :options => XML::Parser::Options::NOBLANKS).parse
+ doc.root
+ end
+end
+
+# A bunch of helper methods
+def xib_files
+ xibs = Dir["#{PROJECT_DIR}/**/*.xib"]
+ xibs.reject! {|f| f =~ /^#{Regexp.escape PROJECT_DIR}\/wax/} # Don't include any of the xibs in the wax folder
+
+ xibs
+end
+
+classes_as_xml = LuaClass.all.map {|o| o.to_xml}
+
+for xib_file in xib_files
+ puts(xib_file)
+ doc = XML::Document.file(xib_file, :encoding => XML::Encoding::UTF_8, :options => XML::Parser::Options::NOBLANKS)
+ ib_classes = doc.find("//object[@key='IBDocument.Classes']").first
+
+ doc.find("//object[@key='referencedPartialClassDescriptions']").each {|e| e.remove!}
+ class_descriptions = XML::Node.new("object")
+ class_descriptions["class"] = "NSMutableArray"
+ class_descriptions["key"] = "referencedPartialClassDescriptions"
+
+ encoding_node = XML::Node.new("bool")
+ encoding_node['key'] = "EncodedWithXMLCoder"
+ encoding_node.content = "YES"
+ class_descriptions << encoding_node
+
+ ib_classes << class_descriptions
+
+ class_descriptions.find("object[@class='IBPartialClassDescription']").each {|e| e.remove!}
+ classes_as_xml.each {|e| class_descriptions << e.copy(true)}
+ doc.save(xib_file)
+end
+
+
+__END__
+<object class="IBPartialClassDescription">
+ <string key="className"><%= @class_name %></string>
+ <string key="superclassName"><%= @superclass_name or "NSObject" %></string>
+
+ <%- if @outlets.any? -%>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <%- for outlet in @outlets -%>
+ <string><%= outlet %></string>
+ <%- end -%>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <%- for outlet in @outlets -%>
+ <string>id</string>
+ <%- end -%>
+ </object>
+ </object>
+ <%- end -%>
+
+ <%- if @actions.any? -%>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <%- for action in @actions -%>
+ <string><%= action %>:</string>
+ <%- end -%>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <%- for action in actions -%>
+ <string>id</string>
+ <%- end -%>
+ </object>
+ </object>
+ <%- end -%>
+
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+</object>
+
View
BIN  tools/Framework/done/bin/waxsim
Binary file not shown
View
1  tools/Framework/wax/bin
Please sign in to comment.
Something went wrong with that request. Please try again.