|
Cocoa Java Tips
This week I wrote some personal time-tracking software in Cocoa, and it was my first foray into Cocoa Java. Some lessons learned:
- NSTextFormatter is broken out-of-the-box, and has been since the beginning of time (or at least 2000, circa WebObjects 4.5, which also had a ObjC-Java bridge). Fortunately, Benjamin Riefenstahl posted a runtime patch that fixes the problem. Do I even bother filing a bug about this? I know, I know...
- The bridge is not amused when you get your types wrong. Consider this target action code:
public void updateInitialEstimate(NSFormCell sender) {
sender.doubleValue();
}
This code will unceremoniously terminate your entire process, sans error or exception. You need to do this, instead:
public void updateInitialEstimate(NSControl sender) {
sender.doubleValue();
}
- (Not Cocoa-Java Specific:) In Interface Builder, copying and pasting views (even within the same window) kills all its connections, leading to runtime
NullPointerException land when your outlets never get hooked up for you.
- (Also Not Cocoa-Java Specific:) PBX crashes. A lot. Save often.
Friday, June 13, 2003
12:00 AM
|
Focus of this site
Contact Me
Topics
RSS Feed
Linkblog
Twitter
Andy Finnell
Bill Bumgarner
Brent Simmons
Daniel Jalkut
Dave Dribin
Eric Albert
Eric Rescorla
Eric Sink
Greg Miller
Gus Mueller
Jeremy Zawodny
John Gruber
Mark Dalrymple
Michael Tsai
Peter Ammon
Raymond Chen
Ryan Wilcox
Scott Stevenson
Steven Frank
The Daily WTF
we hates software
Wil Shipley
|