Re: NSImageView vs IKImageView

2011-08-06 Thread James Merkel
On Aug 6, 2011, at 6:26 PM, Graham Cox wrote: On 06/08/2011, at 10:44 PM, James Merkel wrote: True, I could just update the window. But that seemed like more work than just going through the closing/opening cycle. If this seems even remotely true, you're surely doing it wrong. Incident

Re: Xcode 4 core data mapping model not creating inherited attributes/relationships

2011-08-06 Thread Martin Hewitson
(Cc'd cocoa mailing list because this turns out to be relevant to those working with core data.) This turns out to be much more sinister than I'd thought. The mapping model seems to be a red herring and the problem of having nil'ed out inherited attributes is not to do with the mapping model. T

Re: resizing window containing NSView with CALayer

2011-08-06 Thread Graham Cox
I think you need to set the resizing mask for the layer as well - since you're creating this yourself, it's your responsibility: zCALayerRoot.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; If you want the layer to redraw its content when it resizes, you also have to set: zCAL

Re: NSImageView vs IKImageView

2011-08-06 Thread Graham Cox
On 06/08/2011, at 10:44 PM, James Merkel wrote: > True, I could just update the window. But that seemed like more work than > just going through the closing/opening cycle. If this seems even remotely true, you're surely doing it wrong. Incidentally, IKImageView/NSImageVIew should handle this

Re: Referencing an object after sending a release message to it

2011-08-06 Thread Thomas Wetmore
It may look odd to use an object that has been just released, but there is nothing wrong in this case, and no assumptions are needed here. As soon as the object has been added to the array it has been safely retained on the same thread by well-understood and well-documented rules, and it should

Re: Referencing an object after sending a release message to it

2011-08-06 Thread Scott Ribe
On Aug 6, 2011, at 3:06 PM, Jon Boone wrote: > Is it dangerous to send the release message to p right after adding it to the > array? Should I put the release at the end of the method? You should release it when you're done with it. Granted, you can probably get away with it here, under a reas

NSPersistentDocument: SQLite error 21 on save

2011-08-06 Thread Fritz Anderson
Lion SDK. I have an NSPersistentDocument, with autosave-in-place enabled. When I try to save the document after editing it, it balks with both application-modal alerts and document-modal sheets, all with generic messages about being unable to create or save the document. I set "-com.apple.Cor

Referencing an object after sending a release message to it

2011-08-06 Thread Jon Boone
Folks, I'm trying to make sure that I correctly understand the rules for manual memory management in Cocoa. In particular, I'm curious as to the safety of sending an object a release message and then using that object later on in the same method. Here's the method that I'm curious about: -

Re: Asynchronous downloading and parsing of XML

2011-08-06 Thread Thomas Davie
Just for reference, With the help of Mike Ash I figured out how to do this sensibly. Note, code typed straight into Mail.app, so it may not be dead perfect, but it should show the idea: //When creating the NSURLConnection and parser: - (void)doMagicParsingStuff { NSInputStream *iStream;

Re: [Q] including omp.h?

2011-08-06 Thread Sean McBride
On Sat, 6 Aug 2011 12:25:39 +0200, Marcus Karlsson said: > Apple may ditch gcc but that doesn't mean that users have to. Do you really have a practical choice? >>> >>> Yes you have. Why wouldn't you? A compiler is not different than any >>> other software. It takes source code and pr

Re: [Q] including omp.h?

2011-08-06 Thread JongAm Park
It didn't. That is why I asked. Thank you. On Aug 6, 2011, at 1:31 AM, Marcus Karlsson wrote: --On July 31, 2011 4:49:34 PM -0700 JongAm Park > wrote: Hello, Because gcc now supports OpenMP, we can use pragmas for OpenMP without doing any special steps except for setting "Enable OpenMP"

resizing window containing NSView with CALayer

2011-08-06 Thread julius
Hi, is this a system error or I'm doing something wrong? In IB place a custom NSView onto a NSWindow and make sure there is a good sized border between the view and the edges of the window. In the size pane of the inspector set all the struts and springs so the view will resize with the window.

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

2011-08-06 Thread Jerry Krinock
On 2011 Aug 04, at 08:30, Kevin Perry wrote: > What Ken said. OK, I'm back. Had to fork my project since Block_copy()/release() is not available in 10.5 SDK. But it works now. See code below. > Also, it might be more convenient to use NSBlockOperation or > -addOperationWithBlock so the fun

Re: view:(QTMovieView *)view willDisplayImage:

2011-08-06 Thread julius
On 6 Aug 2011, at 13:23, Ron Fleckner wrote: > > On 06/08/2011, at 9:00 PM, julius wrote: > >> The need for the child window to have a minimum alpha of 0.05 in order for >> it to receive mouse events has an acceptably small effect on the movie's >> colour. > > Hey Julian, this should allow y

Re: cleanly support drag-to-trash for uninstall?

2011-08-06 Thread Rainer Brockerhoff
On 06/08/2011, at 06:48, cocoa-dev-requ...@lists.apple.com wrote: > From: Jens Alfke > Date: 6 de agosto de 2011 02:07:48 BRT > > On Aug 5, 2011, at 8:04 AM, Carl Harris wrote: > >> I have a Cocoa app that (among other things) installs an agent in launchd >> that runs in the background. The a

Re: NSImageView vs IKImageView

2011-08-06 Thread James Merkel
On Aug 6, 2011, at 3:58 AM, Graham Cox wrote: On 06/08/2011, at 7:07 AM, James Merkel wrote: In my app, I accept edits in a window, save the edits to a file, close the window, then reopen the window to show the changes. With an NSImageView, you get an annoying flash when the window closes

Re: view:(QTMovieView *)view willDisplayImage:

2011-08-06 Thread Ron Fleckner
On 06/08/2011, at 9:00 PM, julius wrote: > The need for the child window to have a minimum alpha of 0.05 in order for it > to receive mouse events has an acceptably small effect on the movie's colour. Hey Julian, this should allow you to get rid of that 0.05 of darkness: setIgnoresMouseEvents:

Re: view:(QTMovieView *)view willDisplayImage:

2011-08-06 Thread julius
On 5 Aug 2011, at 16:04, douglas welton wrote: > Julius, > > QTMovieLayer is your friend. If you haven't already, check out the Core > Animation QuickTime Layer sample code. I think you'll find it very helpful. > > regards, > > douglas > > Douglas hi, thanks for the suggestion. I'll study

Re: NSImageView vs IKImageView

2011-08-06 Thread Graham Cox
On 06/08/2011, at 7:07 AM, James Merkel wrote: > In my app, I accept edits in a window, save the edits to a file, close the > window, then reopen the window to show the changes. > With an NSImageView, you get an annoying flash when the window closes and > then opens again. > With an IKImageVie

Re: [Q] including omp.h?

2011-08-06 Thread Marcus Karlsson
--On August 6, 2011 6:01:46 AM -0400 Jeffrey Walton wrote: On Sat, Aug 6, 2011 at 5:45 AM, Marcus Karlsson wrote: --On August 6, 2011 5:25:53 AM -0400 Jeffrey Walton wrote: On Sat, Aug 6, 2011 at 5:20 AM, Marcus Karlsson wrote: --On August 5, 2011 11:32:09 AM -0400 Sean McBride w

Asynchronous downloading and parsing of XML

2011-08-06 Thread Thomas Davie
Hi everyone, I'm trying to figure out how to download and parse XML at the same time. NSXMLParser seems to have support for this by providing it with an NSInputStream. However, I see no way to get an NSInputStream that contains the data that an NSURLConnection is downloading. Is this possibl

Re: [Q] including omp.h?

2011-08-06 Thread Jeffrey Walton
On Sat, Aug 6, 2011 at 5:45 AM, Marcus Karlsson wrote: > > > --On August 6, 2011 5:25:53 AM -0400 Jeffrey Walton > wrote: > >> On Sat, Aug 6, 2011 at 5:20 AM, Marcus Karlsson wrote: >>> >>> --On August 5, 2011 11:32:09 AM -0400 Sean McBride >>> wrote: >>> On Sun, 31 Jul 2011 16:49:34 -0700

Re: [Q] including omp.h?

2011-08-06 Thread Marcus Karlsson
--On August 6, 2011 5:25:53 AM -0400 Jeffrey Walton wrote: On Sat, Aug 6, 2011 at 5:20 AM, Marcus Karlsson wrote: --On August 5, 2011 11:32:09 AM -0400 Sean McBride wrote: On Sun, 31 Jul 2011 16:49:34 -0700, JongAm Park said: Because gcc now supports OpenMP, we can use pragmas for O

Re: [Q] including omp.h?

2011-08-06 Thread Jeffrey Walton
On Sat, Aug 6, 2011 at 5:20 AM, Marcus Karlsson wrote: > > --On August 5, 2011 11:32:09 AM -0400 Sean McBride > wrote: > >> On Sun, 31 Jul 2011 16:49:34 -0700, JongAm Park said: >> >>> Because gcc now supports OpenMP, we can use pragmas for OpenMP without >>> doing any special steps except for se

Re: [Q] including omp.h?

2011-08-06 Thread Marcus Karlsson
--On August 5, 2011 11:32:09 AM -0400 Sean McBride wrote: On Sun, 31 Jul 2011 16:49:34 -0700, JongAm Park said: Because gcc now supports OpenMP, we can use pragmas for OpenMP without doing any special steps except for setting "Enable OpenMP" and "-fopenmp". I don't have an answer for you

Re: [Q] including omp.h?

2011-08-06 Thread Marcus Karlsson
--On July 31, 2011 4:49:34 PM -0700 JongAm Park wrote: Hello, Because gcc now supports OpenMP, we can use pragmas for OpenMP without doing any special steps except for setting "Enable OpenMP" and "-fopenmp". However, when I tried to use OpenMP functions like : int omp_get_max_threads(void)