Re: remove icon from Dock

2010-10-13 Thread Stephane Sudre
On Tue, Oct 12, 2010 at 9:50 PM, Charles Srstka cocoa...@charlessoft.com wrote: and the Dashboard server gets killed, terminating all active Dashboard widgets. Is it an issue? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: The dreaded UITableView won't refresh problem.

2010-10-13 Thread Alexander Spohr
Am 12.10.2010 um 23:55 schrieb G S: - (UITableViewCell*) tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@MyIdentifier]; if (cell == nil) { cell = [[UITableViewCell

Re: remove icon from Dock

2010-10-13 Thread John Joyce
On Oct 13, 2010, at 7:08 PM, Stephane Sudre wrote: On Tue, Oct 12, 2010 at 9:50 PM, Charles Srstka cocoa...@charlessoft.com wrote: and the Dashboard server gets killed, terminating all active Dashboard widgets. Is it an issue? This could certainly be an issue to unsuspecting users who

Re: remove icon from Dock

2010-10-13 Thread Charles Srstka
On Oct 13, 2010, at 5:08 AM, Stephane Sudre wrote: On Tue, Oct 12, 2010 at 9:50 PM, Charles Srstka cocoa...@charlessoft.com wrote: and the Dashboard server gets killed, terminating all active Dashboard widgets. Is it an issue? If you don’t have an SSD, Dashboard widgets can take quite a

[ANN] CocoaHeads-NYC tonight, Wed 10/13

2010-10-13 Thread aglee
Our meeting date this month will be Wednesday Oct 13 (tonight) rather than the usual Thursday. I'll be doing a quick show-and-tell of how to get a WebView to talk to Cocoa, via JavaScript. Daniel Jalkut will show his Web Inspector. Bob Clair is generously contributing three copies of his

Re: remove icon from Dock

2010-10-13 Thread Kyle Sluder
On Oct 13, 2010, at 3:08 AM, Stephane Sudre dev.iceb...@gmail.com wrote: On Tue, Oct 12, 2010 at 9:50 PM, Charles Srstka cocoa...@charlessoft.com wrote: and the Dashboard server gets killed, terminating all active Dashboard widgets. Is it an issue? Dashboard widgets can play audio when

Dynamically subclassing an observed object

2010-10-13 Thread Dave DeLong
Hi everyone, I maintain some code that does dynamic subclassing to override an object's -dealloc method to do some extra cleanup prior to deallocation. (And for the curious, this cleanup is not necessary when using Garbage Collection) However, I observed a problem this morning, and that's

Re: Dynamically subclassing an observed object

2010-10-13 Thread Kyle Sluder
On Wed, Oct 13, 2010 at 12:44 PM, Dave DeLong davedel...@me.com wrote: What's involved with safely subclassing an object that's already been dynamically subclassed with KVO? You can't. See the comments here:

Re: Dynamically subclassing an observed object

2010-10-13 Thread Ken Thomases
On Oct 13, 2010, at 2:44 PM, Dave DeLong wrote: I maintain some code that does dynamic subclassing to override an object's -dealloc method to do some extra cleanup prior to deallocation. (And for the curious, this cleanup is not necessary when using Garbage Collection) As mentioned, it's

Re: Dynamically subclassing an observed object

2010-10-13 Thread Dave DeLong
Good questions. I know that this swizzling will only be happening on NSViews (since that's what my code operates on). As I mentioned in the original email, my current implementation exchanges -dealloc with a new one, which then invokes the original dealloc method. This appears to work well,

Re: Dynamically subclassing an observed object

2010-10-13 Thread Kyle Sluder
On Wed, Oct 13, 2010 at 2:02 PM, Dave DeLong davedel...@me.com wrote: As for the rationale behind why I need to do this, I'll just refer to my blog post on the matter:   http://davedelong.com/blog/2010/10/07/fun-objective-c-dynamic-subclassing Funny enough, it sounds like the blog post I

Re: Dynamically subclassing an observed object

2010-10-13 Thread Dave DeLong
Yeah, thanks for this. I've been over Mike's code, and he gets around this issue by using class_setSuperclass(), which the documentation says should not be used. How would using a CFDictionary with custom callbacks make things any better? In order to find things in the dictionary, things are

Re: The dreaded UITableView won't refresh problem.

2010-10-13 Thread G S
I'm not supposed to call reloadData in that function, am I? No. You would get an infinite loop. Yes indeed. Well, this has proven to be a stumper. In case the XIB was corrupted, I deleted the whole thing and started over. Same result. It's a deal-breaker, since this is the main interface

Re: Dynamically subclassing an observed object

2010-10-13 Thread Dave DeLong
Ah, I think I see what you're saying. I could create a custom CFDictionaryHashCallBack to simply return the pointer value or something, thereby skirting the -hash problem. Intriguing. I'll play with this and report back. The thing I have against this approach is that it potentially allows

disable animation of default button

2010-10-13 Thread Georg Seifert
Hi, I have a subclass of NSButton. The bezel style is set to Push. If the button has the return key equivalent and becoming the default button (drawn blue) the - (void) drawBezelWithFrame:(NSRect)cellFrame inView:(NSView *)controlView method gets called over end over again. In the standard

Re: The dreaded UITableView won't refresh problem.

2010-10-13 Thread Greg Guerin
G S wrote: Well, this has proven to be a stumper. In case the XIB was corrupted, I deleted the whole thing and started over. Same result. It's a deal-breaker, since this is the main interface of my app. Total standstill. I don't recall seeing any of your code that calls reloadData.

The dreaded UITableView won't refresh problem: SOLVED.

2010-10-13 Thread G S
Turns out to be a simulator bug, or a bug in the way Xcode is loading apps into the simulator. The simulator was showing a UI from a XIB that had long since been deleted from disk and removed from the project. And yet the compiled nib from it was turning up in the app package, even after cleans.

UIButton variations?

2010-10-13 Thread Laurent Daudelin
I was just wondering, given the single choice of a default UIButton (when compared to all the variations that you have in NSButton on OS X) what you guys were doing whenever you need some kind of spiced up UIButtons. You're rolling your own, using some kind of UIButton subclass that uses some

Re: disable animation of default button

2010-10-13 Thread Lee Ann Rucker
Try a different bezel. Any of the other push button styles should work fine (gradient, textured, etc) if you're doing your own drawing. On Oct 13, 2010, at 4:22 PM, Georg Seifert wrote: Hi, I have a subclass of NSButton. The bezel style is set to Push. If the button has the return key

iPhone/iPad device orientation problems

2010-10-13 Thread William Squires
Hi What's the proper way to force an iOS device to set the orientation to one of UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown ? The (relatively new) Wrox book says to do something along the

Re: The dreaded UITableView won't refresh problem.

2010-10-13 Thread Aran Mulholland
You have a black table view. Is by chance the text in the cell black also? (meaning you cant see it) I would try setting the table view style to grouped, then you could definitely see if the number of cells you say should be there (in your numberOfRowsInSection) are there. Then if the correct

Text Tables created programatically don't play nice with standard table UI

2010-10-13 Thread Graham Cox
Hi all, I'm creating a text table programatically in accordance with the 'recipe' specified in the Text layout Programming Guide, under 'Supporting Text Tables Programatically'. The table gets created with the layout I want as expected. However, when I edit the table, the standard UI for

Re: iPhone/iPad device orientation problems

2010-10-13 Thread M Pulis
Sir, Not sure I understand the problem... the user determines the orientation of the device... all (I think) we can/should do is respond to whatever orientation is when we launch and when notified of changes... To force the device, have you looked at -

Re: iPhone/iPad device orientation problems

2010-10-13 Thread Philip Mobley
On Oct 13, 2010, at 7:16 PM, William Squires wrote: Hi What's the proper way to force an iOS device to set the orientation to one of UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown ? So

Re: UIButton variations?

2010-10-13 Thread Philip Mobley
On Oct 13, 2010, at 5:07 PM, Laurent Daudelin wrote: I was just wondering, given the single choice of a default UIButton (when compared to all the variations that you have in NSButton on OS X) what you guys were doing whenever you need some kind of spiced up UIButtons. You're rolling your