TOOLBAR different numbering on different OsX

Archives Forums/MaxGUI Bug Reports/TOOLBAR different numbering on different OsX

Midimaster(Posted 2013) [#1]
I report this bug after some tests with a GUI based game on OsX10.5 and OsX10.7 together with Brucey.

My game has a TOOLBAR with 7 icons and 2 separators between them:


On 10.6 and 10.6 the "floppy disk" icon has the ID=5, because the separator has to be considered as an individual item. On 10.7 and 10.8 the "floppy disk" icon has the ID=4, because the separator is counted not longer as a individual item.

Brucey confirmed this behavior by clicking on the "book" icon in a OsX10.7, and it appeared the action FILESELECTBOX, which is the action of the "folder" item. This is a bug! But on my OsX10.5 the book opens correct a Pdf manual without a FILESELECTBOX


Follow this thread to see details:
http://www.blitzbasic.com/Community/posts.php?topic=99884


Brucey(Posted 2013) [#2]
Do you have an example image (of the toolbar icons) ?
I'd like to write a little test app to show the problem.

Thanks.


Midimaster(Posted 2013) [#3]
here it is...


http://www.blitzforum.de/upload/file.php?id=12236


jsp(Posted 2013) [#4]
Any news on this?


Midimaster(Posted 2013) [#5]
Does anybody know, when Skydracer offers the next update of MaxGui with bugfixes?


skidracer(Posted 2013) [#6]
I have uploaded an experimental fix for cocoamaxgui.mod/cocoa.macos.m here:

http://sourceforge.net/projects/maxgui/files/cocoa.macos.m/download


jsp(Posted 2013) [#7]
Thanks you for the update will check as soon as possible.


jsp(Posted 2013) [#8]
Had a short access to OS 10.8 today and the changes do work, but it looks differently.

On 10.6 every empty icon is converted to a vertical spacer as we see it as well in windows, on OS 10.8 there is now just an empty place, which takes up more space and does not look that elegant.

Does 10.8 not recognize the empty icon as spacer anymore?


d-bug(Posted 2013) [#9]
From developer.apple - NSToolbarItem reference: "NSToolbarSeparatorItemIdentifier - The Separator item. (Deprecated. In OS X v10.7 and later the separator icon has been removed from the toolbar and customization palettes. This constant is ignored.)"


jsp(Posted 2013) [#10]
Thank you for the info.
Understand now why the NSToolbarSpaceItemIdentifier is taken.
But I have no idea what's the reason from apple behind that decision, what was wrong with the separatorItem?
Anyway, glad it works now.


Midimaster(Posted 2013) [#11]
the most important things is: The icons in the strip have to be counted the same way on Windows, OsX 10.5 and OsX 10.8.
So if I disable No 5 it has to be the same Icon on all three targets. Also, when I click on this Icon the returned value has to be 5 on all systems.

Formerly the "separator" was counted. A icon in front of it had 3 and the following already 5. I hope, this did not change?


jsp(Posted 2013) [#12]
Yes, they are counted the same way!
I have compiled my last application which uses several windows with toolbars and it was all working.
Also toggle icons were OK.

I have tested on Windows, OS 10.6 and 10.8. Don't know about 10.5 but as the changes were done in 10.7 I hope there is no problem. On Windows and 10.6 you will see the separator and on 10.8 the SpaceItem (like an empty icon).

All underlying functions were called correctly. So no mismatch because of wrong counting as before.


Midimaster(Posted 2013) [#13]
This sounds perfect. Thank you skidracer for the update! I will test it soon...


d-bug(Posted 2013) [#14]
I don't know why Apple decided to deprecate the separator items in 10.7. They even don't talk about the reasons in the developer release notes: "In 10.7, the Customize Toolbar item and the Separator item (with the vertical dots) have been removed from toolbars and customization palettes, and their item identifiers are ignored." ... that's all!


xlsior(Posted 2013) [#15]
It's Apple's modus operandi: Form over Function.


skidracer(Posted 2013) [#16]
Thanks all for testing.

I finally upgraded my MacBook with new HD and RAM and am now running Mountain Lion (and surprisingly can still boot 10.7 from the old HD using a USB enclosure).

The plan now is to implement a better looking separator in MaxGUI than the large blank box in the current 10.8 implementation...


GaryV(Posted 2013) [#17]
skidracer: Once you get the issue with the Mac side fixed, is there any chance you could push through the Mac/Linux/IDE tweaks into an official update?