Skip to content

Commit

Permalink
Cleanup code for nib2cib.
Browse files Browse the repository at this point in the history
Reviewed by me.
  • Loading branch information
Francisco Tolmasky committed May 7, 2009
1 parent 120768c commit c5f4e0a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 29 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
26 changes: 0 additions & 26 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
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

0 comments on commit c5f4e0a

Please sign in to comment.