Re: Continuous animation locks UI?

2010-09-07 Thread Stephane Sudre
Not sure if this is the same on iOS but in Mac OS X, you can call - [NSRunLoop addTimer: forMode:] on the current run loop. NSEventTrackingRunLoopMode would be a good candidate. On Tue, Sep 7, 2010 at 6:32 AM, Dave DeLong davedel...@me.com wrote: Hi everyone, I'm working on an iPhone app, and

Core Graphics wants 10 petabytes of RAM

2010-09-07 Thread Thomas Davie
I'm having a problem with CoreGraphics periodically deciding it wants to allocate an enormous amount of RAM, the code in question is simply trying to create an NSImage from raw data: CGContextRef context = CGBitmapContextCreate(imgData, width,

Re: Core Graphics wants 10 petabytes of RAM

2010-09-07 Thread Guillem Palou
On Sep 7, 2010, at 2:07 PM, Thomas Davie wrote: I'm having a problem with CoreGraphics periodically deciding it wants to allocate an enormous amount of RAM, the code in question is simply trying to create an NSImage from raw data: CGContextRef context = CGBitmapContextCreate(imgData,

Re: Core Graphics wants 10 petabytes of RAM

2010-09-07 Thread Thomas Davie
On 7 Sep 2010, at 13:10, Guillem Palou wrote: On Sep 7, 2010, at 2:07 PM, Thomas Davie wrote: I'm having a problem with CoreGraphics periodically deciding it wants to allocate an enormous amount of RAM, the code in question is simply trying to create an NSImage from raw data:

NSAttributedString to / from Pasteboard....

2010-09-07 Thread Kartik Reddyreddy
Hi, Is there a way to push/pop an NSAttributedString to/from Pasteboard...?? I have an NSAttributedString with some custom attributes. Currently I am using the following code to copy to the pasteboard. NSPasteboard *pb = [NSPasteboard generalPasteboard]; NSData *rtf = [aString

Small memory leaks in Cocoa guts

2010-09-07 Thread Vincent Habchi
Hi again, I was chasing some leaks in my app; I may be too perfectionist, but I cannot reduce them to zero. There appears to be small leaks in, for example, NSOpenPanel methods, somewhere deep inside (more specifically in CFStringCreateWithCStringNoCopy). It's matter of a dozen of bytes, but

Re: Small memory leaks in Cocoa guts

2010-09-07 Thread Raleigh Ledet
Create the smallest test app that you can that duplicates the problem. Then attach it to a new radar along with an instruments trace. -raleigh On Sep 7, 2010, at 7:18 AM, Vincent Habchi wrote: Hi again, I was chasing some leaks in my app; I may be too perfectionist, but I cannot reduce

Re: Small memory leaks in Cocoa guts

2010-09-07 Thread Vincent Habchi
Le 7 sept. 2010 à 16:28, Raleigh Ledet a écrit : Create the smallest test app that you can that duplicates the problem. Then attach it to a new radar along with an instruments trace. Okay, I'll do that asap – I am going to become specialist for these kind of things :) Thanks for the answer,

UIKit: Customized text display

2010-09-07 Thread Phillip Mills
I'm looking at the feasibility of an iPad application. A primary view would allow for the entry of lines of text, paired with lines of annotation. Annotation lines and text lines would have different attributes: height, font, edit methods In fact it might be better for the annotation

Fwd: Continuous animation locks UI?

2010-09-07 Thread Dave DeLong
Bah, silly cocoa-dev and its incorrectly-set Reply-To: headers. Begin forwarded message: From: Dave DeLong davedel...@me.com Date: September 7, 2010 8:34:42 AM MDT To: lukex...@gmail.com Subject: Re: Continuous animation locks UI? BINGO! Thank you very much! I thought that that option

Re: Small memory leaks in Cocoa guts

2010-09-07 Thread Mark Ritchie
On 7/Sep/2010, at 7:33 AM, Vincent Habchi wrote: Okay, I'll do that asap – I am going to become specialist for these kind of things :) Yup, a repeatable case is ALWAYS a good idea! ;-) M. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Continuous animation locks UI?

2010-09-07 Thread Roland King
well the way you described your UI, is it possible that it's basically always being animated? On 07-Sep-2010, at 11:16 PM, Dave DeLong wrote: Bah, silly cocoa-dev and its incorrectly-set Reply-To: headers. Begin forwarded message: From: Dave DeLong davedel...@me.com Date: September 7,

Re: Continuous animation locks UI?

2010-09-07 Thread Dave DeLong
Yes, the animation is continuous. The completion block of the animation resets the UI and restarts the animation immediately. Dave On Sep 7, 2010, at 9:46 AM, Roland King wrote: well the way you described your UI, is it possible that it's basically always being animated? On

Re: Pin NSScrollView documentView to Upper Left AND Pin Scrolling to Upper left

2010-09-07 Thread Keary Suska
On Sep 4, 2010, at 11:25 AM, Keary Suska wrote: I am trying to have NSScrollView behavior similar to, well, every other implementation of a view in an NSScrollView (e.g. NSTextView, NSTableView, etc.). Pinning my view to the upper left is easy using the view-within-an-isFlipped-view,

Re: Highlight Text like with FIne

2010-09-07 Thread Brad Stone
Ross - That looks like a good solution, basically, I'm highlighting the background versus the actual text. Very clever. This approach has the added advantage of preventing the user from accidentally deleting text because it's not a real highligh. I'll try this out tonight. Using this code

Re: Folders and file system organization instead of just XCode

2010-09-07 Thread Daniel Lopes
Tthe scroll and search in folders dont take too much of my time because I like some shortcuts like command T in Textmate and command option D in Xcode. Thanks for the help. Sent from my iPad On 06/09/2010, at 22:45, Dave Keck davek...@gmail.com wrote: 2º Why most of projects that I found

What REALLY determines which application opens a file?

2010-09-07 Thread G S
Hi all. I'm trying to write a Movie Importer component, and I'm finding a perplexing pile of file-association methods in the process. The current method of file-to-application mapping is supposed to be UTIs, but I don't think this is working for me. I was told that to get QuickTime Player X to

Re: Continuous animation locks UI?

2010-09-07 Thread Luke Iannini
Hi Dave, Might this have something to do with it? UIViewAnimationOptionAllowUserInteraction - Allow the user to interact with views while they are being animated.

Number of layout managers for NSTextStorage increases

2010-09-07 Thread Jens Bauer
Hi all, I have an editor with a list of files, where I switch the contents of a NSTextView in and out when selecting a new file. For the switching I use the following lines: NSLog(@[1] %s, layoutManager count: %d, __PRETTY_FUNCTION__, [[[textView textStorage] layoutManagers] count]);

Re: NSAttributedString to / from Pasteboard....

2010-09-07 Thread Ross Carter
On Sep 7, 2010, at 9:43 AM, Kartik Reddyreddy wrote: Is there a way to push/pop an NSAttributedString to/from Pasteboard...?? I have an NSAttributedString with some custom attributes. See this thread. Note particularly the excellent comment by Mike Ash:

Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
I'm getting an apparently spurious warning when compiling an mapping model (.xcmappingmodel) file: Foo.xcmappingmodel: warning: Relationship Mapping Starkoid_entityToStarkoid_entity.ixportLog -- NSMigrationManager method destinationInstancesForSourceRelationshipNamed:sourceInstances: not

Re: UIKit: Customized text display

2010-09-07 Thread Ross Carter
On Sep 7, 2010, at 11:14 AM, Phillip Mills wrote: Perhaps I need to use my own container view and dynamically alternate UILabels and UITextFields...or subclass UITextView...or build a new view type from scratch Core text? Other

Re: Number of layout managers for NSTextStorage increases

2010-09-07 Thread Ross Carter
On Sep 7, 2010, at 12:22 PM, Jens Bauer wrote: ...Does anyone have an idea about why the number of layout managers increase ? I don't know the answer, but I expect it is easy to find out. Set a breakpoint on layout manager -init and see who is creating them. Or, look at the contents of the

NSInputStream Overflow?

2010-09-07 Thread Mathieu Coursolle
Hi Cocoa Developers, I have an application that connects to a TCP server and exchanges data using NSInputStream. I am using the run-loop scheduling approach. Everything works fine most of the time. However, when my application becomes busy processing other stuff, it seems like I am loosing

UIViewController: not receiving motion events

2010-09-07 Thread Dave DeLong
Hi everyone, I've got a UIViewController subclass that controls a screen of content and a couple subviews. I'm trying to detect when the user shakes the device using UIResponder's motionEnded: method. In a nutshell, nothing that I do ever causes this method to be triggered. I've tried: -

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Quincey Morris
On Sep 7, 2010, at 11:26, Jerry Krinock wrote: 4. I cannot find the workaround mentioned in the warning in Core Data's 10.6 Release Notes. Does this describe and/or provide a solution for your problem?

Re: Small memory leaks in Cocoa guts

2010-09-07 Thread vincent habchi
Hi again, well, I am embarrassed. I may have misunderstood or misinterpreted the output of the 'leaks' instrument regarding the leak I thought located in Cocoa, but, at the same, I stumbled on a bug of 'leaks' itself… that leads to crash or, at best, the sampled application being 'wheeled'

recalling the original view height

2010-09-07 Thread Tony Romano
I have a NSWindow and a view. The view is defined in a nib with a given height and width. I am resizing the window to a new size and then optionally returning it to the original size and the view changes accordingly. Is there a way of obtaining the original view height as defined in the nib

Re: recalling the original view height

2010-09-07 Thread John C. Randolph
Views have no storage for previous frame or bounds rectangles. If you want to remember them, you'll need to save them yourself. -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
On 2010 Sep 07, at 12:15, Quincey Morris wrote: On Sep 7, 2010, at 11:26, Jerry Krinock wrote: 4. I cannot find the workaround mentioned in the warning in Core Data's 10.6 Release Notes. Does this describe and/or provide a solution for your problem?

Re: UIViewController: not receiving motion events

2010-09-07 Thread Fritz Anderson
On 7 Sep 2010, at 2:11 PM, Dave DeLong wrote: None of these work, and my motionEnded: method never gets called. You say repeatedly that you are looking for the method -motionEnded:, period. There is no such method in the API. There is a -motionEnded:withEvent:. Did you try that? Going

Re: recalling the original view height

2010-09-07 Thread Tony Romano
Thanks, this is what I suspected. Tony Romano http://www.cocoaegghead.com On Sep 7, 2010, at 2:03 PM, John C. Randolph wrote: Views have no storage for previous frame or bounds rectangles. If you want to remember them, you'll need to save them yourself. -jcr

Re: UIViewController: not receiving motion events

2010-09-07 Thread Dave DeLong
Yes, sorry. motionEnded: was shorthand for motionEnded:withEvent: I should've been clearer about that. I could've sworn I overrode canBecomeFirstResponder, but apparently I hadn't. Putting that in appears to have fixed it. Thanks, Dave On Sep 7, 2010, at 4:19 PM, Fritz Anderson wrote:

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Quincey Morris
On Sep 7, 2010, at 14:55, Jerry Krinock wrote: But I'd still like to know how I built a half dozen mapping models during this calendar year, and each migrated a half dozen or more relationships, and they all auto-generated expressions which invoked the old method, and now all of a

Patching implementation in +load. Was: … Mapping Model : Spurious Warning

2010-09-07 Thread Jerry Krinock
The workaround given in the note [1] works. But it recommends that you patch NSMigrationManager in a method that is guaranteed to be invoked before migration could be attempted—for example, if you have an application delegate, this could be in its init method Messy. I added a +load method to

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
On 2010 Sep 07, at 15:37, Quincey Morris wrote: Didn't that document say that this scenario occurs when the entity has a sub-entity … Ah, indeed this was my first subentity. You are correct as usual, Quincey – thank you! ___ Cocoa-dev mailing

Re: Patching implementation in +load. Was : …Mapping Model : Spurious Warning

2010-09-07 Thread Kyle Sluder
On Tue, Sep 7, 2010 at 3:41 PM, Jerry Krinock je...@ieee.org wrote: Messy.  I added a +load method to the NSMigrationManger category that I added, and invoked the patch in there.  Seems to work fine.  Is +load [2] not the recommended place to invoke patches? +load is kind of risky. See Bill

Re: Patching implementation in +load. Was : …Mapping Model : Spurious Warning

2010-09-07 Thread Kyle Sluder
On Tue, Sep 7, 2010 at 3:55 PM, Kyle Sluder kyle.slu...@gmail.com wrote: Since all you're doing is adding methods, +load might be an okay time to do things, except if the method you're replacing comes from a category. You might want to defer to +initialize instead. For the record, this is

NSNumber compare: Giving Unexpected Results

2010-09-07 Thread Chris Tracewell
I have a category on NSDecimalNumber that seems very straight forward - yet is producing odd results. The code below shows my logging and everything outputs as expected - but the final evaluation does not work. Am I misunderstanding something? -(BOOL)isLessThanZero { NSNumber

Re: NSEntityMigrationPolicy subclass methods not being called

2010-09-07 Thread Jerry Krinock
On 2010 Sep 06, at 05:31, Ben wrote: my NSEntityMigrationPolicy subclass methods are not being called so that I can run further migration code. @implementation TestMigrationPolicy - (BOOL)beginEntityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager

Re: What REALLY determines which application opens a file?

2010-09-07 Thread G S
Wow, I didn't realize this was such a mystery. ___ 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

Re: NSAttributedString to / from Pasteboard....

2010-09-07 Thread Kartik Reddyreddy
Thanks Ross.. It was very helpful. On Tue, Sep 7, 2010 at 2:07 PM, Ross Carter rosscarter...@me.com wrote: On Sep 7, 2010, at 9:43 AM, Kartik Reddyreddy wrote: Is there a way to push/pop an NSAttributedString to/from Pasteboard...?? I have an NSAttributedString with some custom

Re: NSNumber compare: Giving Unexpected Results

2010-09-07 Thread Quincey Morris
On Sep 7, 2010, at 17:58, Chris Tracewell wrote: -(BOOL)isLessThanZero { NSNumber *theNumOne = [NSNumber numberWithInteger:0]; NSNumber *theNumTwo = self; NSLog(@theNumOne = %@,theNumOne); NSLog(@theNumTwo = %@,theNumTwo); NSLog(@NSOrderedSame =

Re: What REALLY determines which application opens a file?

2010-09-07 Thread Quincey Morris
On Sep 7, 2010, at 19:21, G S wrote: Wow, I didn't realize this was such a mystery. Perhaps not such a big mystery, but it's a treacherous conceptual area that perhaps sensible people don't want to venture into. It's not clear from your original post whether you know that files don't *have*

Re: What REALLY determines which application opens a file?

2010-09-07 Thread G S
Hi Quincey. Thanks for your response. It's not clear from your original post whether you know that files don't *have* UTIs as metadata. They have extensions or file types as metadata, and the translation from file metadata to UTI is handled by Launch Services after aggregating all of the

Lake Forest Cocoaheads meeting 9/8 - design patterns, Cocoa and other

2010-09-07 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 9/8. We will be discussing common design patterns,

Re: What REALLY determines which application opens a file?

2010-09-07 Thread Quincey Morris
On Sep 7, 2010, at 21:46, G S wrote: I didn't have any entry in the Document Types list in the target's properties. The documentation didn't mention (let alone explain) the relationship between this list and the UTI collection in the plist. I still don't see why you'd have both. The