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
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
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
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
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
-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
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];
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,
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
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,
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
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
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
13 matches
Mail list logo