Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread 2551
No takers? 


> On 4 Nov 2015, at 22:19, 2551 <2551p...@gmail.com> wrote:
> 
> I have an OSX app built on 10.11.1, deployment target 10.9. The app builds 
> and runs without any AutoLayout issues or warnings from Xcode. I have 
> ambiguities turned on.
> 
> The problem is when I try to run the app on 10.9. Although the app will run 
> without fatally crashing, one of its main windows won’t open. In Console, on 
> launch I first see the message
> 
> 
> “Unable to create description in 
> descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil.”
> 
> 
> If I then try to open the window from a menu command, I get the stacktrace 
> (relevant part appended below). I see the ‘mutually exclusive’ error starting 
> at line 18 in the trace, but I’ve manually been through the constraints and 
> can’t see any conflicts. I’ve also removed all constraints and had Xcode do 
> “Add Missing Constraints” after that. Again, no AutoLayout errors on build, 
> but still the mutually exclusive exception occurs on 10.9.
> 
> Does anyone have any debugging tips as to how do I can find the source of the 
> problem when neither Xcode nor Console on my build machine make any 
> complaints?
> 
> 
> Best
> 
> 
> Phil
> 
> 
> 
> 
> 
>   0   CoreFoundation  0x7fff9497025c 
> __exceptionPreprocess + 172
> 
>   1   libobjc.A.dylib 0x7fff92de3e75 
> objc_exception_throw + 43
> 
>   2   CoreFoundation  0x7fff9497010c 
> +[NSException raise:format:] + 204
> 
>   3   Foundation  0x7fff8f98cc55 
> descriptionForLayoutAttribute_layoutItem_coefficient + 145
> 
>   4   Foundation  0x7fff8f98caaf 
> -[NSLayoutConstraint equationDescription] + 215
> 
>   5   Foundation  0x7fff8f98cf3e 
> -[NSLayoutConstraint description] + 298
> 
>   6   CoreFoundation  0x7fff949620e1 -[NSArray 
> descriptionWithLocale:indent:] + 481
> 
>   7   Foundation  0x7fff8f7517bb 
> _NSDescriptionWithLocaleFunc + 64
> 
>   8   CoreFoundation  0x7fff9485ece4 
> __CFStringAppendFormatCore + 7332
> 
>   9   CoreFoundation  0x7fff9488d263 
> _CFStringCreateWithFormatAndArgumentsAux + 115
> 
>   10  CoreFoundation  0x7fff948c4aeb _CFLogvEx + 
> 123
> 
>   11  Foundation  0x7fff8f77b32c NSLogv + 79
> 
>   12  Foundation  0x7fff8f77b2b8 NSLog + 148
> 
>   13  AppKit  0x7fff8f1dc194 
> -[NSView(NSConstraintBasedLayout) 
> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 114
> 
>   14  Foundation  0x7fff8f98713e -[NSISEngine 
> handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
>  + 507
> 
>   15  Foundation  0x7fff8f98789c -[NSISEngine 
> tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
>  + 379
> 
>   16  Foundation  0x7fff8f784e89 -[NSISEngine 
> tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:]
>  + 663
> 
>   17  Foundation  0x7fff8f98d897 
> -[NSLayoutConstraint 
> _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:]
>  + 285
> 
>   18  Foundation  0x7fff8f7792cf 
> -[NSLayoutConstraint 
> _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 204
> 
>   19  AppKit  0x7fff8e97520b 
> __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke_2 + 411
> 
>   20  Foundation  0x7fff8f7873aa -[NSISEngine 
> withBehaviors:performModifications:] + 119
> 
>   21  AppKit  0x7fff8e8d795c 
> -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] 
> + 66
> 
>   22  AppKit  0x7fff8e975049 
> __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke + 433
> 
>   23  AppKit  0x7fff8e8da4fa 
> -[NSView(NSConstraintBasedLayout) _setLayoutEngine:] + 229
> 
>   24  AppKit  0x7fff8e975122 
> __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke_2 + 178
> 
>   25  Foundation  0x7fff8f7873aa -[NSISEngine 
> withBehaviors:performModifications:] + 119
> 
>   26  AppKit  0x7fff8e8d795c 
> -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] 
> + 66
> 
>   27  AppKit   

How to run Spotlight Index Extension (iOS)?

2015-11-05 Thread Маша Качалова
I add a Spotlight Index Extension in my iOS app.
How can I run that extension?
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread Conrad Shultz

> On Nov 5, 2015, at 6:50 AM, 2551 <2551p...@gmail.com> wrote:
> 
>> or set a breakpoint on -[NSView(NSConstraintBasedLayout) 
>> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:].  
> 
> Not sure I’m still following along. Are we talking symbolic breakpoint here? 
> I tried that, but the app just builds and runs fine on 10.11.
> 
> 
>> Either way, select that frame of the stack.  Then, try to examine the third 
>> parameter, which seems like it would be the array of constraints.  
> 
> 
> Ken, this is beyond my ken. Sure, I know what frames and stacks are, but I 
> don’t understand where/how/when I’m supposed to be selecting these frames and 
> stacks in the debugger when no debug session appears in Xcode. Or are you 
> suggesting I export the project to my 10.9 install and run it from Xcode 
> there? In theory I could do that (I think there’s an old Xcode install on 
> that machine), but I’m not sure if the project will build if it was made in 
> 10.11, will it?

You can attach LLDB to a running application (or set it to attach-on-launch) 
and set breakpoints therein without needing to actually build.

-Conrad
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread David Duncan

> On Nov 5, 2015, at 2:37 PM, Carl Hoefs  wrote:
> 
> iOS 9.1, iPhone 5S, ObjC
> 
> I'm getting the following runtime warning due to multiple simultaneous 
> UIAlertControllers presenting at the same time:
> 
> Warning: Attempt to present  on 
>  which is already presenting 
> 
> 
> I know only one alert view controller can be presenting at a time, so the way 
> I thought to serialize execution of each -presentViewController:: is:
> 
>dispatch_async( dispatch_get_main_queue(), ^{
>[ self presentViewController: alert 
>animated: YES 
>  completion: nil ];
>});
> 
> Why isn't dispatch_get_main_queue() enforcing serialized execution?

It does enforce serialized execution, but that doesn’t help if what you are 
asking for is effectively asynchronous as well (you just get your requests 
issued in a serialized fashion).

> Is there another way to do this?

The completion handler on -presentedViewController:animated:completion: 
notifies you when the presentation is complete and it is safe to present 
another view controller.

> -Carl
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
> 
> This email sent to david.dun...@apple.com

--
David Duncan


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

showing a web view with a certain amount of links

2015-11-05 Thread Scott Berry
> 
> 
> I am building a program that requires me to look at airports.  I have a site 
> that one can browse by US State and a link for other countries.  I’d like 
> these links to show first.  Then people can pick the airports they are most 
> likely to use.  I don’t really want to display the whole web page if I don’t 
> have to.  I just want to show the airports by state and country.  When the 
> page comes up after you hit either Brows US States or Countries it gives a 
> list of airports.  I’d like to download those in to some sort of database the 
> first time so that I don’t have to grab this list off the web site except for 
> a couple of times a year just to ensure there are no new airports.  I 
> restarted my program in Swift.  If there are any ideas could someone please 
> pass them along?

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
iOS 9.1, iPhone 5S, ObjC

I'm getting the following runtime warning due to multiple simultaneous 
UIAlertControllers presenting at the same time:

Warning: Attempt to present  on 
 which is already presenting 

I know only one alert view controller can be presenting at a time, so the way I 
thought to serialize execution of each -presentViewController:: is:

dispatch_async( dispatch_get_main_queue(), ^{
[ self presentViewController: alert 
animated: YES 
  completion: nil ];
});

Why isn't dispatch_get_main_queue() enforcing serialized execution? Is there 
another way to do this?
-Carl


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Eric E Dolecki
That's the way. You should never need more than one presented at a time. 

Sent from my iP6+

> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński  wrote:
> 
> You should present next UIAlertController when first one has been dismissed 
> (when UIAlertAction handler is called).
> 
> Tomek
> 
>> Wiadomość napisana przez Carl Hoefs  w dniu 
>> 05.11.2015, o godz. 23:37:
>> 
>> iOS 9.1, iPhone 5S, ObjC
>> 
>> I'm getting the following runtime warning due to multiple simultaneous 
>> UIAlertControllers presenting at the same time:
>> 
>> Warning: Attempt to present  on 
>>  which is already presenting 
>> 
>> 
>> I know only one alert view controller can be presenting at a time, so the 
>> way I thought to serialize execution of each -presentViewController:: is:
>> 
>>   dispatch_async( dispatch_get_main_queue(), ^{
>>   [ self presentViewController: alert 
>>   animated: YES 
>> completion: nil ];
>>   });
>> 
>> Why isn't dispatch_get_main_queue() enforcing serialized execution? Is there 
>> another way to do this?
>> -Carl
>> 
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>> 
>> This email sent to t...@union.waw.pl
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
> 
> This email sent to edole...@gmail.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
I don't want more than 1 alert presented at a time, of course, but they get 
generated asynchronously. I thought dispatch_get_main_queue() would nicely 
serialize any that occur. Thus David's comment that I'm just getting the 
requests issued in a serialized fashion. 

I'm not certain how to have alerts that are scattered all throughout the app to 
wait until some other alert's completion block executes. Are you saying to have 
it control a global flag or some such?
-Carl

> On Nov 5, 2015, at 3:53 PM, Eric E Dolecki  wrote:
> 
> That's the way. You should never need more than one presented at a time. 
> 
> Sent from my iP6+
> 
>> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński  wrote:
>> 
>> You should present next UIAlertController when first one has been dismissed 
>> (when UIAlertAction handler is called).
>> 
>> Tomek
>> 
>>> Wiadomość napisana przez Carl Hoefs  w dniu 
>>> 05.11.2015, o godz. 23:37:
>>> 
>>> iOS 9.1, iPhone 5S, ObjC
>>> 
>>> I'm getting the following runtime warning due to multiple simultaneous 
>>> UIAlertControllers presenting at the same time:
>>> 
>>> Warning: Attempt to present  on 
>>>  which is already presenting 
>>> 
>>> 
>>> I know only one alert view controller can be presenting at a time, so the 
>>> way I thought to serialize execution of each -presentViewController:: is:
>>> 
>>>  dispatch_async( dispatch_get_main_queue(), ^{
>>>  [ self presentViewController: alert 
>>>  animated: YES 
>>>completion: nil ];
>>>  });
>>> 
>>> Why isn't dispatch_get_main_queue() enforcing serialized execution? Is 
>>> there another way to do this?
>>> -Carl
>>> 
>>> 
>>> ___
>>> 
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>>> 
>>> This email sent to t...@union.waw.pl
>> 
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
>> 
>> This email sent to edole...@gmail.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:
> https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
> 
> This email sent to newsli...@autonomy.caltech.edu


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
A queue of what? I would think that if only a single alert view can be
presented at a time, then iOS would serialize them and present them when
earlier ones complete. Is there no system-level solution to this?
-Carl


> Make a queue.
>
> Sent from my iPhone
>
>> On Nov 5, 2015, at 6:10 PM, Carl Hoefs 
>> wrote:
>>
>> I don't want more than 1 alert presented at a time, of course, but they
>> get generated asynchronously. I thought dispatch_get_main_queue() would
>> nicely serialize any that occur. Thus David's comment that I'm just
>> getting the requests issued in a serialized fashion.
>>
>> I'm not certain how to have alerts that are scattered all throughout the
>> app to wait until some other alert's completion block executes. Are you
>> saying to have it control a global flag or some such?
>> -Carl
>>
>>> On Nov 5, 2015, at 3:53 PM, Eric E Dolecki  wrote:
>>>
>>> That's the way. You should never need more than one presented at a
>>> time.
>>>
>>> Sent from my iP6+
>>>
 On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński 
 wrote:

 You should present next UIAlertController when first one has been
 dismissed (when UIAlertAction handler is called).

 Tomek

> Wiadomość napisana przez Carl Hoefs
>  w dniu 05.11.2015, o godz. 23:37:
>
> iOS 9.1, iPhone 5S, ObjC
>
> I'm getting the following runtime warning due to multiple
> simultaneous UIAlertControllers presenting at the same time:
>
> Warning: Attempt to present  on
>  which is already presenting
> 
>
> I know only one alert view controller can be presenting at a time, so
> the way I thought to serialize execution of each
> -presentViewController:: is:
>
> dispatch_async( dispatch_get_main_queue(), ^{
> [ self presentViewController: alert
> animated: YES
>   completion: nil ];
> });
>
> Why isn't dispatch_get_main_queue() enforcing serialized execution?
> Is there another way to do this?
> -Carl
>
>
> ___
>
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>
> This email sent to t...@union.waw.pl


 ___

 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:
 https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com

 This email sent to edole...@gmail.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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
>>>
>>> This email sent to newsli...@autonomy.caltech.edu
>>
>>
>> ___
>>
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>>
>> This email sent to z...@mac.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: -clickedRow

2015-11-05 Thread Jens Alfke

> On Nov 5, 2015, at 12:35 PM, Raglan T. Tiger  wrote:
> 
> In -rightMouseDown I call [self clickedRow] which always returns -1 in a row 
> or not in row

Yeah, you’re getting control before the base class has had a chance to set the 
clickedRow property. (Have you tried calling the superclass method first? That 
might help.)

> What should I be doing to get the clicked row?

Convert the position to local coords, then call -rowAtPoint:.

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Tomasz Muszyński
You should present next UIAlertController when first one has been dismissed 
(when UIAlertAction handler is called).

Tomek

> Wiadomość napisana przez Carl Hoefs  w dniu 
> 05.11.2015, o godz. 23:37:
> 
> iOS 9.1, iPhone 5S, ObjC
> 
> I'm getting the following runtime warning due to multiple simultaneous 
> UIAlertControllers presenting at the same time:
> 
> Warning: Attempt to present  on 
>  which is already presenting 
> 
> 
> I know only one alert view controller can be presenting at a time, so the way 
> I thought to serialize execution of each -presentViewController:: is:
> 
>dispatch_async( dispatch_get_main_queue(), ^{
>[ self presentViewController: alert 
>animated: YES 
>  completion: nil ];
>});
> 
> Why isn't dispatch_get_main_queue() enforcing serialized execution? Is there 
> another way to do this?
> -Carl
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
> 
> This email sent to t...@union.waw.pl


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Alex Zavatone
Make a queue.

Sent from my iPhone

> On Nov 5, 2015, at 6:10 PM, Carl Hoefs  wrote:
> 
> I don't want more than 1 alert presented at a time, of course, but they get 
> generated asynchronously. I thought dispatch_get_main_queue() would nicely 
> serialize any that occur. Thus David's comment that I'm just getting the 
> requests issued in a serialized fashion. 
> 
> I'm not certain how to have alerts that are scattered all throughout the app 
> to wait until some other alert's completion block executes. Are you saying to 
> have it control a global flag or some such?
> -Carl
> 
>> On Nov 5, 2015, at 3:53 PM, Eric E Dolecki  wrote:
>> 
>> That's the way. You should never need more than one presented at a time. 
>> 
>> Sent from my iP6+
>> 
>>> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński  wrote:
>>> 
>>> You should present next UIAlertController when first one has been dismissed 
>>> (when UIAlertAction handler is called).
>>> 
>>> Tomek
>>> 
 Wiadomość napisana przez Carl Hoefs  w 
 dniu 05.11.2015, o godz. 23:37:
 
 iOS 9.1, iPhone 5S, ObjC
 
 I'm getting the following runtime warning due to multiple simultaneous 
 UIAlertControllers presenting at the same time:
 
 Warning: Attempt to present  on 
  which is already presenting 
 
 
 I know only one alert view controller can be presenting at a time, so the 
 way I thought to serialize execution of each -presentViewController:: is:
 
 dispatch_async( dispatch_get_main_queue(), ^{
 [ self presentViewController: alert 
 animated: YES 
   completion: nil ];
 });
 
 Why isn't dispatch_get_main_queue() enforcing serialized execution? Is 
 there another way to do this?
 -Carl
 
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
 
 This email sent to t...@union.waw.pl
>>> 
>>> 
>>> ___
>>> 
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
>>> 
>>> This email sent to edole...@gmail.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:
>> https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
>> 
>> This email sent to newsli...@autonomy.caltech.edu
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
Thanks for the tip, I'll look into it.

(As a general thought, though, it would appear that UIAlertController
should be a singleton app-wide, and it should manage its own serialized
presentation. Any other solution seems like external plumbing to fix a
design problem.)
-Carl

> Pretty sure the WWDC 2015 video on NSOperations tackles a similar scenario
> in a quite elegant way. That might be worth investigating.
>
> Peter
>
>> On Nov 5, 2015, at 6:42 PM, Carl Hoefs 
>> wrote:
>>
>> A queue of what? I would think that if only a single alert view can be
>> presented at a time, then iOS would serialize them and present them when
>> earlier ones complete. Is there no system-level solution to this?
>> -Carl
>>
>>
>>> Make a queue.
>>>
>>> Sent from my iPhone
>>>
 On Nov 5, 2015, at 6:10 PM, Carl Hoefs
 
 wrote:

 I don't want more than 1 alert presented at a time, of course, but
 they
 get generated asynchronously. I thought dispatch_get_main_queue()
 would
 nicely serialize any that occur. Thus David's comment that I'm just
 getting the requests issued in a serialized fashion.

 I'm not certain how to have alerts that are scattered all throughout
 the
 app to wait until some other alert's completion block executes. Are
 you
 saying to have it control a global flag or some such?
 -Carl

> On Nov 5, 2015, at 3:53 PM, Eric E Dolecki 
> wrote:
>
> That's the way. You should never need more than one presented at a
> time.
>
> Sent from my iP6+
>
>> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński 
>> wrote:
>>
>> You should present next UIAlertController when first one has been
>> dismissed (when UIAlertAction handler is called).
>>
>> Tomek
>>
>>> Wiadomość napisana przez Carl Hoefs
>>>  w dniu 05.11.2015, o godz. 23:37:
>>>
>>> iOS 9.1, iPhone 5S, ObjC
>>>
>>> I'm getting the following runtime warning due to multiple
>>> simultaneous UIAlertControllers presenting at the same time:
>>>
>>> Warning: Attempt to present  on
>>>  which is already presenting
>>> 
>>>
>>> I know only one alert view controller can be presenting at a time,
>>> so
>>> the way I thought to serialize execution of each
>>> -presentViewController:: is:
>>>
>>>dispatch_async( dispatch_get_main_queue(), ^{
>>>[ self presentViewController: alert
>>>animated: YES
>>>  completion: nil ];
>>>});
>>>
>>> Why isn't dispatch_get_main_queue() enforcing serialized execution?
>>> Is there another way to do this?
>>> -Carl
>>>
>>>
>>> ___
>>>
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>>>
>>> This email sent to t...@union.waw.pl
>>
>>
>> ___
>>
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
>>
>> This email sent to edole...@gmail.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:
> https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
>
> This email sent to newsli...@autonomy.caltech.edu


 ___

 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:
 https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com

 This email sent to z...@mac.com
>>>
>>
>>
>> ___
>>
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>
>> Please do not post admin requests or moderator comments to the list.

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Peter Tomaselli
Pretty sure the WWDC 2015 video on NSOperations tackles a similar scenario in a 
quite elegant way. That might be worth investigating.

Peter

> On Nov 5, 2015, at 6:42 PM, Carl Hoefs  wrote:
> 
> A queue of what? I would think that if only a single alert view can be
> presented at a time, then iOS would serialize them and present them when
> earlier ones complete. Is there no system-level solution to this?
> -Carl
> 
> 
>> Make a queue.
>> 
>> Sent from my iPhone
>> 
>>> On Nov 5, 2015, at 6:10 PM, Carl Hoefs 
>>> wrote:
>>> 
>>> I don't want more than 1 alert presented at a time, of course, but they
>>> get generated asynchronously. I thought dispatch_get_main_queue() would
>>> nicely serialize any that occur. Thus David's comment that I'm just
>>> getting the requests issued in a serialized fashion.
>>> 
>>> I'm not certain how to have alerts that are scattered all throughout the
>>> app to wait until some other alert's completion block executes. Are you
>>> saying to have it control a global flag or some such?
>>> -Carl
>>> 
 On Nov 5, 2015, at 3:53 PM, Eric E Dolecki  wrote:
 
 That's the way. You should never need more than one presented at a
 time.
 
 Sent from my iP6+
 
> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński 
> wrote:
> 
> You should present next UIAlertController when first one has been
> dismissed (when UIAlertAction handler is called).
> 
> Tomek
> 
>> Wiadomość napisana przez Carl Hoefs
>>  w dniu 05.11.2015, o godz. 23:37:
>> 
>> iOS 9.1, iPhone 5S, ObjC
>> 
>> I'm getting the following runtime warning due to multiple
>> simultaneous UIAlertControllers presenting at the same time:
>> 
>> Warning: Attempt to present  on
>>  which is already presenting
>> 
>> 
>> I know only one alert view controller can be presenting at a time, so
>> the way I thought to serialize execution of each
>> -presentViewController:: is:
>> 
>>dispatch_async( dispatch_get_main_queue(), ^{
>>[ self presentViewController: alert
>>animated: YES
>>  completion: nil ];
>>});
>> 
>> Why isn't dispatch_get_main_queue() enforcing serialized execution?
>> Is there another way to do this?
>> -Carl
>> 
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>> 
>> This email sent to t...@union.waw.pl
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
> 
> This email sent to edole...@gmail.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:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
>>> 
>>> 
>>> ___
>>> 
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>>> 
>>> This email sent to z...@mac.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:
> https://lists.apple.com/mailman/options/cocoa-dev/vast.grapes%40gmail.com
> 
> This email sent to vast.gra...@gmail.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the 

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Tomasz Muszyński
It was working that way on UIAlertView, but on UIAlertController it has changed 
and you need to serialize presentations manually.

tm

> Wiadomość napisana przez Carl Hoefs  w dniu 
> 06.11.2015, o godz. 00:42:
> 
> A queue of what? I would think that if only a single alert view can be
> presented at a time, then iOS would serialize them and present them when
> earlier ones complete. Is there no system-level solution to this?
> -Carl
> 
> 
>> Make a queue.
>> 
>> Sent from my iPhone
>> 
>>> On Nov 5, 2015, at 6:10 PM, Carl Hoefs 
>>> wrote:
>>> 
>>> I don't want more than 1 alert presented at a time, of course, but they
>>> get generated asynchronously. I thought dispatch_get_main_queue() would
>>> nicely serialize any that occur. Thus David's comment that I'm just
>>> getting the requests issued in a serialized fashion.
>>> 
>>> I'm not certain how to have alerts that are scattered all throughout the
>>> app to wait until some other alert's completion block executes. Are you
>>> saying to have it control a global flag or some such?
>>> -Carl
>>> 
 On Nov 5, 2015, at 3:53 PM, Eric E Dolecki  wrote:
 
 That's the way. You should never need more than one presented at a
 time.
 
 Sent from my iP6+
 
> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński 
> wrote:
> 
> You should present next UIAlertController when first one has been
> dismissed (when UIAlertAction handler is called).
> 
> Tomek
> 
>> Wiadomość napisana przez Carl Hoefs
>>  w dniu 05.11.2015, o godz. 23:37:
>> 
>> iOS 9.1, iPhone 5S, ObjC
>> 
>> I'm getting the following runtime warning due to multiple
>> simultaneous UIAlertControllers presenting at the same time:
>> 
>> Warning: Attempt to present  on
>>  which is already presenting
>> 
>> 
>> I know only one alert view controller can be presenting at a time, so
>> the way I thought to serialize execution of each
>> -presentViewController:: is:
>> 
>>dispatch_async( dispatch_get_main_queue(), ^{
>>[ self presentViewController: alert
>>animated: YES
>>  completion: nil ];
>>});
>> 
>> Why isn't dispatch_get_main_queue() enforcing serialized execution?
>> Is there another way to do this?
>> -Carl
>> 
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>> 
>> This email sent to t...@union.waw.pl
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
> 
> This email sent to edole...@gmail.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:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
>>> 
>>> 
>>> ___
>>> 
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>>> 
>>> This email sent to z...@mac.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:
> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
> 
> This email sent to t...@union.waw.pl


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.

Adding first Swift file to a framework ("Umbrella header not found")

2015-11-05 Thread Daniel Stenmark
We just added the first Swift file to our internal .framework, but now the 
build is completely broken, with Xcode complaining “Umbrella header 
‘OTCommon.h’ not found.”

/Users/dstenmark/Library/Developer/Xcode/DerivedData/OpenTable-aylpkukwtinirqbvfkphthelbglb/Build/Intermediates/OpenTable.build/OpenTable-Debug-iphonesimulator/OTCommon-ios.build/unextended-module.modulemap:2:19:
 error: umbrella header 'OTCommon.h' not found
  umbrella header "OTCommon.h"
  ^
:0: error: could not build Objective-C module 'OTCommon'

Anyone else running into this?

Dan
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

-clickedRow

2015-11-05 Thread Raglan T. Tiger
I subclass NSTableView to catch -rightMouseDown 

In -rightMouseDown I call [self clickedRow] which always returns -1 in a row or 
not in row

What should I be doing to get the clicked row?




-rags




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Alex Zavatone
A queue of content to be in each alerts.

I think we've all had this issue.

If there is more than one alert, then have a little number within the alert so 
that you know it's alert #n of nn alerts.

And then each OK or Cancel button displays the next alert until they are gone.

Add the alert content to a dictionary and each button as well.  Add the 
selector for each button as properties.

As each alert is incremented, it just pages on to the next one until the alert 
is dismissed.

Create a little alert manager that is able to handle a queue of alerts and 
display them one at a time.



On Nov 5, 2015, at 6:42 PM, Carl Hoefs wrote:

> A queue of what? I would think that if only a single alert view can be
> presented at a time, then iOS would serialize them and present them when
> earlier ones complete. Is there no system-level solution to this?
> -Carl
> 
> 
>> Make a queue.
>> 
>> Sent from my iPhone
>> 
>>> On Nov 5, 2015, at 6:10 PM, Carl Hoefs 
>>> wrote:
>>> 
>>> I don't want more than 1 alert presented at a time, of course, but they
>>> get generated asynchronously. I thought dispatch_get_main_queue() would
>>> nicely serialize any that occur. Thus David's comment that I'm just
>>> getting the requests issued in a serialized fashion.
>>> 
>>> I'm not certain how to have alerts that are scattered all throughout the
>>> app to wait until some other alert's completion block executes. Are you
>>> saying to have it control a global flag or some such?
>>> -Carl
>>> 
 On Nov 5, 2015, at 3:53 PM, Eric E Dolecki  wrote:
 
 That's the way. You should never need more than one presented at a
 time.
 
 Sent from my iP6+
 
> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński 
> wrote:
> 
> You should present next UIAlertController when first one has been
> dismissed (when UIAlertAction handler is called).
> 
> Tomek
> 
>> Wiadomość napisana przez Carl Hoefs
>>  w dniu 05.11.2015, o godz. 23:37:
>> 
>> iOS 9.1, iPhone 5S, ObjC
>> 
>> I'm getting the following runtime warning due to multiple
>> simultaneous UIAlertControllers presenting at the same time:
>> 
>> Warning: Attempt to present  on
>>  which is already presenting
>> 
>> 
>> I know only one alert view controller can be presenting at a time, so
>> the way I thought to serialize execution of each
>> -presentViewController:: is:
>> 
>>dispatch_async( dispatch_get_main_queue(), ^{
>>[ self presentViewController: alert
>>animated: YES
>>  completion: nil ];
>>});
>> 
>> Why isn't dispatch_get_main_queue() enforcing serialized execution?
>> Is there another way to do this?
>> -Carl
>> 
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/thom%40union.waw.pl
>> 
>> This email sent to t...@union.waw.pl
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
> 
> This email sent to edole...@gmail.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:
 https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
 
 This email sent to newsli...@autonomy.caltech.edu
>>> 
>>> 
>>> ___
>>> 
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>>> 
>>> This email sent to z...@mac.com
>> 
> 
> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact 

Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread 2551

> On 5 Nov 2015, at 20:33, Ken Thomases  wrote:

> It's trying to log the problem, but getting an exception while composing a 
> description string for one of the constraints.


Ahh, right. That’s what the ‘Unable to create description’ bit means. Thanks.

> You've truncated the stack trace 

Full stack trace appended below from when the [showWindow] message is sent.


>  Could it be that the window has a minimum or maximum size that's conflicting 
> with the size the view wants to be?

There’s a minimum size set that’s much smaller than the View size. There’s no 
maximum size set for the Window.

In fact, this problem only started to occur because in the last update to the 
app I changed a previously fixed-sized window to be resizable. After release, I 
realised I’d carelessly overlooked setting constraints on one of the textViews 
in a 3-tab tabview so that one of them didn't scale with the window (call me a 
luddite, but I still yearn for the old days of springs and struts; never had so 
much trouble with layout since AutoLayout…;p ). 

I’ve been assuming its that tabView that’s causing the problem, but even 
removing all those constraints doesn’t avoid the issue.


> You could break on the exception

Bear with me. My debugging-foo doesn’t extend much beyond logging and a few 
basic exceptions, but I don’t think this is possible for the simple reason no 
exception is raised on my build machine. I have some vague notion that I can 
attach the Clang debugger in Terminal to a running process, maybe on my 10.9 
machine— is that possible? A Complete Idiot’s Guide (or link to…) would be 
welcome here, if so.

> or set a breakpoint on -[NSView(NSConstraintBasedLayout) 
> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:].  

Not sure I’m still following along. Are we talking symbolic breakpoint here? I 
tried that, but the app just builds and runs fine on 10.11.


> Either way, select that frame of the stack.  Then, try to examine the third 
> parameter, which seems like it would be the array of constraints.  


Ken, this is beyond my ken. Sure, I know what frames and stacks are, but I 
don’t understand where/how/when I’m supposed to be selecting these frames and 
stacks in the debugger when no debug session appears in Xcode. Or are you 
suggesting I export the project to my 10.9 install and run it from Xcode there? 
In theory I could do that (I think there’s an old Xcode install on that 
machine), but I’m not sure if the project will build if it was made in 10.11, 
will it?

Hmm…I know I could just revert back to the last commit before I made these 
changes and start all over again testing step by step, but there’s a lot of 
other work in here I don’t really want to recapitulate if i can avoid it. 

Appreciate any further thoughts! Here’s that full stack trace:


0   CoreFoundation  0x7fff9497025c 
__exceptionPreprocess + 172
1   libobjc.A.dylib 0x7fff92de3e75 
objc_exception_throw + 43
2   CoreFoundation  0x7fff9497010c 
+[NSException raise:format:] + 204
3   Foundation  0x7fff8f98cc55 
descriptionForLayoutAttribute_layoutItem_coefficient + 145
4   Foundation  0x7fff8f98caaf 
-[NSLayoutConstraint equationDescription] + 215
5   Foundation  0x7fff8f98cf3e 
-[NSLayoutConstraint description] + 298
6   CoreFoundation  0x7fff949620e1 -[NSArray 
descriptionWithLocale:indent:] + 481
7   Foundation  0x7fff8f7517bb 
_NSDescriptionWithLocaleFunc + 64
8   CoreFoundation  0x7fff9485ece4 
__CFStringAppendFormatCore + 7332
9   CoreFoundation  0x7fff9488d263 
_CFStringCreateWithFormatAndArgumentsAux + 115
10  CoreFoundation  0x7fff948c4aeb _CFLogvEx + 
123
11  Foundation  0x7fff8f77b32c NSLogv + 79
12  Foundation  0x7fff8f77b2b8 NSLog + 148
13  AppKit  0x7fff8f1dc194 
-[NSView(NSConstraintBasedLayout) 
engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 114
14  Foundation  0x7fff8f98713e -[NSISEngine 
handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
 + 507
15  Foundation  0x7fff8f98789c -[NSISEngine 
tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
 + 379
16  Foundation  0x7fff8f784e89 -[NSISEngine 
tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:]
 + 663
17  Foundation  0x7fff8f98d897 

Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread Ken Thomases
It's definitely encountering unsatisfiable constraints.  It's trying to log the 
problem, but getting an exception while composing a description string for one 
of the constraints.

This is happening when the view is being added to its window.  You've truncated 
the stack trace so we can't tell why/when that's happening.  Could it be that 
the window has a minimum or maximum size that's conflicting with the size the 
view wants to be?  A view is likely to lay out to a slightly different size on 
10.9 vs. 10.10 or 10.11 because of system font changes.

You could break on the exception or set a breakpoint on 
-[NSView(NSConstraintBasedLayout) 
engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:].  Either way, 
select that frame of the stack.  Then, try to examine the third parameter, 
which seems like it would be the array of constraints.  You won't be able to 
request the array's description (for example, using "po"), because that's 
precisely what's failing.  You'll have to examine the elements and their 
properties.

-Ken

> On Nov 4, 2015, at 9:19 AM, 2551 <2551p...@gmail.com> wrote:
> 
> I have an OSX app built on 10.11.1, deployment target 10.9. The app builds 
> and runs without any AutoLayout issues or warnings from Xcode. I have 
> ambiguities turned on.
> 
> The problem is when I try to run the app on 10.9. Although the app will run 
> without fatally crashing, one of its main windows won’t open. In Console, on 
> launch I first see the message
> 
> 
> “Unable to create description in 
> descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil.”
> 
> 
> If I then try to open the window from a menu command, I get the stacktrace 
> (relevant part appended below). I see the ‘mutually exclusive’ error starting 
> at line 18 in the trace, but I’ve manually been through the constraints and 
> can’t see any conflicts. I’ve also removed all constraints and had Xcode do 
> “Add Missing Constraints” after that. Again, no AutoLayout errors on build, 
> but still the mutually exclusive exception occurs on 10.9.
> 
> Does anyone have any debugging tips as to how do I can find the source of the 
> problem when neither Xcode nor Console on my build machine make any 
> complaints?
> 
> 
> Best
> 
> 
> Phil
> 
> 
> 
> 
> 
>   0   CoreFoundation  0x7fff9497025c 
> __exceptionPreprocess + 172
> 
>   1   libobjc.A.dylib 0x7fff92de3e75 
> objc_exception_throw + 43
> 
>   2   CoreFoundation  0x7fff9497010c 
> +[NSException raise:format:] + 204
> 
>   3   Foundation  0x7fff8f98cc55 
> descriptionForLayoutAttribute_layoutItem_coefficient + 145
> 
>   4   Foundation  0x7fff8f98caaf 
> -[NSLayoutConstraint equationDescription] + 215
> 
>   5   Foundation  0x7fff8f98cf3e 
> -[NSLayoutConstraint description] + 298
> 
>   6   CoreFoundation  0x7fff949620e1 -[NSArray 
> descriptionWithLocale:indent:] + 481
> 
>   7   Foundation  0x7fff8f7517bb 
> _NSDescriptionWithLocaleFunc + 64
> 
>   8   CoreFoundation  0x7fff9485ece4 
> __CFStringAppendFormatCore + 7332
> 
>   9   CoreFoundation  0x7fff9488d263 
> _CFStringCreateWithFormatAndArgumentsAux + 115
> 
>   10  CoreFoundation  0x7fff948c4aeb _CFLogvEx + 
> 123
> 
>   11  Foundation  0x7fff8f77b32c NSLogv + 79
> 
>   12  Foundation  0x7fff8f77b2b8 NSLog + 148
> 
>   13  AppKit  0x7fff8f1dc194 
> -[NSView(NSConstraintBasedLayout) 
> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 114
> 
>   14  Foundation  0x7fff8f98713e -[NSISEngine 
> handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
>  + 507
> 
>   15  Foundation  0x7fff8f98789c -[NSISEngine 
> tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
>  + 379
> 
>   16  Foundation  0x7fff8f784e89 -[NSISEngine 
> tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:]
>  + 663
> 
>   17  Foundation  0x7fff8f98d897 
> -[NSLayoutConstraint 
> _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:]
>  + 285
> 
>   18  Foundation  0x7fff8f7792cf 
> -[NSLayoutConstraint 
> _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 204
> 
>   19  AppKit  0x7fff8e97520b 
> __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke_2 + 411
> 
>