Re: [iPhone] Terminating iPhone App programatically

2010-07-09 Thread Uli Kusterer
Am Jul 5, 2010 um 6:51 PM schrieb Tharindu Madushanka: > Ah Ok. I got the point. Thanks :) So we should not look to exit the app > using code. Exactly. If it's an error situation, you should really try to gracefully handle such errors and give the user the option to continue using your applicat

Re: Another basic CoreData question

2010-07-09 Thread Jerry Krinock
On 2010 Jul 08, at 19:28, Noah Desch wrote: > On Jul 8, 2010, at 7:33 PM, gumbo...@mac.com wrote: > >> Using the standard Employee/Department example, Whats the best way to set a >> default department for an Employee? >> So that every employee is created with a relationship to the "mailRoom" >

Re: NSXMLParser parses line feeds in attribute strings as spaces

2010-07-09 Thread Jerry Krinock
Thank you all for the replies. On 2010 Jul 08, at 19:18, Jeff Johnson wrote: > See section 3.3.3 Attribute-Value Normalization: > > http://www.xml.com/axml/testaxml.htm That's the problem. NSXMLParser is correct. Unfortunately, the incorrect XML is being generated by others, so I got to sp

Re: NSView Docs. Was: Binding -- or not -- a button created in code

2010-07-09 Thread Sean McBride
On Thu, 8 Jul 2010 15:01:19 -0700, Jerry Krinock said: >Well, I'm still using -[NSView viewWillMoveToWindow:] to remove my >observers and unbind my bindings, with no problems. But I'm still >scared that someday it might not be invoked when a window is closed. So >I filed a bug on the documentati

Re: Another basic CoreData question

2010-07-09 Thread Keary Suska
On Jul 9, 2010, at 6:12 AM, Jerry Krinock wrote: > An interesting question is how this happens in the DepartmentAndEmployees > sample code. When I create a document with an employee, save the file and > dump it with sqlite3, it appears that the Employee is related to the > Department. But I l

Re: Another basic CoreData question

2010-07-09 Thread Sean McBride
On Fri, 9 Jul 2010 05:12:10 -0700, Jerry Krinock said: >>> Using the standard Employee/Department example, Whats the best way to >set a default department for an Employee? >>> So that every employee is created with a relationship to the >"mailRoom" department. >> >> Probably to add some custom cod

CIFilter does not strongly reference its name, resulting in crash when using garbage collection

2010-07-09 Thread Michal Antonic
Hi, it seems to me that CIFilter does not strongly reference its own name. When using garbage collection, sometimes the name gets collected prematurely, resulting in crashes. This problem manifests itself perhaps most clearly when trying to use a CIFilter that has been encoded to XIB and then d

EPUB

2010-07-09 Thread Gerd Moe-Behrens
How do I display an EPUB/XHTML file in UIWebView? Thanks in advance for your help. Best Gerd Sent from my iPad ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: Another basic CoreData question

2010-07-09 Thread gumboots
Thanks for the help guys. I have this working now, along with the double items. Is there any way to avoid/workaround this problem. Or rather another way to get a reference to the departments? Cheers Rob On 10/07/2010, at 2:26 AM, Sean McBride wrote: > On Fri, 9 Jul 2010 05:12:10 -0700, Jerry K

Re: Custom control and cells

2010-07-09 Thread Corbin Dunn
On Jul 7, 2010, at 4:14 AM, Georg Seifert wrote: > Hi, > > I try to find an example on how to implement the mouse tracking and editing > behavior of a NSCell from my own control (subclass of NSControl). I need a > control that can handle several kinds of cells like ImageAndTextCell (with > ed

Detecting 'nop' clicks on an NSPopUpButton?

2010-07-09 Thread Sean McBride
Hi all, If the user clicks a popup button and reselects the existing selection, the button still sends its action. I'd like to treat that as a nop. Is there a way to detect, from my action method, that the new selection is the same as the previous selection? (I can of course do this by checking

Re: Another basic CoreData question

2010-07-09 Thread Sean McBride
On Sat, 10 Jul 2010 05:22:46 +1200, gumbo...@mac.com said: >Thanks for the help guys. I have this working now, along with the double >items. Is there any way to avoid/workaround this problem. Or rather >another way to get a reference to the departments? The workaround is to not fetch in awakeFrom

trapping each iteration of run loop?

2010-07-09 Thread Scott Ribe
Is there any way to get some code to run after each event processed? (This is for debugging, not subverting the UI in some strange way.) I don't really want to just use NSTimer, because I don't want this code running continuously when the app is otherwise idle. -- Scott Ribe scott_r...@elevat

Re: Another basic CoreData question

2010-07-09 Thread Jerry Krinock
On 2010 Jul 09, at 07:19, Keary Suska wrote: > On Jul 9, 2010, at 6:12 AM, Jerry Krinock wrote: > >> An interesting question is how this happens in the DepartmentAndEmployees >> sample code. When I create a document with an employee, save the file and >> dump it with sqlite3, it appears that

Re: NSView Docs. Was: Binding -- or not -- a button created in code

2010-07-09 Thread Jerry Krinock
On 2010 Jul 09, at 07:19, Sean McBride wrote: > mmalc has some comments on unbinding here: > I wonder if mmalc saw any advantage to using -viewWillMoveToSuperview: vs. -viewWillMoveToWindow: for unbinding/unobserving? It

Re: trapping each iteration of run loop?

2010-07-09 Thread Abhinay Kartik Reddyreddy
I think CFRunLoopObserver is what you are looking for. http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFRunLoopObserverRef/Reference/reference.html -Kartik On Jul 9, 2010, at 4:14 PM, Scott Ribe wrote: > Is there any way to get some code to run after each ev

Re: NSView Docs. Was: Binding -- or not -- a button created in code

2010-07-09 Thread Sean McBride
On Fri, 9 Jul 2010 13:38:36 -0700, Jerry Krinock said: >> mmalc has some comments on unbinding here: >> > >I wonder if mmalc saw any advantage to using -viewWillMoveToSuperview: >vs. -viewWillMoveToWindow: for unbinding/unobs

Re: trapping each iteration of run loop?

2010-07-09 Thread Scott Ribe
Yes, exactly, thanks! You'd think after all this time I'd know to replace NS with CF in the documentation browser when I don't see a way to do something... But n... On Jul 9, 2010, at 2:38 PM, Abhinay Kartik Reddyreddy wrote: > think CFRunLoopObserver is what you are looking for. -

Re: Setting focus on NSSearchField...

2010-07-09 Thread Lorenzo Thurman
-It's better now and the menu stays after a --slight flickering In case no one has responded to the flickering issue yet (on 10.5?). It may be a known bug. You'll have to disable screen updates just before the call that causes the flickering. And re-enable it just after. I think the macros

Re: Custom control and cells

2010-07-09 Thread Georg Seifert
Hi, The thing is, I want to replicate the NSCollectionView but using cells instead of views. The NSCollectionView has a lot of problems like performance and I couldn’t find a way to get the rect of the view of an item (both fixed in Snow Leopard but I have to support Leopard). It would be inte

Re: Custom control and cells

2010-07-09 Thread Michael Watson
In what way do you believe a custom NSCell-based replication of NSCollectionView will perform better than NSCollectionView itself? What performance issue have you seen? Are you sure the problem lies with NSCollectionView and not your own code surrounding it? (I.e., have you Sharked your applica

NSPreferencePane and sheets

2010-07-09 Thread Dave DeLong
Hi everyone, I'm working on a preference pane and am having issues getting some sheets to work. I have a button that executes: NSOpenPanel * open = [NSOpenPanel openPanel]; //basic configuration [NSApp beginSheet:open modalForWindow:[[self mainView] window] delegate:self didEndSelector:@select

Re: NSPreferencePane and sheets

2010-07-09 Thread Dave DeLong
Here's some clarification (since I realize my original question may not have made very much sense): I have a button on an NSPreferencePane that executes the following code: NSOpenPanel * open = [NSOpenPanel openPanel]; //basic configuration [NSApp beginSheet:open modalForWindow:[[self mainView]

[iOS] How to test iAd enabled apps

2010-07-09 Thread Meik Schuetz
Hello, while testing my iAd enabled app on my device the delegate method didFailToReceiveAdWithError is called with the error 'Invalid app id/account information'. I'd like to make sure that everything works fine before I submit the app for review. Is there anyway that I can test, even having th

Re: Custom control and cells

2010-07-09 Thread Georg Seifert
Hi, > In what way do you believe a custom NSCell-based replication of > NSCollectionView will perform better than NSCollectionView itself? What > performance issue have you seen? Are you sure the problem lies with > NSCollectionView and not your own code surrounding it? (I.e., have you > Shark

Re: NSPreferencePane and sheets

2010-07-09 Thread Michael Ash
On Fri, Jul 9, 2010 at 7:21 PM, Dave DeLong wrote: > Hi everyone, > > I'm working on a preference pane and am having issues getting some sheets to > work. > > I have a button that executes: > > NSOpenPanel * open = [NSOpenPanel openPanel]; > //basic configuration > [NSApp beginSheet:open modalFor

Re: Custom control and cells

2010-07-09 Thread Michael Ash
On Fri, Jul 9, 2010 at 6:22 PM, Georg Seifert wrote: > Hi, > The thing is, I want to replicate the NSCollectionView but using cells > instead of views. The NSCollectionView has a lot of problems like performance >  and I couldn’t find a way to get the rect of the view of an item (both fixed > i

Using NSFetchRequest to fetch NSManagedObject subclasses

2010-07-09 Thread Matt James
Hi all, In the WWDC session "Mastering Core Data", it was recommended to subclass NSManagedObject, which I'm doing. Not only does this follow their recommendation, but it's also helpful for coding additional logic that might be appropriate on a per-model basis. What I don't understand, howeve

Re: Using NSFetchRequest to fetch NSManagedObject subclasses

2010-07-09 Thread Roland King
Your model (xcdatamodel) says what class is used for each entity, you have that set to the name of your custom class, right? If so it will give you the correct object type when you insert or retrieve it. executeFetchRequest:error: in NSManagedObjectContext will return an NSArray() of the corre

Re: Using NSFetchRequest to fetch NSManagedObject subclasses

2010-07-09 Thread Matt James
Wow, thank you so much. I have no idea how I missed the "Class" column in the xcdatamodel's UI. From what I saw, none of the tutorials mentioned doing this either. Maybe I was reading the newbie stuff where they didn't get into fun stuff like that. Again, thanks a TON! -Matt On Jul 10, 201