Re: problems with NSTextField destroying background

2009-03-12 Thread Memo Akten
that solved it thanks! On 11 Mar 2009, at 19:25, Joel Norvell wrote: Hi Memo, Try doing setDrawsBackground:NO when you initialize your NSTextFields. HTH, Joel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

How to reduce the height of Indefinite progress bar ?

2009-03-12 Thread Arun
Hi How can we reduce the height of the Indefinite progress bar control. I know it comes with two sizes, one Thin and thick, But if i need to reduce the size to other than this, is there any way? Thanks Arun ___ Cocoa-dev mailing list

Re: Detemine Document Types ...

2009-03-12 Thread Graham Cox
On 12/03/2009, at 9:48 PM, Mic Pringle wrote: Hi, Is there a way (programmatically) that I can determine which document types a particular application can open/view etc without resorting to parsing it's info.plist file ? Doesn't look like there is - NSDocumentController (where you might

Re: Detemine Document Types ...

2009-03-12 Thread Mic Pringle
Hi Graham, It's not that I wanted to avoid it, I wasn't aware it was that easy :-) However, in your example you use the mainbundle of the current application. Is it possible to use this technique when the bundle is another application ? i.e. the task I'm trying to achieve is when given an

Re: Detemine Document Types ...

2009-03-12 Thread Graham Cox
On 12/03/2009, at 10:09 PM, Mic Pringle wrote: It's not that I wanted to avoid it, I wasn't aware it was that easy :-) However, in your example you use the mainbundle of the current application. Is it possible to use this technique when the bundle is another application ? i.e. the task I'm

NSTextFieldCell text color issue in NSTableView with source list highlighting

2009-03-12 Thread jonat...@mugginsoft.com
The recommended way to override the text color in an NSTableView NSTextFieldCell is detailed here: http://www.cocoabuilder.com/archive/message/cocoa/2008/11/5/222008. However, there seems to be a problem setting the text color of a highlighted NSTextFieldCell when NSTableView

NSMakeSize and correct type

2009-03-12 Thread Kevin Walzer
Hello, I'm getting these gcc errors: macicon.m:29: error: incompatible type for argument 1 of ‘NSMakeSize’ macicon.m:29: error: incompatible type for argument 2 of ‘NSMakeSize’ I have tried using both float and CGFloat in the parameters, and I get the same complaint. Here is my code:

Re: NSMakeSize and correct type

2009-03-12 Thread Graham Cox
On 12/03/2009, at 11:08 PM, Kevin Walzer wrote: -(int) makeIcon: (NSString *) filePath imagewidth: (float *) width imageheight: (float *)height outputfile:(NSString *)imagePath; @end @implementation MacIcon -(int) makeIcon: (NSString *) filePath imagewidth: (float *) width

Re: NSMakeSize and correct type

2009-03-12 Thread Ron Fleckner
On 12/03/2009, at 11:08 PM, Kevin Walzer wrote: Hello, I'm getting these gcc errors: macicon.m:29: error: incompatible type for argument 1 of ‘NSMakeSize’ macicon.m:29: error: incompatible type for argument 2 of ‘NSMakeSize’ [snip] -(int) makeIcon: (NSString *) filePath imagewidth: (float

NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Graham Cox
I've noticed I'm getting different results with NSGradient when drawing to screen and when drawing in a PDF context, e.g. printing, or write PDF to clipboard. If the gradient contains colours with transparency, it draws correctly on-screen (allowing what's drawn behind to come through),

Performance problem with GC enabled

2009-03-12 Thread John Engelhart
I'm sort of at a loss on this one... While working on some improvements to RegexKitLite, I've come across a bit of a problem. I'm in the middle of adding - (NSArray *)arrayOfStringsMatching:(NSString *)regex and friends, a method that (surprise!) returns an array of all the matches of a string

Develop and OSAX

2009-03-12 Thread marco
Hello, I need to rewrite an OSAX I wrote some time ago (Carbon Bundle), I wonder if I can use a Cocoa Bundle and use ObjC instead of the old carbon code. Any information? Thanks, Marco Bambini ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Karaoke like algorithm

2009-03-12 Thread Eric Gorr
Have you considered creating a Quicktime movie in code which displays the words in the way you want? On Mar 11, 2009, at 6:52 PM, Ariel Rodriguez wrote: I'm working on a Karaoke-like application. I need to print out to the screen text lines at a given time, and then, paint each word at a

Re: Karaoke like algorithm

2009-03-12 Thread Eric Gorr
It also seems possible that Quartz Composer might be able to help you out here as well, but I am less familiar with that. On Mar 12, 2009, at 9:58 AM, Eric Gorr wrote: Have you considered creating a Quicktime movie in code which displays the words in the way you want? On Mar 11, 2009, at

Re: Compile Problems

2009-03-12 Thread Barry Fawthrop
... extern const mit_des_cblock mit_des_zeroblock; #define mit_des_zeroblock krb5int_c_mit_des_zeroblock I swapped these two lines in des-int.h around #define mit_des_zeroblock krb5int_c_mit_des_zeroblock extern const mit_des_cblock mit_des_zeroblock; Now in f_cbc.mm I have const

Help, I need a jedi memory master with time and patience to help me here.

2009-03-12 Thread James Cicenia
Hello - I must be doing something conceptually wrong as this class will alway kill my app in the device without any console info. I am sure it is memory or retain related. In instruments my memory never goes above 5MB and then comes down a bit. In the device... it just quits after a few

Re: Help, I need a jedi memory master with time and patience to help me here.

2009-03-12 Thread Luke Hiesterman
My guess is it's not really a memory issue. I'll glance at it for you, though. Luke Sent from my iPhone. On Mar 12, 2009, at 8:11 AM, James Cicenia ja...@jimijon.com wrote: Hello - I must be doing something conceptually wrong as this class will alway kill my app in the device without

GC Seems To Never Kick In

2009-03-12 Thread Karl Moskowski
All this recent talk about GC here on cocoa-dev and on the Obj-C mailing list has come at an opportune time. I'm working on a file compression framework that's GC-only and 32-bit. It reads a file using NSFileHandle 256KB at a time into an NSData object, processes each object into another

Re: Is cascading Nib Loading from -awakeFromNib permissible?

2009-03-12 Thread Stuart Malin
On Mar 11, 2009, at 1:37 PM, Stuart Malin wrote: Further, the second Nib I am loading has no references back to the controller, except as File's Owner. And that's enough to get awakeFromNib'd. snip Interesting -- there must be some further distinctions here. I have another controller,

Re: Performance problem with GC enabled

2009-03-12 Thread Bill Bumgarner
On Mar 12, 2009, at 6:04 AM, John Engelhart wrote: [ way too many words deleted ... please try to succinctly state issues in the future ] You have created a micro benchmark that demonstrates a significant bit of overhead from GC vs. non-GC. While micro benchmarks are

Re: GC Seems To Never Kick In

2009-03-12 Thread Bill Bumgarner
On Mar 12, 2009, at 8:32 AM, Karl Moskowski wrote: If I add something like this to the method's processing loop if (++block % 1000 == 0) objc_collect(OBJC_EXHAUSTIVE_COLLECTION); memory usage stays reasonable in the Cocoa app. I've tried other options in various

Re: GC Seems To Never Kick In

2009-03-12 Thread Karl Moskowski
On 12-Mar-09, at 11:43 AM, Bill Bumgarner wrote: On Mar 12, 2009, at 8:32 AM, Karl Moskowski wrote: If I add something like this to the method's processing loop if (++block % 1000 == 0) objc_collect(OBJC_EXHAUSTIVE_COLLECTION); memory usage stays reasonable in the

Re: NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Benjamin Stiglitz
I've noticed I'm getting different results with NSGradient when drawing to screen and when drawing in a PDF context, e.g. printing, or write PDF to clipboard. If the gradient contains colours with transparency, it draws correctly on-screen (allowing what's drawn behind to come through),

Copy of NSDictionary is cleared when the original is cleared. Why?

2009-03-12 Thread fclee
Why is myDict empty? {I've checked via debugger po} It's a COPY of textDictionary, that had been cleared. Here's my code: + (NSDictionary *)getTextData { NSDictionary *myDict = [textDictionary copy]; [self resetDataCache]; return myDict; } // end getText(). + (void)resetDataCache {

Bi-directional pipe with AuthorizationExecuteWithPrivileges

2009-03-12 Thread Sidney San Martín
I'm trying to figure out how to work with **communicationsPipe provided by AEWP. I figured out how to send data to of from the called process by creating an NSFileHandle: NSFileHandle *helperInputHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno(rawPipe) closeOnDealloc:YES] //

Re: Garbage collected and non-garbage collected

2009-03-12 Thread Robert Mullen
I had tried NSCollectorDisabled flag on NSAllocateCollectable but when I do this I get cryptic errors from ibtool when compiling the main project. The errors seem to be of the same nature I am seeing elsewhere (things like unrecognized selector sent to instance - [NSString count]

Re: Synthesized instance variables

2009-03-12 Thread Andreas Känner
Am 11.03.2009 um 17:02 schrieb Jean-Daniel Dupas: Le 11 mars 09 à 16:03, Andreas Känner a écrit : Hi, Am 11.03.2009 um 13:27 schrieb Jean-Daniel Dupas: Le 11 mars 09 à 13:10, Andreas Känner a écrit : Hi there, does anybody know if there is an efficient way to directly access

[MEET] CocoaHeads-NYC meeting Thu 03/12

2009-03-12 Thread Andy Lee
The next meeting of CocoaHeads-NYC will be tonight: Thursday Mar 12 6:00PM to 8:00PM at Tekserve, at 119 West 23rd between 6th and 7th http://www.tekserve.com. As usual, please bring Cocoa programming questions and see if any among us can help. We can put your code up on the big screen

Re: Synthesized instance variables

2009-03-12 Thread Roland King
@private? On Mar 13, 2009, at 12:27 AM, Andreas Känner wrote: Am 11.03.2009 um 17:02 schrieb Jean-Daniel Dupas: Le 11 mars 09 à 16:03, Andreas Känner a écrit : Hi, Am 11.03.2009 um 13:27 schrieb Jean-Daniel Dupas: Le 11 mars 09 à 13:10, Andreas Känner a écrit : Hi there, does

Re: How to reduce the height of Indefinite progress bar ?

2009-03-12 Thread Mike Abdullah
I'd advise that you don't, and just stick to the standard system sizes. Why does your app demand its own special progress bar style? If you're really desparate, you could try applying a transform to the view that ends drawing the large style in a compressed manner, but it would probably

Re: Synthesized instance variables

2009-03-12 Thread Bill Bumgarner
On Mar 12, 2009, at 9:27 AM, Andreas Känner wrote: I don't want to make this implementation detail visible to the outside (in the header). It would help if ivars could be declared in categories but this is not possible. Any other suggestion? If you really need to have an iVar declared --

Re: most suitable framework for network app communication?

2009-03-12 Thread Josh Hermsmeyer
Bill Dudney released code yesterday that may be just what you are looking for: Bonjour Network Server for iPhone Bill is the guy who wrote iPhone SDK Development. HTH, Josh Josh Hermsmeyer | President | Capozzi Winery | (707) 694-2481 | www.pinotblogger.com On Mar 11, 2009, at 12:15

code for drawing an NSTextField to a panel window ...

2009-03-12 Thread vinai
Hi All, I am relatively new to Cocoa, though I've done a bit of programming in generic C on Linux and UNIX systems. I have been trying to create a panel with pop-up buttons and text fields. I know IB will do this for you, but I'd really like to get a handle on what goes on behind the

Re: Converting unicode strings to its values

2009-03-12 Thread Dave Keck
Hey, Try [NSString stringWithUTF8String: \u00d6]; David On Tue, Mar 10, 2009 at 10:23 PM, Christian Netthöfel m...@snod.net wrote: Hi Everyone, I'm quite new to Cocoa-development and have a question regarding the conversion of unicode-representations. I have a string containing the unicode

A minimal InputManager bundle

2009-03-12 Thread Kevin Yank
Hi there, I am attempting to write a minimal InputManager bundle, to be auto- loaded by all qualifying Cocoa applications. I have it partly working, but have run into a stumbling block. Here is the implementation of my bundle's primary class: @implementation PluginIM + (void) load {

Re: NSMenuItem Binding Problem

2009-03-12 Thread Dave Keck
It sounds like you're accessing the variable directly, which doesn't allow the KVO system to send the appropriate notifications in order to notify the menu item that there was a change. If you want to set the value of the variable and expect the menu item to respond, you must make sure the

Re: Is cascading Nib Loading from -awakeFromNib permissible?

2009-03-12 Thread Dave Keck
Hello, It looks like this is your answer: http://lists.apple.com/archives/cocoa-dev/2008/Apr/msg02276.html It sounds like the object is the file's owner of the nibs that you're loading using loadNibNamed:. Is this correct? Also check out:

Re: A minimal InputManager bundle

2009-03-12 Thread Kevin Yank
Answering my own question... The behavior I was seeing appears to have been the result of installing the bundle in the user-specific /Users/user/Library/ InputManagers directory hierarchy. Leopard requires bundles to be installed in the system-wide /Library/InputManagers hierarchy in order

Re: Synthesized instance variables

2009-03-12 Thread Frank Illenberger
And what prevent you to simply declare the ivar in the interface instead of letting the compiler generating it ? I second Andreas. For most cases, the correct place to declare instance variables should be the .m file as they are an implementation detail and not part of the contract with the

Re: code for drawing an NSTextField to a panel window ...

2009-03-12 Thread I. Savant
On Wed, Mar 11, 2009 at 12:11 PM, vinai for_use...@yahoo.com wrote: where rawButtonRect is an NSRect, contectRect defines the panel window I am trying to draw to, and rawTextField is of * NSTextField type. mainPanelView is the view for the mainPanel window, and rawTextField is just one of

Re: NSTextFieldCell text color issue in NSTableView with source list highlighting

2009-03-12 Thread Corbin Dunn
On Mar 12, 2009, at 3:51 AM, jonat...@mugginsoft.com wrote: The recommended way to override the text color in an NSTableView NSTextFieldCell is detailed here: http://www.cocoabuilder.com/archive/message/cocoa/2008/11/5/222008. However, there seems to be a problem setting the text color of a

Re: Performance problem with GC enabled

2009-03-12 Thread John Engelhart
On Thu, Mar 12, 2009 at 11:39 AM, Bill Bumgarner b...@mac.com wrote: On Mar 12, 2009, at 6:04 AM, John Engelhart wrote: [ way too many words deleted  ... please try to succinctly state issues in the future ] You have created a micro benchmark that demonstrates a significant bit of

Re: Synthesized instance variables

2009-03-12 Thread Jean-Daniel Dupas
Le 12 mars 09 à 17:54, Frank Illenberger a écrit : And what prevent you to simply declare the ivar in the interface instead of letting the compiler generating it ? I second Andreas. For most cases, the correct place to declare instance variables should be the .m file as they are an

Re: Synthesized instance variables

2009-03-12 Thread Greg Parker
On Mar 12, 2009, at 9:54 AM, Frank Illenberger wrote: And what prevent you to simply declare the ivar in the interface instead of letting the compiler generating it ? I second Andreas. For most cases, the correct place to declare instance variables should be the .m file as they are an

Re: Performance problem with GC enabled

2009-03-12 Thread Bill Bumgarner
On Mar 12, 2009, at 10:29 AM, John Engelhart wrote: Actually, this isn't a micro-benchmark. If you aren't displaying the results, responding to user events, keeping an application state up to date and otherwise doing all of the things that need be done in a real world application, it is --

Re: Notifications and timing

2009-03-12 Thread Randall Meadows
On Mar 12, 2009, at 11:46 AM, McLaughlin, Michael P. wrote: I have a global gFlags variable (unsigned long long) and several objects that need a pointer to it. I fill one such pointer, and reinit gFlags, via the following code: if (flags == nil) { flagPtr *flgH = flags; NSData

Re: Synthesized instance variables

2009-03-12 Thread Frank Illenberger
I second Andreas. For most cases, the correct place to declare instance variables should be the .m file as they are an implementation detail and not part of the contract with the outside world using the class. The feature of non-fragile instance variables of the modern ABI should make this

Re: Garbage collected and non-garbage collected

2009-03-12 Thread Robert Mullen
OK, I took a step back today and reconvened the knowledge you guys have shared, reread the Hillegass chapter on GC (what a great book!!), and reviewed the approaches I had taken. One thing that jumped out at me was that I had not revisited the flags: _SM2DGraphView_Private =

Re: Garbage collected and non-garbage collected

2009-03-12 Thread Greg Parker
On Mar 12, 2009, at 11:33 AM, Robert Mullen wrote: OK, I took a step back today and reconvened the knowledge you guys have shared, reread the Hillegass chapter on GC (what a great book!!), and reviewed the approaches I had taken. One thing that jumped out at me was that I had not

Re: Handling WebView DOM events in Cocoa

2009-03-12 Thread Matt Neuburg
On Wed, 11 Mar 2009 09:11:01 -0700, Dave Carrigan d...@rudedog.org said: All, I've been the WebKit docs, but haven't been able to find an answer to a pretty basic (to my mind) question. I want to have an obc-c method get called when a DOM event (click, mouseover, etc.) happens inside the

Re: Develop and OSAX

2009-03-12 Thread Matt Neuburg
On Thu, 12 Mar 2009 09:41:45 -0400 (EDT), ma...@vampiresoft.com said: Hello, I need to rewrite an OSAX I wrote some time ago (Carbon Bundle), I wonder if I can use a Cocoa Bundle and use ObjC instead of the old carbon code. Any information? Marco - I've never written an OSAX and I don't pretend

Re: Performance problem with GC enabled

2009-03-12 Thread Peter Ammon
On Mar 12, 2009, at 6:04 AM, John Engelhart wrote: This is (obviously) due to -fobjc-gc turning the storing of a __strong pointer in to a call to objc_assign_strongCast(). Each and every call to objc_assign_strongCast, in turn, grabs a gc lock before it does its work. Soo.. what was a

Multiple Images into one UIView

2009-03-12 Thread James Cicenia
Is it possible to add multiple images to one UIView. I am hoping that would help my memory issue. Thanks James Cicenia ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Develop and OSAX

2009-03-12 Thread Mark Munz
You should be able to use Cocoa in an OSAX w/o trouble. You may still need to call NSApplicationLoad() if you access AppKit, but I don't think anything other than setting up an NSAutoreleasePool when you call Obj-c for calling Foundation. Leopard did make some things easier for OSAX development

Re: Binding or notification

2009-03-12 Thread Kyle Sluder
On Thu, Mar 12, 2009 at 4:26 PM, Michael Süssner michael.suess...@utanet.at wrote: So I have extended the NSArrayController class by adding a new method numberOfRows. Since the value of numberOfRows changes each time I insert an object, it would be necessary to link the managedObjectContext to

using QuickLook from an application?

2009-03-12 Thread Bill Janssen
I'd like to be able to invoke the QuickLook server from my application to obtain PDF or RTF preview versions of MS-Office Documents before opening them. The capability exists; you can see it in Finder, for instance. But I can't see how to invoke it from a client. The only useful call I can make

Re: Multiple Images into one UIView

2009-03-12 Thread Wyatt Webb
Do you mean in some way other than embedding multiple UIImageViews or multiple CALayers? Unless your images are very small, I doubt the overhead of the UIView objects is what's causing a memory problem. Maybe I'm misunderstanding. Can you give us more detail about the current arrangement

Re: Multiple Images into one UIView

2009-03-12 Thread James Cicenia
My images are very small. I have approximately 100 lines with 24 small images per line. These are all one one scrollable view. I am using a UIImageView to position each one. Just trying to get efficient as possible here. On Mar 12, 2009, at 4:48 PM, Wyatt Webb wrote: Do you mean in some

Re: using QuickLook from an application?

2009-03-12 Thread Julien Jalon
-- Julien Le 12 mars 09 à 22:29, Bill Janssen jans...@parc.com a écrit : I'd like to be able to invoke the QuickLook server from my application to obtain PDF or RTF preview versions of MS-Office Documents before opening them. The capability exists; you can see it in Finder, for instance.

Re: Multiple Images into one UIView

2009-03-12 Thread Paul Sanders
Is it possible to add multiple images to one UIView. I am hoping that would help my memory issue. Checkout NSMatrix. It's designed to do exactly what you want - provide a lightweight way of managing a large number of small objects which need to render themselves and respond to input events.

Re: using QuickLook from an application?

2009-03-12 Thread James Walker
Bill Janssen wrote: I'd like to be able to invoke the QuickLook server from my application to obtain PDF or RTF preview versions of MS-Office Documents before opening them. The capability exists; you can see it in Finder, for instance. But I can't see how to invoke it from a client. The only

Re: Multiple Images into one UIView

2009-03-12 Thread Wyatt Webb
Well, then maybe UIImageViews aren't the right choice. You could either use many CALayers or even a single large UIView(if you need user input events) or CALayer subclass where you render the images yourself. I presume there are only a small number of different images and you're using

Re: Multiple Images into one UIView

2009-03-12 Thread James Cicenia
I will look into that. Thank you On Mar 12, 2009, at 5:18 PM, Wyatt Webb wrote: Well, then maybe UIImageViews aren't the right choice. You could either use many CALayers or even a single large UIView(if you need user input events) or CALayer subclass where you render the images yourself.

NSTableView live resizing glitch

2009-03-12 Thread Ulai Beekam
Hi, I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png I really need to have the column width independent of the table view's size, so it is not an option to have the column resize with the

Re: NSTableView live resizing glitch

2009-03-12 Thread Corbin Dunn
On Mar 12, 2009, at 3:33 PM, Ulai Beekam wrote: Hi, I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png Howdy! Do you have a test case for this? If so, please log a bugreporter.apple.com

Re: NSTableView live resizing glitch

2009-03-12 Thread Chris Suter
Hi Ulai, On Fri, Mar 13, 2009 at 9:33 AM, Ulai Beekam ulaibee...@hotmail.com wrote: I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png I really need to have the column width independent of

Re: NSTableView live resizing glitch

2009-03-12 Thread Corbin Dunn
On Mar 12, 2009, at 3:50 PM, Chris Suter wrote: Hi Ulai, On Fri, Mar 13, 2009 at 9:33 AM, Ulai Beekam ulaibee...@hotmail.com wrote: I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png I

Re: NSTableView live resizing glitch

2009-03-12 Thread Chris Suter
Hi Corbin, On Fri, Mar 13, 2009 at 10:06 AM, Corbin Dunn corb...@apple.com wrote: That's doing too much redraw work :) I was aware that may be the case but it didn't matter for my needs; the performance is perfectly adequate for me. Please do log bugs when you run into these issues. I did

Re: using QuickLook from an application?

2009-03-12 Thread Bill Janssen
Julien Jalon jja...@gmail.com wrote: I'd like to be able to invoke the QuickLook server from my application to obtain PDF or RTF preview versions of MS-Office Documents before opening them. The capability exists; you can see it in Finder, for instance. But I can't see how to invoke it

Re: code for drawing an NSTextField to a panel window ...

2009-03-12 Thread vinai
Hi, The complete code for the object is attached. I guess I am still more than a little perplexed why the window itself is being drawn fine, but I can't get any elements (like the text field) drawn to the panel view. Thanks --- On Thu, 3/12/09, I. Savant idiotsavant2...@gmail.com wrote:

Re: code for drawing an NSTextField to a panel window ...

2009-03-12 Thread Chris Hanson
On Mar 12, 2009, at 4:41 PM, vinai wrote: The complete code for the object is attached. I guess I am still more than a little perplexed why the window itself is being drawn fine, but I can't get any elements (like the text field) drawn to the panel view. Glancing at your code, I don't

Re: NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Graham Cox
On 13/03/2009, at 3:00 AM, Benjamin Stiglitz wrote: I've noticed I'm getting different results with NSGradient when drawing to screen and when drawing in a PDF context, e.g. printing, or write PDF to clipboard. If the gradient contains colours with transparency, it draws correctly

Re: code for drawing an NSTextField to a panel window ...

2009-03-12 Thread Jesper Storm Bache
Your implementation of init is wrong. You are returning nil which means that initialization failed. You should be doing something like: - (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) windowStyle backing: (NSBackingStoreType)

NSWorkspaceWillPowerOffNotification from a daemon

2009-03-12 Thread Matthew Mashyna
I have a daemon that gets started from /Library/LaunchDaemons. It monitors the system and alerts another remote machine when certain status changes. What I want to monitor is when the machine powers on and off, sleep, monitor sleep. Everything works fine except catching the shutdown. I

Re: NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Kyle Sluder
On Thu, Mar 12, 2009 at 7:57 PM, Graham Cox graham@bigpond.com wrote: Wow. That sucks... is that likely to be changed any time soon? This workaround is pretty hardcore. You're more than welcome to try to convince Adobe to change the PDF standard. As it stands, colors in PDF shadings do not

Re: using QuickLook from an application?

2009-03-12 Thread Bill Janssen
Bill Janssen jans...@parc.com wrote: Julien Jalon jja...@gmail.com wrote: Please file a radar and explain precisely what you want. I'll do that. Basically, the idea is that having access to simplified standardized renditions of various document formats is very useful for purposes other

Re: Detemine Document Types ...

2009-03-12 Thread Kyle Sluder
On Thu, Mar 12, 2009 at 7:09 AM, Mic Pringle micprin...@gmail.com wrote: However, in your example you use the mainbundle of the current application. Is it possible to use this technique when the bundle is another application ? Use +[NSBundle bundleWithPath:]. i.e. the task I'm trying to

Re: NSWorkspaceWillPowerOffNotification from a daemon

2009-03-12 Thread Nick Zitzmann
On Mar 12, 2009, at 6:11 PM, Matthew Mashyna wrote: The sleep calls work fine but the PowerOff doesn't work ever. Is there another way to catch shutdown ? Can I catch some signal to handle it ? Did you remember to call NSApplicationLoad() before using NSWorkspace? Nick Zitzmann

Re: NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Graham Cox
On 13/03/2009, at 11:51 AM, Kyle Sluder wrote: On Thu, Mar 12, 2009 at 7:57 PM, Graham Cox graham@bigpond.com wrote: Wow. That sucks... is that likely to be changed any time soon? This workaround is pretty hardcore. You're more than welcome to try to convince Adobe to change the PDF

Re: NSWorkspaceWillPowerOffNotification from a daemon

2009-03-12 Thread Matthew Mashyna
On Mar 12, 2009, at 8:45 PM, Nick Zitzmann wrote: On Mar 12, 2009, at 6:11 PM, Matthew Mashyna wrote: The sleep calls work fine but the PowerOff doesn't work ever. Is there another way to catch shutdown ? Can I catch some signal to handle it ? Did you remember to call

Re: NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Graham Cox
On 13/03/2009, at 12:37 PM, Graham Cox wrote: NSGradient could implement the workaround Enhancement request filed, #6677944 -G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

TXT Records with NSImages

2009-03-12 Thread Joe Turner
Hello, Recently, I've been working on an app that will sync with an iphone app. So, I am using NSNetServices. I would like the iPhone to display the mac's icon, so I was thinking of using the TXT Record to store the icon. However, whenever I add it to the dictionary, convert the

Re: Poof! Recently-saved Core Data document suddenly gets dirty

2009-03-12 Thread Jerry Krinock
On 2009 Mar 11, at 18:39, Dave Fernandes wrote: It helped me figure out what was changing by overriding willChangeValueForKey in my NSManagedObject subclass... Dave, I just used your idea and was able to track down two of these phantom changes this afternoon. At first, I was getting

Getting the front process path

2009-03-12 Thread Chris Idou
I thought I'd figured out how to get the path of the currently running process: GetFrontProcess, then CopyProcessName, and then [[NSWorkspacesharedWorkspace] fullPathForApplication:app] This works most of the time, but some programs, for example Aquamacs Emacs, has just Aquamacs in the

Handling errors in -initWithCoder:

2009-03-12 Thread Graham Cox
Minor problem, I think, but I'd like to get some advice about the right way to approach this. One of my classes can sometimes fail in -initWithCoder: - it relies on certain resources being available and if it doesn't get them, I thought I could follow the same pattern as -init and

Re: Getting the front process path

2009-03-12 Thread Kyle Sluder
Use GetProcessInformation instead. http://developer.apple.com/DOCUMENTATION/Carbon/Reference/Process_Manager/Reference/reference.html#//apple_ref/doc/uid/TP3208-CH1g-F01980 --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: code for drawing an NSTextField to a panel window ...

2009-03-12 Thread Sidney San Martín
Remember that Interface Builder does not generate code! It saves a representation of the interface and its associated objects to a nib file which is read at runtime. Generating your interface by hand will not tell you what's going on behind the scenes, and IB is much more appropriate than