Re: Problem implementing keyPathsForvaluesAffecting

2009-04-24 Thread jonat...@mugginsoft.com
On 23 Apr 2009, at 23:21, Jim Correia wrote: On Apr 22, 2009, at 10:45 AM, jonat...@mugginsoft.com wrote: The property canDelete is dependent on three other properties as shown below. Is there a problem with my implementation of + keyPathsForValuesAffectingCanDelete with regard to the k

How to clone a mutable dictionary

2009-04-24 Thread Steve Cronin
Folks; Its been a long day and maybe I'm just in need of sleep but I'm bamboozeled... I have an NSMutableDictionary (newThing) that is set up based on some user defaults and current contextual data. newThing is fine. What I want to do is clone newThing (newThing2) and leave the values

Re: How to clone a mutable dictionary

2009-04-24 Thread Graham Cox
On 24/04/2009, at 6:35 PM, Steve Cronin wrote: Its been a long day and maybe I'm just in need of sleep but I'm bamboozeled... I have an NSMutableDictionary (newThing) that is set up based on some user defaults and current contextual data. newThing is fine. What I want to do is clone new

Re: How to clone a mutable dictionary

2009-04-24 Thread Jean-Daniel Dupas
Le 24 avr. 09 à 10:35, Steve Cronin a écrit : Folks; Its been a long day and maybe I'm just in need of sleep but I'm bamboozeled... I have an NSMutableDictionary (newThing) that is set up based on some user defaults and current contextual data. newThing is fine. What I want to do is c

Re: How to clone a mutable dictionary

2009-04-24 Thread Graham Cox
On 24/04/2009, at 6:39 PM, Graham Cox wrote: I'm sorry if this is something silly! When a dictionary is copied, the objects it contains are not copied, merely retained by the second dictionary. Likewise setObject:forKey only retains the object. You need to copy each object ("deep copy"

Best technology to use for overlays?

2009-04-24 Thread Daniel Vollmer
Hi, I want to optimise my drawing code a bit. Essentially, I have a custom NSView embedded in an NSCollectionView embedded in an NSScrollView. In my custom view, I always want to display an overlay (consisting of something like a description string of what is being displayed). This overla

Re: How to clone a mutable dictionary

2009-04-24 Thread Jean-Daniel Dupas
Le 24 avr. 09 à 10:50, Graham Cox a écrit : On 24/04/2009, at 6:44 PM, Jean-Daniel Dupas wrote: NSMutableDictionary *newThing2 = [newThing mutableCopy]; [newThing2 setObject:foo forKey:bar]; This doesn't copy the contents of the dictionary, it only makes a mutable copy of the dictionary

Re: Best technology to use for overlays?

2009-04-24 Thread Alexander Spohr
Did you try visibleRect? Returns the portion of the receiver not clipped by its superviews. - (NSRect)visibleRect Make the header a subview of your datastream-view and put it into the visibleRect. I hope the ScrollViews clipView does the needed job of clipping :) atze Am 24.04.2

Re: Best technology to use for overlays?

2009-04-24 Thread Michael Ash
On Fri, Apr 24, 2009 at 5:02 AM, Daniel Vollmer wrote: > Hi, > > I want to optimise my drawing code a bit. Essentially, I have a custom > NSView embedded in an NSCollectionView embedded in an NSScrollView. In my > custom view, I always want to display an overlay (consisting of something > like a d

Re: Best technology to use for overlays?

2009-04-24 Thread Chris Suter
Hi Daniel, On Fri, Apr 24, 2009 at 9:07 PM, Michael Ash wrote: > If you want to use the same back-end as window compositing, why not > use actual window compositing? Create a borderless NSWindow, make it a > child window, and position it appropriately. In my opinion, you're better off having a

Re: Best technology to use for overlays?

2009-04-24 Thread Michael Ash
On Fri, Apr 24, 2009 at 7:27 AM, Chris Suter wrote: > Hi Daniel, > > On Fri, Apr 24, 2009 at 9:07 PM, Michael Ash wrote: > >> If you want to use the same back-end as window compositing, why not >> use actual window compositing? Create a borderless NSWindow, make it a >> child window, and position

Re: Best technology to use for overlays?

2009-04-24 Thread Chris Suter
Hi Michael, On Fri, Apr 24, 2009 at 9:38 PM, Michael Ash wrote: > If your overlay is known about in advance, the solution to the timing > window is easy: load and position it immediately, when you load the > parent window, even if you don't need it yet. You can fill it with > nothing so that it'

Re: Best technology to use for overlays?

2009-04-24 Thread Chris Suter
Hi Michael, And I've just thought of more things that are awkward with child windows: handling events and accessibility. Regards, Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Dividing NSView to subviews

2009-04-24 Thread Naresh Kongara
Thanks peter for your reply, Now there is some improvement in the performance , but the image is not that much clear as the image we are getting with dataWithPDFInsideRect: is there any way to remove that blur. Thanks, nareshk On Apr 24, 2009, at 10:40 AM, Peter N Lewis wrote: On 23/

RE: How to clone a mutable dictionary

2009-04-24 Thread Kirk Kerekes
Simple, brute-force method: archive the dictionary, then unarchive it. The result is a 1-line "deep copy". Of course, that assumes that all the dictionary objects/keys support archiving. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

Re: Best technology to use for overlays?

2009-04-24 Thread Daniel Vollmer
On Apr 24, 2009, at 11:06 , Frederik Slijkerman wrote: Hi Daniel, Why not move the overlay drawing to a separate custom view, that you insert as a direct subview of the scroll view? In this way, the composition system takes care of all the redrawing in the most efficient way. The thing

Re: Detecting changes to NSPopUpButtonCell in an NSTableView

2009-04-24 Thread Jerry Krinock
On 2009 Apr 23, at 16:39, Ulai Beekam wrote: Furthermore, it doesn't seem to make too much sense to bind the selected index to a single variable because, as you say, I have multiple rows and the popupmenu for each one. Actually I can think of one weird way of making it work: Having an i

Re: How to clone a mutable dictionary

2009-04-24 Thread Andy Lee
On Apr 24, 2009, at 4:35 AM, Steve Cronin wrote: Everything I do causes any change I make in newThing2 to also be made in newThing. newThing2 = [NSMutableDictionary dictionaryWithCapacity:20]; [newThing2 setDictionary:newThing]; [newThing2 setObject:foo forKey:bar]; // at this method line

Re: How to clone a mutable dictionary

2009-04-24 Thread Graham Cox
On 24/04/2009, at 6:44 PM, Jean-Daniel Dupas wrote: NSMutableDictionary *newThing2 = [newThing mutableCopy]; [newThing2 setObject:foo forKey:bar]; This doesn't copy the contents of the dictionary, it only makes a mutable copy of the dictionary itself. If an object in the second dictionar

Re: Best technology to use for overlays?

2009-04-24 Thread Mike Abdullah
Just position your overlay view as a sibling to the scrollview. If you're using NSCollectionView, you're targeting Leopard+, where overlapping views are properly supported. On 24 Apr 2009, at 10:02, Daniel Vollmer wrote: Hi, I want to optimise my drawing code a bit. Essentially, I have a

Re: How to clone a mutable dictionary

2009-04-24 Thread Chris Suter
Hi Graham, On Fri, Apr 24, 2009 at 6:49 PM, Graham Cox wrote: > Incidentally this makes a very useful basic category on NSDictionary, one > that every Cocoa programmer is likely to need sooner or later. Here's mine: [snip] You could also use CFPropertyListCreateDeepCopy. Just remember to call N

NSPopUpButtonCell causes UI to "sleep" when clicked

2009-04-24 Thread Jerry Krinock
I'm creating an NSPopUpButtonCell programatically. To show the menu I invoke -[NSPopUpButtonCell performClickWithFrame:inView:]. It works -- however after the menu has popped up, been clicked and dismissed, - Timers in the main thread stop firing - Keyboard equivalents fail silently O

Re: NSTableView variable row height and noteHeightOfRowsWithIndexesChanged during live resize

2009-04-24 Thread Corbin Dunn
On Apr 23, 2009, at 5:44 PM, Stuart Malin wrote: On Apr 23, 2009, at 1:18 PM, Corbin Dunn wrote: On Apr 23, 2009, at 3:37 PM, Stuart Malin wrote: On Apr 23, 2009, at 12:33 PM, Corbin Dunn wrote: On Apr 23, 2009, at 2:55 PM, Stuart Malin wrote: I have an NSTableView with a single colu

Re: How to clone a mutable dictionary

2009-04-24 Thread Steve Cronin
Graham; THANK-YOU for this informative and "full-bodied" answer! I want make sure I fully understand: 1) The "Easy Way" works only if there are no collection objects as values in the "copied" dictionary (or other collection). It seems to me that the "Hard Way" is ultimately necessary for "ev

NSPopUpButton with "multiple selection" state (like NSMixedState)

2009-04-24 Thread ALEXander
Hello, I am looking for a possibility to display a NSMixedState for an NSPopUpButton (like it is used OmniGraffle): I have some objects. Each object can be in one and only one group. There are multiple groups and objects. I want to assign the group to the objects via an NSPopUpButton.

Re: How to clone a mutable dictionary

2009-04-24 Thread Mike Abdullah
On 24 Apr 2009, at 17:15, Steve Cronin wrote: Graham; THANK-YOU for this informative and "full-bodied" answer! I want make sure I fully understand: 1) The "Easy Way" works only if there are no collection objects as values in the "copied" dictionary (or other collection). It seems to me th

Re: NSPopUpButton with "multiple selection" state (like NSMixedState)

2009-04-24 Thread Jerry Krinock
On 2009 Apr 24, at 08:43, ALEXander wrote: I am looking for a possibility to display a NSMixedState for an NSPopUpButton (like it is used OmniGraffle): If you pasted an image in there, it did not make it through the email server. (Interesting, because I have seen small images make it

Re: NSPopUpButton with "multiple selection" state (like NSMixedState)

2009-04-24 Thread ALEXander
If you pasted an image in there, it did not make it through the email server. (Interesting, because I have seen small images make it through in the past.) No, that was just a big white space to keep text and context apart :) Anyhow, I believe you want a popup menu which shows a constant "

Re: How to clone a mutable dictionary

2009-04-24 Thread Steve Cronin
Mike; Thank-you also. The "goodness' just doesn't stop... ;-) My bad on the NSObject code - thanks for clarifying... (How on earth could init yield a copy?) But at the end of your message you say "...there's a reason why Cocoa has both -copy and -mutableCopy. .." Is the reason you are allu

WebView setDownloadDelegate: issue

2009-04-24 Thread Mikkel Eriksen
Hi foks Hopefully the right place to ask this question. In the project I'm working on, I have a webview that's going to a specific site. When the user downloads files from that site, I want to intercept them (basically grab the URL, get the file and parse the contents). So in my controller class

Clicking through a NSView with CALayers

2009-04-24 Thread Rowan Nairn
Hi, I have a transparent overlay NSWindow the size if the screen and it contains a mostly transparent NSView. I'd like to accept clicks which occur on non-transparent regions of the view but let clicks that occur over transparent regions activate the app underneath. If I draw the view using draw

Re: How to clone a mutable dictionary

2009-04-24 Thread Jerry Krinock
I spent some time on this problem a couple months ago and found some code on cocoadev which I improved upon, also added a little test code. There still may be bugs in it. I don't know what the byte/character limit is on this list, but at least the header should make it through. -

Re: WebView setDownloadDelegate: issue

2009-04-24 Thread Jeff Johnson
Hi Mikkel. The Webkitsdk-dev list would probably be better for this question. Having said that, does your webview also have a UIDelegate? I ask because many downloads try to open a new window, so I'm wondering if webView:createWebViewWithRequest: would be called, for example. If you don't

CoreData delete clean up

2009-04-24 Thread Jim Thomason
I just can't find a solution for this. Basically, I need a pre-delete hook in CoreData but can't seem to find one. Here's the deal - I have a Foo object which has many Bar objects. Foo also has a property that's calculated off of the various values in Bar. So Bar has many custom set methods that

Binding Image and Text into a NSTextFieldCell

2009-04-24 Thread Arun
Hi All, How can we place Image and text in a NSTextField cell. I searched in the net and found sample codes for table columns with Image and text. Does any one know how to bind Image and Text into a NSTextFieldCell? Thanks Arun KA ___ Cocoa-dev mailing

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-24 Thread Jerry Krinock
On 2009 Apr 23, at 13:53, Melissa J. Turner wrote: Unwinding to the original message, the most correct thing to do would be to add a derived property letterGrade which is automatically updated whenever grade is, which then allows you to search against that. Melissa, please give a more pr

Re: Core Data and the Application Delegate

2009-04-24 Thread Sean McBride
On 4/23/09 8:37 PM, Jon Gordon said: >I'm having trouble understanding how to do certain things with the >application delegate in a document-based application that uses Core >Data. Or maybe I'm understanding things perfectly well, but I don't >like the logical conclusion. But I digress. > >In a n

Re: Core Data and the Application Delegate

2009-04-24 Thread Jason Foreman
On Apr 23, 2009, at 7:37 PM, Jon Gordon wrote: But I understand (I think) also that, in a Core Data document-based application, the application delegate is set to one provided by Core Data. And in such cases, providing my own delegate breaks Core Data functionality that I'd otherwise get fo

Re: Binding Image and Text into a NSTextFieldCell

2009-04-24 Thread Jerry Krinock
On 2009 Apr 24, at 11:55, Arun wrote: Does any one know how to bind Image and Text into a NSTextFieldCell? I don't believe you can do that with NSTextFieldCell. I believe this would work: First of all add or identify a single 'foo' attribute in your data object model from which both data

problems with live resize of NSTextView

2009-04-24 Thread Stuart Malin
I have an NSTextView in a custom view, it is set to resize with the containing view only in the horizontal dimension. When I resize the window, the text view does resize, and it does re-layout its content to fit, both on expanding and shrinking. However, the text view not only changes its f

Re: NSPopUpButtonCell causes UI to "sleep" when clicked

2009-04-24 Thread Peter Ammon
Hi Jerry, On Apr 24, 2009, at 5:41 AM, Jerry Krinock wrote: I'm creating an NSPopUpButtonCell programatically. To show the menu I invoke -[NSPopUpButtonCell performClickWithFrame:inView:]. It works -- however after the menu has popped up, been clicked and dismissed, - Timers in the mai

KVO leaks memory

2009-04-24 Thread Andreas Grosam
I get strange memory leaks when I use KVO. The setup of all classes is OK as far as I can see, and the KVO is actually working. There is no memory leak when the classes will be tested in test cases without KVO. There are two classes involved: class Model and class Observer Model has a propert

Re: KVO leaks memory

2009-04-24 Thread Andreas Grosam
On Apr 24, 2009, at 11:55 PM, Andreas Grosam wrote: I get strange memory leaks when I use KVO. The setup of all classes is OK as far as I can see, and the KVO is actually working. There is no memory leak when the classes will be tested in test cases without KVO. There are two classes inv

Re: KVO leaks memory

2009-04-24 Thread Jean-Daniel Dupas
Le 24 avr. 09 à 23:55, Andreas Grosam a écrit : I get strange memory leaks when I use KVO. The setup of all classes is OK as far as I can see, and the KVO is actually working. There is no memory leak when the classes will be tested in test cases without KVO. There are two classes involve

Fill box with repeating text

2009-04-24 Thread Trygve Inda
I have a rect in a graphics context that I wish to fill with repeating text "Some Text" so that the text repeats enough times to completely fill the rect at the given line spacing, font style etc. How can I determine how much text I need? Is there a better way to build this than just stringByAppen

Re: Fill box with repeating text

2009-04-24 Thread Dave Keck
There are several ways to accomplish this. (I'll note that you can get the size of an attributed string using its -size method.) Option 1: Create an NSImage with the size returned from the attributed string. Draw the attributed string into the image. Create an NSColor pattern from the image, usin

Re: KVO leaks memory

2009-04-24 Thread Andreas Grosam
On Apr 25, 2009, at 1:07 AM, Jean-Daniel Dupas wrote: Le 24 avr. 09 à 23:55, Andreas Grosam a écrit : I get strange memory leaks when I use KVO. The setup of all classes is OK as far as I can see, and the KVO is actually working. There is no memory leak when the classes will be tested in

Re: Dividing NSView to subviews

2009-04-24 Thread Michael Ash
On Fri, Apr 24, 2009 at 8:02 AM, Naresh Kongara wrote: > Thanks peter for your reply, > > Now there is some improvement in the performance , but the image is not that > much clear as the image we are getting with dataWithPDFInsideRect: > > is there any way to remove that blur. The technique that

Re: ObjectAlloc and objects that should have been released

2009-04-24 Thread Miles
I just mean that I'm adding some labels and images to the view. I have quadruple checked that they are all being released, but I must be overlooking something. For example, ObjectAlloc points to the second line here, where I declare UIImage *logo as being created and still living, even though it's

Re: NSPopUpButtonCell causes UI to "sleep" when clicked

2009-04-24 Thread Peter Ammon
On Apr 24, 2009, at 5:41 AM, Jerry Krinock wrote: I'm creating an NSPopUpButtonCell programatically. To show the menu I invoke -[NSPopUpButtonCell performClickWithFrame:inView:]. It works -- however after the menu has popped up, been clicked and dismissed, - Timers in the main thread s

Re: Core Data and the Application Delegate

2009-04-24 Thread Jon Gordon
I believe it to be so because of some things I found while Googling to look for the answer. I even found one poster to some list who claimed that his Core Data app worked perfectly well until he set his own application delegate, at which point it stopped working perfectly well. On the othe

Re: Core Data and the Application Delegate

2009-04-24 Thread Jon Gordon
On Apr 24, 2009, at 4:40 PM, Jason Foreman wrote: On Apr 23, 2009, at 7:37 PM, Jon Gordon wrote: But I understand (I think) also that, in a Core Data document-based application, the application delegate is set to one provided by Core Data. And in such cases, providing my own delegate break

Re: KVO leaks memory

2009-04-24 Thread Greg Parker
On Apr 24, 2009, at 5:09 PM, Andreas Grosam wrote: model creates several other objects that will be stored in a dictionary which is also an ivar of model. The dictionary will be used as a parameter in a recursive method invocation, where its sub dictionaries will be processed. Well, and it

Re: Core Data and the Application Delegate

2009-04-24 Thread Jason Foreman
On Apr 24, 2009, at 7:47 PM, Jon Gordon wrote: On Apr 24, 2009, at 4:40 PM, Jason Foreman wrote: On Apr 23, 2009, at 7:37 PM, Jon Gordon wrote: But I understand (I think) also that, in a Core Data document- based application, the application delegate is set to one provided by Core Data. An

Core Data: thread safety of NSPersistentStore +metadataForPersistentStoreWithURL:... (and +set...)?

2009-04-24 Thread Jim Correia
I don't see that the documentation specifically calls out @interface NSPersistentStore + (NSDictionary *)metadataForPersistentStoreWithURL:(NSURL *)url error: (NSError **)error; + (BOOL)setMetadata:(NSDictionary *)metadata forPersistentStoreWithURL: (NSURL*)url error:(NSError **)error; @end a

passing complex objects between threads

2009-04-24 Thread Daniel Child
I have a Core Data app that imports data via a separate managed object contexts. Without multithreading, the operation works fine. But since the import takes over a minute, I want to do the import in a different thread. The data consists of an archived table of data with records. This is my

Re: Core Data and the Application Delegate

2009-04-24 Thread mmalc Crawford
On Apr 23, 2009, at 5:37 PM, Jon Gordon wrote: In a normal (i.e., non-Core Data) document-based application, as I understand it, one can modify certain functions by providing a delegate to the instance of NSApplication. For example, to keep the application from opening a blank document at

Re: passing complex objects between threads

2009-04-24 Thread Eric Hermanson
I believe you should use a producer-consumer pattern where the consumer thread waits on a blocking queue for the incoming object, and the producer thread passes the fetched object to the blocking queue after its fetched. There are many examples of producer/consumer on the web... - Eric

Re: passing complex objects between threads

2009-04-24 Thread Eric Hermanson
FYI, I wrote a blocking queue that is very similar to Java's BlockingQueue. I haven't tested it very much yet, so no guarantees to this code... enum _Lock { EMPTY, NOT_EMPTY }; @implementation BlockingQueue - (id)initWithCapacity:(NSUInteger)capacity { if((self = [

parsing a string into words

2009-04-24 Thread Gerriet M. Denkmann
I want to parse a string into words. Currently I do: NSString *theString = NSUInteger stringLength = [ theString length ]; NATextView *theTextView = [[NSTextView alloc] initWithFrame: NSMakeRect(0,0,99,99) ]; [ theTextView setString: theString ]; for( NSUInteger t = 0; t < stringLength;

Re: ObjectAlloc and objects that should have been released

2009-04-24 Thread Peter N Lewis
On 25/04/2009, at 8:28 , Miles wrote: I just mean that I'm adding some labels and images to the view. I have quadruple checked that they are all being released, but I must be overlooking something. I doubt its your issue, but I recently had a problem like this that took me far too long to tra

Re: parsing a string into words

2009-04-24 Thread Michael Ash
On Fri, Apr 24, 2009 at 9:24 PM, Gerriet M. Denkmann wrote: > > I want to parse a string into words. > Currently I do: > > NSString *theString = > NSUInteger stringLength = [ theString length ]; > NATextView *theTextView = [[NSTextView alloc] initWithFrame: > NSMakeRect(0,0,99,99) ]; > [ theT

Re: ObjectAlloc and objects that should have been released

2009-04-24 Thread Miles
Very interesting, I'll give all that a shot and report back. Thanks so much! On Apr 24, 2009, at 7:07 PM, Peter N Lewis wrote: On 25/04/2009, at 8:28 , Miles wrote: I just mean that I'm adding some labels and images to the view. I have quadruple checked that they are all being releas

Conversation-style controls?

2009-04-24 Thread Christopher Gillis
How would I go about attaining a conversation-style layout. Tweetie ( http://www.atebits.com/tweetie-mac/ ) is a perfect example of the layout I would like to achieve. I can get something similar by subclassing NSTableView but it seems to me like it's a convoluted approach to what should be a simpl

Re: Fill box with repeating text

2009-04-24 Thread Trygve Inda
> There are several ways to accomplish this. > > (I'll note that you can get the size of an attributed string using its > -size method.) > > Option 1: Create an NSImage with the size returned from the attributed > string. Draw the attributed string into the image. Create an NSColor > pattern from

Re: Fill box with repeating text

2009-04-24 Thread Dave Keck
> Makes the text transparent, but I can't seem to make the background of the > NSImage transparent. I want to end up with white text on a transparent > background, but [[NSImage alloc] initWithSize:[theString size]] seems to set > the background to solid white. This is because you're drawing the i

Re: Fill box with repeating text

2009-04-24 Thread Chris Suter
Hi Trygve, 2009/4/25 Trygve Inda Makes the text transparent, but I can't seem to make the background of the > NSImage transparent. I want to end up with white text on a transparent > background, but [[NSImage alloc] initWithSize:[theString size]] seems to > set > the background to solid white. >

Re: Fill box with repeating text

2009-04-24 Thread Trygve Inda
>> Makes the text transparent, but I can't seem to make the background of the >> NSImage transparent. I want to end up with white text on a transparent >> background, but [[NSImage alloc] initWithSize:[theString size]] seems to set >> the background to solid white. > > This is because you're drawi

Re: NSPopUpButtonCell causes UI to "sleep" when clicked

2009-04-24 Thread Jerry Krinock
On 2009 Apr 24, at 17:36, Peter Ammon wrote: Sorry, I think I misread your original message. After the menu is dismissed, then the run loop should return to the Default mode and timers in that mode should resume. The behavior you describe is pretty weird. Thank you, Peter. I had been

Re: Fill box with repeating text

2009-04-24 Thread Dave Keck
> Where does this go as it is drawing the image, not the text? The image is > drawn with a RectFill call?? Ah, sorry. I meant to say: NSRectFillUsingOperation(rect, NSCompositeSourceOver); Note that point here is that however the image is finally drawn, you have to make sure you're drawing it us

Re: Core Data and the Application Delegate

2009-04-24 Thread Andy Lee
On Apr 24, 2009, at 8:47 PM, Jon Gordon wrote: On Apr 24, 2009, at 4:40 PM, Jason Foreman wrote: On Apr 23, 2009, at 7:37 PM, Jon Gordon wrote: But I understand (I think) also that, in a Core Data document- based application, the application delegate is set to one provided by Core Data. And

Re: passing complex objects between threads

2009-04-24 Thread Chris Hanson
On Apr 24, 2009, at 6:24 PM, Daniel Child wrote: I have a Core Data app that imports data via a separate managed object contexts. Without multithreading, the operation works fine. But since the import takes over a minute, I want to do the import in a different thread. The data consists of a

Re: Fill box with repeating text

2009-04-24 Thread Trygve Inda
>> Where does this go as it is drawing the image, not the text? The image is >> drawn with a RectFill call?? > > Ah, sorry. I meant to say: > > NSRectFillUsingOperation(rect, NSCompositeSourceOver); > > Note that point here is that however the image is finally drawn, you > have to make sure you'

Re: CF autorelease?

2009-04-24 Thread Charles Srstka
On Apr 23, 2009, at 3:42 PM, Todd Heberlein wrote: Many of the Cocoa object allocation methods automatically do an autorelease before returning the pointer to the object, so I can call something like: foo( [NSString stringWithCString: "bar" encoding: NSASCIIStringEncoding] ); and then n