Discussion:
Strange toolbar item error
Shane Stanley
2016-09-15 00:50:55 UTC
Permalink
Under 10.12 GM, I'm seeing entries like this in Console:

NSToolbarItem (<NSToolbarItem: 0x618000138060>) had to adjust the size of <NSButton: 0x618000144c50> from {38, 25} to the expected size of {40, 27}. Make sure that this toolbar item view has a valid frame/min/max size. This is an app bug, please do not file a bug against AppKit or NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint

I'm seeing it in a couple of apps -- one using a standard nib approach, and one generating the toolbar fully in code.

In the nib one, the toolbar has buttons on the toolbar items, and IB won't even allow any size other than 25px deep. I've tried fiddling with the toolbar item sizes, to no avail. I added the suggested breakpoint, but I don't see it break. If the message weren't so adamant, I'd be inclined to question it.

Anyone else seen it, or have suggestions?
--
Shane Stanley <***@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This email sent to geg
Kyle Sluder
2016-09-15 04:54:50 UTC
Permalink
Post by Shane Stanley
NSToolbarItem (<NSToolbarItem: 0x618000138060>) had to adjust the size of
<NSButton: 0x618000144c50> from {38, 25} to the expected size of {40,
27}. Make sure that this toolbar item view has a valid frame/min/max
size. This is an app bug, please do not file a bug against AppKit or
NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint
I'm seeing it in a couple of apps -- one using a standard nib approach,
and one generating the toolbar fully in code.
In the nib one, the toolbar has buttons on the toolbar items, and IB
won't even allow any size other than 25px deep. I've tried fiddling with
the toolbar item sizes, to no avail. I added the suggested breakpoint,
but I don't see it break. If the message weren't so adamant, I'd be
inclined to question it.
Anyone else seen it, or have suggestions?
What’s your app’s deployment target? What’s the deployment target of
your nib (listed in the file inspector while the nib is open for
editing)?

--Kyle

_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net
Shane Stanley
2016-09-15 05:24:18 UTC
Permalink
Post by Kyle Sluder
What’s your app’s deployment target? What’s the deployment target of
your nib (listed in the file inspector while the nib is open for
editing)?
The app's deployment target is 10.9, and the nib's is set to "Deployment Target(10.9)".
--
Shane Stanley <***@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This email sent t
Shane Stanley
2016-09-15 05:26:51 UTC
Permalink
Post by Shane Stanley
Post by Kyle Sluder
What’s your app’s deployment target? What’s the deployment target of
your nib (listed in the file inspector while the nib is open for
editing)?
The app's deployment target is 10.9, and the nib's is set to "Deployment Target(10.9)".
Just to be clear: that's what's showing now, but I'm not running 10.12 now. So I suppose Xcode 8 could be changing it under 10.12.
--
Shane Stanley <***@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This email sent to geg
Shane Stanley
2016-09-17 04:11:06 UTC
Permalink
Post by Kyle Sluder
Post by Shane Stanley
NSToolbarItem (<NSToolbarItem: 0x618000138060>) had to adjust the size of
<NSButton: 0x618000144c50> from {38, 25} to the expected size of {40,
27}. Make sure that this toolbar item view has a valid frame/min/max
size. This is an app bug, please do not file a bug against AppKit or
NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint
I'm seeing it in a couple of apps -- one using a standard nib approach,
and one generating the toolbar fully in code.
In the nib one, the toolbar has buttons on the toolbar items, and IB
won't even allow any size other than 25px deep. I've tried fiddling with
the toolbar item sizes, to no avail. I added the suggested breakpoint,
but I don't see it break. If the message weren't so adamant, I'd be
inclined to question it.
Anyone else seen it, or have suggestions?
What’s your app’s deployment target? What’s the deployment target of
your nib (listed in the file inspector while the nib is open for
editing)?
I checked under the latest(?) GM, and it's still showing "Deployment Target(10.9)".

For anyone seeing the same thing, the solution seems to be to change the max size of the toolbar items to the unexpected "expected" size. I thought I'd already tried this without success, until I realized what was happening: I had edited the values, then closed the toolbar editor in IB. I've now realised that the changes were not being saved; when I reopened the toolbar editor, the old values were still showing. Running once with the toolbar editor open seems to have made the changes 'take". (And yes, I tried cleaning at various stages.)

Along the way I discovered another problem in Xcode 8: setting a button to image-only in IB still shows any title if there is one.
--
Shane Stanley <***@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This
Kyle Sluder
2016-09-17 17:12:03 UTC
Permalink
Post by Shane Stanley
Post by Kyle Sluder
Post by Shane Stanley
NSToolbarItem (<NSToolbarItem: 0x618000138060>) had to adjust the size of
<NSButton: 0x618000144c50> from {38, 25} to the expected size of {40,
27}. Make sure that this toolbar item view has a valid frame/min/max
size. This is an app bug, please do not file a bug against AppKit or
NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint
I'm seeing it in a couple of apps -- one using a standard nib approach,
and one generating the toolbar fully in code.
In the nib one, the toolbar has buttons on the toolbar items, and IB
won't even allow any size other than 25px deep. I've tried fiddling with
the toolbar item sizes, to no avail. I added the suggested breakpoint,
but I don't see it break. If the message weren't so adamant, I'd be
inclined to question it.
Anyone else seen it, or have suggestions?
What’s your app’s deployment target? What’s the deployment target of
your nib (listed in the file inspector while the nib is open for
editing)?
I checked under the latest(?) GM, and it's still showing "Deployment Target(10.9)".
For anyone seeing the same thing, the solution seems to be to change the
max size of the toolbar items to the unexpected "expected" size.
Yes, the intent of the warning message is to get you to do that. But
since you’re linking against and deploying to Mavericks, I fear you’ll
wind up with too-big buttons on older OSes. Could you please file a bug
report with a sample project attached, and send me the bug number?
Post by Shane Stanley
I
thought I'd already tried this without success, until I realized what was
happening: I had edited the values, then closed the toolbar editor in IB.
I've now realised that the changes were not being saved; when I reopened
the toolbar editor, the old values were still showing. Running once with
the toolbar editor open seems to have made the changes 'take". (And yes,
I tried cleaning at various stages.)
This sounds worthy of investigation. Could you please file a bug report
detailing the _exact_ steps that resulted in your changes being
forgotten? Send me that bug number too please.
Post by Shane Stanley
Along the way I discovered another problem in Xcode 8: setting a button
to image-only in IB still shows any title if there is one.
I think we have a bug report on this already. In the meantime, if you
clear out the Title property, please make sure to populate the relevant
Accessibility properties.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This ema
Shane Stanley
2016-09-18 02:24:25 UTC
Permalink
Post by Kyle Sluder
Post by Shane Stanley
For anyone seeing the same thing, the solution seems to be to change the
max size of the toolbar items to the unexpected "expected" size.
Yes, the intent of the warning message is to get you to do that. But
since you’re linking against and deploying to Mavericks, I fear you’ll
wind up with too-big buttons on older OSes. Could you please file a bug
report with a sample project attached, and send me the bug number?
Will do. So if I understand you correctly, my options are:

* Change the max size as above, and have toolbar items potentially appear the wrong size pre-Sierra;

* Ignore the warning and have everything appear as it should in each version;

* Perhaps set the max size in code, based on the running OS version.

FWIW, I'm also seeing it on another project, which is more complex: the toolbar items are all moderately subclassed, it doesn't use autolayout, and it's all done in code rather than a nib. I've tried a few things, but I can't see any way to make the warning go away.

I think I understand the point of the message, but the adamant tone is going to put developers in an invidious position if users start logging bugs with them over it.
Post by Kyle Sluder
Post by Shane Stanley
I
thought I'd already tried this without success, until I realized what was
happening: I had edited the values, then closed the toolbar editor in IB.
I've now realised that the changes were not being saved; when I reopened
the toolbar editor, the old values were still showing. Running once with
the toolbar editor open seems to have made the changes 'take". (And yes,
I tried cleaning at various stages.)
This sounds worthy of investigation. Could you please file a bug report
detailing the _exact_ steps that resulted in your changes being
forgotten? Send me that bug number too please.
It's #28348587.
Post by Kyle Sluder
Post by Shane Stanley
Along the way I discovered another problem in Xcode 8: setting a button
to image-only in IB still shows any title if there is one.
I think we have a bug report on this already.
I've already filed #28348535, which includes a simple example.
--
Shane Stanley <***@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This email
Kyle Sluder
2016-09-18 16:26:46 UTC
Permalink
Post by Shane Stanley
Post by Kyle Sluder
Post by Shane Stanley
For anyone seeing the same thing, the solution seems to be to change the
max size of the toolbar items to the unexpected "expected" size.
Yes, the intent of the warning message is to get you to do that. But
since you’re linking against and deploying to Mavericks, I fear you’ll
wind up with too-big buttons on older OSes. Could you please file a bug
report with a sample project attached, and send me the bug number?
* Change the max size as above, and have toolbar items potentially appear
the wrong size pre-Sierra;
* Ignore the warning and have everything appear as it should in each version;
* Perhaps set the max size in code, based on the running OS version.
Your understanding matches mine. (I don’t work on the team that manages
NSToolbar, so I will let them have the final say in the response to your
bug report.) In the meantime, I would go with option #2.

--Kyle Sluder
Post by Shane Stanley
FWIW, I'm also seeing it on another project, which is more complex: the
toolbar items are all moderately subclassed, it doesn't use autolayout,
and it's all done in code rather than a nib. I've tried a few things, but
I can't see any way to make the warning go away.
I think I understand the point of the message, but the adamant tone is
going to put developers in an invidious position if users start logging
bugs with them over it.
Post by Kyle Sluder
Post by Shane Stanley
I
thought I'd already tried this without success, until I realized what was
happening: I had edited the values, then closed the toolbar editor in IB.
I've now realised that the changes were not being saved; when I reopened
the toolbar editor, the old values were still showing. Running once with
the toolbar editor open seems to have made the changes 'take". (And yes,
I tried cleaning at various stages.)
This sounds worthy of investigation. Could you please file a bug report
detailing the _exact_ steps that resulted in your changes being
forgotten? Send me that bug number too please.
It's #28348587.
Post by Kyle Sluder
Post by Shane Stanley
Along the way I discovered another problem in Xcode 8: setting a button
to image-only in IB still shows any title if there is one.
I think we have a bug report on this already.
I've already filed #28348535, which includes a simple example.
--
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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/gegs%40ml-in.narkive.net

This email sent to geg

Loading...