Re: How to tell whether an executable supports GC?

2008-08-08 Thread André Pang
On 08/08/2008, at 3:18 PM, Chris Suter wrote: You want to look at the __image_info section in the __OBJC segment: struct objc_image_info { uint32_t version;// initially 0 uint32_t flags; }; #define OBJC_IMAGE_SUPPORTS_GC 2 #define OBJC_IMAGE_GC_ONLY 4 Thanks

Re: NSMultipleTextSelectionPboardType not working

2008-08-08 Thread André Pang
On 09/08/2008, at 4:02 AM, Douglas Davidson wrote: On Aug 7, 2008, at 9:06 PM, André Pang wrote: I'm trying to read some NSMultipleTextSelectionPboardType data off the pasteboard: You should not do this without reading the AppKit release notes. Ah, thanks for the tip Douglas! I've

NSMultipleTextSelectionPboardType not working

2008-08-07 Thread André Pang
Hi, I'm trying to read some NSMultipleTextSelectionPboardType data off the pasteboard: NSData* data = [pboard dataForType:NSMultipleTextSelectionPboardType]; I've verified that the pasteboard is holding the data using - [NSPasteboard availableTypeFromArray:], but I'm encountering two

How to tell whether an executable supports GC?

2008-08-07 Thread André Pang
Hi all, is there a reasonably easy way to programmatically determine whether a particular executable on-disk supports garbage collection? Cocoa methods aren't necessary; all C functions are welcome. Poking around in an executable's Mach-O headers is fine too, but I'm not sure what to

Setting NSObjectController's to file's owner

2008-05-15 Thread André Pang
Hi all, I have a nib file containing an NSObjectController. The NSObjectController's content is set to the File's Owner proxy object, and this creates a retain cycle. (The file's owner never gets deallocated because the object controller retains it, and the object controller never gets

Re: Setting NSObjectController's to file's owner

2008-05-15 Thread André Pang
On 15/05/2008, at 5:21 PM, André Pang wrote: I have a nib file containing an NSObjectController. The NSObjectController's content is set to the File's Owner proxy object, and this creates a retain cycle. (The file's owner never gets deallocated because the object controller retains