providesPresentationContextTransitionStyle busted?

2011-12-19 Thread Matt Neuburg
According to the docs:

> @property(nonatomic, assign) BOOL providesPresentationContextTransitionStyle
> Discussion
> If the value of this property is YES and the value of the 
> definesPresentationContext property is YES, then the modal transition style 
> of the presenting view controller is used. Otherwise, the modal transition 
> style of the presented view controller’s modal transition style is used.

So I tried it and it doesn't work. I simply used Xcode's built-in Utility 
Application template, which presents and dismisses a modal view right out of 
the box:

- (IBAction)showInfo:(id)sender
{
FlipsideViewController *controller = [[FlipsideViewController alloc] 
initWithNibName:@"FlipsideViewController" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
// here are my additions
self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; // *
self.providesPresentationContextTransitionStyle = YES; // *
self.definesPresentationContext = YES; // *
[self presentModalViewController:controller animated:YES];
}

The three marked lines are my only change to the template. I am doing exactly 
what the docs say to do. But it isn't working, or rather it's working in a very 
lame and partial way: the transition is flip horizontal when the modal view is 
shown, but it is cross dissolve when the modal view is dismissed. Other 
combinations of the presented modal view controller's transition style and the 
presenting modal view controller's transition style get even weirder and can 
even cause the app to crash.

What most amazes me is that I can't find anyone else complaining about this 
online. Hence this note. Either I'm doing this totally wrong or the docs are 
describing it incorrectly or no one in the world has actually tried this except 
me! Thx - m.

--
matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


___

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: Unknow CF Error

2011-12-19 Thread Ben
I have also been getting this logged and can add more information, though no 
solution.

The actual sandbox message is as follows:
sandboxd: ([pid]) MyApp(28087) deny file-issue-extension /path/to/myapp.app

It occurs when I begin a drag of my own app bundle from a view within my app. 
i.e., drag from this view and my apps bundle is given as the dragged file path.

Is your app doing something similar?

- Ben



On 17 Dec 2011, at 04:20, koko wrote:

> NOTE: I misposted this to xcode, I ma not trying to cross post.
> 
> 
> I  get this error in the console when running my program:
> 
> __CFPasteboardIssueSandboxExtensionForPath: error for [  filename  ]
> 
> The program functions properly.
> 
> I have searched but found no relevant information.
> 
> There are no sandboxing or entitlement flags set in the project.
> 
> Where should I be looking?
> 
> -koko
> 
___

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: Unknow CF Error

2011-12-19 Thread koko
I read data from a memory card in a USB device.

I give the data a file name "file-xx".

My "file" is displayed in an IKImageBrowserView.

The file name "file-xx" is returned to the IKImageBrowserView via the imageUID 
method of the IKImageBrowserItem Protocol.

Here is where the error arises.

-koko



On Dec 19, 2011, at 1:44 PM, Ben wrote:

> I have also been getting this logged and can add more information, though no 
> solution.
> 
> The actual sandbox message is as follows:
> sandboxd: ([pid]) MyApp(28087) deny file-issue-extension /path/to/myapp.app
> 
> It occurs when I begin a drag of my own app bundle from a view within my app. 
> i.e., drag from this view and my apps bundle is given as the dragged file 
> path.
> 
> Is your app doing something similar?
> 
> - Ben
> 
> 
> 
> On 17 Dec 2011, at 04:20, koko wrote:
> 
>> NOTE: I misposted this to xcode, I ma not trying to cross post.
>> 
>> 
>> I  get this error in the console when running my program:
>> 
>> __CFPasteboardIssueSandboxExtensionForPath: error for [  filename  ]
>> 
>> The program functions properly.
>> 
>> I have searched but found no relevant information.
>> 
>> There are no sandboxing or entitlement flags set in the project.
>> 
>> Where should I be looking?
>> 
>> -koko
>> 
> 

___

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


presentingViewController docs patently false

2011-12-19 Thread Matt Neuburg
The docs say:

> @property(nonatomic, readonly) UIViewController *presentingViewController
> Discussion
> The default implementation of this property walks up the view hierarchy, 
> starting from this view controller. The first view controller it finds that 
> received the presentViewController:animated:completion: method, or that has 
> its definesPresentationContext property set to YES is returned as the value 
> of the property. It keeps walking up the hierarchy until it finds a value to 
> return or it gets to the root view controller.

Oh, yeah? Watch this:

self.definesPresentationContext = YES;
self.parentViewController.definesPresentationContext = YES;
NSLog(@"%i %i", self.definesPresentationContext, 
self.parentViewController.definesPresentationContext);
// 1 1
NSLog(@"%@", self.presentingViewController);
// null

So both self and its parent do in fact have their definesPresentationContext 
property set to YES, and yet neither is being returned as the value of the 
property. I rest my case. Maybe the docs are talking here about some very 
specific situation where what's claimed is correct, but then they should say 
what that situation is. I've been looking for it all day and haven't found 
it... m.

--
matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


___

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: presentingViewController docs patently false

2011-12-19 Thread Kyle Sluder
On Mon, Dec 19, 2011 at 3:55 PM, Matt Neuburg  wrote:
> So both self and its parent do in fact have their definesPresentationContext 
> property set to YES, and yet neither is being returned as the value of the 
> property. I rest my case. Maybe the docs are talking here about some very 
> specific situation where what's claimed is correct, but then they should say 
> what that situation is. I've been looking for it all day and haven't found 
> it... m.

I trust you've filed a Radar?

And you might find this article relevant:
http://toxicsoftware.com/uistoryboard-issues/

I've already given up on storyboards. They're not done yet.

--Kyle Sluder
___

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: presentingViewController docs patently false

2011-12-19 Thread Matt Neuburg

On Dec 19, 2011, at 4:05 PM, Kyle Sluder wrote:

> On Mon, Dec 19, 2011 at 3:55 PM, Matt Neuburg  wrote:
>> So both self and its parent do in fact have their definesPresentationContext 
>> property set to YES, and yet neither is being returned as the value of the 
>> property. I rest my case. Maybe the docs are talking here about some very 
>> specific situation where what's claimed is correct, but then they should say 
>> what that situation is. I've been looking for it all day and haven't found 
>> it... m.
> 
> I trust you've filed a Radar?

Well, that's another thing - I haven't been able to summon the bugreporter Web 
page in days.

> And you might find this article relevant:
> http://toxicsoftware.com/uistoryboard-issues/
> 
> I've already given up on storyboards. They're not done yet.

And they've been oversold. Thanks for the ref to that article - it comes at 
just the right moment. m.___

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


NSURLConnection using setDelegateQueue deadlocks

2011-12-19 Thread Michael Link
Is there some trick to getting NSURLConnection to work with an NSOperationQueue 
on iOS 5, and perhaps Lion but I haven't tried it there? It seems that it 
causes a deadlock every time just after the last delegate message has been sent 
(connectionDidFinishLoading:). The project is using ARC.

The connection is setup like this:

_connection = [[NSURLConnection alloc] initWithRequest:request delegate:self 
startImmediately:NO];
[_connection setDelegateQueue:_queue];
[_connection start];

The operation queue used is setup in this category method of NSOperationQueue

+ (NSOperationQueue*)URLConnectionQueue
{
static NSOperationQueue* _S_operationQueue;
static dispatch_once_t _S_once;

dispatch_once(&_S_once, ^{
_S_operationQueue = [[NSOperationQueue alloc] init];
_S_operationQueue.name = 
@"com.falkor.URLConnectionQueuedLoading";
});

return _S_operationQueue;
}

The connection runs and finishes sending the connectionDidFinishLoading: 
message and then deadlocks on the thread that created it. Interestingly enough 
it appears that a runloop is still required to even start the connection when 
it's setup to use a NSOperationQueue for the delegate messages otherwise the 
connection is never started.

Thread 7 (process 22301):
#0  0x960f8b42 in select$DARWIN_EXTSN ()
#1  0x017107fb in __CFSocketManager ()
#2  0x97e9fed9 in _pthread_start ()
#3  0x97ea36de in thread_start ()

Thread 6 (process 22301):
#0  0x960f6c22 in mach_msg_trap ()
#1  0x960f61f6 in mach_msg ()
#2  0x0177c13a in __CFRunLoopServiceMachPort ()
#3  0x016df605 in __CFRunLoopRun ()
#4  0x016dedb4 in CFRunLoopRunSpecific ()
#5  0x016deccb in CFRunLoopRunInMode ()
#6  0x00e2de40 in +[NSURLConnection(Loader) _resourceLoadLoop:] ()
#7  0x00d3f4e6 in -[NSThread main] ()
#8  0x00d3f457 in __NSThread__main__ ()
#9  0x97e9fed9 in _pthread_start ()
#10 0x97ea36de in thread_start ()

Thread 5 (process 22301):
#0  0x960f8876 in __psynch_mutexwait ()
#1  0x97e9e6af in pthread_mutex_lock ()
#2  0x0216b7e1 in URLConnectionClient::cancelConnection ()
#3  0x0209cc0c in URLConnection::cancel ()
#4  0x0209cbf2 in CFURLConnectionCancel ()
#5  0x00e2fdca in -[NSURLConnectionInternalConnection _invalidate] ()
#6  0x00e2ed10 in __66-[NSURLConnectionInternal 
_withConnectionDisconnectFromConnection]_block_invoke_0 ()
#7  0x00e2ee94 in __65-[NSURLConnectionInternal 
_withConnectionAndDelegate:onlyActive:]_block_invoke_0 ()
#8  0x00d6b64e in -[NSBlockOperation main] ()
#9  0x00d641f7 in -[__NSOperationInternal start] ()
#10 0x00d63efa in -[NSOperation start] ()
#11 0x00df40bd in __block_global_6 ()
#12 0x02487445 in _dispatch_call_block_and_release ()
#13 0x024884e6 in _dispatch_worker_thread2 ()
#14 0x97ea1b24 in _pthread_wqthread ()
#15 0x97ea36fe in start_wqthread ()

Thread 4 (process 22301):
#0  0x960f6c22 in mach_msg_trap ()
#1  0x960f61f6 in mach_msg ()
#2  0x0177c13a in __CFRunLoopServiceMachPort ()
#3  0x016df605 in __CFRunLoopRun ()
#4  0x016dedb4 in CFRunLoopRunSpecific ()
#5  0x016deccb in CFRunLoopRunInMode ()
#6  0x057cd220 in RunWebThread ()
#7  0x97e9fed9 in _pthread_start ()
#8  0x97ea36de in thread_start ()

Thread 3 (process 22301):
#0  0x960f883e in __psynch_cvwait ()
#1  0x97ea3e21 in _pthread_cond_wait ()
#2  0x97e5442c in pthread_cond_wait$UNIX2003 ()
#3  0x00d7a8fc in -[__NSOperationInternal waitUntilFinished] ()
#4  0x00d7a85e in -[NSOperation waitUntilFinished] ()
#5  0x00e2ff0e in -[NSURLConnectionInternalConnection invokeForDelegate:] ()
#6  0x00e2ee4f in -[NSURLConnectionInternal 
_withConnectionAndDelegate:onlyActive:] ()
#7  0x00e2ecb0 in -[NSURLConnectionInternal 
_withConnectionDisconnectFromConnection] ()
#8  0x00d73fe2 in _NSURLConnectionReleaseClient ()
#9  0x0216b306 in URLConnectionClient::releaseClientLocked ()
#10 0x0209342d in URLConnectionClient::processEvents ()
#11 0x0216916b in non-virtual thunk to 
URLConnectionInstanceData::multiplexerClientPerform() ()
#12 0x02093137 in MultiplexerSource::perform ()
#13 0x0177c97f in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#14 0x016dfb73 in __CFRunLoopDoSources0 ()
#15 0x016df454 in __CFRunLoopRun ()
#16 0x016dedb4 in CFRunLoopRunSpecific ()
#17 0x016deccb in CFRunLoopRunInMode ()
#18 0x00d7341f in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#19 0xe723 in -[FBLoginOperation main] (self=0xfa19a90, _cmd=0x166971a) at 
LoginOperation.m:142
#20 0xe542 in -[FBLoginOperation start] (self=0xfa19a90, _cmd=0x6aadf8b) at 
LoginOperation.m:127
#21 0x00df40bd in __block_global_6 ()
#22 0x02487445 in _dispatch_call_block_and_release ()
#23 0x024884e6 in _dispatch_worker_thread2 ()
#24 0x97ea1b24 in _pthread_wqthread ()
#25 0x97ea36fe in start_wqthread ()

Thread 2 (process 22301):
#0  0x960f990a in kevent ()
#1  0x02489373 in _dispatch_mgr_invoke ()
#2  0x02487cd0 in _dispatch_mgr_thread ()

Thread 1 (process 22301):
#0  0x960f6c22 in mach_msg_trap ()
#1  0x960f61f6 in mach_msg ()
#2  0x