Re: ARC and reinterpret_cast?

2012-07-09 Thread Andreas Grosam
On 08.07.2012, at 06:13, Rick Mann wrote: Hi. I'd like to write code like this: MyObject* foo = reinterpret_cast__bridge MyObject* (someVoidPointer); But the compiler doesn't like it. It's perfectly happy with: MyObject* foo = (__bridge MyObject) someVoidPointer; this is

One more try - NSCollectionView multi-selection problem..

2012-07-09 Thread Robert Monaghan
Hi Everyone, In a previous posting, I had a problem with NSCollectionView not selecting a range of objects, when shift-selecting items. For example, if I were to click on object 3 and then shift-click on object 5, I would expect a range of 3,4,5 to be highlighted. Instead only 3 and 5 are

Re: Stupid block syntax!

2012-07-09 Thread Vincent Habchi
On 5 juil. 2012, at 02:45, Graham Cox graham@bigpond.com wrote: I read recently that the '^' was the only possible operator that could be used due to the inherent grammar of C meaning that anything else would have introduced ambiguity If I remember correctly, it has more to do with C++

Re: NSInteger vs int vs int32_t

2012-07-09 Thread Vincent Habchi
On 5 juil. 2012, at 07:41, Nathan Day nathan_...@mac.com wrote: It must if 64bits is read in that mean you have just read in two 32bit words. So to put a 32bit word in a 64bit register some bit must be ditched, in some way, and if the CPU is optimise to only work with 64bit word alignment

Re: Re: Bottom-edge constraint not enforced in IB but is in runtime?

2012-07-09 Thread Marc Respass
I'm also finding that NSSplitView's pane views seem to have the translatesAutoresizingMaskIntoConstraints property set to true by default, even when built strictly in IB. Is this correct? Xcode 4.3.2. Hi Rick, I really encourage you to watch all three WWDC 2012 videos on constraints. That

Re: Arrgh IB constraints

2012-07-09 Thread Kevin Cathey
BTW, if the NSSplitView hasn't been updated to use constraints in its own layout, then why does it and up changing the size at runtime? For that matter it seems like IB is expressly forbidding adding constraints to the NSSplitView's panes. There are known bugs with NSSplitView and auto

Capturing 'self' strongly in this block is likely to lead to a retain cycle

2012-07-09 Thread Andreas Grosam
I get the mentioned warning in my code and I'm wondering if this a possibly issue in my case: ARC enabled. The warning Capturing 'self' strongly in this block is likely to lead to a retain cycle is issued in this method: - (void) foo { [self.operationQueue addOperationWithBlock:^{

Re: Capturing 'self' strongly in this block is likely to lead to a retain cycle

2012-07-09 Thread Fritz Anderson
On 9 Jul 2012, at 10:40 AM, Andreas Grosam wrote: The warning Capturing 'self' strongly in this block is likely to lead to a retain cycle is issued in this method: - (void) foo { [self.operationQueue addOperationWithBlock:^{ [self bar]; }]; } property operationQueue is

Re: Arrgh IB constraints

2012-07-09 Thread Rick Mann
Which videos? I've watched the first two on constraints, and don't recall any mention of nssplitview. Sent from my iPhone On Jul 9, 2012, at 8:33, Kevin Cathey cat...@apple.com wrote: BTW, if the NSSplitView hasn't been updated to use constraints in its own layout, then why does it and up

Re: turning app into background app

2012-07-09 Thread Eric Schlegel
On Jul 8, 2012, at 5:52 AM, Rick C. rickcort...@gmail.com wrote: I did read that I could set my app to have LSUIElement - YES by default and then use TransformProcessType to unhide it since there is no way to do it in reverse. Note that in 10.7 and later, you can use TransformProcessType

Open Recent Menu

2012-07-09 Thread koko
In some situations, it is worthwhile to subclass NSDocumentController in non-NSDocument-based applications to get some of its features. For example, the NSDocumentController management of the Open Recent menu is useful in applications that don’t use subclasses of NSDocument. I have subclassed

Re: NSInteger vs int vs int32_t

2012-07-09 Thread Greg Parker
On Jul 9, 2012, at 5:44 AM, Vincent Habchi vi...@macports.org wrote: Modern CPU do not enforce strict alignment for integer access. You can perfectly access a Dword (64 bits) at any address, even or odd. It is just more efficient to align 64-bits words at 8-bytes boundary, 32-bits at

Re: NSInteger vs int vs int32_t

2012-07-09 Thread vincent habchi
On 9 juil. 2012, at 20:40, Greg Parker gpar...@apple.com wrote: On Jul 9, 2012, at 5:44 AM, Vincent Habchi vi...@macports.org wrote: Modern CPU do not enforce strict alignment for integer access. You can perfectly access a Dword (64 bits) at any address, even or odd. It is just more

Re: turning app into background app

2012-07-09 Thread Ken Thomases
On Jul 9, 2012, at 1:33 PM, Eric Schlegel wrote: On Jul 8, 2012, at 5:52 AM, Rick C. rickcort...@gmail.com wrote: I did read that I could set my app to have LSUIElement - YES by default and then use TransformProcessType to unhide it since there is no way to do it in reverse. Note that

Re: Open Recent Menu

2012-07-09 Thread koko
The URLs are returned by: -recentDocumentURLs They are just not in the menu. -koko On Jul 9, 2012, at 12:34 PM, koko wrote: In some situations, it is worthwhile to subclass NSDocumentController in non-NSDocument-based applications to get some of its features. For example, the

Re: Bottom-edge constraint not enforced in IB but is in runtime?

2012-07-09 Thread Rick Mann
On Jul 9, 2012, at 7:57 , Marc Respass wrote: I'm also finding that NSSplitView's pane views seem to have the translatesAutoresizingMaskIntoConstraints property set to true by default, even when built strictly in IB. Is this correct? Xcode 4.3.2. Hi Rick, I really encourage you to

Re: NSInteger vs int vs int32_t

2012-07-09 Thread Steve Sisak
At 10:05 AM -0600 7/5/12, Scott Ribe wrote: And theoretically, moving from 32-bit to 64-bit executable could slow you down because of fewer pointers fitting in cache--however the few people I've ever heard mention that were, in my opinion, seriously overblowing it. In my experience with data

Re: Capturing 'self' strongly in this block is likely to lead to a retain cycle

2012-07-09 Thread Sean McBride
On Mon, 9 Jul 2012 11:03:50 -0500, Fritz Anderson said: You correctly describe the cycle. In practice, NSOperationQueue probably releases the block when it's done with it, and breaks the cycle, but clang can't know that, so it has to warn of the likely cycle. You can break this by having a

Re: Arrgh IB constraints

2012-07-09 Thread Charles Srstka
On Jul 9, 2012, at 10:33 AM, Kevin Cathey wrote: BTW, if the NSSplitView hasn't been updated to use constraints in its own layout, then why does it and up changing the size at runtime? For that matter it seems like IB is expressly forbidding adding constraints to the NSSplitView's panes.

Re: Capturing 'self' strongly in this block is likely to lead to a retain cycle

2012-07-09 Thread Shane Stanley
On 10/07/2012, at 2:03 AM, Fritz Anderson wrote: In practice, NSOperationQueue probably releases the block when it's done with it I'm curious about your use of the word probably here. Can you explain? -- Shane Stanley sstan...@myriad-com.com.au 'AppleScriptObjC Explored'

NSComboBox fails to notify delegate?

2012-07-09 Thread Marc Respass
Hi All, My NSViewController is the delegate of five different combo boxes in its view but the delegate methods are not being called. They do get called sometimes, but usually they do not. I haven't found exactly what the situation is where the delegate methods get called. I implement

Re: turning app into background app

2012-07-09 Thread Rick C.
Thank you very much I overlooked this! rc On Jul 10, 2012, at 2:33 AM, Eric Schlegel wrote: On Jul 8, 2012, at 5:52 AM, Rick C. rickcort...@gmail.com wrote: I did read that I could set my app to have LSUIElement - YES by default and then use TransformProcessType to unhide it since

Re: turning app into background app

2012-07-09 Thread Charles Srstka
On Jul 9, 2012, at 1:33 PM, Eric Schlegel wrote: On Jul 8, 2012, at 5:52 AM, Rick C. rickcort...@gmail.com wrote: I did read that I could set my app to have LSUIElement - YES by default and then use TransformProcessType to unhide it since there is no way to do it in reverse. Note that

Re: turning app into background app

2012-07-09 Thread Charles Srstka
On Jul 9, 2012, at 1:33 PM, Eric Schlegel wrote: On Jul 8, 2012, at 5:52 AM, Rick C. rickcort...@gmail.com wrote: I did read that I could set my app to have LSUIElement - YES by default and then use TransformProcessType to unhide it since there is no way to do it in reverse. Note that

Re: Open Recent Menu

2012-07-09 Thread Graham Cox
On 10/07/2012, at 4:34 AM, koko wrote: In some situations, it is worthwhile to subclass NSDocumentController in non-NSDocument-based applications to get some of its features. For example, the NSDocumentController management of the Open Recent menu is useful in applications that don’t use

Re: One more try - NSCollectionView multi-selection problem..

2012-07-09 Thread Graham Cox
I believe for icon-type views, the idea that shift-selecting selects a range of items is no longer considered best practice these days. For example, the icon view in the Finder doesn't do that (list view does). command-click and shift-click are the same thing for icon views, i.e. they toggle

Re: Open Recent Menu

2012-07-09 Thread koko
The problem was the menu, Open Recent. This is not a NSDocument app and as such had no such menu. I created my own but not didi not get items. So, I added a new File menu from IB, dragged its OPen recent entry to my File menu, deleted the File menu just added. And now it all works. -koko

Re: Tab Bar Item naming convention?

2012-07-09 Thread Sixten Otto
On Thu, Jul 5, 2012 at 10:31 PM, Laurent Daudelin laur...@nemesys-soft.com wrote: But, do I follow the same naming convention as for the app icon by adding a @2x to the file name? Absolutely. That's a general convention for naming hidpi resources.

Field Editor told to replace range {0, NSUIntegerMax} : Range Exception

2012-07-09 Thread Jerry Krinock
I'm working on a custom control (a token field), and apparently I've messed with the field editor somehow. When I (as user) click on my control, but not in the focused NSTextView which is the field editor, and then type a character, a message is sent to the field editor telling it to replace

Re: turning app into background app

2012-07-09 Thread Eric Schlegel
On Jul 9, 2012, at 5:58 PM, Charles Srstka wrote: I notice that in the headers, the new constants are marked functional in Mac OS X Barolo and later.” Was Barolo an early code-name for Lion Yes. Also, I just tried this out, and it seems that it always converts the app into a