NSTextField black outline, not drawing in background thread when in a custom NSControl?

2009-09-20 Thread aaron smith
Hey All - quick question, I have a custom search NSControl that I attach an NSTextField onto. I can't figure out why the NSTextField isn't drawing like normal (cursor blink), the cursor is solid black. My control overrides some mouse methods as I change parts of the control when mouse over etc. Th

Re: Push-on push-off buttons doesn't show state

2009-09-20 Thread Gabriel Zachmann
Do you have an alternate image as well? I believe it's both or nothing. No ... but 1. all the other buttons in my GUI with push-on / push-off work just fine without an alternate image, and 2. the doc says "A button’s image is displayed when the button is in its normal state, or all the t

Subclassing NSUserDefaultsController

2009-09-20 Thread Thomas Bauer
Dear List, In some cases my application needs to modify and get the user defaults from a different user than the one it is launched under. Since this affects not only things done programmatically, but also parts of the user interface that use bindings, I was thinking an elegant solution would

Re: Running run loops in 10.6 (was: Need -[NSTask waitUntilExitOrTimeout:])

2009-09-20 Thread Ken Thomases
On Sep 20, 2009, at 1:38 AM, Jerry Krinock wrote: Trying to find a way to "tickle" a run loop into returning in Mac OS 10.6, I wrote another little tool which, instead of spawning a short- duration NSTask, sends a message to a mach port which has been added to the current run loop. To my su

Re: Subclassing NSUserDefaultsController

2009-09-20 Thread jonat...@mugginsoft.com
On 20 Sep 2009, at 10:39, Thomas Bauer wrote: Dear List, In some cases my application needs to modify and get the user defaults from a different user than the one it is launched under. Since this affects not only things done programmatically, but also parts of the user interface that use b

Re: What is the best way to call parent view controller methods from within child view controller?

2009-09-20 Thread Jesse Armand
You can create an ivar in class B that refer to class A instance. Set that ivar, when class B instance is created. So, you can call the methods in class A by using that instance, without searching through the view controllers array. Besides, you can also change the title before class B is pushed.

Re: What is the best way to call parent view controller methods from within child view controller?

2009-09-20 Thread Jesse Armand
On Sun, Sep 20, 2009 at 6:37 PM, Jesse Armand wrote: > You can create an ivar in class B that refer to class A instance. Set > that ivar, when class B instance is created. > So, you can call the methods in class A by using that instance, > without searching through the view controllers array. > C

Re: NSTextField black outline, not drawing in background thread when in a custom NSControl?

2009-09-20 Thread Graham Cox
On 20/09/2009, at 6:25 PM, aaron smith wrote: Even when setting all those to false, I still get this 1px black border. It sounds like the graphics context composite mode is set incorrectly. Try looking into that. --Graham ___ Cocoa-dev mail

Re: Running run loops in 10.6 (was: Need -[NSTask waitUntilExitOrTimeout:])

2009-09-20 Thread Jerry Krinock
On 2009 Sep 20, at 02:50, Ken Thomases wrote: You've got the send port and receive port mixed up here. The send port is the one you're sending to. The receive port is the one on which you'd receive any reply, if there is one. Since the timer user info contains the port which was added to

Thank you

2009-09-20 Thread Gabriel Zachmann
I have been asking quite a few questions on this mailing list and have gotten lots of helpful answers. I wanted to thank you, because without your help, I would not have been able to complete my little project. Should you be curious what I have been working on, here is the application: h

Re: Subclassing NSUserDefaultsController

2009-09-20 Thread James Bucanek
Thomas Bauer wrote (Sunday, September 20, 2009 2:39 AM +1200): In some cases my application needs to modify and get the user defaults from a different user than the one it is launched under. Since this affects not only things done programmatically, but also part

NSOpenGL Full Screen

2009-09-20 Thread Jeff LaMarche
Okay, I'm feeling a little foolish. I've been so focused on iPhone stuff for the last year and a half that I either didn't notice or just plain forgot that NSView now has a method for displaying in full screen mode. It certainly makes the whole process much easier. I've updated the old NSOp

Re: [UNSOLVED] How to observe every child entity

2009-09-20 Thread Jim Correia
First, a bit about terminology. What you are talking about is not observing child entities. You wish to observe related instances (NSManagedObject or subclass thereof). The entity describes the instance, but is not the instance. (I'm trying to avoid being overly pedantic, but talking about

MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Folks; I have recently converted to XC & IB 3.2 I've updated my project to be a 3.2 project using a baseSDK of 10.6 with deployment target of 10.4 I've run the static analyzer and have no analyzer issues as well as no compiler nor IB warnings I'm feeling good about this but now code that wo

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Kyle Sluder
On Sep 20, 2009, at 11:35 AM, Steve Cronin wrote: I have an instance variable which is an NSMutableDictionary * myBaseSettings You need to post the code that creates this dictionary. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

favicon of address

2009-09-20 Thread Mitchell Livingston
Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works "most of the time" should be fine. Thanks, Mitch __

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Kyle; Thanks for such a speedy response. (and on a Sunday afternoon too!) That code is a fairly complex set of interlocking methods. Why would the construction of this NSMutableDictionary have anything to do with this error? Steve On Sep 20, 2009, at 1:51 PM, Kyle Sluder wrote: On Sep 20,

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Jason Foreman
On Sep 20, 2009, at 1:54 PM, Steve Cronin wrote: Kyle; Thanks for such a speedy response. (and on a Sunday afternoon too!) That code is a fairly complex set of interlocking methods. Why would the construction of this NSMutableDictionary have anything to do with this error? Because the er

Re: favicon of address

2009-09-20 Thread Dave DeLong
I've been spending the past couple days working on webservers, and I've noticed that the first time that the browser requests a page, it also requests /favicon.ico, no matter what page in the file hierarchy it's trying to GET. From there, it would seem like if you have a host name (http://w

Re: favicon of address

2009-09-20 Thread Jason Foreman
On Sep 20, 2009, at 1:53 PM, Mitchell Livingston wrote: Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works "m

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Kyle; In order to answer your request, I've gone back through the code that generates myBaseSettings essentially it is: NSMutableDictionary *localDict = [NSMutableDictionary dictionaryWithCapacity:70]; [localDict setObject:[self generateInterestingValue1] forKey:@"interestingKey"];

bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Matt Neuburg
Okey-dokey, I'm back with more information. I have finally tracked down the source of my Core Animation crash on 10.5 (the problem, you may recall, is that it's crashing on 10.5 but working just fine on 10.6). And it has nothing to do with my build settings after all. Here's the story. My animatio

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Ken Ferry
Hi Matt, It sounds like the bug discussed in this passage from the AppKit release notes is what's biting you: NSBitmapImageRep notable bug fix: -[NSBitmapImageRep CGImage] safer now (New since WWDC 2008) In Leopard, -[NSBitmap

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Matt Neuburg
On or about 9/20/09 1:16 PM, thus spake "Ken Ferry" : > There was an ownership problem.  The NSBitmapImageRep owned a raw buffer of > data and the CGImage.  The CGImage didn't retain the NSBitmapImageRep since > that would cause a retain cycle.   So all I had to do was retain the NSBitmapImageRep

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Ken Ferry
On Sun, Sep 20, 2009 at 1:37 PM, Matt Neuburg wrote: > On or about 9/20/09 1:16 PM, thus spake "Ken Ferry" : > > > There was an ownership problem. The NSBitmapImageRep owned a raw buffer > of > > data and the CGImage. The CGImage didn't retain the NSBitmapImageRep > since > > that would cause a

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Kyle Sluder
On Sun, Sep 20, 2009 at 12:42 PM, Steve Cronin wrote: > essentially it is: "Essentially" isn't good enough; actual copy-paste is necessary to ensure you're doing it correctly. >        NSMutableDictionary *localDict = [NSMutableDictionary > dictionaryWithCapacity:70]; This is good. > - (void)

Thanks for the Help

2009-09-20 Thread K. Darcy Otto
I just launched my first software product, and I want to thank the many, many people on this list who helped me during the development phase. There would be no way I could have done it without you. When I look back at the large number of questions I have filed (all the way from basic Objec

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Rob Keniger
On 21/09/2009, at 7:22 AM, Ken Ferry wrote: Well, yes, but copying the data out one way or another is probably safer. :-) Once you've passed a CGImage to some other API, you really don't know how long it'll survive, so it's hard to say when it would be safe to release the NSBitmapImageR

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Folks; Thanks for all of the guidance! I have found the issue. It turns out that [localDict copy] is what was being sent to the setBaseSetting. In dealing with the static analyzer's warnings I must have made this change and then had failed to back it out… MY BAD Removed this and all is w

Re: favicon of address

2009-09-20 Thread Mike Abdullah
The best engineered approach would probably be to load the page up into a WebView, BUT use the WebResourceLoadDelegate to stop it wasting time downloading any resource that isn't the favicon. But if it isn't critical, then downloading favicon.ico should probably be enough. On 20 Sep 2009, a

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Ken Ferry
On Sun, Sep 20, 2009 at 3:22 PM, Rob Keniger wrote: > > On 21/09/2009, at 7:22 AM, Ken Ferry wrote: > > Well, yes, but copying the data out one way or another is probably safer. >> :-) >> >> Once you've passed a CGImage to some other API, you really don't know how >> long it'll survive, so it's

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Rob Keniger
On 21/09/2009, at 9:21 AM, Ken Ferry wrote: Ah, I forgot about CGImageCreateCopy. No, as noted in the header, /* Return a copy of `image'. Only the image structure itself is copied; the underlying data is not. */ I'm not sure when you _would_ want to use CGImageCreateCopy, actually.

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Joar Wingfors
On 20 sep 2009, at 16.26, Rob Keniger wrote: Now that you've pointed that out, neither am I! I should always remember to check the header, the docs don't mention this detail. Should I file a bug against the docs? Absolutely - You're not supposed to have to go to the header files to lear

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Rob Keniger
On 21/09/2009, at 9:26 AM, Rob Keniger wrote: Now that you've pointed that out, neither am I! I should always remember to check the header, the docs don't mention this detail. Should I file a bug against the docs? Cancel that, I see the documentation for the 10.6 API is much improved. I

Data Model Versions and -fetchRequestTemplateForName

2009-09-20 Thread Steve Cronin
Folks; I have recently converted to XC & IB 3.2 I've updated my project to be a 3.2 project using a baseSDK of 10.6 with deployment target of 10.4 I have a Core Data model that I've been very happy with starting in 10.4 and continuing in 10.5.. In readying for the brave new world ahead I ha

[SOLVED (but not pretty)] Running run loops in 10.6

2009-09-20 Thread Jerry Krinock
Well, I don't think anyone is going to like this solution, but it seems to be working for me and it comes with a plausible explanation... On 2009 Sep 16, at 14:07, Chris Kane wrote: Go back to the main thread. Setup a oneshot NSTimer for the timeout period. Setup a notification handler to