blocks and id

2012-12-12 Thread Andreas Grosam
How can I check at runtime whether an object (id) is actually a block, and not another kind of object? Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: blocks and id

2012-12-12 Thread Charles Srstka
On Dec 12, 2012, at 3:03 AM, Andreas Grosam agro...@onlinehome.de wrote: How can I check at runtime whether an object (id) is actually a block, and not another kind of object? I don't think there's any good way of doing that right now. You could check the class of the block, but since the

Re: blocks and id

2012-12-12 Thread Andreas Grosam
On 12.12.2012, at 10:19, Charles Srstka wrote: On Dec 12, 2012, at 3:03 AM, Andreas Grosam agro...@onlinehome.de wrote: How can I check at runtime whether an object (id) is actually a block, and not another kind of object? I don't think there's any good way of doing that right now. You

iOS: failed to attach drawable storage

2012-12-12 Thread Gerriet M. Denkmann
An iOS app which compiled and build and run in May (probably iOS 5) now creates the following messages when running in iPhone or iPad Simulator Version 6.0 (358.4): -[AppDelegate application:didFinishLaunchingWithOptions:] start -[MapViewController viewDidLoad] start

Re: blocks and id

2012-12-12 Thread jonat...@mugginsoft.com
On 12 Dec 2012, at 09:57, Andreas Grosam agro...@onlinehome.de wrote: On 12.12.2012, at 10:19, Charles Srstka wrote: On Dec 12, 2012, at 3:03 AM, Andreas Grosam agro...@onlinehome.de wrote: How can I check at runtime whether an object (id) is actually a block, and not another kind of

Re: blocks and id

2012-12-12 Thread Andreas Grosam
On 12.12.2012, at 12:36, jonat...@mugginsoft.com wrote: You could perhaps make this a little less fragile. typedef void (^MyBlockType)(void); // we know this is a block void (^isaBlock)(void) = ^(void) {}; MyBlockType aBlock = ^(void) {NSLog(@I am a block);}; id qua

Re: blocks and id

2012-12-12 Thread Gwynne Raskind
On Dec 12, 2012, at 6:36 AM, jonat...@mugginsoft.com wrote: On 12 Dec 2012, at 09:57, Andreas Grosam agro...@onlinehome.de wrote: On 12.12.2012, at 10:19, Charles Srstka wrote: On Dec 12, 2012, at 3:03 AM, Andreas Grosam agro...@onlinehome.de wrote: How can I check at runtime whether an

Re: blocks and id

2012-12-12 Thread Mike Abdullah
On 12 Dec 2012, at 09:57, Andreas Grosam wrote: On 12.12.2012, at 10:19, Charles Srstka wrote: On Dec 12, 2012, at 3:03 AM, Andreas Grosam agro...@onlinehome.de wrote: How can I check at runtime whether an object (id) is actually a block, and not another kind of object? I don't

Re: blocks and id

2012-12-12 Thread Andreas Grosam
On 12.12.2012, at 13:02, Mike Abdullah wrote: On 12 Dec 2012, at 09:57, Andreas Grosam wrote: Why does your code care if some unknown object is a block? This is a strong sign of a bad design. Oh, then a lot of common Cocoa patters like dug typing and the usage -respondsToSelector:,

Re: blocks and id

2012-12-12 Thread Mike Abdullah
On 12 Dec 2012, at 13:24, Andreas Grosam wrote: On 12.12.2012, at 13:02, Mike Abdullah wrote: On 12 Dec 2012, at 09:57, Andreas Grosam wrote: Why does your code care if some unknown object is a block? This is a strong sign of a bad design. Oh, then a lot of common Cocoa patters

Re: blocks and id

2012-12-12 Thread Jean Suisse
On 12 déc. 2012, at 13:02, Mike Abdullah cocoa...@mikeabdullah.net wrote: Why does your code care if some unknown object is a block? This is a strong sign of a bad design. As far as I am concerned, I can think of at least two or three legitimate reasons to care wether an unidentified object

Cocoaheads Lake Forest Meets Tonight (really, this time)

2012-12-12 Thread Scott Ellsworth
As promised last week, Stuart Cracraft will be discussing Massive data mining on a MacBook Air. CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630

NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
Very basic question: When I have an NSScrollView, when I resize the window (which resizes the NSScrollView), the NSScrollView's documentView (my NSView subclass) gets resized. I didn't expect that to happen. I thought the documentView's size would remain constant and the scrollbars would

Re: NSScrollView's document view resizing?

2012-12-12 Thread Kyle Sluder
On Dec 12, 2012, at 9:23 AM, Todd Heberlein todd_heberl...@mac.com wrote: Very basic question: When I have an NSScrollView, when I resize the window (which resizes the NSScrollView), the NSScrollView's documentView (my NSView subclass) gets resized. I didn't expect that to happen. I

Re: NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
On Dec 12, 2012, at 9:31 AM, Kyle Sluder k...@ksluder.com wrote: What's the autoresizing mask on your document view? Even though your document view is the subview of a scroll view, it still gets -resizeWithOldSuperviewSize: as normal. If your autoresizing mask had the width- or

Re: NSScrollView's document view resizing?

2012-12-12 Thread Kyle Sluder
On Wed, Dec 12, 2012, at 11:44 AM, Todd Heberlein wrote: On Dec 12, 2012, at 9:31 AM, Kyle Sluder k...@ksluder.com wrote: What's the autoresizing mask on your document view? Even though your document view is the subview of a scroll view, it still gets -resizeWithOldSuperviewSize: as

Re: NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
On Dec 12, 2012, at 12:11 PM, Kyle Sluder k...@ksluder.com wrote: Why not just set the autoresizing mask in IB? I confess, I tried to look for it but could not find it. I don't know if it is there and I just wasn't bright enough to figure it out, or if it simply isn't there. If it's

Re: NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
On Dec 12, 2012, at 12:11 PM, Kyle Sluder k...@ksluder.com wrote: There is a workaround, though: instead of dragging out a Scroll View from the Object Library, drag out a Custom View and choose Editor Embed In Scroll View. Yes, I get two different results depending on how I created a

Re: blocks and id

2012-12-12 Thread Mike Abdullah
On 12 Dec 2012, at 14:14, Jean Suisse wrote: On 12 déc. 2012, at 13:02, Mike Abdullah cocoa...@mikeabdullah.net wrote: Why does your code care if some unknown object is a block? This is a strong sign of a bad design. As far as I am concerned, I can think of at least two or three

Re: blocks and id

2012-12-12 Thread Jens Alfke
On Dec 12, 2012, at 5:24 AM, Andreas Grosam agro...@onlinehome.de wrote: And, it can be a block as well, where the block is responsible to feed the consumer (the idRXMultipartFormdataPart) with data when it has bytes available when the request is active. You can do this with the same

Re: split views, best practices for 10.8?

2012-12-12 Thread Chuck Soper
Your message helps a lot. Yesterday, I finally got it working. I had been trying to load a custom view with constraints from a nib file into the cell of an NSTableView which was inside an NSSplitView. By isolating the constraints in my custom view, I discovered the errors I was making. That is, I

Re: clarification about document type extensions

2012-12-12 Thread Rick C.
Thank you very much for the replies it's most helpful... On Dec 11, 2012, at 4:50 AM, Charles Srstka cocoa...@charlessoft.com wrote: On Dec 10, 2012, at 11:44 AM, Sean McBride s...@rogue-research.com wrote: On Mon, 10 Dec 2012 18:33:00 +0800, Rick C. said: Hoping for some clarification

Re: iOS: failed to attach drawable storage

2012-12-12 Thread Gerriet M. Denkmann
On 12 Dec 2012, at 20:51, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: An iOS app which compiled and build and run in May (probably iOS 5) now creates the following messages when running in iPhone or iPad Simulator Version 6.0 (358.4): -[AppDelegate

URL Request from AppDelegate?

2012-12-12 Thread berry hunt
Hi gurus, I am pretty new to cocoa development, and would like to ask for help on some questions here that I am struggling with. Any insight will be greatly appreciated. I am trying to establish Facebook login session via my mobile app, but got an error of following message *Error: HTTP status

NSView image corruption when dragging from scaled view

2012-12-12 Thread Clay Heaton
I'm trying to implement dragging of a subclass of NSView, to copy an NSImage to the pasteboard so that it can be dragged into other applications (Pages, Mail, etc.). It works as expected until I resize the NSView's parent window (which resizes the NSView -- it always remains square). Once

Re: URL Request from AppDelegate?

2012-12-12 Thread Nick Zitzmann
On Dec 12, 2012, at 6:22 PM, berry hunt berryhun...@gmail.com wrote: - where in the AppDelegate class would a URL be sent, to somewhere? How do I track it down? Try breaking on -[NSURLConnection initWithRequest:delegate:] and -[NSURLConnection initWithRequest:delegate:startImmediately:]. The