Skip to content

Instantly share code, notes, and snippets.

@import <AppKit/CPView.j>
// A subclass of CPView that won't draw unless you tell it to
@implementation BigView : CPView
{
BOOL isDrawable @accessors;
}
- (id)initWithFrame:(CGRect)aRect
{
/*
* AppController.j
* MenuHighlightBug
*
* Created by You on February 27, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPView.j>
@import "base64.j"
/*
* Canvas2Image v0.1
* Copyright (c) 2008 Jacob Seidelin, [email protected]
* MIT License [http://www.opensource.org/licenses/mit-license.php]
*/
/******* Canvas2Image code starts here *******/
[After listing all my files twice...]
Writing bundle: /Users/saikat/Development/Projects/Mockingbird/mockingbird/mockingbird/frontend/lib-pressed
{
CPApplicationSize = "{
executable = "2358477"
data = "194506"
mhtml = "15341"
}"
CPApplicationDelegateClass = "AppController"
Warning: objj is incompatible with "jsc" engine. Automatically running with "rhino" engine instead.
================================================================================
Application root: /Users/saikat/Development/Projects/Mockingbird/mockingbird/mockingbird/frontend/lib/
Output directory: /Users/saikat/Development/Projects/Mockingbird/mockingbird/mockingbird/frontend/lib-pressed-1/
================================================================================
Main file: /Users/saikat/Development/Projects/Mockingbird/mockingbird/mockingbird/frontend/lib/main.j
Frameworks: /Users/saikat/Development/Projects/Mockingbird/mockingbird/mockingbird/frontend/lib/Frameworks
Environment: Browser
PHASE 1: Loading application...
>>>><><>><<>><>><<<>>><><<><>><><><>><><<<<<>><>><><><><<>><<<><>><><<>><><<><><><>><><<>><><<>><<>><><><><>><><<><><<>><>><<<>><><><><>><><><><><>><><><><<>><><<<><<><><>><><<>><><><><><<><><><><>><<>><><>><><><<>><><<<>><<><>><><><<><><><>><><><><<>
[CPWindow sendEvent:<left mouse click] ->
[CPWindow makeFirstResponder:CPTextField] ->
[CPTextField becomeFirstResponder] ->
[CPTextField textDidFocus] ->
[CPNotification notificationWithName:] ->
[delegate controlTextDidFocus] ->
[CPTextField selectText:] ->
[CPWindow makeFirstResponder:CPTextField] -> infinite recursion
Downloading Narwhal from "http://github.com/280north/narwhal/zipball/master"...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 120k 100 120k 0 0 11357 0 0:00:10 0:00:10 --:--:-- 24475
Installing Narwhal...
Archive: /tmp/narwhal.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
aiur:cappuccino-saikat saikat$ sudo ./bootstrap.sh
Password:
================================================================================
Found an existing Narwhal/Cappuccino installation, /usr/local/narwhal. Remove it automatically now?
WARNING: the ENTIRE directory, /usr/local/narwhal, will be removed (i.e. 'rm -rf /usr/local/narwhal').
Be sure this is correct. Custom modifications and installed packages WILL BE DELETED.
Enter "yes" or "no":
yes
================================================================================
Narwhal JavaScript platform is required. Install it automatically now?
// Show the cib window
-(void)showDashboard
{
if (!dashboardController)
dashboardController = [[DashboardController alloc] initWithWindowCibName:@"Dashboard"];
[dashboardController showWindow:self];
}
// DashboardController
@implementation DashboardController : CPWindowController
saikat: I have a cib that I created in Atlas and hooked up to a class called DashboardController, which is a subclass of CPWindowController. I show the window of this cib using this code (my dashboard controller code is here too): http://gist.github.com/328447
[1:41pm] saikat: however, emailErrors and updatePassword are both nil in my showWindow method
[1:41pm] saikat: also, awakeFromCib seems to get called twice
[1:42pm] saikat: and the second time it is called, emailErrors is nil (the first time it is correct)
[1:42pm] saikat: I'm dropping this cib/controller into an otherwise non-atlas app
[1:43pm] saikat: (I basically made an atlas app first to create the cib and the controller, did the connections in that, then copy and pasted the cib and controller out of that app and into mine)
[1:43pm] boucher left the chat room. (Quit: Leaving.)
[1:46pm] saikat: In the "External Object" object inside atlas, the Class is set to DashboardController, and under "Outlets" I have confirmPassword -> Text field, email -> T