Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / July 2006



Tip: Looking for answers? Try searching our database.

System images or (Application Kit Shared images)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
halt001@gmail.com - 21 Jul 2006 22:13 GMT
I would like to access system images using Cocoa and it looks like I
should be able to do that through NSImage:imageNamed. Unfortunately I
can not find the names of the possible system images other than
NSAscendingSortIndicator & NSDescendingSortIndicator.

I'm sure there are lots of them but I can't find them.
Can anybody point me to the names of the possible system images
(Application Kit Shared images)
Patrick Machielse - 21 Jul 2006 23:14 GMT
> I would like to access system images using Cocoa and it looks like I
> should be able to do that through NSImage:imageNamed. Unfortunately I
[quoted text clipped - 4 lines]
> Can anybody point me to the names of the possible system images
> (Application Kit Shared images)

According to:

<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingG
uide/Images/chapter_7_section_5.html#//apple_ref/doc/uid/TP40003290-CH20
8-DontLinkElementID_54>

the images are located in the Resources folder of the AppKit framework.
However, when I look in there, it seems like an archaic collection of
TIFFs, some of which you can access by other means. What images were you
hoping to find?

patrick
halt001@gmail.com - 22 Jul 2006 08:05 GMT
I'm hoping to find common images like the gear on action buttons and a
+ and - sign, maybe a folder image, alert images (yellow triangle) or
information images (round blue with an i in it) things like that.

I also looked in the folder you describe and that doesn't seem to
contain most of these images.

I would expect that if the documentation of NSImage:imageNamed
describes using Appkit shared images that we should be able to find in
the doc what images are available under what name.

Tim

> > I would like to access system images using Cocoa and it looks like I
> > should be able to do that through NSImage:imageNamed. Unfortunately I
[quoted text clipped - 17 lines]
>
> patrick
Patrick Machielse - 22 Jul 2006 09:26 GMT
> I'm hoping to find common images like the gear on action buttons and a
> + and - sign, maybe a folder image, alert images (yellow triangle) or
[quoted text clipped - 6 lines]
> describes using Appkit shared images that we should be able to find in
> the doc what images are available under what name.

I agree, that would be very nice! However, at the moment these images
are not part of the Cocoa framework, but packaged with the applications
you see them in (f.i. iTunes, iPhoto etc.). A lot of programs from third
party developers 're-use' these images, although they are probably (c)
Apple. This is a bit of a legal grey area.

If you are developing a more serious program, you could invest in an
icon collection such as this:

<http://www.jasperhauser.nl/icon/iconkit.html>

patrick
halt001@gmail.com - 22 Jul 2006 10:58 GMT
I found out that if you program using Carbon you have "Icon Services"
and with that you have access to a large amount of system icons. (See
http://developer.apple.com/documentation/Carbon/Reference/IconServices/icon_serv
ices.pdf

from page 85 and down for all available constants)

A bit strange that these system icons are not available through Cocoa.

I did find a class named IconFamily ( available here
http://homepage.mac.com/troy_stephens/software/objects/IconFamily/ )
that seems to wrap access to the Carbon "Icon Services" for use in
Cocoa. I'm not sure if this is what I need but I will try this out.

Thank you for Jaspers Housers'  link. He was already on top of my list
for designing my icons if my programming for the mac becomes a success.
(currently I'm just learning Cocoa but I'm a developer for Windows by
occupation).

There are 2 things I know:
1) Icon/graphic design can make or break your apps success.
2) I personally can not design appealing graphics but I do appreciate
them.

I'm only worried that letting others design my graphics is going to be
too expensive for a hobby Mac developer like me.

Tim

> > I'm hoping to find common images like the gear on action buttons and a
> > + and - sign, maybe a folder image, alert images (yellow triangle) or
[quoted text clipped - 19 lines]
>
> patrick
Patrick Machielse - 22 Jul 2006 12:43 GMT
> I found out that if you program using Carbon you have "Icon Services" and
> with that you have access to a large amount of system icons. (See
> http://developer.apple.com/documentation/Carbon/Reference/IconServices/ico
> n_services.pdf from page 85 and down for all available constants)

Look nice. I'm going to have to read that ;-)

> A bit strange that these system icons are not available through Cocoa.

Well, there _may_ be a way in Cocoa, although it might not use the
'imageNamed:' method. For instance, if you wan't access to program or
file icons, you can use the NSWorkspace methods:

iconForFile:
iconForFiles:
iconForFileType:

Even if Cocoa doesn't offer the functionality you need, there is nothing
stopping us from using Carbon calls from within our Cococa code. That's
the beauty of Objective-C being C as well. Carbon is not deprecated, and
in fact there are numerous occasions where you have to 'drop down' to
Carbon, when Cocoa doesn't offer some functionality. Sometimes
inconvenient, but on the other hand it keeps Cocoa managable, and
prevents unneccesary duplication between frameworks.

> There are 2 things I know:
> 1) Icon/graphic design can make or break your apps success.
> 2) I personally can not design appealing graphics but I do appreciate
> them.

Yes, designing the icon can be harder than writing the code ;-)

patrick
Simon Slavin - 24 Jul 2006 23:49 GMT
On 22/07/2006, halt001@gmail.com wrote in message
<1153562313.142414.186280@b28g2000cwb.googlegroups.com>:

> A bit strange that these system icons are not available through Cocoa.

No it's not.

These icons are used by system routines.  The routines may one day change:
instead of a still icon they might show an animation.  Or they may change
to something that doesn't need an icon at all: the need for that function
might go away entirely.  Therefore accessing any of these icons directly
is almost definitely going to be the wrong thing to do.  If you want one
of these icons, call the system routine that causes it to be displayed.
That way, when the system's behaviour changes, your program will
automatically change its behaviour to match.

If you want to design your own icon, do so.  If you want to study a System
icon to make a variant of it, get it on the screen and do a screen-dump.
But don't feel bound to copy the System's look: it may change.

Simon.
Signature

http://www.hearsay.demon.co.uk

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.