Re: How to: NSPopover Refuse First Responder?

2013-03-20 Thread Andy Lee
I always think of more to say *after* I hit Send... I haven't tried spelunking in iTunes, but I wouldn't be surprised if it doesn't use NSPopover. You might want to try an alternative like Matt Gemmell's MAAttachedWindow: . I don't know if it has the same issues

Re: How to: NSPopover Refuse First Responder?

2013-03-20 Thread Andy Lee
On Mar 20, 2013, at 11:44 PM, Graham Cox wrote: > > On 21/03/2013, at 12:53 AM, Brad Stone wrote: > >> How can I have a popover appear but have the NSSearchField never relinquish >> it's firstResponder status or have the NSPopover refuse firstResponder? > > > I think you'll need to ensure

Re: How to: NSPopover Refuse First Responder?

2013-03-20 Thread Graham Cox
On 21/03/2013, at 12:53 AM, Brad Stone wrote: > How can I have a popover appear but have the NSSearchField never relinquish > it's firstResponder status or have the NSPopover refuse firstResponder? I think you'll need to ensure that none of the views in the popover accept first responder, wh

Re: How to: NSPopover Refuse First Responder?

2013-03-20 Thread Brad Stone
Hmm. I can think of reasons why this might not work, but it's worth a shot: Have you tried subclassing NSPopover and returning NO from -acceptsFirstResponder? -- Seth Willits Yes, I tried that and tested that it was returning NO. It didn't work. ___

Re: NSScanner question

2013-03-20 Thread Graham Cox
On 21/03/2013, at 12:53 AM, Gerd Knops wrote: > Can't agree here, I have used NSScanner to parse quite a few even complex > file formats, and NSScanner was a pretty convenient (and fast!) solution for > these cases. It's useful, but not as useful as it could be. It *looks* as if it could be

Re: Adding toolbar items only works in viewWillAppear: (?)

2013-03-20 Thread David Rowland
I defer to your technical knowledge, but I think one should do related initializations in one place, and that isn't the place I would choose. Yet, it does solve the OP's problem at no cost, making it a puzzle rather than a problem. Why isn't it appearing as expected? David On Mar 20, 2013, at

Re: CALayer with AppKit objects inside

2013-03-20 Thread Kyle Sluder
On Mon, Mar 18, 2013, at 02:10 AM, Daniele Margutti wrote: > Hi guys, > I'm working on a thing that involve CALayer as base container for objects > instead of NSView (due to iOS compatibility issues). This is not a supported configuration. You cannot arbitrarily parent NSView backing layers to CA

Re: How to: NSPopover Refuse First Responder?

2013-03-20 Thread Seth Willits
On Mar 20, 2013, at 6:53 AM, Brad Stone wrote: > I'm trying to replicate the NSPopover functionality that the new iTunes has > and I'm 99% there. The las problem I'm facing is when the NSPopover appears > it steals the firstResponder status from the NSSearchField so the user's > typing gets in

Re: ARC Release too soon

2013-03-20 Thread Dave
On 16 Mar 2013, at 21:52, Kevin Muldoon wrote: I'd think adding the WindowController to a @property (strong, nonatomic) NSArray *array; would keep those objects alive. Most often, I would simply add each WindowController (or in my case, ViewController) one-at-a-time in the .h. I simply feel

Re: KeyboardType for an iOS searchBar.

2013-03-20 Thread Alex Zavatone
On Mar 20, 2013, at 1:27 PM, Matt Neuburg wrote: > On Wed, 13 Mar 2013 17:54:40 -0400, Alex Zavatone said: >> Yeah, that's the point. I know you can set it a la the storyboard, but once >> it is set (once it's on the scene, the default is what is set) it's really >> hard to change. >> >> I h

Re: Triggering an NSTextStorage Bug

2013-03-20 Thread Kyle Sluder
On Wed, Mar 20, 2013, at 11:48 AM, Seth Willits wrote: > Either way though, it seems in a huge document with a zillion little > ranges it could easily and legitimately hit this retainCount limit. Seems > kinda odd that it's limited to 19 bits. Ha! The reason it's limited to 19 bits is because for

Re: Triggering an NSTextStorage Bug

2013-03-20 Thread Seth Willits
Long story short, it seems this may be caused by the retainCount value on the paragraph style object wrapping around because there are so many references to it. According to the header, it only allows for 2^19 retains (524,288), which you can see in NSParagraphStyle.h (unsigned int refCount:19;

Re: How to get all the path of an application present on the disk

2013-03-20 Thread Matt Neuburg
But only if Spotlight is turned on for this disk. I mention this because I recently broke my own app under these exact circumstances, by turning off Spotlight! I had to turn it off because it was misbehaving - and I'm sure I'm not the only one. m. On Wed, 20 Mar 2013 13:39:32 +0100, Tim Schröde

Re: Adding toolbar items only works in viewWillAppear: (?)

2013-03-20 Thread Matt Neuburg
Far be it from me to step into a controversy (ha ha), but I feel compelled to push back against this oversimplification. (1) It's true that viewWillAppear can occur multiple times, but that doesn't make it a bad place to do one-time initialization. It is easy to distinguish the *first* time fro

Re: accessing notification center programatically

2013-03-20 Thread David Duncan
You cannot access these items no. On Mar 20, 2013, at 1:21 AM, Rick C. wrote: > Hi, > > Does anyone know if there's a way to access all current notifications in > notification center (from all apps) programmatically? Not sure if Apple > would allow this but thought I'd ask. Any ideas about

Re: KeyboardType for an iOS searchBar.

2013-03-20 Thread Matt Neuburg
On Wed, 13 Mar 2013 17:54:40 -0400, Alex Zavatone said: >Yeah, that's the point. I know you can set it a la the storyboard, but once it >is set (once it's on the scene, the default is what is set) it's really hard >to change. > >I have cases where the data the searchBar will be searching will a

Re: Watching a file for changes.

2013-03-20 Thread Scott Ribe
On Mar 20, 2013, at 10:37 AM, Jay Freeman wrote: > At a lower level, there is always the C library function, "stat". Do "man > stat" for details. But you have to poll, which sucks. kqueue lets you block for an event. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303)

Re: Watching a file for changes.

2013-03-20 Thread Jay Freeman
At a lower level, there is always the C library function, "stat". Do "man stat" for details. -- Jay Reynolds Freeman - jay_reynolds_free...@mac.com http://JayReynoldsFreeman.com (personal web site) ___ Cocoa-dev mailing list (C

Re: Watching a file for changes.

2013-03-20 Thread Mr. Gecko
Thanks, I'll read though how that works and see if I can implement it in my software. On Mar 20, 2013, at 11:26 AM, Scott Ribe wrote: > On Mar 20, 2013, at 9:34 AM, Felix Franz wrote: > >> You can use kqueue or some wrapper like UKKQueue >> (http://zathras.de/angelweb/sourcecode.htm) >> or VD

Re: Watching a file for changes.

2013-03-20 Thread Scott Ribe
On Mar 20, 2013, at 9:34 AM, Felix Franz wrote: > You can use kqueue or some wrapper like UKKQueue > (http://zathras.de/angelweb/sourcecode.htm) > or VDKQueue (https://github.com/bdkjones/vdkqueue). I think kqueue is > available in 10.4, but > better check for yourself. kqueue was introduced i

Re: Watching a file for changes.

2013-03-20 Thread Felix Franz
On 20.03.2013, at 16:23, Mr. Gecko wrote: > How can I watch for file changes? E.G. I open a file in Text Edit, I change > the file by adding a few words, I save the file. After the file is saved, > I'll like to know it was saved. > > I need to know how to do this both in 10.8 and 10.4. E.G. F

Watching a file for changes.

2013-03-20 Thread Mr. Gecko
How can I watch for file changes? E.G. I open a file in Text Edit, I change the file by adding a few words, I save the file. After the file is saved, I'll like to know it was saved. I need to know how to do this both in 10.8 and 10.4. E.G. For directories in 10.8, I use FSEventStreamCreate. For

Re: NSScanner question

2013-03-20 Thread Gerd Knops
Can't agree here, I have used NSScanner to parse quite a few even complex file formats, and NSScanner was a pretty convenient (and fast!) solution for these cases. Gerd On Mar 19, 2013, at 8:37 PM, Jens Alfke wrote: > > On Mar 19, 2013, at 4:37 PM, Graham Cox wrote: > >> I don't find NSSca

How to: NSPopover Refuse First Responder?

2013-03-20 Thread Brad Stone
I'm trying to replicate the NSPopover functionality that the new iTunes has and I'm 99% there. The las problem I'm facing is when the NSPopover appears it steals the firstResponder status from the NSSearchField so the user's typing gets interrupted when the popover appears. I tried giving the

Re: Global (all-user) preferences for an application

2013-03-20 Thread Scott Ribe
On Mar 19, 2013, at 11:26 PM, Jerry Krinock wrote: > > On 2013 Mar 19, at 20:26, Scott Ribe wrote: > >> Sure seems to me like signed package com.foo.bar should be able to write >> into /Library/Application Support/com.foo.bar/ without so much >> difficulty... > > You mean, if your app's bund

Re: How to get all the path of an application present on the disk

2013-03-20 Thread Tim Schröder
I don't have the code at hand, but you could run a NSMetadataQuery and search for kMDItemCFBundleIdentifier==abc.xyz. Best, Tim Am 20.03.2013 um 13:08 schrieb anni saini : > Hi, > > I'm tried to find out all the locations where my app is present on the disk. > Is there any Cocoa API which ret

How to get all the path of an application present on the disk

2013-03-20 Thread anni saini
Hi, I'm tried to find out all the locations where my app is present on the disk. Is there any Cocoa API which returns an array of path of an application. For example: my app identifier is "abc.xyz" and name is "ABCXYZ". I have four copies of app on the disk so I want to find out all the paths.

Re: Callbacks from async blocks

2013-03-20 Thread Allan Odgaard
On 20 Mar 2013, at 4:28, Roland King wrote: All the code touching that variable is on the main thread. So it's serialized by that. Say you start block A (slow) and block B (fast). Now block B calls main queue and we have ‘currentOperation == currentOperationAtQueueTime’ so we reset currentOp

accessing notification center programatically

2013-03-20 Thread Rick C.
Hi, Does anyone know if there's a way to access all current notifications in notification center (from all apps) programmatically? Not sure if Apple would allow this but thought I'd ask. Any ideas about this would be great thanks! rc ___ Cocoa-dev