Re: Return causes EXC_BAD_ACCESS

2011-07-30 Thread vincent habchi
> Memory is "virtual", the addresses you appear to be working with are not real > (i.e. they don't refer to the real address of the physical RAM underneath). > Instead, a bit of hardware translates these to the real addresses as needed > at some level far below the perception of your program. Yo

Re: Release build throw "unrecognized selector sent to instance" for a category method

2011-07-30 Thread Bruno Berisso
Thanks for the links, but my problem is a little different. The code in my library is executed fine, it's only crash when build in 'Release' mode and just in this category. Other categories work just fine. Thanks again. On Jul 31, 2011, at 2:02 AM, Jerry Krinock wrote: > > On 2011 Jul 30, at 2

Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?

2011-07-30 Thread Jens Alfke
On Jul 30, 2011, at 10:21 PM, Jerry Krinock wrote: > I don't think so, Jens. "They" is Apple. Apple has the source code for > -initWithCoder: and -encodeWithCoder:. No they don’t — not for the implementations of those methods in our own classes. Anyone implementing an archivable class has t

Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?

2011-07-30 Thread Jerry Krinock
On 2011 Jul 30, at 21:09, Jens Alfke wrote: > On Jul 29, 2011, at 8:22 PM, Jerry Krinock wrote: > >> +[NSKeyedArchiver isEncodeable:(id)object] >> +[NSKeyedUnarchiver isAValidArchive:(NSData*)data] BTW, I forgot to mention those methods should return BOOLs. > Neither of these are feasible with

Re: Printing options

2011-07-30 Thread Eli Bach
On Jul 21, 2011, at 9:31 PM, Matt Neuburg wrote: > On Thu, 21 Jul 2011 16:34:07 -0400, davel...@mac.com said: > >> On Jul 19, 2011, at 3:25 PM, Amy Gibbs wrote: > >>> In my app I have customer orders, and I just want to print out a copy. ... >>> I could lay it all out on a view and print that?

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread Jens Alfke
On Jul 30, 2011, at 9:45 PM, Jerry Krinock wrote: > Thank you, Quincey. I watched that a few weeks ago, and studied the part on > Auto Save carefully. I think that what you are recalling is the ability to > cancel an Auto Save after it is started, by returning NO in > -writeToURL:ofType:erro

Re: Release build throw "unrecognized selector sent to instance" for a category method

2011-07-30 Thread Jerry Krinock
On 2011 Jul 30, at 20:58, Bruno Berisso wrote: > If some one has any clue I will really appreciate it. Wow. I remember a similar bug if you had a category in a framework, way back in Mac OS 10.3! Read these… http://www.cocoabuilder.com/archive/xcode/263621-framework-links-work-ok-in-10-5-and

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread Jerry Krinock
On 2011 Jul 30, at 20:12, Quincey Morris wrote: > I can't help thinking that there was a (brief) section about this in the 2011 > WWDC session video that I watched. "If you don't want to be interrupted by an > Auto Save, ...". If you haven't watched this video, it might be worth > spending the

Re: Ticker tape display

2011-07-30 Thread Graham Cox
On 31/07/2011, at 1:23 PM, Scott Steinman wrote: > I have drawn text into a CALayer. I'd like to allow the user select the type > of animation effect displayed, such as fading the text in/out by changing the > CALayer's opacity. Do you mean CATextLayer? It's already optimised for displaying t

Re: Issues where code produced in Snow Leopard won't work in Lion, but will compile in Xcode 4.1

2011-07-30 Thread Jens Alfke
On Jul 30, 2011, at 11:19 AM, Tom Miller wrote: > the code would compile and build the app > without any errors but wouldn't work in either debug mode of release mode > with it properly pointing to the correct object in IB. One more time: We don’t know what “wouldn’t work” means in this case. Yo

Re: Nib File Distortion

2011-07-30 Thread Jens Alfke
On Jul 28, 2011, at 11:50 PM, Ralph Long wrote: > I have a complex form or screen in which I have buttons, images, text boxes, > boxes. Since using Xcode 4, 5, I have had problems sizing the text boxes and > the images and having them retain their new location. > These items were nib was built

Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?

2011-07-30 Thread Jens Alfke
On Jul 29, 2011, at 8:22 PM, Jerry Krinock wrote: > +[NSKeyedArchiver isEncodeable:(id)object] > +[NSKeyedUnarchiver isAValidArchive:(NSData*)data] Neither of these are feasible without actually running the archiving, including calling all of the arbitrary -initWithCoder: and -encodeWithCoder:

Release build throw "unrecognized selector sent to instance" for a category method

2011-07-30 Thread Bruno Berisso
Hi all. I'm working on tow projects. One is a Mac application and the other is a static library used for the application. Both are in the same Xcode workspace. In the library project I use several categories, one of them add some methods to NSDate to move a date around (ej: 'moveDateToNextMonth'

Ticker tape display

2011-07-30 Thread Scott Steinman
I have drawn text into a CALayer. I'd like to allow the user select the type of animation effect displayed, such as fading the text in/out by changing the CALayer's opacity. One of the effects I'm trying to do is a ticker tape display where a line of text is scrolled repeatedly from off-screen

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread Quincey Morris
On Jul 30, 2011, at 18:41, Jerry Krinock wrote: > But it still seems that Apple should document the correct way to handle this > situation. I can't help thinking that there was a (brief) section about this in the 2011 WWDC session video that I watched. "If you don't want to be interrupted by a

Issues where code produced in Snow Leopard won't work in Lion, but will compile in Xcode 4.1

2011-07-30 Thread Tom Miller
Hey everyone, I'm having a strange issue with some code I produced in Snow Leopard on Xcode 4.0 The code successfully compiled on 4.0. Once I upgraded to Lion and Xcode 4.1 I had an issue where the code would compile and build the app without any errors but wouldn't work in either debug mode of re

Re: NSFileManager - a cautionary tale

2011-07-30 Thread John Hawkinson
> > I'm not sure if there is a way to observe file system stuff during > > launch - if anyone knows, please let me know! Greg Parker: > Run in a debugger with a breakpoint at the top of main(). When you > hit the breakpoint, start on fs_usage and continue. If you need to In addition to this, TN21

Nib File Distortion

2011-07-30 Thread Ralph Long
I have a complex form or screen in which I have buttons, images, text boxes, boxes. Since using Xcode 4, 5, I have had problems sizing the text boxes and the images and having them retain their new location. These items were nib was built using Xcode 3 and was properly aligned until I upgraded.

Re: Fastest high-quality thumbnail display

2011-07-30 Thread James Merkel
I tried ImageKit and it works great. Excellent quality. Thanks for the suggestion, Scott. I didn't have to do much more than change an NSImageView to an IKImageView in InterfaceBuilder and the code. However, there doesn't appear to be an easy way to print a CGImageRef (which you get from a

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread Jerry Krinock
On 2011 Jul 30, at 15:39, wadesli...@mac.com wrote: > You're lying to the save machinery by saying that you have saved, when you > have not. So NSFileCoordinator will then think your file is up to date, and > let others read (or write) it. It could lead to all sorts of nasty behaviors… Thank

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread wadeslists
> - (void)saveToURL:(NSURL *)url > ofType:(NSString *)typeName > forSaveOperation:(NSSaveOperationType)saveOperation > completionHandler:(void (^)(NSError *errorOrNil))completionHandler { > if (saveOperation == NSAutosaveInPlaceOperation) { > if ([[[NSOperationQueue mainQueue] oper

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread Jerry Krinock
On 2011 Jul 30, at 02:10, Ken Thomases wrote: > On Jul 29, 2011, at 10:32 PM, Jerry Krinock wrote: > >> With Auto Save enabled in a document, I find that Lion sometimes wants to >> break into a sequence of operations to do an Auto Save. > > What do you mean by "break into" or "a sequence of op

Re: NSNumberFormatter documentation error?

2011-07-30 Thread Andre Masse
Thanks for the clarification. Andre Masse > It's not a matter of misinterpretation per se. The documentation reflects the > API, and would apply only to objects you create in your own code. Interface > Builder may choose to have its own defaults for objects created by it, and > those choices w

Re: Change in animation?

2011-07-30 Thread Matt Neuburg
On Sat, 30 Jul 2011 09:22:45 -0700, David Rowland said: >Yikes, so I did, and I had forgotten. Must be Codeheimer's disease. >Side question -- animateWithDuration: > >is a class method. How does it know which view to act on? You order up your animations in advance, in the block supplied as t

Re: NSNumberFormatter documentation error?

2011-07-30 Thread Keary Suska
On Jul 30, 2011, at 9:09 AM, Andre Masse wrote: > According to the NSNumberFormatter documentation: > > setGeneratesDecimalNumbers: > Controls whether the receiver creates instances of NSDecimalNumber when it > converts strings to number objects. > > - (void)setGeneratesDecimalNumbers:(BOOL)fla

Re: Change in animation?

2011-07-30 Thread David Rowland
Yikes, so I did, and I had forgotten. Must be Codeheimer's disease. That is the right answer. The routine is now, - (void)fadeView:(UIView *)theView { theView.alpha = 1.0; infoButton.hidden = FALSE; [UIView animateWithDuration:2.5 delay:0 option

Re: Running Cocoa from a dynamic library

2011-07-30 Thread Bill Appleton
>> Sadly, Cocoa and many of the frameworks on which it is based really do depend on the main thread and its run loop. Events have to be received there and its run loop has to be serviced (run) on a regular basis. this situation is basically the same on other platforms. the events come in on some

Re: Fastest high-quality thumbnail display

2011-07-30 Thread James Merkel
Thanks, I'll take a look at IK. I also found an Apple example application called ImageApp. It seems to work fine. No memory leaks. The approach for using CIImage seems to be to draw directly to an NSView rather than going to an NSImageView. Jim Merkel On Jul 29, 2011, at 11:46 PM, Scott

NSNumberFormatter documentation error?

2011-07-30 Thread Andre Masse
Hi, According to the NSNumberFormatter documentation: setGeneratesDecimalNumbers: Controls whether the receiver creates instances of NSDecimalNumber when it converts strings to number objects. - (void)setGeneratesDecimalNumbers:(BOOL)flag Parameters flag YES if the receiver should generate NSDe

Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?

2011-07-30 Thread Fritz Anderson
On 29 Jul 2011, at 10:00 PM, Kyle Sluder wrote: > Any code that throws exceptions will probably leak a few objects, since > according to the ARC design doc the ABI requires not draining autorelease > pools while unwinding the stack. Are you sure (or does ARC work differently)?

Re: Calculations in a tableview

2011-07-30 Thread Andre Masse
Thanks to all who helped me on and off the list. After a good night sleep and a day off coding, I think I finally got it :-) > On 28/07/2011, at 23:15 , Quincey Morris wrote: > > So how does the array controller enter this picture at all? It's a glue > object (aka "mediating controller") whose

Re: Telling Auto Save, "No, I'm busy now"

2011-07-30 Thread Ken Thomases
On Jul 29, 2011, at 10:32 PM, Jerry Krinock wrote: > With Auto Save enabled in a document, I find that Lion sometimes wants to > break into a sequence of operations to do an Auto Save. What do you mean by "break into" or "a sequence of operations"? The frameworks are almost certainly not inter

Re: Filter an array

2011-07-30 Thread Ken Thomases
On Jul 29, 2011, at 11:09 AM, Wade Tregaskis wrote: > for (NSString *path in paths) { > NSURL *url = [[NSURL alloc] initFileURLWithPath:path]; > NSString *uti = nil; > NSError *error = nil; > > if ([url getResourceValue:&uti forKey:NSURLTypeIdentifierKey > error:&error])

Re: Running Cocoa from a dynamic library

2011-07-30 Thread Ken Thomases
On Jul 28, 2011, at 1:14 PM, Jens Alfke wrote: > On Jul 27, 2011, at 8:02 AM, Guido Sales Calvano wrote: > >> Ogre3D however, uses a cocoa window to render on, and obviously I want user >> input. But if I start ogre in a dynamic library ui events register >> incorrectly. > > It’s not the fact

Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?

2011-07-30 Thread Thomas Davie
On 29 Jul 2011, at 23:54, wadesli...@mac.com wrote: >> When invoking -archivedDataWithRootObject: on, say, dictionary, finding an >> un-encodeable object buried somewhere in the dictionary would seem to be >> quite common. Similarly, when invoking -unarchiveObjectWithFile:, no >> programmer c

Section header artifacts in popover

2011-07-30 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have been attempting to debug a strange quirk I am getting when I use a UISearchDisplayController in conjunction with a UIPopoverController. Consider the perfectly normal looking filtered table view seen in a popover at http://dl.dropbox.co

Re: NSTask oddity with getting stdout

2011-07-30 Thread Ken Thomases
On Jul 26, 2011, at 11:22 PM, Scott Ribe wrote: > On Jul 26, 2011, at 5:52 PM, Shane Stanley wrote: > >> In Snow Leopard that worked fine; a notification would be sent when new data >> was written to the file. In Lion, as soon as it's called it goes into a >> loop; each time readInBackgroundAndNo