Re: NSXMLParser frees itself on error?

2009-05-07 Thread Marcel Weiher
On May 7, 2009, at 21:12 , Michael Ash wrote: On Thu, May 7, 2009 at 11:53 PM, Marcel Weiher > wrote: On May 7, 2009, at 17:29 , Jeff Johnson wrote: On May 7, 2009, at 6:00 PM, Marcel Weiher wrote: That's not what I was talking about. I was talking about the possibility that the 'owned' c

Outrunning the Garbage Collector

2009-05-07 Thread Jeffrey J. Early
I have a multithreaded application with several NSOperationQueues and it appears as if under heavy load conditions I'm overwhelming the garbage collector so-to-speak. I essentially have three queues which can be processing different types of operations simultaneously. - If I load up *one*

Re: Associating Objective-C objects with Java objects using JNI

2009-05-07 Thread Scott Ribe
It can certainly be done; I did something exactly analogous ~7 years ago for C++ & Carbon. Basically, you can use the JNI to instantiate a Java runtime instance within your program, then use JNI to call through to Java object instances. Backing out a bit, you can create your own proxy classes whose

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Michael Ash
On Thu, May 7, 2009 at 11:53 PM, Marcel Weiher wrote: > > On May 7, 2009, at 17:29 , Jeff Johnson wrote: > >> On May 7, 2009, at 6:00 PM, Marcel Weiher wrote: >> That's not what I was talking about. I was talking about the possibility that the 'owned' caller manually runs the run loop ri

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Marcel Weiher
On May 7, 2009, at 17:29 , Jeff Johnson wrote: On May 7, 2009, at 6:00 PM, Marcel Weiher wrote: That's not what I was talking about. I was talking about the possibility that the 'owned' caller manually runs the run loop right after it calls the delegate callback, so any performSelector:

NSTokenFieldCell in NSTableView

2009-05-07 Thread Jerry Krinock
Last week I mentioned that NSTokenFieldCell was working OK for me. After testing more thoroughly I need to correct the record. As stated in the Release Notes for Mac OS 10.4, there are issues using NSTokenFieldCell in an NSTableView. I found the following results testing with Mac OS 10.5

Re: losing focus momentarily, over and over again

2009-05-07 Thread Michael Ash
On Thu, May 7, 2009 at 2:41 PM, Bill Janssen wrote: > I'm guessing that some other app I'm running, probably in this > background process (programs like GNU "enscript", and "ghostscript", > but also like "sips", to create custom Finder icons), is stealing the > focus.  Or maybe System Events is do

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Seth Willits
On May 7, 2009, at 5:31 PM, Graham Cox wrote: The problem I have with it is that I can't precisely tell from the documentation what problem it solves, and whether it is the same problem that I've had in the past (and Seth has now) which I solved as outlined. It seems to solve a closely rela

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Graham Cox
On 08/05/2009, at 1:40 AM, Shawn Erickson wrote: On Thu, May 7, 2009 at 1:46 AM, Graham Cox wrote: I suspected it might be but frankly I found the documentation confusing and couldn't get it to work. Also, it's 10.5 only, though there is a deprecated older method that serves a similar

Key-Value Observing: light-weight or heavy-weight?

2009-05-07 Thread Stuart Malin
I've got a situation where I have several hundred objects of a class that have a KVC-compliant property. There are a matching set of other objects that refer to the former. For a problem I need to solve, one solution is for the other objects to observe the property of their counterpart obje

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Jeff Johnson
On May 7, 2009, at 6:00 PM, Marcel Weiher wrote: And yes, the code that I use explicitly runs the runloop, and it is the code that runs the runloop that both allocates the NSURLConnection and then cleans up after it checks the flag. Perfectly safe, perfectly synchronous. That's not what

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread Corbin Dunn
On May 7, 2009, at 2:28 PM, Kevin Gessner wrote: On May 7, 2009, at 6:11 PM, Corbin Dunn wrote: On May 7, 2009, at 6:52 AM, Kevin Gessner wrote: On May 7, 2009, at 3:39 PM, develo...@mugginsoft.com wrote: Try reviewing this thread - it might help http://www.cocoabuilder.com

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Marcel Weiher
On May 7, 2009, at 10:39 , Jeff Johnson wrote: Actually, you were initially claiming that there was such a guarantee, and misquoting the docs to 'prove' your point. The memory management docs tell you what you should do, but nothing in Objective-C or Cocoa requires you to follow them. Wel

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread Kevin Gessner
On May 7, 2009, at 6:11 PM, Corbin Dunn wrote: On May 7, 2009, at 6:52 AM, Kevin Gessner wrote: On May 7, 2009, at 3:39 PM, develo...@mugginsoft.com wrote: Try reviewing this thread - it might help http://www.cocoabuilder.com/archive/message/cocoa/2009/3/12/232149 Thanks for the po

Re: Calling a super call method from and instance

2009-05-07 Thread Jonathan Hess
Hey Dave - Usually wanting to do something like this points to some design flaw, but if you really want to invoke classA's implementation there are a number of ways to do it. One way would be to put a category on MyClassB like this: @implementation MyClassB(PassThrough) - (void)aboutMySupe

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Seth Willits
On May 7, 2009, at 12:25 PM, Seth Willits wrote: Graham's idea notifies the parent of any change in the child without having to use an "isModified" key, which is a bit cleaner. I think an even better solution would be to merge Mike Ash's dedicated KV observer object with the general idea of

Calling a super call method from and instance

2009-05-07 Thread David Alter
In Objective-C 1.0 (not 2.0 ) is there a way to call a super class method if I have a reference to the class See bellow @interface MyClassA : NSObject { } -(void) aboutMe ; @end @implementation MyClassA -(void) aboutMe ; { NSLog(@"I'm Class A"); } @end @interface MyClassB :MyClassA { } -(void) ab

Re: Force AppleSpell.service to launch

2009-05-07 Thread Eric Gorr
On May 7, 2009, at 12:54 PM, Ross Carter wrote: Is there a nice way to insure that AppleSpell.service is running? I've never used this... Have you checked to see what sharedSpellCheckerExists returns? I am not sure what one would do if it returned NO. __

Re: Tri-state Check box

2009-05-07 Thread Eric Gorr
If I understand correctly, when the user changes the state, simply do: [myCheckBox setAllowsMixedState:NO]; On May 7, 2009, at 1:36 PM, Arun wrote: Hi All, In my application i use check box to represent enable / disable states. And user is allowed to change the states from enable to disab

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Seth Willits
On May 7, 2009, at 1:39 AM, Caleb Strockbine wrote: A. each observable object class exports a list of properties that it thinks may be of interest to an observer. This is just an array of strings (property names) returned by a class method. B. A utility method iterates over that list and regist

losing focus momentarily, over and over again

2009-05-07 Thread Bill Janssen
I'm losing focus, momentarily, over and over again, and I'd like to figure out whether there's anything I can do about it. I'm running a number of apps against the window server, like Cocoa Emacs and Camino. I run a background process that watches (via Applescript calls to System Events) what's g

Re: Core Data Migration and the Inexperienced Younger Self

2009-05-07 Thread I. Savant
On Thu, May 7, 2009 at 1:19 PM, Adam Swift wrote: > Unless you are specifying NSIgnorePersistentStoreVersioningOption as an > option to addPersistentStoreWithType:... I'm not. > ... if there are any changes to your > data model that would result in changes to the data that is persisted > ...

[Q] Correct way to identify an application, Launch Services, & Spaces

2009-05-07 Thread Eric Gorr
I have two versions of my application (appname 2008 & appname 2009). They both have the same identifier: com.mycompany.appname Is this ok so far? So, if I reset the launch services database by doing: lsregister -kill -r -domain local -domain system -domain user and launch & quit appname 200

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Jeff Johnson
On May 7, 2009, at 12:05 PM, Marcel Weiher wrote: On May 7, 2009, at 9:43 , Jeff Johnson wrote: You misunderstand my argument. I'm not claiming that autorelease provides some magical guarantee. Actually, you were initially claiming that there was such a guarantee, and misquoting the docs

Tri-state Check box

2009-05-07 Thread Arun
Hi All, In my application i use check box to represent enable / disable states. And user is allowed to change the states from enable to disable and vice versa. Is it possible to represent one more state say "modified" using the same check box? I know if i set the state of the check box to mixed i

Re: Core Data Issue

2009-05-07 Thread Sean McBride
On 5/6/09 8:11 PM, Scott Daner said: >I seem to be having an issue with Core Data. I can only have like 4 >attributes in my entity or else it won't add a new object to the array >when the user clicks add in the application. It just loads into the >debugger. It seems to be solely based on the numbe

Re: Core Data Migration and the Inexperienced Younger Self

2009-05-07 Thread Adam Swift
On May 7, 2009, at 7:02 AM, I. Savant wrote: On Wed, May 6, 2009 at 6:36 PM, Melissa J. Turner wrote: Context is important. Also future-proofing. If your app was originally written against v1 CoreData (Tiger), you need to update the app to be wise enough to check the store's metadata a

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Marcel Weiher
On May 7, 2009, at 9:43 , Jeff Johnson wrote: You misunderstand my argument. I'm not claiming that autorelease provides some magical guarantee. Actually, you were initially claiming that there was such a guarantee, and misquoting the docs to 'prove' your point. I'm claiming that you oug

Re: Garbage collected and non-garbage collected

2009-05-07 Thread Marcel Weiher
[catching up with my cocoa-dev backlog] On Mar 10, 2009, at 20:36 , Michael Ash wrote: On Tue, Mar 10, 2009 at 2:47 PM, Robert Mullen wrote: Too little resource, too little experience, too little return. The first two are because this is a skunk works type corporate project that basically

Force AppleSpell.service to launch

2009-05-07 Thread Ross Carter
Normally, a NSTextView will launch AppleSpell.service as needed. In my app, for reasons I have not figured out, that doesn't happen. I've been launching the service with a call to [[NSSpellChecker sharedSpellChecker] checkSpellingOfString:@"hello" startingAt:0]; That works on app startup, but

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread develo...@mugginsoft.com
On 7 May 2009, at 14:27, Kevin Gessner wrote: I'm trying to remove the highlighted appearance from the selected row of an NSOutlineView (and draw the row like an unselected row). I'm overriding highlightSelectionInClipRect: as a no-op, to remove the whole row's selection background. I'm al

Re: Programmatic access to NSSearchField's Display Name?

2009-05-07 Thread develo...@mugginsoft.com
On 7 May 2009, at 13:54, Jon C. Munson II wrote: Namaste! I tried searching for the answers to hopefully avoid having to ask, however, I am drawing blanks... I could use a little more explanation of what you wrote. For my benefit, and for those who are new to this as well, would you min

Re: Programmatic access to NSSearchField's Display Name?

2009-05-07 Thread develo...@mugginsoft.com
On 7 May 2009, at 13:18, Jon C. Munson II wrote: Namaste! Thanks! Too bad there isn't any way to access "the list" otherwise... I read something about that not being possible due to a copy not being made... So, where did you find this stuff? I looked in the docs and didn't any of that

Re: Problem Embedding Cocoa Framework

2009-05-07 Thread Sean McBride
On 5/7/09 2:40 AM, Gwynne Raskind said: >The system installed version of libxml2 on 10.5.6 is 2.6.16. The >current release of libxml2 is 2.7.3. A quick glance at xmlsoft.org/news.html > > tells us that 2.6.16 comes from November of 2004 and that there >have been dozens of bug, feature, and securit

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Jeff Johnson
On May 7, 2009, at 11:18 AM, Marcel Weiher wrote: On May 7, 2009, at 8:37 , Jeff Johnson wrote: No, autorelease can be used to ensure that the returned object is valid within the scope of the caller, You can *try* to use it to ensure that, but as we have found out, you have no way of actu

Re: iPhone target-specific headers for Xcode

2009-05-07 Thread Fritz Anderson
On 7 May 2009, at 10:32 AM, Sam Krishna wrote: Thanks for this note. I had already looked for the "Preprocessor Macros..." in the iPhone app target build properties. It *doesn't* exist. You have the Simulator SDK selected in the ad-hoc menu at the left of the project window's toolbar. Xco

Re: Custom NSImageView

2009-05-07 Thread Corbin Dunn
On May 7, 2009, at 8:16 AM, Livio Isaia wrote: I create MyImageView (from NSImageView) which must use MyImageCell (from NSImageCell). I put MyImageView in MyWindow with Interface Builder, creating an NSImageView and setting its class to MyImageView. The cell is encoded in the nib. You ca

Re: iPhone target-specific headers for Xcode

2009-05-07 Thread Brian Slick
See if either of these helps out: http://www.iphonedevsdk.com/forum/iphone-sdk-development/7515-how-do-i-define-preprocessor-macros-xcode-project-settings.html http://blog.aribraginsky.com/2009/01/how-do-i-define-preprocessor-macros-in.html Brian On May 7, 2009, at 11:32 AM, Sam Krishna wrote

Re: Problem Embedding Cocoa Framework

2009-05-07 Thread George King
Is there a particular reason you are embedding a version of libxml rather than the one that ships with the system ( /usr/lib/ libxml2.dylib )? Does the somewhat newer version have features that you need or have needed bugfixes? The system installed version of libxml2 on 10.5.6 is 2.6.16. Th

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Marcel Weiher
On May 7, 2009, at 8:37 , Jeff Johnson wrote: On May 7, 2009, at 2:38 AM, Marcel Weiher wrote: EXACTLY. Autorelease allows ownership transfer from called methods to occur without thrusting ownership on those that don't want it. That's one use, anyway. No. That is what you need autor

Re: Dynamic Layout

2009-05-07 Thread Greg Guerin
Bridger Maxwell wrote: I think a layout manager is similar to what I want, but a little overkill. I have one view, and want to fit many smaller views inside it. That's what a layout manager does. Please explain how it's overkill. It is still really early in development, but here is a sc

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread Corbin Dunn
On May 7, 2009, at 6:52 AM, Kevin Gessner wrote: On May 7, 2009, at 3:39 PM, develo...@mugginsoft.com wrote: Try reviewing this thread - it might help http://www.cocoabuilder.com/archive/message/cocoa/2009/3/12/232149 Thanks for the pointer - that's what I get for not Googling for th

Re: different application behaviour under different startup modes ...

2009-05-07 Thread vinai
--- On Thu, 5/7/09, I. Savant wrote: > From: I. Savant > To: "vinai" > Cc: Cocoa-dev@lists.apple.com > Date: Thursday, May 7, 2009, 9:59 AM > > On Thu, May 7, 2009 at 10:53 AM, vinai wrote: > >> However, when I try to launch the application from >> either double-click in the finder, or tryin

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Shawn Erickson
On Thu, May 7, 2009 at 1:46 AM, Graham Cox wrote: > I suspected it might be but frankly I found the documentation confusing and > couldn't get it to work. Also, it's 10.5 only, though there is a deprecated > older method that serves a similar purpose. The older method and the new method work jus

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Jeff Johnson
On May 7, 2009, at 2:38 AM, Marcel Weiher wrote: EXACTLY. Autorelease allows ownership transfer from called methods to occur without thrusting ownership on those that don't want it. That's one use, anyway. No. That is what you need autorelease for. Anything else is fluff. No, autore

Re: iPhone target-specific headers for Xcode

2009-05-07 Thread Sam Krishna
Hi Fritz, et. al., Thanks for this note. I had already looked for the "Preprocessor Macros..." in the iPhone app target build properties. It *doesn't* exist. I've filed rdar://6865368 against this issue. I've discovered it's pretty much in all the iPhone SDKs that I've used. I've worked

Custom NSImageView

2009-05-07 Thread Livio Isaia
I create MyImageView (from NSImageView) which must use MyImageCell (from NSImageCell). I put MyImageView in MyWindow with Interface Builder, creating an NSImageView and setting its class to MyImageView. In MyImageView.m I put: @implementation MyImageCell - (void)encodeWithCoder:(NSCoder *)aCo

Re: Dashboard-style window flip.

2009-05-07 Thread Randall Meadows
On May 7, 2009, at 5:55 AM, Тимофей Даньшин wrote: Hello. This might be a noob question, but I'd like my application to have it's two or three settings to be located "on the back of it's window", like widgets in DashBoard do. I've been googling for it, but all i could find was a desperatel

Re: different application behaviour under different startup modes ...

2009-05-07 Thread I. Savant
On Thu, May 7, 2009 at 10:53 AM, vinai wrote: > However, when I try to launch the application from either double-click in the > finder, or trying to open the application folder from a terminal command > line, I get the message about "The application ... quit unexpectedly. Mac OS > X and other

different application behaviour under different startup modes ...

2009-05-07 Thread vinai
Hi Folks, I am just starting up with Cocoa, and feel like I'm making a very rookie mistake, but I can't track down what I've missed I am coding up an application to process different types of raw data. On application startup, I have a window (of NSPanel lineage) open, with 2 NSPopupButt

Re: Core Data Migration and the Inexperienced Younger Self

2009-05-07 Thread I. Savant
On Wed, May 6, 2009 at 6:36 PM, Melissa J. Turner wrote: > Context is important. Also future-proofing. > > If your app was originally written against v1 CoreData (Tiger),  you need to > update the app to be wise enough to check the store's metadata and run away, > run away from any store containi

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread Kevin Gessner
On May 7, 2009, at 3:39 PM, develo...@mugginsoft.com wrote: Try reviewing this thread - it might help http://www.cocoabuilder.com/archive/message/cocoa/2009/3/12/232149 Thanks for the pointer - that's what I get for not Googling for the outline view's super class, too. -- Kevin Kevin Ge

Re: NSManagedObjectContext -insertObject: Cancels Prior Deletion -- BUT!

2009-05-07 Thread Jerry Krinock
On 2009 May 06, at 11:32, Jim Correia wrote: Using multiple MOCs with a single persistent store coordinator is supported. It is pattern #1 in the Core Data threading documentation. Thanks, Jim. I believe that moving the children to a "foster parent" before deleting the real parent would b

Text color in NSOutlineView's selected row

2009-05-07 Thread Kevin Gessner
I'm trying to remove the highlighted appearance from the selected row of an NSOutlineView (and draw the row like an unselected row). I'm overriding highlightSelectionInClipRect: as a no-op, to remove the whole row's selection background. I'm also overriding preparedCellAtColumn:row: to call

Missing EOF (Was Re: Core Data Migration and the Inexperienced Younger Self)

2009-05-07 Thread Sam Krishna
Dear Apple Developer Engineering Team (Dev Support, Dev Tools, Core Data, and anyone else who works for Matt Firlik): I miss Enterprise Objects Framework for the Desktop. Badly. I know the Objective-C codebase is sitting somewhere in an old CVS or Subversion repository deep in the bowels of

RE: Programmatic access to NSSearchField's Display Name?

2009-05-07 Thread Jon C. Munson II
Namaste! I tried searching for the answers to hopefully avoid having to ask, however, I am drawing blanks... I could use a little more explanation of what you wrote. For my benefit, and for those who are new to this as well, would you mind answering the following: 1. Please explain the differe

RE: Programmatic access to NSSearchField's Display Name?

2009-05-07 Thread Jon C. Munson II
Namaste! Thanks! Too bad there isn't any way to access "the list" otherwise... I read something about that not being possible due to a copy not being made... So, where did you find this stuff? I looked in the docs and didn't any of that referenced from the perspective of the search field. Peac

Dashboard-style window flip.

2009-05-07 Thread Тимофей Даньшин
Hello. This might be a noob question, but I'd like my application to have it's two or three settings to be located "on the back of it's window", like widgets in DashBoard do. I've been googling for it, but all i could find was a desperately slow "Window Flipper" project. Can you recommend m

data binding using shared user default controller

2009-05-07 Thread pan xuan
Hello, I have had a question regarding how to bind my data with "Shared User Default Controller". Usually, I can establish a binding between the data and with a controller key, Values with the specified key path in the user default controller. I wonder is it possible that I bind my data with a

Multiple UIViewControllers don't autorotate correctly

2009-05-07 Thread Gwynne Raskind
Disclaimer: As far as my understanding goes, the iPhone SDK NDA has been lifted and I'm free to ask this question here. If for some crazy reason this isn't true, please just delete this e-mail. My iPhone application has one UIViewController for each piece of its interface. Each such control

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Graham Cox
On 07/05/2009, at 6:39 PM, Caleb Strockbine wrote: Isn't that pretty much what +keyPathsForValuesAffectingValueForKey: is for? The parent object could observe a single property, such as 'modified', and any children would implement either +keyPathsForValuesAffectingValueForKey: or +keyPa

Re: Dynamic Layout

2009-05-07 Thread Bridger Maxwell
> > You probably looking for a Layout Manager. > > Mozilla's XUL, .NET's XAML and Adobe's FLEX provide Layout managers: > http://en.wikipedia.org/wiki/Layout_manager > > http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=0517.html > > For Jav

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Caleb Strockbine
On May 7, 2009, at 2:21 AM, Graham Cox wrote: A. each observable object class exports a list of properties that it thinks may be of interest to an observer. This is just an array of strings (property names) returned by a class method. B. A utility method iterates over that list and registers a

Re: Help Making Shell Script Accept Spaces

2009-05-07 Thread Bridger Maxwell
> > > Always, always, always wrap paths in shell scripts using quotes. > > "\"@executable_path/../Frameworks/SCMercury.framework/Versions/A/SCMercury\"" >> > > You put one too many quotes in those paths. Remove the inner quotes and the > \s and it ought to work. > > Thank you! I really should spend

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Marcel Weiher
On May 6, 2009, at 23:56 , Jeff Johnson wrote: On May 7, 2009, at 12:27 AM, Marcel Weiher wrote: OK, quiz time: the reason for NSMutableString to relinquish ownership is to (a) release the object (b) allow someone else to take ownership? Answer: always (a), sometimes (b), and sometimes

Re: NSXMLParser frees itself on error?

2009-05-07 Thread Jeff Johnson
On May 7, 2009, at 12:27 AM, Marcel Weiher wrote: In fact, NSXMLParser very likely *should* maintain autorelease pools, because its clients can't safely do this and there is quite a potential for growing the heap during XML parsing. "One technique for dealing with these generated objects i

Re: Programmatic access to NSSearchField's Display Name?

2009-05-07 Thread jonat...@mugginsoft.com
On 6 May 2009, at 22:43, jmun...@his.com wrote: Namaste! Is there a way to programmatically access the Display Name attribute of the search field for a given predicate? I've got a number of predicates set up via IB and several of them I need to be able to change the display name at run t