Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Mail Thread Index
Mail Thread Index
Date Index
[
Prev Page
][
Next Page
]
Re: Figuring out which values are selected in an NSTableView
,
(continued)
Re: Figuring out which values are selected in an NSTableView
, Denis Stanton
Re: Figuring out which values are selected in an NSTableView
, mmalcolm crawford
Re: Figuring out which values are selected in an NSTableView
, Denis Stanton
Re: Figuring out which values are selected in an NSTableView
, Steven Kramer
Re: Figuring out which values are selected in an NSTableView
, Scott Anguish
Re: Figuring out which values are selected in an NSTableView
, Denis Stanton
NSCharacterSet and NSCaseInsensitiveSearch
, Christopher Drum
CoreData and arrays owned by arrays...
, Lee Morgan
Re: CoreData and arrays owned by arrays...
, mmalcolm crawford
Re: CoreData and arrays owned by arrays...
, Lee Morgan
Re: CoreData and arrays owned by arrays...
, Lee Morgan
Re: CoreData and arrays owned by arrays...
, SA Dev
Re: CoreData and arrays owned by arrays...
, Scott Ahten
Re: CoreData and arrays owned by arrays...
, Lee Morgan
<Possible follow-ups>
Re: CoreData and arrays owned by arrays...
, leeamorgan
Re: How best to archive in CSV format If you haven't already solved this here is some code that may help. It does this for tsv files, tweaking it for csv files shouldn't be that much work. If you do mod this for csv, I'd love to get that code back, but it isn't required. Enjoy, -Mont Sorry, no docs. @interface NSArray (BNExtensions) - (NSArray *)tabJoinedComponents; - (NSString *)joinAsLinesOfEndingType:(LineEndingType)type; - (NSData *)dataWithLineEndingType:(LineEndingType)lineEndingType; @end @implementation NSArray (BNExtensions) - (NSArray *)tabJoinedComponents { NSEnumerator *components; NSMutableArray *rows; NSArray *row; components = [self objectEnumerator]; rows = [NSMutableArray arrayWithCapacity: [self count]]; while (row = [components nextObject]) { [rows addObject: [row componentsJoinedByString: @"\t"]]; } return rows; } - (NSString *)joinAsLinesOfEndingType:(LineEndingType)lineEndingType { switch (lineEndingType) { case LineEndingTyp! eDOS : return [self componentsJoinedByString: @"\r\n"]; case LineEndingTypeMac : return [self componentsJoinedByString: @"\r"]; case LineEndingTypeUnix : return [self componentsJoinedBy String: @"\n"]; default : return [self componentsJoinedByString: @""]; } } - (NSData *)dataWithLineEndingType:(LineEndingType)lineEndingType; { NSArray *rows; NSString *dataString; rows = [self tabJoinedComponents]; dataString = [rows joinAsLinesOfEndingType: lineEndingType]; return [dataString dataUsingEncoding: NSASCIIStringEncoding]; } @end @interface NSData (BNExtension) - (NSArray *)rowsAndColumns; @end @implementation NSData (BNExtension) - (NSArray *)rowsAndColumns { NSString *fileContents; NS_DURING fileContents = [[[NSString alloc] initWithData: self encoding: NSASCIIStringEncoding] autorelease]; NS_HANDLER fileContents = nil; [NSException raise: @"Import Error" format: @"There was a problem reading your file. Please make sure that it is a Tab delimited file. Additional information:\n\nException: %@\nReason: %@\nDetail: %@", [localException name], [localException reason], [localException userInfo]]; NS_ENDHANDLER return [[fileContents lines] valu! eForKey: @"tabSeparatedComponents"]; } @end typedef enum { LineEndingTypeNone = 0, LineEndingTypeDOS = 1, LineEndingTypeMac = 2, LineEndingTypeUnix = 3, } LineEndingType; @interface NSString (BNExtensions) - (NSArray *)lines; - (NSArray *)tabSeparatedComponents; - (NSArray *)rowsAndColumns; @end @implementation NSString (BNExtensions) - (LineEndingType)lineEndingType { NSRange lineEndRange; // Is this alineEndRangeDOS format? lineEndRange = [ self rangeOfString:@"\r\n"]; if (lineEndRange.location != NSNotFound) return LineEndingTypeDOS; // Not DOS; is this the Mac format? lineEndRange = [self rangeOfString:@"\r"]; if (lineEndRange.location != NSNotFound) return LineEndingTypeMac; // Not DOS or Mac, is this Unix format? lineEndRange = [self rangeOfString:@"\n"]; if (lineEndRange.location != NSNotFound) return LineEndingTypeUnix; // This string has a single line return LineEndingTypeNone; } - (NSArray *)lines { LineEndingType lineEndingType; lineEndingType = [self lineEndingType]; switch (lineEndingType) { case LineEndingTypeDOS : return [self componentsSeparatedByString: @"\r\n"]; case LineEndingTypeMac : return [self componentsSeparatedByString: @"\r"]; case LineEndingTypeUnix : return [self componentsSeparatedByString: @"\n"]; default : return [NSArray arrayWithObject: self]; } } - (NSArray *)tabSeparatedComponents { return [self componentsSeparatedByString: @"\t"]; } - (NSArray *)rowsAndColumns { re! turn [[self lines] valueForKey: @"tabSeparatedComponents"]; } @end
, Mont Rothstein
Re: How best to archive in CSV format
, Mont Rothstein
Trying to solve a to-many relationship?
, Michael Carter
Re: Trying to solve a to-many relationship?
, Scott Stevenson
Re: Trying to solve a to-many relationship? [solved]
, Michael Carter
Hidden window with NSMovieView makes QT stutter?
, Andreas Pardeike
Base coordinate system definition
, Neil Williams
KVO returning nil for old values, and mmalc's Graphics Bindings example
, Tim Lucas
Re: KVO returning nil for old values, and mmalc's Graphics Bindings example
, Tim Lucas
Re: KVO returning nil for old values, and mmalc's Graphics Bindings example
, Sean McBride
CIImage - saving the file?
, Nick Morris
Re: CIImage - saving the file?
, Troy Stephens
Re: CIImage - saving the file?
, Shawn Erickson
Can NSCell draw both an icon and text?
, James Bucanek
Re: Can NSCell draw both an icon and text?
, j o a r
Re: Can NSCell draw both an icon and text?
, James Bucanek
Re: Can NSCell draw both an icon and text?
, j o a r
Re: Can NSCell draw both an icon and text?
, Nick Zitzmann
Re: Can NSCell draw both an icon and text?
, James Bucanek
Re: Can NSCell draw both an icon and text?
, Nick Zitzmann
Pie shapes
, R T
<Possible follow-ups>
Re: Pie shapes
, R T
Re: Pie shapes
, Henry McGilton
Re: Pie shapes
, R T
HTTP server with NetSocket
, Pierre Chatel
Re: HTTP server with NetSocket
, Cameron Hayne
Re: HTTP server with NetSocket
, Pierre Chatel
<Possible follow-ups>
Re: HTTP server with NetSocket
, Frank Illenberger
Re: HTTP server with NetSocket
, Pierre Chatel
NEWBIE: Why use protocols?
, Ben D. Jones
Re: NEWBIE: Why use protocols?
, Cameron Hayne
Re: NEWBIE: Why use protocols?
, Daniel Jalkut
Re: NEWBIE: Why use protocols?
, Ondra Cada
Re: NEWBIE: Why use protocols?
, Ben D. Jones
Re: NEWBIE: Why use protocols?
, Thomas Davie
Re: NEWBIE: Why use protocols?
, Ben D. Jones
Re: NEWBIE: Why use protocols?
, Ondra Cada
Re: NEWBIE: Why use protocols?
, Thomas Davie
Re: NEWBIE: Why use protocols?
, Bob Ippolito
Re: NEWBIE: Why use protocols?
, Ondra Cada
Re: NEWBIE: Why use protocols?
, Bob Ippolito
Re: NEWBIE: Why use protocols?
, Bob Ippolito
Re: NEWBIE: Why use protocols?
, Ondra Cada
Re: NEWBIE: Why use protocols?
, Ondra Cada
Re: NEWBIE: Why use protocols?
, Ondra Cada
Re: NEWBIE: Why use protocols?
, Shawn Erickson
Loading already scaled JPEGs
, Michael Becker
Re: Loading already scaled JPEGs
, Stefan Husch
<Possible follow-ups>
Re: Loading already scaled JPEGs
, Dan Messing
Handling a Null PlaceHolder on a Bound PopUp (with CoreData)
, Herve Bouvier
NSMovie and DisposeMovie
, Des Courtney
<Possible follow-ups>
Re: NSMovie and DisposeMovie
, Des Courtney
Re: Why use protocols?
, Matt Neuburg
Re: Why use protocols?
, Ondra Cada
<Possible follow-ups>
Re: Why use protocols?
, Matt Neuburg
Re: Why use protocols?
, Bob Ippolito
Re: Why use protocols?
, Ondra Cada
Spotlight Plugin Woes
, Tim Fuller
Re: Spotlight Plugin Woes
, Scott Anguish
Moral to call [self windowDidLoad] ?
, Leonard Budney
Re: Moral to call [self windowDidLoad] ?
, Daniel Jalkut
Beware abs function in Core Data
, Scott Ellsworth
Cocoa Bindings + User Defaults Controller Trouble
, Denis Defreyne
Re: Cocoa Bindings + User Defaults Controller Trouble
, Chris Parker
Re: Cocoa Bindings + User Defaults Controller Trouble
, Ondra Cada
sample code for connecting to server
, Robert Clair
Re: sample code for connecting to server
, Douglas Davidson
Re: sample code for connecting to server
, Dustin Voss
SIMPLE way to pass Objects over a network
, Joseph
Re: SIMPLE way to pass Objects over a network
, Ondra Cada
[OT] [Moderator] Leaving Apple..
, John C. Randolph
Re: [OT] [Moderator] Leaving Apple..
, Thomas Davie
Re: [OT] [Moderator] Leaving Apple..
, j o a r
Re: [OT] [Moderator] Leaving Apple..
, Herve Bouvier
<Possible follow-ups>
Re: [OT] [Moderator] Leaving Apple..
, Cassj
Custom NSView as IB Palette - isFlipped strangeness
, dan pahlajani
Can't Choose Build Styles
, Joel Day
Re: Can't Choose Build Styles
, Chris Hanson
Re: Can't Choose Build Styles
, Joel Day
FSMountServerVolumeSync, AFP volumes and Tiger
, Lorenzo Thurman
<Possible follow-ups>
Re: FSMountServerVolumeSync, AFP volumes and Tiger
, Mike Kluev
Re: FSMountServerVolumeSync, AFP volumes and Tiger
, Lorenzo Thurman
Change in behavior from 10.3.9 to 10.4
, Ian was here
[ANN] Open-source IPA character palette IM
, Moses Hall
Getting the NSDateFormatter strings from the user's preferences
, James Bucanek