mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 05:27:03 +00:00
Added : -makeViewWithIdentifier:owner: -rowForView: columnForView: less performant tahn cocoa because we cycle through all visible rows. But these methods are generally used once when editing manually. Added identifier property to CPView. retro and forward (in IB) compatible with the existing API. You can use IB table view based without the new API. Existing table views / Nib won't break. CPTableView view based example. Featuring: IB made data views, different views in the same column, subviews binding in IB When the view is found automatically in the cib, instantiate with _delegate as the owner (cocoa behavior).
95 lines
3.0 KiB
JavaScript
95 lines
3.0 KiB
JavaScript
/*
|
|
* Jakefile
|
|
* CPTableViewLionCibTest
|
|
*
|
|
* Created by You on March 8, 2012.
|
|
* Copyright 2012, Your Company All rights reserved.
|
|
*/
|
|
|
|
var ENV = require("system").env,
|
|
FILE = require("file"),
|
|
JAKE = require("jake"),
|
|
task = JAKE.task,
|
|
FileList = JAKE.FileList,
|
|
app = require("cappuccino/jake").app,
|
|
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
|
|
OS = require("os");
|
|
|
|
app ("CPTableViewLionCibTest", function(task)
|
|
{
|
|
task.setBuildIntermediatesPath(FILE.join("Build", "CPTableViewLionCibTest.build", configuration));
|
|
task.setBuildPath(FILE.join("Build", configuration));
|
|
|
|
task.setProductName("CPTableViewLionCibTest");
|
|
task.setIdentifier("com.yourcompany.CPTableViewLionCibTest");
|
|
task.setVersion("1.0");
|
|
task.setAuthor("Your Company");
|
|
task.setEmail("feedback @nospam@ yourcompany.com");
|
|
task.setSummary("CPTableViewLionCibTest");
|
|
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
|
|
task.setResources(new FileList("Resources/**"));
|
|
task.setIndexFilePath("index.html");
|
|
task.setInfoPlistPath("Info.plist");
|
|
task.setNib2CibFlags("-R Resources/");
|
|
|
|
if (configuration === "Debug")
|
|
task.setCompilerFlags("-DDEBUG -g");
|
|
else
|
|
task.setCompilerFlags("-O");
|
|
});
|
|
|
|
task ("default", ["CPTableViewLionCibTest"], function()
|
|
{
|
|
printResults(configuration);
|
|
});
|
|
|
|
task ("build", ["default"]);
|
|
|
|
task ("debug", function()
|
|
{
|
|
ENV["CONFIGURATION"] = "Debug";
|
|
JAKE.subjake(["."], "build", ENV);
|
|
});
|
|
|
|
task ("release", function()
|
|
{
|
|
ENV["CONFIGURATION"] = "Release";
|
|
JAKE.subjake(["."], "build", ENV);
|
|
});
|
|
|
|
task ("run", ["debug"], function()
|
|
{
|
|
OS.system(["open", FILE.join("Build", "Debug", "CPTableViewLionCibTest", "index.html")]);
|
|
});
|
|
|
|
task ("run-release", ["release"], function()
|
|
{
|
|
OS.system(["open", FILE.join("Build", "Release", "CPTableViewLionCibTest", "index.html")]);
|
|
});
|
|
|
|
task ("deploy", ["release"], function()
|
|
{
|
|
FILE.mkdirs(FILE.join("Build", "Deployment", "CPTableViewLionCibTest"));
|
|
OS.system(["press", "-f", FILE.join("Build", "Release", "CPTableViewLionCibTest"), FILE.join("Build", "Deployment", "CPTableViewLionCibTest")]);
|
|
printResults("Deployment")
|
|
});
|
|
|
|
task ("desktop", ["release"], function()
|
|
{
|
|
FILE.mkdirs(FILE.join("Build", "Desktop", "CPTableViewLionCibTest"));
|
|
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTableViewLionCibTest"), FILE.join("Build", "Desktop", "CPTableViewLionCibTest", "CPTableViewLionCibTest.app"));
|
|
printResults("Desktop")
|
|
});
|
|
|
|
task ("run-desktop", ["desktop"], function()
|
|
{
|
|
OS.system([FILE.join("Build", "Desktop", "CPTableViewLionCibTest", "CPTableViewLionCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]);
|
|
});
|
|
|
|
function printResults(configuration)
|
|
{
|
|
print("----------------------------");
|
|
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTableViewLionCibTest"));
|
|
print("----------------------------");
|
|
}
|