Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread Rob Rix
Check out -[NSWorkspace iconForFile:] in the docs. Rob On 7-Jan-09, at 4:42 PM, David wrote: Hello,Is there a way to obtain the icon that finder uses to display for a file system object? Such things as the folder icon for folders, PDF icon for pdfs etc. Thanks

Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread Rob Rix
Either make your own cell class, or use two columns for that. I’d recommend the latter due to simplicity, but it may not give you the look you’re going for. Sincerely, Rob On 7-Jan-09, at 5:36 PM, David wrote: Great! Thanks for the info. I hoped it was something simple. Next question

Re: Which language to get started with cocoa development?

2009-01-05 Thread Rob Rix
Go with Objective-C: it’s the native language for Cocoa, so there’s no impedance mismatch. Plus, you can leverage your C/C++ knowledge where you want/need to more easily than you could in Ruby or Python. (C# is an unknown quantity for me, so I can’t really comment on that.) Plus, if you’re

Re: Visualization strategy/choosing a framework

2009-01-05 Thread Rob Rix
OpenGL has a steep learning curve, but it’s the only truly 3D framework out of all of these mentioned. Quartz is 2D-only, and only wraps OpenGL as a matter of performance and/or convenience; CoreAnimation is a really clever system for compositing 2D layers in 3D; managing the drawing

Re: Messaging framework

2008-12-24 Thread Rob Rix
Have you looked at http://www.collaboration-world.com/pantomime ? I don’t know anything about it really, other than that it exists (: Rob On 24-Dec-08, at 11:46 AM, lorenzo7...@gmail.com wrote: Anyone have any recommendations on a messaging framework for sending email? I had been using

Re: NSCoding, objects that can

2008-12-23 Thread Rob Rix
-conformsToProtocol will do it: for(id object in [dictionary objectEnumerator]) { if(![object conformsToProtocol: @protocol(NSCoding)]) { // raise an exception, exclude the object, or whatever } } Rob On 23-Dec-08, at 1:47 PM, Alexander Cohen wrote: Hi, i have

Re: Reliable way to capitalize camel-case strings?

2008-12-22 Thread Rob Rix
I’m interested to know if there’s a better way to do this than the ugly way I’ve been using, too: NSString *first = [string substringWithRange: NSMakeRange(0, 1)]; NSString *rest = [string substringFromIndex: 1]; NSString *result = [[first uppercaseString] stringByAppendingString: rest];

Re: Sorting an NSMutableArray

2008-12-20 Thread Rob Rix
See -sortUsingFunction:context: in NSMutableArray’s documentation. As Ricky Sharp has already mentioned, there’s also -sortUsingSelector:, however if you’re comparing partly with external data you might like having the void * context provided by this method. Sincerely, Rob On 20-Dec-08,

Re: selectionShouldChangeInTableView called twice

2008-12-20 Thread Rob Rix
I'm using a master/detail view in my application. If the user select another row in the master table and the detail has been modified, I want to present an alert to save, cancel or return to detail. Just my 2¢ worth, but this sounds like a horrible UI. If I get interrupted by an alert

Re: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classi c C array?

2008-12-18 Thread Rob Rix
Do the simplest thing that could possibly work. In some cases, like if you need to be calling -performSelector:withObject: with each of these things, that might be the NSArray. In your case, it sounds to me like it’s the C array of floats. Just my two cents. Rob On 17-Dec-08, at 3:04 PM,

Re: nib loading / displaying question.

2008-12-13 Thread Rob Rix
It sounds like you’re looking for [aboutPanel makeKeyAndOrderFront: self];. Rob On 14-Dec-08, at 2:38 AM, aaron smith wrote: hey all, really quick question. I'm messing around with loading nib's from the main bundle. It's pretty basic. -I've got a custom nib called About that shows when

Re: NSArrayController with a base class

2008-12-09 Thread Rob Rix
I’m doing something vaguely similar to this using a subclass of NSCollectionView, which sets up the collection view item differently depending on some attribute of the represented object it’s operating on. In this case, the class is just another attribute. NSArrayController being in the

Re: Creating a window when pressing a button

2008-12-09 Thread Rob Rix
It sounds like you might want to set up the window in a new nib file, which you load and unload with NSWindowController by creating a new NSWindowController instance and then calling -showWindow: on it. This also gives you a convenient location to start adding controller code for the