Blocking while a save panel sheet is showing

2011-02-14 Thread Kenneth Baxter
Hi everyone, I am using a framework where I register as a delegate and when my delegate method is called, I should be able to save my data, and then the framework does different things based on whether the data has been saved or not. I need to ask the user for the file name to save as, and

Blocking while a save panel sheet is showing

2011-02-14 Thread Kenneth Baxter
Hi everyone, I am using a framework where I register as a delegate and when my delegate method is called, I should be able to save my data, and then the framework does different things based on whether the data has been saved or not. I need to ask the user for the file name to save as, and

Re: Blocking while a save panel sheet is showing

2011-02-14 Thread Graham Cox
On 14/02/2011, at 11:01 PM, Kenneth Baxter wrote: Hi everyone, I am using a framework where I register as a delegate and when my delegate method is called, I should be able to save my data, and then the framework does different things based on whether the data has been saved or not. I

Re: Blocking while a save panel sheet is showing

2011-02-14 Thread Kenneth Baxter
Thanks for the reply Graham. It sounds as if I would have to have control over the framework to do as you suggest, but I don't have access to the framework source. My understanding of what the framework does is: [delegate saveData]; if (dataHasBeenSaved) { do stuff } else { do

How to get volume information

2011-02-14 Thread Abhijeet Singh
Hi,In my application 1. I want to check whether my application is running from CD (removable media) or from hard disk.I dont want to allow my user to run my application from hard disk. 2. Same application i developed in windows. I used to store the volume serial number of the CD that was first

Re: How to get volume information

2011-02-14 Thread Gary L. Wade
Look at the Disk Arbitration framework. - Gary L. Wade (Sent from my iPhone) On Feb 14, 2011, at 5:46 AM, Abhijeet Singh abhi_...@in.com wrote: Hi,In my application 1. I want to check whether my application is running from CD (removable media) or from hard disk.I dont want to allow my user

Re: Blocking while a save panel sheet is showing

2011-02-14 Thread Ken Thomases
On Feb 14, 2011, at 7:09 AM, Kenneth Baxter wrote: I'm afraid I can't see a way to refactor that so that saveData doesn't return until the save operation is complete, and I can't see how the framework could work properly without waiting for the completion of the save operation. Maybe I'm

Re: How to get volume information

2011-02-14 Thread Ken Thomases
On Feb 14, 2011, at 7:46 AM, Abhijeet Singh wrote: Hi,In my application 1. I want to check whether my application is running from CD (removable media) or from hard disk.I dont want to allow my user to run my application from hard disk. 2. Same application i developed in windows. I used to

Re: Canceling NSInvocationOperation

2011-02-14 Thread Chase Latta
Thanks Matt, (1) Don't let go of the operation in the first place; keep a reference to it when you create it (even though it is also being kept inside the NSOperationQueue). This worked for me. Chase ___ Cocoa-dev mailing list

Re: Canceling NSInvocationOperation

2011-02-14 Thread James Montgomerie
I think you are exposing yourself to a race condition here, even if you did get this to work - imagine: --- // Some Code: - (void)myOperationInController; { // Do stuff if (![self isCancelled]) -- main thread sets isCancelled to YES -- [self

Using NSTerminateLater with a Status Item

2011-02-14 Thread Olivier Lance
Hi all, I'm facing a problem returning NSTerminateLater from applicationShouldTerminate: in a status item application... I've tried many things and followed the doc I've found, but nothing works as I'm expecting it to. In short, I want to delay the termination of my status item application

Re: Blocking while a save panel sheet is showing

2011-02-14 Thread Kenneth Baxter
Thanks Ken - don't know why I missed that when reading the documentation. It does what I need, thanks. On 15 Feb, 2011,at 02:34 AM, Ken Thomases k...@codeweavers.com wrote: Although Graham is right that document-modal sheets is the preferred user interface for saving, you can run the save

Re: Canceling NSInvocationOperation

2011-02-14 Thread Chase Latta
Jamie, I hadn't thought about that situation but I can see how that could lead to problems. I guess I will just need to rethink my code a little bit but I will probably do what you suggest and check if the operation has been cancelled in the callback. Thanks, Chase On Mon, Feb 14, 2011 at 9:18

Re: Using NSTerminateLater with a Status Item

2011-02-14 Thread Jeff Johnson
Hi Olivier. rdar://problem/6001460 See http://lapcatsoftware.com/rdar/6001460/index.html for an explanation. In short, you won't be able to do it with a LSUIElement app. -Jeff On Feb 14, 2011, at 10:52 AM, Olivier Lance wrote: Hi all, I'm facing a problem returning NSTerminateLater

Re: NSUnicodeStringEncoding

2011-02-14 Thread Aki Inoue
If the data is in-process UTF16 (i.e. host-endian UTF-16 without BOM), you should be using -initWithCharacters:length: instead. Aki On 2011/02/13, at 15:50, Kyle Sluder wrote: On Sun, Feb 13, 2011 at 3:17 PM, Todd Heberlein todd_heberl...@mac.com wrote: [[NSString alloc]

Re: NSTableView auto sorting does not work

2011-02-14 Thread Chris Tracewell
On Fri, Feb 11, 2011 at 5:14 PM, Chris Tracewell ch...@thinkcl.com wrote: I have experienced that an NSTableview which is bound to an array controller will sometimes automatically sort when their column headers are clicked and sometimes not. As an example, I currently have two windows, each

Re: Using NSTerminateLater with a Status Item

2011-02-14 Thread Olivier Lance
Hi Jeff, Well that's what I was afraid to learn... Gotta find a workaround then! Do you know if by any chance, something similar can be done from a process running as a service using launchd? Thanks a lot for you quick reply :) Olivier Le 14 févr. 2011 à 19:06, Jeff Johnson

Re: UINavigationController in Popover

2011-02-14 Thread Matt Neuburg
Sorry it's taken me a while to get to this. I ran my own tests and what I see is buggy (i.e. not what the docs would seem to advertise) but not identical to what you describe. Assuming the UINavigationController does nothing about setting its own size, and that (as I suggested) each contained

Re: UINavigationController in Popover

2011-02-14 Thread Gordon Apple
Good timing. I just added a navigation controller to another popover last night and am getting similar results. Even though I am using the same size for both the views, the nav controller still tries to shape the view into that of a standard table view, i.e., long and narrow. I used the same

Re: Using NSTerminateLater with a Status Item

2011-02-14 Thread jonat...@mugginsoft.com
On 14 Feb 2011, at 19:29, Olivier Lance wrote: Hi Jeff, Well that's what I was afraid to learn... Gotta find a workaround then! I don't know if this would fly or not but... Rather than conventionally returning NSTerminateLater you could try, assuming your async driver calls are run

10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Eric Wing
Is there an API in Snow Leopard to suppress/block/prevent the screensaver from coming up? (I work with a lot of games/multimedia where I don't want the screen to go to screensaver and the input devices in use may not reset the idle counter.) For some reason I thought there might have been a new

Re: 10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Sean McBride
On Mon, 14 Feb 2011 14:03:36 -0800, Eric Wing said: Is there an API in Snow Leopard to suppress/block/prevent the screensaver from coming up? (I work with a lot of games/multimedia where I don't want the screen to go to screensaver and the input devices in use may not reset the idle counter.) For

Re: 10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Jean-Daniel Dupas
Le 14 févr. 2011 à 23:03, Eric Wing a écrit : Is there an API in Snow Leopard to suppress/block/prevent the screensaver from coming up? The new API is supposed to be IOPMAssertionCreateWithName() with kIOPMAssertionTypeNoDisplaySleep, but AFAIK, it does not prevent screen saver (at least it

Re: 10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Nathan Sims
http://developer.apple.com/library/mac/#qa/qa2004/qa1160.html - Nate On Feb 14, 2011, at 2:38 PM, Jean-Daniel Dupas wrote: Le 14 févr. 2011 à 23:03, Eric Wing a écrit : Is there an API in Snow Leopard to suppress/block/prevent the screensaver from coming up? The new API is supposed to

Re: 10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Ron Fleckner
On 15/02/2011, at 9:03 AM, Eric Wing wrote: Is there an API in Snow Leopard to suppress/block/prevent the screensaver from coming up? (I work with a lot of games/multimedia where I don't want the screen to go to screensaver and the input devices in use may not reset the idle counter.) For

Re: Blocking while a save panel sheet is showing

2011-02-14 Thread Graham Cox
On 15/02/2011, at 12:09 AM, Kenneth Baxter wrote: My understanding of what the framework does is: [delegate saveData]; if (dataHasBeenSaved) { do stuff } else { do different stuff } So if my delegate method saveData uses the sheet to save, it will return from the

Re: 10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Eric Wing
Thanks for all the replies! That was what I needed to know. -Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

awakeFromNib on main thread?

2011-02-14 Thread Jon Sigman
I did a search of the docs but didn't find this question addressed... During the object instantiation phase of app startup, is every -awakeFromNib method guaranteed to be called on the app's main thread? ___ Cocoa-dev mailing list

Re: awakeFromNib on main thread?

2011-02-14 Thread Seth Willits
On Feb 14, 2011, at 4:57 PM, Jon Sigman wrote: I did a search of the docs but didn't find this question addressed... During the object instantiation phase of app startup, is every -awakeFromNib method guaranteed to be called on the app's main thread? Given that AppKit is generally not

Re: awakeFromNib on main thread?

2011-02-14 Thread Jon Sigman
On Feb 14, 2011, at 5:41 PM, Seth Willits wrote: On Feb 14, 2011, at 4:57 PM, Jon Sigman wrote: I did a search of the docs but didn't find this question addressed... During the object instantiation phase of app startup, is every -awakeFromNib method guaranteed to be called on the app's main