Skip to content

Commit

Permalink
Merge branch '0.7b' of git@github.com:280north/cappuccino into 0.7b
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Boucher committed May 7, 2009
2 parents 3d2cf3f + 0cd3312 commit 4f024a0
Show file tree
Hide file tree
Showing 15 changed files with 70 additions and 54 deletions.
6 changes: 3 additions & 3 deletions AppKit/Cib/CPCib.j
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";
- (void)connection:(CPURLConnection)aConnection didReceiveData:(CPString)data
{
_data = [CPData dataWithString:data];

if ([_loadDelegate respondsToSelector:@selector(cibDidFinishLoading:)])
[_loadDelegate cibDidFinishLoading:self];
}

- (void)connection:(CPURLConnection)aConnection didFailWithError:(CPError)anError
Expand All @@ -168,6 +165,9 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";

- (void)connectionDidFinishLoading:(CPURLConnection)aConnection
{
if ([_loadDelegate respondsToSelector:@selector(cibDidFinishLoading:)])
[_loadDelegate cibDidFinishLoading:self];

_loadDelegate = nil;
}

Expand Down
3 changes: 2 additions & 1 deletion AppKit/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ ObjectiveJ::BundleTask.new(:AppKit) do |t|
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
t.platforms = [ObjectiveJ::Platform::Browser, ObjectiveJ::Platform::Rhino]
t.type = ObjectiveJ::Bundle::Type::Framework
end
Expand Down
3 changes: 2 additions & 1 deletion AppKit/Tools/BlendKit/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ ObjectiveJ::BundleTask.new(:BlendKit) do |t|
t.resources = FileList['Resources/*'].to_a
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
t.type = ObjectiveJ::Bundle::Type::Framework
end

Expand Down
3 changes: 2 additions & 1 deletion AppKit/Tools/blend/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ObjectiveJ::BundleTask.new(:blend) do |t|
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Debug'
end

#executable in environment directory
Expand Down
2 changes: 1 addition & 1 deletion Foundation/CPKeyedArchiver.j
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ var _CPKeyedArchiverEncodeObject = function(self, anObject, isConditional)
}
else
{
var theClass = [anObject classForKeyedArchiver],
var theClass = [object classForKeyedArchiver],
plistObject = nil;

if ((theClass === _CPKeyedArchiverStringClass) || (theClass === _CPKeyedArchiverNumberClass))// || theClass == _CPKeyedArchiverBooleanClass)
Expand Down
3 changes: 2 additions & 1 deletion Foundation/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ ObjectiveJ::BundleTask.new(:Foundation) do |t|
t.resources = FileList['Resources/*'].to_a
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
t.type = ObjectiveJ::Bundle::Type::Framework
end

Expand Down
2 changes: 1 addition & 1 deletion Objective-J/Tools/objjc/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function compress(/*String*/ aCode, /*Object*/ flags, /*File*/ tmpFile)

writer.close();

return exec(["java", "-jar", OBJJ_HOME + "/lib/shrinksafe.jar", "-c", tmpFile.getCanonicalPath()]);
return exec(["java", "-jar", OBJJ_HOME + "/lib/objjc/shrinksafe.jar", "-c", tmpFile.getCanonicalPath()]);
}

//#define SET_CONTEXT(aFragment, aContext) aFragment.context = aContext
Expand Down
36 changes: 0 additions & 36 deletions Rake/lib/objective-j.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,6 @@ class Platform
BrowserDesktop = 'browser-desktop'
BrowserIPhone = 'browser-iphone'
BrowseriPhone = 'browser-iphone'

PLATFORM_DIRECTORIES =
{
Platform::ObjJ => 'objj.platform',
Platform::Rhino => 'rhino.platform',
Platform::Browser => 'browser.platform',
Platform::BrowserDesktop => 'browser-desktop.platform',
Platform::BrowserIPhone => 'browser-iphone.platform'
}

PLATFORM_FLAGS =
{
Platform::ObjJ => [],
Platform::Rhino => ['PLATFORM_RHINO'],
Platform::Browser => ['PLATFORM_BROWSER', 'PLATFORM_DOM'],
Platform::BrowserDesktop => ['PLATFORM_BROWSER', 'PLATFORM_DOM', 'PLATFORM_DESKTOP'],
Platform::BrowserIPhone => ['PLATFORM_BROWSER', 'PLATFORM_DOM', 'PLATFORM_IPHONE', 'PLATFORM_MOBILE']
}

def Platform.directory(aPlatform)
return PLATFORM_DIRECTORIES[aPlatform]
end

def Platform.flags(aPlatform)
return PLATFORM_FLAGS[aPlatform]
end
end

end # module ObjectiveJ
Expand Down Expand Up @@ -82,13 +56,3 @@ def file_d(*args, &block)

file fileTask.name => fileDirectory
end

def resolve_flags(flags)

case flags
when nil then ''
when String then '-D' + flags
when Array then flags.map { |flag| '-D' + flag }.join(' ')
when Hash then flags.map { |flag, value| '-D' + flag + (value != '' ? '=' + value : '') }.join(' ')
end
end
10 changes: 5 additions & 5 deletions Rake/lib/objective-j/bundletask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,10 @@ def copy_of(obj)
PLATFORM_FLAGS =
{
Platform::ObjJ => [],
Platform::Rhino => ['PLATFORM_RHINO'],
Platform::Browser => ['PLATFORM_BROWSER', 'PLATFORM_DOM'],
Platform::BrowserDesktop => ['PLATFORM_BROWSER', 'PLATFORM_DOM', 'PLATFORM_DESKTOP'],
Platform::BrowserIPhone => ['PLATFORM_BROWSER', 'PLATFORM_DOM', 'PLATFORM_IPHONE', 'PLATFORM_MOBILE']
Platform::Rhino => ['-DPLATFORM_RHINO'],
Platform::Browser => ['-DPLATFORM_BROWSER', '-DPLATFORM_DOM'],
Platform::BrowserDesktop => ['-DPLATFORM_BROWSER', '-DPLATFORM_DOM', '-DPLATFORM_DESKTOP'],
Platform::BrowserIPhone => ['-DPLATFORM_BROWSER', '-DPLATFORM_DOM', '-DPLATFORM_IPHONE', '-DPLATFORM_MOBILE']
}

# Objective-J Bundle spec containing the metadata for this bundle.
Expand Down Expand Up @@ -451,7 +451,7 @@ def define
# We no longer get this for free with file_d
FileUtils.mkdir_p File.join(build_path, PLATFORM_DIRECTORIES[platform])

IO.popen("objjc #{resolve_flags(flags)} #{resolve_flags(PLATFORM_FLAGS[platform])} #{platform_sources.join(' ')} #{preprocessed_files.join(' ')}") do |objjc|
IO.popen("objjc #{flags.join(' ')} #{PLATFORM_FLAGS[platform].join(' ')} #{platform_sources.join(' ')} #{preprocessed_files.join(' ')}") do |objjc|
objjc.sync = true

while str = objjc.gets
Expand Down
3 changes: 2 additions & 1 deletion Tools/bake/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ObjectiveJ::BundleTask.new(:bake) do |t|
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
end

#executable in environment directory
Expand Down
3 changes: 2 additions & 1 deletion Tools/capp/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ ObjectiveJ::BundleTask.new(:capp) do |t|
t.resources = FileList['Resources/*', 'Templates']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
end

#executable in environment directory
Expand Down
21 changes: 21 additions & 0 deletions Tools/nib2cib/NSSecureTextField.j
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* NSSecureTextField.j
* nib2cib
*
* Created by Francisco Tolmasky.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

@import <AppKit/CPSecureTextField.j>

Expand Down
23 changes: 23 additions & 0 deletions Tools/nib2cib/NSTextField.j
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
/*
* NSTextField.j
* AppKit
*
* Created by Francisco Tolmasky.
* Copyright 2008, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

@import <AppKit/CPTextField.j>

@import "NSControl.j"
@import "NSCell.j"


@implementation CPTextField (NSCoding)

- (id)NS_initWithCoder:(CPCoder)aCoder
Expand Down
3 changes: 2 additions & 1 deletion Tools/nib2cib/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ ObjectiveJ::BundleTask.new(:nib2cib) do |t|
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
end

#executable in environment directory
Expand Down
3 changes: 2 additions & 1 deletion Tools/press/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ ObjectiveJ::BundleTask.new(:press) do |t|
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-DDEBUG' if $CONFIGURATION == 'Debug'
t.flag = '-O' if $CONFIGURATION == 'Release'
end

#executable in environment directory
Expand Down

0 comments on commit 4f024a0

Please sign in to comment.