On Sep 6, 2016, at 1:38 PM, Andreas Falkenhahn <andr...@falkenhahn.com> wrote:
> 
> On 06.09.2016 at 18:51 Ken Thomases wrote:
> 
>> On Sep 6, 2016, at 11:41 AM, Andreas Falkenhahn <andr...@falkenhahn.com> 
>> wrote:
> 
>>> My NSWindow contains an NSView which I use to draw custom graphics to. It 
>>> doesn't
>>> contain any widgets like buttons at all, just custom graphics drawn in 
>>> drawRect().
> 
>>> Now I'd like to have an AVPlayerView NSView on top of this view. Thus, I 
>>> tried to
>>> add this AVPlayerView on top of the NSView by doing the following:
> 
>>>   [view addSubview:playerview];
> 
>>> However, this didn't work and generated lots of debug output to stderr.
> 
>> What, specifically, does "this didn't work" mean?  What debug output was 
>> logged?

I'll note you still didn't say what "this didn't work" means, but I can guess.

> 2016-09-06 17:12:50.963 Hollywood[1160:23595] Unable to simultaneously 
> satisfy constraints:
> (
> "<NSLayoutConstraint:0x1005ca210 H:|-(10)-[NSView:0x1005c58d0]   (Names: 
> '|':AVExternalPlaybackIndicatorView:0x1005c5160 )>",
> "<NSLayoutConstraint:0x1005ca280 H:[NSView:0x1005c58d0]-(10)-|   (Names: 
> '|':AVExternalPlaybackIndicatorView:0x1005c5160 )>",
> "<NSLayoutConstraint:0x1005ca150 NSView:0x1005c5c80.centerX == 
> NSView:0x1005c58d0.centerX>",
> "<NSLayoutConstraint:0x1005ca620 H:|-(0)-[NSView:0x1005c5c80]   (Names: 
> '|':NSView:0x1005c58d0 )>",
> "<NSLayoutConstraint:0x1005ca4e0 AVDraggableImageView:0x1005c6030.centerX == 
> NSView:0x1005c5c80.centerX>",
> "<NSLayoutConstraint:0x1005ca900 H:|-(>=0)-[AVDraggableImageView:0x1005c6030] 
>   (Names: '|':NSView:0x1005c5c80 )>",
> "<NSLayoutConstraint:0x100568020 
> H:|-(0)-[AVExternalPlaybackIndicatorView:0x1005c5160]   (Names: 
> '|':MyAVPlayerView:0x1004f5b70 )>",
> "<NSLayoutConstraint:0x1005cbce0 
> H:[AVExternalPlaybackIndicatorView:0x1005c5160]-(0)-|   (Names: 
> '|':MyAVPlayerView:0x1004f5b70 )>",
> "<NSAutoresizingMaskLayoutConstraint:0x1086c3130 h=--& v=--& 
> H:[MyAVPlayerView:0x1004f5b70(0)]>",
> "<NSLayoutConstraint:0x1005cad30 V:[AVDraggableImageView:0x1005c6030(>=43)]>",
> "<NSLayoutConstraint:0x1005cace0 AVDraggableImageView:0x1005c6030.width == 
> 1.45556*AVDraggableImageView:0x1005c6030.height + 1>"
> )
> 
> Will attempt to recover by breaking constraint
> <NSLayoutConstraint:0x1005ca150 NSView:0x1005c5c80.centerX == 
> NSView:0x1005c58d0.centerX>
> 
> Set the NSUserDefault 
> NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have 
> -[NSWindow visualizeConstraints:] automatically called when this happens.  
> And/or, break on objc_exception_throw to catch this in the debugger.

These are errors from the autolayout system.  I'm not sure if you're using 
autolayout in the rest of your view hierarchy, but it appears that AVPlayerView 
uses it internally.  That's potentially fine, except that it requires that the 
player view be at least 63 points wide.  There may also be height constraints.

Regards,
Ken


_______________________________________________

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

Reply via email to