Deleting entire sections in UITableView edit mode

2009-12-08 Thread Michael Gardner
I'm creating a UITableView in which users should be able to (among other things) delete not only single rows, but entire sections. When the table is put into edit mode, I would like to show a control in each section header that will allow deletion of the associated section. How hard is this goi

Snapshotting hidden UIViews

2010-01-12 Thread Michael Gardner
I'm trying to create a "snapshot" UIImage from a UITextView that's inside a larger, hidden UIView. renderInContext: works fine for visible UIView layers, but I can't get consistent results for hidden views. I read somewhere (can't recall the source, but it wasn't authoritative) that this is exp

Re: Snapshotting hidden UIViews

2010-01-13 Thread Michael Gardner
On Jan 13, 2010, at 11:24 AM, Matt Neuburg wrote: > On Tue, 12 Jan 2010 14:18:05 -0600, Michael Gardner > said: >> I'm trying to create a "snapshot" UIImage from a UITextView that's inside a > larger, hidden UIView. renderInContext: works fine for visib

Re: Snapshotting hidden UIViews

2010-01-13 Thread Michael Gardner
On Jan 13, 2010, at 5:07 PM, glenn andreas wrote: > > On Jan 13, 2010, at 4:48 PM, Michael Gardner wrote: > >> >> I also tried calling -drawRect: on my hidden view (after setting the context >> with UIGraphicsBeginImageContext()), but it doesn't seem to do any

Re: Snapshotting hidden UIViews

2010-01-14 Thread Michael Gardner
On Jan 13, 2010, at 10:30 PM, glenn andreas wrote: > On Jan 13, 2010, at 9:46 PM, Michael Gardner wrote: > >> On Jan 13, 2010, at 5:07 PM, glenn andreas wrote: >> >>> >>> On Jan 13, 2010, at 4:48 PM, Michael Gardner wrote: >>> >>>>

Re: Returning a nil float?

2010-02-01 Thread Michael Gardner
On Jan 29, 2010, at 6:44 PM, Chunk 1978 wrote: > i'm almost 100% sure it's not possible to return a nil on basic data > types, but just incase i'll post the question. > > -- > - (float)panForSoundWithName:(NSString *)soundName > { >

Re: Returning a nil float?

2010-02-01 Thread Michael Gardner
On Feb 1, 2010, at 12:58 PM, Jean-Daniel Dupas wrote: > > Le 1 févr. 2010 à 19:17, Michael Gardner a écrit : > >> On Jan 29, 2010, at 6:44 PM, Chunk 1978 wrote: >> >>> i'm almost 100% sure it's not possible to return a nil on basic data >>&

Re: Application support for Time Machine

2008-05-30 Thread Michael Gardner
What are you looking to accomplish with Time Machine? -Michael Ralf Edmund Stranzenbach wrote: > Hi. > > I'm still wondering if there is any plug-in or extension type > architecture that enables applications to cooperate with the TimeMachine > backups much like Apples Mail or AddressBook applica

Re: Writing a notifier app

2008-06-05 Thread Michael Gardner
Have you looked at Growl? -Michael Abhiram Dwivedi wrote: > Hi, > > I need to build a functionality similar to gmail notifier. > > Any pointers if Cocoa would be the right approach or if some other technology > (python?) can be used to create such an app? Also, if you know of a similar > open

Re: Grand Central Details

2008-06-17 Thread Michael Gardner
On Jun 17, 2008, at 7:17 PM, Pierce T. Wetter III wrote: If you've ever used CoreNetwork you might get the idea, because CFNetwork is event-driven, rather then the shitty thread-per-socket style that CS students are taught. So you can easily handle a zillion connections with CoreNetwork

Re: design pattern for data acquisition in background thread?

2008-09-27 Thread Michael Gardner
On Sep 27, 2008, at 10:10 PM, Joe Keenan wrote: The problem with any async method is that I haven't figured an elegant way to know which update code to use for each return value. They're not all the same. Different data elements need different processing to update the UI. When I get a re

Re: How to count composed characters in NSString?

2008-09-28 Thread Michael Gardner
On Sep 27, 2008, at 2:23 PM, David Niemeijer wrote: Hi, I have been trying to find this in the documentation and list archives but without success so far. What is the best way to count the number of characters in an NSString taking account of the fact that some characters may take up mult

Re: How to count composed characters in NSString?

2008-09-28 Thread Michael Gardner
On Sep 28, 2008, at 5:53 AM, Gerriet M. Denkmann wrote: On Sun, 28 Sep 2008 03:27:48 -0500, Michael Gardner <[EMAIL PROTECTED] > wrote: On Sep 27, 2008, at 2:23 PM, David Niemeijer wrote: Hi, I have been trying to find this in the documentation and list archives but without succ

Re: How to count composed characters in NSString?

2008-09-28 Thread Michael Gardner
On Sep 28, 2008, at 1:17 PM, David Niemeijer wrote: Michael, On 28 sep 2008, at 14:41, Michael Gardner wrote: Upon further investigation, I may be wrong. I based my assertion upon Apple's NSString documentation ("Returns the number of Unicode characters in the receiver")

-draggingEntered: never gets called

2008-05-05 Thread Michael Gardner
I'm trying to implement drag & drop in an NSView subclass. I made sure that the source returns NSDragOperationMove in - draggingSourceOperationMaskForLocal:, and that the destination calls - registerForDraggedTypes: with the same (custom) type that the source uses for the drag operation. Th

Re: -draggingEntered: never gets called

2008-05-05 Thread Michael Gardner
Loc offset: NSZeroSize event: event pasteboard: pboard source: self slideBack: YES]; -Michael On May 5, 2008, at 4:25 PM, Stéphane Sudre wrote: On May 5, 2008, at 11:02 PM, Michael Gardner wrote: I'm trying to implement drag & drop in an NSView subclass. I made sure that

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
7;t be any interference from that side of things. As far as I can tell, this looks to be a bug in Cocoa's DnD code, or at least a caveat that should be mentioned in the documentation... -Michael On May 5, 2008, at 4:02 PM, Michael Gardner wrote: I'm trying to implement drag & drop

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
My actual init method has a different signature, and calls - initWithFrame: on its superclass. I was trying to abstract away extra details, but I shouldn't have made it look like an actual method signature. Sorry about that. -Michael On May 6, 2008, at 9:34 AM, I. Savant wrote: With help

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
2008, at 10:14 AM, I. Savant wrote: On Tue, May 6, 2008 at 10:44 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: My actual init method has a different signature, and calls - initWithFrame: on its superclass. I was trying to abstract away extra details, but I shouldn't have made it look

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
On May 6, 2008, at 10:47 AM, I. Savant wrote: On Tue, May 6, 2008 at 11:34 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: Upon further investigation, I've found that if I call -registerForDraggedTypes: before adding the view to its parent window with -setContentView:, I ne

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
t 10:44 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: My actual init method has a different signature, and calls - initWithFrame: on its superclass. I was trying to abstract away extra details, but I shouldn't have made it look like an actual method signature. Sorry about that. IB

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
hich probably do assume that things are fully constructed. G. On 7 May 2008, at 1:34 am, Michael Gardner wrote: Upon further investigation, I've found that if I call - registerForDraggedTypes: before adding the view to its parent window with -setContentView:, I never get the -draggingEntered:

Re: -draggingEntered: never gets called [SOLVED]

2008-05-07 Thread Michael Gardner
4:02 PM, Michael Gardner wrote: I'm trying to implement drag & drop in an NSView subclass. I made sure that the source returns NSDragOperationMove in - draggingSourceOperationMaskForLocal:, and that the destination calls -registerForDraggedTypes: with the same (custom) type that the

NSStream blocking behavior?

2008-05-07 Thread Michael Gardner
Are there any guarantees about blocking behavior for NSInputStream and NSOutputStream? For example, if I receive an NSStreamEventHasSpaceAvailable for an NSOutputStream, how many bytes can I write without blocking? It doesn't seem safe to do I/O in the main thread if there are no such guara

Re: NSStream blocking behavior?

2008-05-08 Thread Michael Gardner
Okay, then next question: what will happen if I call -write:maxLength: on an NSOutputStream without having received a NSStreamEventHasSpaceAvailable event? Is is guaranteed to block until it has written at least one byte (assuming we're not dealing with a fixed-length stream that has reache

Re: Anyone used btlsocket framework?

2008-05-10 Thread Michael Gardner
I've used SmallSockets (http://smallsockets.sourceforge.net/) in a small project, with good results. It doesn't do run loop events, but in my opinion it's better to just use threads with blocking I/O anyway. -Michael On May 10, 2008, at 2:11 PM, Jens Alfke wrote: On 10 May '08, at 11:59 A

Re: NSStream blocking behavior?

2008-05-10 Thread Michael Gardner
ing writes -Use -performSelector:onThread:withObject:waitUntilDone: to pass data to/from the main thread -Michael On May 8, 2008, at 12:00 PM, Michael Gardner wrote: Okay, then next question: what will happen if I call - write:maxLength: on an NSOutputStream without having received a NSStreamEventHa

Re: [OT] How do people use and contribute to this list?

2008-10-20 Thread Michael Gardner
On Oct 19, 2008, at 10:18 PM, Scott Ribe wrote: The "view unread only" option is the reason I haven't switched to Mail and still use Entourage. You know you can sort by unread status by clicking on the 'unread' column in Mail, right? It's not exactly the same, but it works well for me.