Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?

2012-03-15 Thread Per Bull Holmen
Den 22:09 14. mars 2012 skrev Wade Tregaskis følgende: >> I don't like the idea of a multithreaded aproach by default, because as a >> general rule, you >> should not make your application multithreaded unless you have a good >> reason. > > a) The reality is that Cocoa already exposes you to a lo

Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?

2012-03-15 Thread Per Bull Holmen
Den 12:03 15. mars 2012 skrev Per Bull Holmen følgende: > I agree with what you are saying, > but remember that we MAY also move towards new concepts and > abstractions that make todays concept of multithreading an antiquated > way of achieving parallelism. For example, multithreading is not an >

NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Alex Zavatone
I just fired up Xcode 4.3 early this morning, opened the TextEdit source to try a build after reading the documentation on Automatic Termination and Sudden Termination, how to enable it and how to disable it. Last night I tried adding the indicated properties to the info.plist files in TextEdit

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Fritz Anderson
On 15 Mar 2012, at 10:01 AM, Alex Zavatone wrote: > Then I came across the text below from the read me file in the TextEdit > source: > > • TextEdit opts into Automatic Termination. However, this opt-in is done > automatically by the system. Normally TextEdit would have had to put an entry > f

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Michael Babin
On Mar 15, 2012, at 10:40 AM, Fritz Anderson wrote: > On 15 Mar 2012, at 10:01 AM, Alex Zavatone wrote: > >> Then I came across the text below from the read me file in the TextEdit >> source: >> >> • TextEdit opts into Automatic Termination. However, this opt-in is done >> automatically by the

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Alex Zavatone
I have but this brings up another problem. Two actually. One is that if you try to do this in the existing version of 10.7.3's TextEdit info.plist, TextEdit will no longer launch, complaining of a code signing error with an invalid code signature. I then tried this with other apps (that I quit

Re: Cocoa-dev Digest, Vol 9, Issue 176

2012-03-15 Thread JongAm Park
Yes. That is exactly the case why I tried to find a better and elegant solution. I'm sorry that I didn't read digest version of Cocoa-dev email yesterday. To me it was a busy day yesterday and when I went back home, I literally went to bed ( after writing one email. ) So, I missed your great po

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Michael Babin
On Mar 15, 2012, at 10:58 AM, Alex Zavatone wrote: > If I make the build myself from the TextEdit source code, and add that pList > value to the Info.plist, the built copy of TextEdit still auto quits if I > close the last doc and click in the Finder. If you're building from source, perhaps you

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Alex Zavatone
I think I tried that at 4 or 5 AM this morning but I will try again later today after I get out of the office. I'm also going to try these: – automaticTerminationSupportEnabled – disableAutomaticTermination – enableAutomaticTermination Declared In NSProcessInfo.h On Mar 15, 2012, at 12:25 PM,

Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?

2012-03-15 Thread Wade Tregaskis
> While all these points are very good, I disagree with the conclusion > because I believe in the wisdom: Keep simple things simple. An argument for doing this in the frameworks is that it is then simpler to do this. No need for every developer to write the same boiler plate every time. And if

Re: Undomanager for custom object?

2012-03-15 Thread Seth Willits
On Mar 14, 2012, at 11:44 PM, Luc Van Bogaert wrote: > By "strong reference", I assume you mean I should add an ivar of type > NSUndoManager to my model object to hold a reference to the document's > undoManager, right? If so, I think I understand what you are saying. I will > give this a try.

Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?

2012-03-15 Thread Per Bull Holmen
Den 18:06 15. mars 2012 skrev Wade Tregaskis følgende: > Highly subjective, though, I recognise that.  I think we've pretty much run > this discussion to its end now, and it doesn't appear I've swayed you. >  That's okay. Yes we have, but you have actually swayed me... :) You made me think of h

Exception in AppKit while exercising key-loop

2012-03-15 Thread Michael Crawford
I have a custom popover control containing multiple sliders and textfields (http://dl.dropbox.com/u/4920112/Screenshots/SliderPopover.PNG). When tabbing through the textfields I get the following exception: 2012-03-15 12:19:42.805 SettingsBar[7232:603] *** Assertion failure in +[LSPopupSliderV

NSViewAnimation fade[In/Out]effect not working

2012-03-15 Thread Shawn Bakhtiar
I am trying to fade in and out 4 different views based on the user clicking on a tool bar item (each toolbar item representing a different page (NSView) of the document. So far from the examples I've found on line I have come up with this procedure and it does not work. The function fadeInVi

Re: NSViewAnimation fade[In/Out]effect not working

2012-03-15 Thread Seth Willits
On Mar 15, 2012, at 7:49 PM, Shawn Bakhtiar wrote: > I am trying to fade in and out 4 different views based on the user clicking > on a tool bar item (each toolbar item representing a different page (NSView) > of the document. > >[[[wc window] contentView] addSubview:graph1View]; >[[[

Re: How to support larger NSView hierarchy?

2012-03-15 Thread Keith Knauber
Long time no response... had to fight other fires for a while. On Feb 27, 2012, at 10:46 PM, Graham Cox wrote: Perhaps it would be better to explain your goals, rather than fragments of an implementation that appears to be, on the face of it, pointless. In my case, there are 3 pieces involved:

Newbie Q: how print NSArray element from Xcode's debugger?

2012-03-15 Thread Bill Doster
short of adding code to load the value into a vanilla-C type variable... TIA, Bill ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: How to support larger NSView hierarchy?

2012-03-15 Thread Kyle Sluder
On Wed, Mar 14, 2012, at 08:15 PM, Keith Knauber wrote: > The goal is to update this cocoa GUI app at up to 30 fps, with as little > impact on my real-time thread and a separate apps' video frame rate as > possible. I must ask, what the heck are you actually updating at 30Hz? That will inform the

Re: Newbie Q: how print NSArray element from Xcode's debugger?

2012-03-15 Thread Eeyore
>From source, NSLog(@"%@", object); will print out the description of most Cocoa objects, including NSArrays. You can get the same description from within gdb/lldb using po (for print object), po object Aaron On Mar 15, 2012, at 2:32 PM, Bill Doster wrote: > short of adding code to load

Xcode 4.3.1 Universal Apps

2012-03-15 Thread Donald Largen
I have been reading up on universal apps and what Xcode does for you, creating the two entry points, iPad Folder etc. I am running Xcode 4.3.1 and created a sample project and I noticed all the things I just mentioned are now gone, or I believe to be gone. Can some one explain? Thanks Dona

Re: Newbie Q: how print NSArray element from Xcode's debugger?

2012-03-15 Thread Jens Alfke
On Mar 15, 2012, at 9:43 PM, Eeyore wrote: > You can get the same description from within gdb/lldb using po (for print > object), If it’s a single array element you want to print, do something like po [theArray objectAtIndex: 7] GDB (and LLDB) accept a surprisingly large subset of C/O

Re: Xcode 4.3.1 Universal Apps

2012-03-15 Thread Roland King
Works fine for me. Are you sure, on the first screen after you picked application type, you had 'universal' in the dropdown, I know that's a stupid question but it's all I can think of. You should have two storyboards, one for phone, one for iPad, and the target settings should reflect those as

iTunes like Fast Forward and Rewind Buttons

2012-03-15 Thread Peter Zegelin
I need to implement something akin to the iTunes Fast Forward or Rewind buttons, where a quick mouse click has a different action to when the button is pressed for a longer time. I also need to link this action to a short or long press of an arrow key on the keyboard. Before I have a go myself d