forked from mascarenhas/scxib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rob Linton
committed
Sep 17, 2010
0 parents
commit affc8e2
Showing
17 changed files
with
4,489 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# =========================================================================== | ||
# Project: SCXIB | ||
# Copyright: ©2010 Robert Linton | ||
# Contributors: Devin Torres, Kurt Williams | ||
# =========================================================================== | ||
|
||
config :scxib, :required => :sproutcore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
SCXIB - Interface Builder for the Web | ||
Copyright (c) 2010 Robert Linton <[email protected]> | ||
Copyright (c) 2010 Devin Torres <[email protected]> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
SCXIB - Interface Builder for the Web | ||
===================================== | ||
|
||
SCXIB (pronounced ska-zib) grew out of the desire to use Interface Builder | ||
as a design tool for SproutCore applications. | ||
|
||
[View the Demo Video] | ||
|
||
## How to use SCXIB | ||
|
||
### On-the-fly Application loading | ||
|
||
Transform XIB files for your SproutCore application to load and use during development: | ||
|
||
SCXIB.loadXibWithOptions(sc_static('MainPage.xib'), { | ||
namespace: DemoApp.NAMESPACE, | ||
pageName: 'mainPage', | ||
callback: function () { | ||
DemoApp.getPath('mainPage.mainPane').append(); | ||
} | ||
}); | ||
|
||
### XIB to JavaScript | ||
|
||
Transform a XIB file into a JavaScript file for your SproutCore application | ||
using a command line tool: | ||
`./bin/scxib -namespace DemoApp -page mainPage apps/demo_app/resources/MainPage.xib` | ||
|
||
## Requirements | ||
|
||
- Interface Builder for XCode 3.2.x | ||
- SproutCore | ||
|
||
## Current Class Mappings | ||
|
||
- NSWindow -> SC.Page | ||
- NSPanel -> SC.Panel | ||
- NSView -> SC.View | ||
- NSCustomView -> your app's custom view name | ||
- NSLabel -> SC.LabelView | ||
- NSTextField -> SC.TextFieldView | ||
- NSSplitView -> SC.SplitView | ||
- IKImageView -> SC.ImageView | ||
- NSCheckBox -> SC.CheckBoxView | ||
- NSButton -> SC.ButtonView | ||
- NSPopUpButton -> SC.SelectFieldView | ||
- NSSegmentedControl -> SC.SegmentedView | ||
- NSCollectionView -> SC.SourceListView | ||
- NSScrollView -> SC.ScrollView | ||
- NSWebView -> SC.WebView | ||
- NSMatrix -> SC.RadioView | ||
- NSTabView -> SC.TabView | ||
- NSBox Horizontal/Vertical -> SC.SeparatorView:layoutDirection SC.LAYOUT\_HORIZONTAL/SC.LAYOUT\_VERTICAL | ||
|
||
[View the Demo Video]: http://vimeo.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# =========================================================================== | ||
# Project: SCXIB | ||
# Copyright: ©2010 Robert Linton | ||
# Contributors: Devin Torres, Kurt Williams | ||
# =========================================================================== | ||
|
||
config :demo_app, :required => :scxib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// ========================================================================== | ||
// Project: DemoApp | ||
// Copyright: ©2010 Robert Linton | ||
// Contributors: Devin Torres, Kurt Williams | ||
// ========================================================================== | ||
/*globals DemoApp */ | ||
|
||
DemoApp.demoController = SC.Object.create({ | ||
|
||
people: [], | ||
message: 'foobar' | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// ========================================================================== | ||
// Project: DemoApp | ||
// Copyright: ©2010 Robert Linton | ||
// Contributors: Devin Torres, Kurt Williams | ||
// ========================================================================== | ||
/*globals DemoApp */ | ||
|
||
DemoApp = SC.Application.create({ | ||
|
||
NAMESPACE: 'DemoApp', | ||
VERSION: '0.1.0', | ||
|
||
store: SC.Store.create().from(SC.Record.fixtures) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
sc_require('models/person'); | ||
|
||
DemoApp.Person.FIXTURES = [ | ||
|
||
{ guid: 1, | ||
firstName: "Michael", | ||
lastName: "Scott" }, | ||
|
||
{ guid: 2, | ||
firstName: "Dwight", | ||
lastName: "Schrute" }, | ||
|
||
{ guid: 3, | ||
firstName: "Jim", | ||
lastName: "Halpert" }, | ||
|
||
{ guid: 4, | ||
firstName: "Pam", | ||
lastName: "Beesly" }, | ||
|
||
{ guid: 5, | ||
firstName: "Ryan", | ||
lastName: "Howard" } | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// ========================================================================== | ||
// Project: DemoApp | ||
// Copyright: ©2010 Robert Linton | ||
// Contributors: Devin Torres, Kurt Williams | ||
// ========================================================================== | ||
/*globals DemoApp */ | ||
|
||
DemoApp.main = function main() { | ||
|
||
SCXIB.loadXibWithOptions(sc_static('MainPage.xib'), { | ||
namespace: DemoApp.NAMESPACE, | ||
callback: function () { | ||
var people = DemoApp.store.find(DemoApp.Person); | ||
DemoApp.demoController.set('people', people); | ||
DemoApp.getPath('mainPage.mainPane').append(); | ||
} | ||
}); | ||
|
||
}; | ||
|
||
function main() { DemoApp.main(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// ========================================================================== | ||
// Project: DemoApp.Person | ||
// Copyright: ©2010 Robert Linton | ||
// Contributors: Devin Torres, Kurt Williams | ||
// ========================================================================== | ||
/*globals DemoApp */ | ||
|
||
DemoApp.Person = SC.Record.extend({ | ||
|
||
// TODO: Add your own code here. | ||
name: function(){ | ||
return this.get('firstName') + ' ' + this.get('lastName'); | ||
}.property('firstName', 'lastName').cacheable(), | ||
|
||
}) ; |
Oops, something went wrong.