NSMatrix bindings

2011-03-18 Thread Christian Ziegler
Hi all! I'm having hard times figuring out how to bind an NSMatrix properly. I got an NSMatrix with NSButtonCells (checkboxes) and I want to somehow bind to my model which of these checkboxes are selected. What should work is binding the content objects of the NSMatrix to an ArrayController and

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread jonat...@mugginsoft.com
Hi Jason I haven't attempted to debug your code but I use NSTask extensively and have experienced some of the problems you describe. In each case I was not correctly handling the asynchronous availability of data in the pipe ie: there is nothing wrong with the approach but implementation is al

Re: Remove characters from string

2011-03-18 Thread Heizer, Charles
I'm looking to clean up some system profiler data before sending it to a database to have it displayed on a web page. Wile I can insert the data in to the MySQL database just fine. The copyright and registered symbols do not display properly on a web page. I was just thinking to make life easy I co

Re: Help: XCode 3.2 breaks XCode 3.1 projects

2011-03-18 Thread Artemiy Pavlov
Just to make clear what I did: - Downloaded XCode 3.2.6 and did a standard install - Downloaded the latest/fixed AU with Cocoa template - Started a new project - It has AU base file groups in red - Raises a ton of errors and doesn't build On 18 Mar 2011, at 16:46, tahome izwah wrote: > Works fo

newbie question

2011-03-18 Thread Luca Ciciriello
Hi All. Im' new in Cocoa and Cocoa touch programming. My question is: How can I make the keyboard disappear when I use a UITextView conroller? In my class I've a Text field and a Text view controller and in my declaration I'v added the delegates: now In the case of UITextField I've used the met

Re: Remove characters from string

2011-03-18 Thread Gary L. Wade
In that case, you should determine what encoding your web page is being displayed in and convert your NSString to that encoding. If it's in UTF8, you can use UTF8String; otherwise, consider dataUsingEncoding: or related messages to see if that will do what you need. - Gary L. Wade (Sent from my

Re: Remove characters from string

2011-03-18 Thread John Joyce
You might also consider using HTML entities for those, as you never know what the browser/user-agent has set for encoding... On Mar 18, 2011, at 11:24 PM, Gary L. Wade wrote: > In that case, you should determine what encoding your web page is being > displayed in and convert your NSString to th

Re: Remove characters from string

2011-03-18 Thread Kyle Sluder
On Fri, Mar 18, 2011 at 8:28 AM, John Joyce wrote: > You might also consider using HTML entities for those, as you never know what > the browser/user-agent has set for encoding... You do if you generate correct HTML and your web server emits the correct Content-type header. Charles, since it so

Re: newbie question (SOLVED)

2011-03-18 Thread Luca Ciciriello
Sorry for this question. I've find out how to solve my problem in apple documentation. At my first reading I'd missed it. Luca. On Mar 18, 2011, at 4:17 PM, Luca Ciciriello wrote: > Hi All. Im' new in Cocoa and Cocoa touch programming. > My question is: How can I make the keyboard disappear whe

Re: iOS Core Data complex predicate.

2011-03-18 Thread Sandro Noël
Andreas First off, thank you for taking the time to read my essay. I did not know the setReturnDistinctResults: was dependant on setPropertiesToFetch: your explanation is outstanding. That did the trick, and I thank you very much. Sandro. On 2011-03-17, at 6:49 PM, Andreas Grosam wrote: > >

Re: LSUIElement making custom windows non-visible.

2011-03-18 Thread Seth Willits
On Mar 16, 2011, at 11:15 AM, Kevin Muldoon wrote: > My understanding is turning on LSUIElement in the pList is the method to make > this happen. Unfortunately, this makes the NSPanel non-visible as well. Perhaps because panels are not visible when the application is not active by default (hid

framework and dylib dependency

2011-03-18 Thread Macdev
___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Jason Harris
> > Hi Jason > > I haven't attempted to debug your code but I use NSTask extensively and have > experienced some of the problems you describe. > > In each case I was not correctly handling the asynchronous availability of > data in the pipe ie: there is nothing wrong with the approach but > i

Re: NSMatrix bindings

2011-03-18 Thread Ken Thomases
On Mar 18, 2011, at 3:45 AM, Christian Ziegler wrote: > I'm having hard times figuring out how to bind an NSMatrix properly. I got an > NSMatrix with NSButtonCells (checkboxes) and I want to somehow bind to my > model which of these checkboxes are selected. What should work is binding the > con

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread jonat...@mugginsoft.com
On 18 Mar 2011, at 21:04, Jason Harris wrote: > > > Hi Jonathan, > > Thanks for looking at this! It's good to know I am not going crazy and there > is some subtle thing I am doing wrong here... > > Just to clarify you mean this example here: > > http://developer.apple.com/library/mac/#sample

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Jason Harris
On Mar 18, 2011, at 10:36 PM, jonat...@mugginsoft.com wrote: > > On 18 Mar 2011, at 21:04, Jason Harris wrote: >> >> >> Hi Jonathan, >> >> Thanks for looking at this! It's good to know I am not going crazy and there >> is some subtle thing I am doing wrong here... >> >> Just to clarify you

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Ken Thomases
I would say that your "...IgnoringErrors" methods are masking a real problem, and you shouldn't have written them let alone used them. (By the way, you didn't post them except incidentally in your screenshot.) The exception is saying that the file descriptor backing the NSPipe/NSFileHandle has

Releasing memory allocated by CoreData's _PFAllocateObjects function?

2011-03-18 Thread Nick Zitzmann
Okay, I have a problem that has been driving me nuts all day now. I have an application that loads tens of thousands of CoreData managed objects across several threads, where each thread has its own unique managed object context. When I run the allocations instrument in Instruments, I can see th

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Jason Harris
On Mar 18, 2011, at 11:07 PM, Ken Thomases wrote: > I would say that your "...IgnoringErrors" methods are masking a real problem, > and you shouldn't have written them let alone used them. (By the way, you > didn't post them except incidentally in your screenshot.) (Ahh yep. I didn't want to

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread jonat...@mugginsoft.com
On 18 Mar 2011, at 22:03, Jason Harris wrote: > > Well just to give some quick feedback... Surprisingly to me your suggested > approach here seems to be working straight off the bat!! > > Along with some other tweaks (No longer call [self finishUp] in any form) > then it works. > > Thank you!

Quick way to find is a path is contained in another path?

2011-03-18 Thread Laurent Daudelin
I have a couple of ideas using "pathComponents" but does anybody have a quick way to find if a given path is contained in another path, e.g. if "/Library/Users/laurent/Library" is contained in "/Library/Users/laurent" (in this case, it is)? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:Laurent

Splitting a single Core Data model between several files

2011-03-18 Thread WT
Hello, in searching the web and the archives for help on splitting a single CD model into several files, I found that the most recent exchanges on this subject date back to July 2009 and September 2008: Core Data, migrate a model split into two files http://www.cocoabuilder.com/archive/cocoa/24

Re: Quick way to find is a path is contained in another path?

2011-03-18 Thread Mike Abdullah
- (BOOL)ks_isSubpathOfPath:(NSString *)aPath https://github.com/karelia/KSFileUtilities/blob/master/KSPathUtilities.h Standard BSD license. On 18 Mar 2011, at 22:59, Laurent Daudelin wrote: > I have a couple of ideas using "pathComponents" but does anybody have a quick > way to find if a given p

Re: Quick way to find is a path is contained in another path?

2011-03-18 Thread Laurent Daudelin
On Mar 18, 2011, at 16:43, Mike Abdullah wrote: > - (BOOL)ks_isSubpathOfPath:(NSString *)aPath > https://github.com/karelia/KSFileUtilities/blob/master/KSPathUtilities.h > Standard BSD license. > > On 18 Mar 2011, at 22:59, Laurent Daudelin wrote: > >> I have a couple of ideas using "pathCompone

Re: Quick way to find is a path is contained in another path?

2011-03-18 Thread Gary L. Wade
If you're not concerned about mount-path inclusion, where Library may be on another volume but mounted at that point, use rangeOfString:options:range: with an anchored search option and range consisting of the full length of the laurent-ending string. You have three possible results: not found (no

Re: Quick way to find is a path is contained in another path?

2011-03-18 Thread Laurent Daudelin
Yeah, I found out that hasPrefix: was not really a good one... -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software laur...@nemesys-soft.com On Mar 18,

Re: Releasing memory allocated by CoreData's _PFAllocateObjects function?

2011-03-18 Thread Quincey Morris
On Mar 18, 2011, at 15:25, Nick Zitzmann wrote: > I have an application that loads tens of thousands of CoreData managed > objects across several threads, where each thread has its own unique managed > object context. > > When I run the allocations instrument in Instruments, I can see that an

iPhone: animating UILabel width results in pre-stretched text

2011-03-18 Thread Rick Mann
I have a table view that allows swipe-to-delete. When the delete button comes up, I want to shrink the UILabels in the custom cell to make room for the button. So I implement -[tableView:willBeginEditingRowAtIndexPath:] and set up an animation that shrinks a view that contains my labels. All th

Re: iPhone: animating UILabel width results in pre-stretched text

2011-03-18 Thread David Duncan
On Mar 18, 2011, at 5:20 PM, Rick Mann wrote: > Any way to get it to re-render the text throughout the animation? Not really. This would also possibly introduce a performance issue. > Looking closely at what Mail does, I see it replaces the wider view with the > narrower version with a crossfa

Re: iPhone: animating UILabel width results in pre-stretched text

2011-03-18 Thread Rick Mann
On Mar 18, 2011, at 5:30 PM, David Duncan wrote: > > On Mar 18, 2011, at 5:20 PM, Rick Mann wrote: > >> Any way to get it to re-render the text throughout the animation? > > Not really. This would also possibly introduce a performance issue. Thanks for the reply, David. I'd argue that in a s

Re: Quick way to find is a path is contained in another path?

2011-03-18 Thread koko
BOOL isDirectory; BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:@"/Library/Users/laurent/Library" isDirectory:&isDirectory] if(exists && isDirectory) NSLog(@"EUREKA I have found it!"); On Mar 18, 2011, at 5:58 PM, Laurent Daudelin wrote: > On

Re: Quick way to find is a path is contained in another path?

2011-03-18 Thread Graham Cox
On 19/03/2011, at 12:15 PM, koko wrote: > BOOL isDirectory; > BOOL exists = [[NSFileManager defaultManager] > fileExistsAtPath:@"/Library/Users/laurent/Library" isDirectory:&isDirectory] > if(exists && isDirectory) > NSLog(@"EUREKA I have found it!"); > > This does not sol