Re: Outlets Not Connected In awakeFromNib

2011-03-08 Thread Matt Neuburg
On Mar 5, 2011, at 11:00 AM, Matt Neuburg wrote: > On Fri, 04 Mar 2011 10:21:38 +0100, Andreas Grosam > said: >> >> Unfortunately, due to the problem described previously, -awakeFromNib does >> not seem to be always appropriate for its intended use as described in the >> reference. There are

[MEET] CocoaHeads-NYC this Thursday -- please RSVP ASAP

2011-03-08 Thread Andy Lee
This month, Demitri Muna will be talking about how to use crash reports. ** IMPORTANT ** Starting this month, CocoaHeads-NYC will be meeting at Google. If you're coming, please RSVP literally like right this minute. Details are on the group's web page:

Re: How to wait for methods with result/completion blocks to finish?

2011-03-08 Thread Kyle Sluder
On Tue, Mar 8, 2011 at 6:13 PM, Kyle Sluder wrote: > Allowing the user to perform an action that requires some work isn't > punishing the user. Now allowing them to cancel the operation without > a good reason is punishing the user. > Of course, I meant to say "not allowing." --Kyle Sluder _

Re: How to wait for methods with result/completion blocks to finish?

2011-03-08 Thread Kyle Sluder
On Tue, Mar 8, 2011 at 5:45 PM, Matt Neuburg wrote: >> when they tap the "photo library" >> button, we (as Kyle said) "throwing up a modal 'please wait' UI" > > Rather, I'd ask myself why the user is able to tap the photo library button > at all, if the photo library is not available. Don't make

Re: How to wait for methods with result/completion blocks to finish?

2011-03-08 Thread Matt Neuburg
On Mar 8, 2011, at 1:44 PM, Chris Markle wrote: > 1. Camera used to take picture or video (UIImagePickerController). > Want to save image that was taken to the camera roll like happens with > the camera app. That saving process starts when the user returns from > the camera. If they then go to th

Re: Updating binding on release of slider (but update text field continuously)?

2011-03-08 Thread Rick Mann
Thanks, Quincy, I'll try that. On Mar 8, 2011, at 17:30:45, Quincey Morris wrote: > On Mar 8, 2011, at 17:18, Rick Mann wrote: > >> I have a UI with an editable text field and a slider. I want the two to >> represent the same model property. I only want the model updated when the >> user exits

Re: Updating binding on release of slider (but update text field continuously)?

2011-03-08 Thread Quincey Morris
On Mar 8, 2011, at 17:18, Rick Mann wrote: > I have a UI with an editable text field and a slider. I want the two to > represent the same model property. I only want the model updated when the > user exits the text field or lets go of the slider (which is what it does > now). > > However, I'd

Re: About notification NSWindowDidMiniaturizeNotification

2011-03-08 Thread Ivan Chen
Yes, Just heard that from one of my Mac team friends 'o- Is there any other way to observer such interprocess window events? Thanks Ivan Chen On Mar 9, 2011, at 9:20 AM, Quincey Morris wrote: > On Mar 8, 2011, at 16:17, Ivan Chen wrote: > >> What I really want to observer is the app iCal, wh

Re: About notification NSWindowDidMiniaturizeNotification

2011-03-08 Thread Quincey Morris
On Mar 8, 2011, at 16:17, Ivan Chen wrote: > What I really want to observer is the app iCal, when I register the > notification the iCal may not be launched yet. > So I have to pass nil to observer every window, but it just doesn't work > 'o-!!! > Why? Because you can't get notifications from w

Updating binding on release of slider (but update text field continuously)?

2011-03-08 Thread Rick Mann
I have a UI with an editable text field and a slider. I want the two to represent the same model property. I only want the model updated when the user exits the text field or lets go of the slider (which is what it does now). However, I'd like it if the text field would update continuously as th

Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]

2011-03-08 Thread Steve Christensen
I'm seeing the above assertion in an app running on iOS 4.2.1. It then throws an NSInternalInconsistencyException with the reason: "movie player has wrong activation state (1)." The setup has a MPMoviePlayerController instance that is playing a local audio file. There is also a UIWebView whose

Re: About notification NSWindowDidMiniaturizeNotification

2011-03-08 Thread Ivan Chen
Hi, Guys What I really want to observer is the app iCal, when I register the notification the iCal may not be launched yet. So I have to pass nil to observer every window, but it just doesn't work 'o-!!! Why? The truth is I also register lots of notification like : [self registerDefaultNotificat

Re: Core Data Intermittently Blocked Over AFP?

2011-03-08 Thread Steve Steinitz
Hi M, On 8/03/11, A.M. wrote: If that's true, then can you confirm this by switching to a different remote FS protocol (smb)? Good idea, thanks. Or does the file locking required for this unsupported design no longer properly function over other protocols? Yes, according to Ben and others

Core Data Intermittently Blocked Over AFP?

2011-03-08 Thread Steve Steinitz
Hello, Our Core Data App Runs on seven machines, five of them pretty active, all sharing a store on a Network drive over AFP. Previously I've accepted constructive criticism of that architecture and ideas on alternative architectures, but in this thread I'd like to focus on one particular an

Fwd: NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Josh Caswell
> So you are not getting a parsing error, you're using the wrong mechanism. I think I see what you are saying. When my parser encounters an element called "Error", I know that I don't need any more parsing done no matter what else is in the data, so it seemed sensible to have the delegate stop the

Re: How to wait for methods with result/completion blocks to finish?

2011-03-08 Thread Chris Markle
Matt, Kyle, Thanks for the guidance and pointers to other doc. I am having trouble wrapping my head around the asynch patterns, especially since I am working with a code base that I inherited that is not doing a good job of leveraging these patterns. There are two cases (at least) in that app (wh

Re: NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Kevin Bracey
Hi Josh, So you are not getting a parsing error, you're using the wrong mechanism. By calling abort you are setting the parsers error code, that code has nothing to do with the fact you are parsing some XML with "error" in it. I think you are confusing a Parsing Error and a valid XML stream wit

Re: NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Josh Caswell
>This error is the parser state, which since you explicitly aborted ?>the >parse, will be something like >"NSXMLParserDelegateAbortedParseError" -512. Yes, as I said in my original post. The parser's delegate gets error 512, NSXMLParserDelegateAbortedParseError, in the delegate method -parser:par

Re: NSXMLParserDelegateAbortedParseError

2011-03-08 Thread glenn andreas
On Mar 8, 2011, at 3:13 PM, Josh Caswell wrote: > Hi Kevin, > > Thanks for your reply. > > Sorry, maybe my explanation is not clear enough (I may have left out > too many details). It's not a network error that I am talking about, > but, as you say, an API error for which the server returns val

Re: NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Josh Caswell
Hi Kevin, Thanks for your reply. Sorry, maybe my explanation is not clear enough (I may have left out too many details). It's not a network error that I am talking about, but, as you say, an API error for which the server returns valid XML. The specifics: I'm requesting weather data for a locati

Re: Crash with extra [CFString release] after changing a bound value in NSTextField

2011-03-08 Thread Quincey Morris
On Mar 8, 2011, at 12:24, John Link wrote: > NSNumber *myNum = [[NSNumber alloc] init]; > myNum = [prefs valueForKey:MinimumValue]; // retrieve NSNumber from shared > defaults > // do stuff > [myNum release]; > > I thought I was releasing the NSNumber I had created, but if I understand > correc

Re: Crash with extra [CFString release] after changing a bound value in NSTextField

2011-03-08 Thread John Link
Thank you Quincey for your help! Looks like I was reading too much into the trace, thinking it was a bindings problem. Turns out I had done something like this: NSNumber *myNum = [[NSNumber alloc] init]; myNum = [prefs valueForKey:MinimumValue]; // retrieve NSNumber from shared defaults // do s

Re: Notifications and Subclassing

2011-03-08 Thread Gordon Apple
Yup. Right you are. Thanks. This was originally a singleton class where it wouldn't have shown up. That changed in redesign when we started switching different subclasses, which caused the problem. On 3/8/11 10:07 AM, "glenn andreas" wrote: > > On Mar 8, 2011, at 9:42 AM, Gordon Apple wrote

Re: NSThread

2011-03-08 Thread Bill Bumgarner
On Mar 8, 2011, at 12:33 AM, Bruno Causse wrote: > the performance is not a problem, all my threads are waiting for a answer to > a request. That is potentially still a big problem as every thread uses kernel resources, reserves memory for a stack, and otherwise pollutes the kernel's schedulin

Re: How to wait for methods with result/completion blocks to finish?

2011-03-08 Thread Matt Neuburg
On Mon, 07 Mar 2011 21:00:33 -0800, Chris Markle said: >This is on iOS... Say I have use a method that has some kind of >result/completion block like ALAssetsLibrary assetForURL In the >example below, in the assetForURL result block, the JPEG >representation of the asset is read into a buffer and

Re: kvo

2011-03-08 Thread Matt Neuburg
On Tue, 08 Mar 2011 01:23:18 +0200, Ariel Feinerman said: >Hi, > >I wish to use kvo to get data from NSOperation and observe isFinished but on >witch thread is - observeValueForKeyPath:ofObject:change:context: executed? Why not use NSLog and find out? :) Basically, you shouldn't make *any* assu

Re: Why do I have to initialize NSError ?

2011-03-08 Thread Kevin Perry
This is a bug in the framework. NSError-returning methods should not need to check the value of the dereferenced pointer before setting it. Please file a bug for this. -KP On Mar 8, 2011, at 7:22 AM, Gerriet M. Denkmann wrote: > I thought that NSError is just an output parameter, which is set

NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Kevin Bracey
Hi Josh, I'm not sure that is the best place to be checking for a server/network error. If there was an API error, I would have thought the server would have returned valid XML with the error details, which should parse and not cause an parser error. I'd look at downloading the file, determine

Re: easy way to store table-like data

2011-03-08 Thread Matt Neuburg
On Mon, 07 Mar 2011 12:29:27 -0800, Dave DeLong said: >If you have an array of dictionaries, you can use >-filteredArrayUsingPredicate, and pass in the NSPredicate with the format >string of @"type = 'website'". You'll get back all the dictionaries where >[[dictionary objectForKey:@"type"] isE

Re: Notifications and Subclassing

2011-03-08 Thread glenn andreas
On Mar 8, 2011, at 9:42 AM, Gordon Apple wrote: > Class A: NSObject, has methods: > > - (void)foo:(Notification*)notification { >... > } > > - (void)addObservers { >[[NSNotificationCenter defaultCenter] addObserver:self > selector:@selector(

Notifications and Subclassing

2011-03-08 Thread Gordon Apple
Class A: NSObject, has methods: - (void)foo:(Notification*)notification { ... } - (void)addObservers { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(foo:) name:notif

Why do I have to initialize NSError ?

2011-03-08 Thread Gerriet M. Denkmann
I thought that NSError is just an output parameter, which is set only in case of errors. But in my completion handler block (see below) NSError MUST be initialized to nil, or it will NOT be set. The same code works as expected when NOT inside a block. #define REMOVE_BUG // if this i

Re: About notification NSWindowDidMiniaturizeNotification

2011-03-08 Thread Jim McGowan
>> with "onObject:nil" you are not providing an NSWindow instance to observe > > > Not so - passing nil means "observe all windows". Ah yes, of course it does ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: About notification NSWindowDidMiniaturizeNotification

2011-03-08 Thread Graham Cox
On 08/03/2011, at 10:45 PM, Jim McGowan wrote: > with "onObject:nil" you are not providing an NSWindow instance to observe Not so - passing nil means "observe all windows". --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: About notification NSWindowDidMiniaturizeNotification

2011-03-08 Thread Jim McGowan
> > I write the following code and try to observe the window miniaturized > notification, it doesn't work, can anyone tell me why? > ... > // Observing window status > [self registerDefaultNotification:NSWindowDidMiniaturizeNotification > withSelector:@selector(windowMiniaturized:) onObjec

Re: binding relationship to checkbox

2011-03-08 Thread Amy Gibbs
Sorry, I'm obviously being a bit dim here, I have got array controllers for both the categories tableview and the products tableview, As I want to list ALL the categories in the tableview I have bound the name column to the categories. array controller, arrangedObjects, categoryName The

Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked

2011-03-08 Thread Bill Cheeseman
On Mar 7, 2011, at 10:40 PM, Deepa wrote: > But, sometimes (randomly) the callback is not invoked; Hot Key does not work > and hence the feature seems to be not working. I haven't analyzed your code, but I would suggest that you revise it to capture all the errors that the event tap functions

Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked

2011-03-08 Thread Deepa
Hi Daniel, Thank you for the response. Our app provides the user with an option of using system shortcut keys for capturing. For example, Suppose Cmd+Shift+4 is the system shortcut used to capture the full screen; user can use the same combination of keys to capture the full screen from my ap

Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked

2011-03-08 Thread Jean-Daniel Dupas
Le 8 mars 2011 à 04:40, Deepa a écrit : > Hi, > > I am developing a desktop application that supports one of the feature > through Hot Key. I am using Event Tap for this to work. > > But, sometimes (randomly) the callback is not invoked; Hot Key does not work > and hence the feature seems to

Re: Length of NSWindow's stringWithSavedFrame result?

2011-03-08 Thread Graham Cox
On 08/03/2011, at 4:38 PM, John Bartleson wrote: > I'm suspicious, though, that the 50 bytes I've allowed for the > string returned by getxattr in the second method above might not be enough on > a multi-monitor > system. You could just make it bigger - it's a very transient piece of memory on

Re: How to wait for methods with result/completion blocks to finish?

2011-03-08 Thread Kyle Sluder
On Mar 7, 2011, at 9:00 PM, Chris Markle wrote: > I guess in general I an wondering how I correctly wait for things to > happen that I absolutely positively need to be done before I > continue... You rework your approach to not require these things to be complete before your code continues. Th

Re: how to start rainbow cursor

2011-03-08 Thread Kyle Sluder
On Mar 7, 2011, at 11:45 PM, "Yu, Min" wrote: > Hi list > > how to start rainbow cursor? This should never, ever, ever be a desired goal. Ever. What are you actually trying to do? For what purpose did you want to display the beachball? --Kyle Sluder___

Re: NSThread

2011-03-08 Thread Bruno Causse
the performance is not a problem, all my threads are waiting for a answer to a request. my program is a kind of working's Distributor. Le 8 mars 11 à 08:20, Bill Bumgarner a écrit : On Mar 7, 2011, at 12:27 PM, Bruno Causse wrote: hi all, how many NSThread i can create? Quite a few mo

[ANN] LuaCocoa v.0.2 released

2011-03-08 Thread Eric Wing
I am happy to announce the second public release of LuaCocoa (v. 0.2). This version is faster, smaller, and better. LuaCocoa is a next generation Lua/Objective-C bridge that uses BridgeSupport and libffi on Mac OS X to provide full automatic bindings to Objective-C and the more difficult areas of