Re: Very odd NSImage problem ...
Re: Very odd NSImage problem ...
- Subject: Re: Very odd NSImage problem ...
- From: Bob Ippolito <email@hidden>
- Date: Thu, 16 Jun 2005 19:55:36 -0400
On Jun 16, 2005, at 7:29 PM, SA Dev wrote:
On Jun 16, 2005, at 7:24 PM, Bob Ippolito wrote:
in a full-blown app). This led me to double check where NSImage
lives - which is part of AppKit, which if I recall requires a
connection to the window server. I'm thinking this is probably
the problem.
Yes, it is.
Thanks! Where's this information at, by the way (or what keywords
should I be searching for)? I'd like to bookmark it.
I don't recall ever seeing documentation on the issue.
So, knowing I can't use NSImage and pals in a command line
tool, what's the best approach? How can I manipulate images in a
command line tool? Does Core Image work from the command line?
You can't unless it runs as a user that's currently logged in, or
root. I don't know about Core Image, but Core Graphics does.
Okay, here's a problem then. As I'm debugging it, I'm logged in
as myself. The image is on my desktop and the app's being built in
and run from a build folder also in my home folder. As I'm
debugging it, it should be able to run, shouldn't it?
I think it depends on a combination of the version of Mac OS X you
are running and the argv[0] of your app. Try running it with an
absolute path.. i.e. `pwd`/executable (if it's in the current dir).
You can check to see if a Window Server connection is available with
this:
#import <ApplicationServices/ApplicationServices.h>
BOOL connectionAvailable = (CGWindowServerCFMachPort() != NULL);
-bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden