Bindings ivars
Why, after I have connected a control in my nib. window using bindings can I no longer access it from code? After connecting a checkbox control using bindings, when my window controller loads, that control's ivar shows up as nil. Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Standard controls on top of NSGradients
I have a custom NSView subclass that contains an NSGradient. All this class does is draw a grey vertical gradient like iPhoto and iTunes do. When I place standard controls on top of one of my custom gradient views, when clicked, they also draw their rects with the same gradient - even though I don't include any code to do that. Do I need to lockFocus or some other aspect of CG on my custom view before I draw my gradient in my view's drawRect: method? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Standard controls on top of NSGradients
Thanks. Changing to [ self.theGradient drawInRect:self.bounds angle:90.0 ]; in drawRect: did the trick. Chuck From: David Duncan david.dun...@apple.com To: Charles Burnstagger burnstag...@yahoo.com Cc: cocoa-dev@lists.apple.com Sent: Mon, April 5, 2010 12:23:46 PM Subject: Re: Standard controls on top of NSGradients On Apr 5, 2010, at 12:15 PM, Charles Burnstagger wrote: When I place standard controls on top of one of my custom gradient views, when clicked, they also draw their rects with the same gradient - even though I don't include any code to do that. Do I need to lockFocus or some other aspect of CG on my custom view before I draw my gradient in my view's drawRect: method? What happens is when those controls redraw, some part of your view is invalidated, so you are asked to draw again. I suspect that when you draw, you are then using the rect parameter passed to -drawRect: to determine the extends of the gradient – which is incorrect. The rect parameter passed to -drawRect: is only a hint as to what parts of the view need to be redrawn. You should always do your drawing with respect to your view's bounds. -- David Duncan Apple DTS Animation and Printing ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
close: before NSWindowWillCloseNotification
Hi all, I have a typical window/controller on OS X 10.6.2. When I click the window's close box, my window controller receives the close: message before it recevies the windowWillCloseNotification. This seems to be backwards in sequence to me. Any ideas why this happens and how to avoid it? I need to recieve the notification *before* I receive close: since I want to do some stuff before the window goes away. Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Debugger: Cannot access memory at address 0x00
This has probably been asked a million times but I didn't see anything in the archives, so here goes: I have a perfecting working desktop OS X app built under Xcode 3.2.1 and 10.6.2, targeting 10.6 only. I move the project folder a subfolder, reset all source, resource, and framework paths to reflect the new location and now when I build and run (even without debugging), Xcode gives me this error: Error From Debugger: Cannot access memory at address 0x00 Does anyone know what causes this and how to solve it? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
viewDidUnload while view is still onscreen
The viewDidUnload: method for one of my iPhone app's views gets called even when that view and all its subviews are still onscreen. (I assume in response to the didReceiveMemoryWarning: message). Since the view and all of its subviews are still needed at that point (they are onscreen), how should I respond to this? On the one hand, I want all my release code to run in viewDidUnload: when the view does actually unload, but on the other hand, I don't want the view unloading while it is still onscreen. What is the correct way to handle such situations? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
IKImageBrowserView IKImageView subclasses not getting called
I subclass IKImageBrowserView IKImageView overriding initWithFrame: drawRect: and sending the same messages to super in both cases. I've set them as the classes for the UI objects in my IB file, and as IBOutlets in my window's window controller subclass. But when I run the code, neither of my two subclasses ever get called. What gives? Is there anything else I need to do in my subclasses? If I set the IBOutlets in the contoller subclass and class types in IB back to IKImageBrowserView IKImageView, the code seems to do the same thing as when I use my subclasses. Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Table views in combined tab/nav interface
I have a combined tab bar/navigation application whose navigation views each hold one table view. I've connected each navigation controller nib to a tab item in my tab bar controller and I've made the tab bar controller the root controller for the app like the docs say to. I know each of the navigation controller nibs load because I can see (and scroll) the empty tableview in each one when I tap a tab. However, *none* the nav controllers' methods ever get called - not even -awakeFromNib or -viewDidLoad. Since each nav controller's nib is connect to a tab bar item (I can see its name listed in the view area in IB), I assume there is nothing else I need to do load the nav controllers. Yet why don't *any* of my nav controller's methods get called when the views contained in the nav controllers load? My nav controller classes are also the datasource delegate for the table views, respectively. I've been over the code a million times and can't find anything wrong with it. And - the same code works fine if I remove the nav view controllers and add the tableview views directly to each tab item (which is not what I want) - in that case everything works as expected and my tables fill with data. Is there something special I need to do when the nav controllers from the tab bar interface? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Normalizing text in elements from NSXMLParser
I retrieve some text from elements found in XML I parse using NSXMLParser on iPhone. The text contains special characters such as #x92;s instead of 's. I've tried all the normalization routines on NSString but none of them work on the special characters. Is there anyway in Cocoa to directly fix such special characters or do I need to write my own mapping routine? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector: on 10.6
What changes were made to NSSavePanel beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector: in 10.6? When I set my Xcode 3.2 project's base SDK to 10.6 and Deployment target to 10.5 it says the method is deprecated. Yet when I run Apple's ImageKitDemo, also using the 10.6 SDK, it compiles without a warning. What gives? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
IKImageBrowserView selection notification
How do I detect when the selection changes in a IKImageBrowserView? I didn't see anything in the docs on that. Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Simulating webpage clicks
I have a Cocoa app with a WebKit browser. My app navigates to a default URL on startup. I need to parse the content of the default page, find specific links I am looking for, then simulate clicks on those links in the page just as if the user was clicking it normally - and I need to do all this in Objective-C without any JavaScript. Is there a way to do this using WebKit? Thanks, Chuck ___ 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 Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com