Re: Circular references caused by scheduled NSTimers?

2013-04-19 Thread Charles Srstka
On Apr 19, 2013, at 1:01 AM, Oleg Krupnov wrote: > I recently encountered an alarming problem that I have never been > aware of, and I'd like to ask about the best practice to handle it. > > Is it true that any object (let's call it Controller) that owns an > NSTimer, scheduled to fire a method

Re: NSScrollView in NSTabView autolayout problem

2013-04-19 Thread Krzysztof Wicher
Thank you Chuck for pointing me to the answer I will try that. I know that NSScrollView is not build with Autolayout in mind but I hoped using it would save several boring layout managment problems arising in my design. Also, I did send the message last week but as it was my first to this mai

Re: Circular references caused by scheduled NSTimers?

2013-04-19 Thread Oleg Krupnov
Thanks for your answers! Now I'm thinking that I'd rather create a helper category on NSTimer with a method that will schedule a timer but under the hood also create the helper object. In this way, the current code of my project will almost not change (only change the scheduling method). The helpe

Showing a drawer on a sheet

2013-04-19 Thread Antonio Nunes
Hi, I have a panel that is shown as a sheet on the document window. I'm trying to show a drawer (NSDrawer) when a certain tab is selected. The drawer shows, but behind the main document window, rather than in front of it, thus being either partly or completely obscured. The drawer window level

My App crash on 10.7.5, but works on 10.8

2013-04-19 Thread Peng Gu
I have an app, which made it to the App Store just a few days ago. But I received a few crash reports from some users. *The information is as following:* Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0001, 0x Application Specific Information: objc[3

Re: Showing a drawer on a sheet

2013-04-19 Thread Uli Kusterer
On Apr 19, 2013, at 1:37 PM, Antonio Nunes wrote: > I have a panel that is shown as a sheet on the document window. I'm trying to > show a drawer (NSDrawer) when a certain tab is selected. The drawer shows, > but behind the main document window, rather than in front of it, thus being > either p

Re: My App crash on 10.7.5, but works on 10.8

2013-04-19 Thread Uli Kusterer
According to the release notes for ARC: http://developer.apple.com/library/ios/#releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html > Which classes don’t support weak references? > > You cannot currently create weak references to instances of the following > classes: >

Re: My App crash on 10.7.5, but works on 10.8

2013-04-19 Thread Peng Gu
Found the problem, there's another place I declared the window controller as weak. Thanks. * * * * On Fri, Apr 19, 2013 at 9:19 AM, Uli Kusterer wrote: > According to the release notes for ARC: > > > http://developer.apple.com/library/ios/#releasenotes/ObjectiveC/RN-TransitioningToARC/Introdu

Re: Preventing edits in Versions browser

2013-04-19 Thread Jerry Krinock
On 2013 Apr 17, at 09:23, Steve Mills wrote: > But TextEdit doesn't seem to prevent any actual edits from happening, but > instantly undoes each edit. So you see the change for a split second. That's > not a very good user experience. What does everyone else do? I agree it's weird, but I just

Re: Circular references caused by scheduled NSTimers?

2013-04-19 Thread Oleg Krupnov
> 2) make a __weak reference to self, and only use that inside the block, your > controller won't be retained. That's another alarming problem that I have become aware of in context of my question. It turns out that if you use blocks instead of delegates inaccurately, you can end up creating a st

Temporarily disabling autosave

2013-04-19 Thread Steve Mills
What's the best way to temporarily disable autosave (autosavesInPlace and preservesVersions are both off), like if I don't want to interrupt our audio playback? Simply override hasUnautosavedChanges and return NO if I want it disabled, otherwise call super? -- Steve Mills office: 952-818-3871

Re: Preventing edits in Versions browser

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 16:13, Jerry Krinock wrote: > > On 2013 Apr 17, at 09:23, Steve Mills wrote: > >> But TextEdit doesn't seem to prevent any actual edits from happening, but >> instantly undoes each edit. So you see the change for a split second. That's >> not a very good user experience.

Re: Temporarily disabling autosave

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 19:25, Steve Mills wrote: > What's the best way to temporarily disable autosave (autosavesInPlace and > preservesVersions are both off), like if I don't want to interrupt our audio > playback? Simply override hasUnautosavedChanges and return NO if I want it > disabled, othe

Re: Temporarily disabling autosave

2013-04-19 Thread Steve Mills
On Apr 19, 2013, at 13:40:12, Mike Abdullah wrote: > Why is it causing an interruption? That sounds suspicious to me. Just because. This isn't simply ol' audio playback. This is a lot more complex. Go with it. > It sounds like you might want to have your -write… routine check > -autosavingIsI

Re: Temporarily disabling autosave

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 20:17, Steve Mills wrote: > On Apr 19, 2013, at 13:40:12, Mike Abdullah wrote: > >> Why is it causing an interruption? That sounds suspicious to me. > > Just because. This isn't simply ol' audio playback. This is a lot more > complex. Go with it. OK. > >> It sounds like y

Re: Temporarily disabling autosave

2013-04-19 Thread Steve Mills
On Apr 19, 2013, at 14:37:11, Mike Abdullah wrote: > Why, what's wrong with cancelling a save? It just seems icky. Who knows what behavior this will cause in the future? I just tried this approach, and it works the same as when I tried returning NO from hasUnautosavedChanges; it successfully p

Re: Temporarily disabling autosave

2013-04-19 Thread Quincey Morris
On Apr 19, 2013, at 13:04 , Steve Mills wrote: > This leads me to believe that the autosave dirty state is getting out of > whack if the save doesn't happen as planned. Any ideas? a. When you get an autosave during playback, can you save the dirty state of the document, return a YES result but

Re: Temporarily disabling autosave

2013-04-19 Thread Jerry Krinock
On 2013 Apr 19, at 12:37, Mike Abdullah wrote: > Why, what's wrong with cancelling a [auto]save? That's a damned good question, Mike. You're probably thinking that, hey, we lived without any autosaves from 1984 to 2011. What's the big deal? It turns out that you need to be really careful w

Re: Temporarily disabling autosave

2013-04-19 Thread Alex Zavatone
I think a good way of summing up your statement is "many developer type people would assume that a save of a document's data is a write of a delta of the data to a disk, which would take an amount of time that is so small that it would be transparent to the user". It's apparent that with your d

Re: Temporarily disabling autosave

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 21:42, Jerry Krinock wrote: > > On 2013 Apr 19, at 12:37, Mike Abdullah wrote: > >> Why, what's wrong with cancelling a [auto]save? > > That's a damned good question, Mike. You're probably thinking that, hey, we > lived without any autosaves from 1984 to 2011. What's th

Re: Temporarily disabling autosave

2013-04-19 Thread Steve Mills
On Apr 19, 2013, at 15:42:05, Jerry Krinock wrote: > That's a damned good question, Mike. You're probably thinking that, hey, we > lived without any autosaves from 1984 to 2011. What's the big deal? It > turns out that you need to be really careful when playing around with an > autosave th

Re: Temporarily disabling autosave

2013-04-19 Thread Steve Mills
On Apr 19, 2013, at 15:22:28, Quincey Morris wrote: > a. When you get an autosave during playback, can you save the dirty state of > the document, return a YES result but not actually autosave, then when > playback stops, if you have this saved state, restore it (via > NSChangeReadOtherConten

Re: Temporarily disabling autosave

2013-04-19 Thread Jerry Krinock
On 2013 Apr 19, at 13:58, Alex Zavatone wrote: > "many developer type people would assume that a save of a document's data is > a write of a delta of the data to a disk, which would take an amount of time > that is so small that it would be transparent to the user". I think this is the model

Re: Temporarily disabling autosave

2013-04-19 Thread Quincey Morris
On Apr 19, 2013, at 14:39 , Steve Mills wrote: > so autosave will happen again during playback You may have covered this ground already and I missed it, but what happens if you return NO from the autosave, along with a cancel error (that is, domain=NSCocoaErrorDomain code=NSUserCancelledError)

UIActivityIndicatorView stops animating when table view cell moves

2013-04-19 Thread Rick Mann
I have a UIActivityIndicatorView in a UITableViewCell that's set up in a dynamic-content cell prototype in a storyboard. It works fine, in that it's animating when displayed, unless the cell is removed and re-inserted. Then it stops animating (still shows). I never actually tell it to stop. Any

Re: Temporarily disabling autosave

2013-04-19 Thread Steve Mills
On Apr 19, 2013, at 16:51:20, Jerry Krinock wrote: > Maybe you Steve and Alex Zavatone may be on to something there. You're > suggesting that, rather than handling the autosave when it is requested > during a long-winded operation, you turn autosave off *before* the > long-winded operation b

Re: Temporarily disabling autosave

2013-04-19 Thread Steve Mills
On Apr 19, 2013, at 16:52:35, Quincey Morris wrote: > You may have covered this ground already and I missed it, but what happens if > you return NO from the autosave, along with a cancel error (that is, > domain=NSCocoaErrorDomain code=NSUserCancelledError). > > On iOS, the document has a spe

Re: Temporarily disabling autosave

2013-04-19 Thread Alex Zavatone
On Apr 19, 2013, at 5:51 PM, Jerry Krinock wrote: > > On 2013 Apr 19, at 13:58, Alex Zavatone wrote: > >> "many developer type people would assume that a save of a document's data is >> a write of a delta of the data to a disk, which would take an amount of time >> that is so small that it w

mobile_house_arrest

2013-04-19 Thread Илья Акгаев
Hi, does anybody have any idea what can such error mean: mobile_house_arrest [7872] : Max open files: 78 As I can see it - that's because app opened too many file handlers, but I can't find any docs or other info that can help. Cheers, Ilia ___ Cocoa

NSInvocation's getArgument & setReurnValue question

2013-04-19 Thread Christ Levesque
Hi there, I used - getArgument:atIndex: method but it gives me error. I don't know what's the problem. I used this as below: if ([component isEqualToString: @"class"]) { 1) id arg; 2) [invocation getArgument: &arg atIndex: i + 2]; 3) [self class:arg]; } The error is this: NSInvocati

Problems converting to ARC

2013-04-19 Thread Christ Levesque
Hi there, I want to convert my code to ARC but this problems doesn't let me to do this. I read the errors but I couldn't do nothing. All the problems are in these else if statement and are colored Red. else if (isupper(character)){ 1) Pointer to non-const type 'NSString *' with no expli

Clang "File not found" - in cocoa app

2013-04-19 Thread Christ Levesque
Hi there, I used clang in my cocoa app but it doesn't find Clang/Index.h. The error is "File not found". I linked to clang but again it doesn't find it. Anybody knows what's the problem. Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: ANN: new open-source window manager for OS X

2013-04-19 Thread Tom von Schwerdtner
Looks interesting. Any comment on how this relates to Slate (https://github.com/jigish/slate)? It seems to be roughly along the same lines (which would be fine, just asking). -Tom On Wed, Apr 17, 2013 at 12:44 PM, Steven Degutis wrote: > Called Windows.app. Source is on github: > https://gith

Preferences for network login

2013-04-19 Thread Graham Cox
Hi all, Our app stores some "by host" preferences aside from its usual user defaults. We have a user that reports that these preferences are not working when logging in over the network. I'm not actually sure what they mean by that, quote: "other users (all of which are network accounts that

Re: Preferences for network login

2013-04-19 Thread Quincey Morris
On Apr 19, 2013, at 22:18 , Graham Cox wrote: > what sort of network accounts are implied by 'AD' ? I assume AD == ActiveDirectory, which is a Microsoft thing. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Preferences for network login

2013-04-19 Thread Graham Cox
Exactly, which is why I figured it must either mean something else here, or the user in question is confused... It's a network of iMacs we're talking about. I'm trying to get more info about what the user means. In the meantime, how to store prefs that work for remote logins? On 20/04/2013,

Re: Preferences for network login

2013-04-19 Thread Quincey Morris
On Apr 19, 2013, at 22:46 , Graham Cox wrote: > Exactly, which is why I figured it must either mean something else here, or > the user in question is confused... > > It's a network of iMacs we're talking about. https://developer.apple.com/library/mac/#documentation/Security/Conceptual/Authenti