Set as Menu Bar on Mac OS bug?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Set as Menu Bar on Mac OS bug?

Post by gyroscope » Fri May 30, 2008 11:41 pm

Hi, this seems like a bug to me but perhaps its just the way it is, I don't know (and if it is just the way it is, it doesn't seem logical to me..."get on with it!"...OK:

On a Mac: go to Menu Builder and click New for Menu bar. File, Edit and Help (or whatever else) appears on the top left of the window, necessary for Windows apps, I understand.

But then if I check Set as Menu Bar on Mac OS, the Menu Bar items disappear as they should, but then 22pxls is cut off the top of the window, moving all objects with it. :(

I've had other problems as well, like objects disappearing (but still showing in the Application Browser and Inspector as living in the window) and graphics stretching to leave artifacts; and to cap it all, when I tried to build a test app, it was unable to because of an error. OK, I did try some dodgy scripting in some of the menu items which might have caused this...

So do Mac users have to add 22pxls to the height of their stacks to make allowance for this, and would anyone agree that this is a bug (or at the least a bit illogical, i.e the menu item names should just go without shortening the window height) :?:

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat May 31, 2008 1:38 am

Hi Gyroscope,

This is no bug, although I agree it is a bit confusing. Normally, when I create a new stack, I create the menubar first and set it to "As on Mac OS" before I add any objects. I do believe that one shouldn't need to think about little problems like these, but I haven't figured out what I would like to have instead. Do you have any ideas? Perhaps we should discuss those in the Feature Requests subforum.

The other problems you mention are unrelated to the menubar issue, as far as I can see. Perhaps we/I can help you with this, if you provide more details about what you are trying to do.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Tue Jun 03, 2008 2:50 pm

Hi Mark
Normally, when I create a new stack, I create the menubar first and set it to "As on Mac OS" before I add any objects.
To an extent, I've put the cart before the horse, I suppose, being relatively new to Rev: I jumped straight in with 4/5 of my main stack(app) done; then decided to do an About window; then needed a window before that for registering software/trial period, etc. And only then decided to set up a Menu...

However, this chopping 22pxls off happens even just after creating a blank new main stack.

I becoming convinced that this is a bug, I don't know if you would agree...
I have a window shape of 420 x 420 with a curved corner, and an image covering the complete area, Left 0, Top 0. Add menubar, click on Set as Menu Bar on Mac OS. The top 22pxls of the image is cut off, with its Left and Top positions still showing 0,0. So I move it down to 0, 22 to compensate for the missing depth (the image now looking like it's at 0,0) and add 22 pxls to the height of the card.
But then the bottom 22 pxls of the image shows as white (its somehow disappearing behind the last 22 pxls of the window shape image (brought in correctly as control).

• Which leads to me another question please: what happens to the Windows File, Edit, Help on an irregular shaped window (oval, for instance) running on a PC? :?:

This is very frustrating for me as I'm trying to set up a running style for my About window for all three of my projects. :(

I would think that what should be happening is that the File, Edit and Menu words should appear, then when checked for Mac OS, they disappear, end of story, without "pinching" any window height.

If there's no solution within three or four months, I'll just have to make the decision to make my app(s) for the Mac only and forget PCs. :cry:

PS For interest, could someone who is using Rev Windows version please tell me: does it still cut off 22pxls when you set the Menu for Mac? :?:

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Jun 04, 2008 7:42 am

It won't cut off 22 pixels on Windows - the menubar is placed at the top of your window. Personally, I wish they would straighten this out and just take the menubar out of the card space, and have all coordinates start at the top of the window on Mac and just below the menubar on other platforms.

However, the current approach of using a group as menubar does have advantages once you start to look at 'skinning' your application. But then I make database front-ends, where it isn't really expected that your User Interface is something from the WinAmp book :-)

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 04, 2008 2:30 pm

Hi Gyroscope,

I understand your problem now. Window shapes cause quite a few problems, here. To solve the problem, do the following.

1) set the editMenus of your stack to true
2) set the menubar of your stack to empty
3) set the defaultMenubar of your stack to the long name of a group of your stack
4) hide the group (you'll have an empty space now, maybe you can put an unnecessary copyright statement there, which is visible on Mac only)

Here is a simple script to reset the menubar in the IDE:

Code: Select all

on mouseUp
  put long name of group "revMenuBar" of card id 1002 of stack \
   "/Applications/Revolution Enterprise/2.9.0-gm-1/Toolset/revmenubar.rev" into myGrp
  set the defaultmenubar to myGrp
end mouseUp
Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 04, 2008 10:13 pm

Hi,

I created an example, which you can find here
http://economy-x-talk.com/test/menubarsolution.rev

This also revealed the following problem:
http://quality.runrev.com/qacenter/show_bug.cgi?id=6520

Note that the stack attached to the bug report is not the same as the stack on the server of Economy-x-Talk!

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Sat Jun 07, 2008 12:04 am

Sorry for the late reply...

Hi Jan, thank you for that info.
Personally, I wish they would straighten this out and just take the menubar out of the card space, and have all coordinates start at the top of the window on Mac and just below the menubar on other platforms.
Yes, I wish that to!

Another thing I'm a bit confused about (mainly because I have no immediate access to a Windows machine) is, does the menubar still appear on top of an About screen (if that's your main stack) on a PC? And if it does, how do you go about changing that? Is it done to set the menu bar up as belonging to the substack (app)? (I haven't tried this as an experiment yet...) Any answers there appreciated, thanks!

Hi Mark, thank you very much for your code; I'm a li'l bit confused where this code lives but I'm sure your example will make it all clear. That's brill you've gone to the trouble of creating an example, much appreciated! 8) Unfortunately though, the page from the link tells me (in an excellently designed way...) "The site is currently unavailable. Please contact your system Administrator." :?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Jun 07, 2008 1:05 am

Gyroscope,

We're moving to a more reliable server right now. The stack should be available again after the weekend.

Best,

Mark

P.S. Update: it seems that most areas have access to the site already, while I'm writing this. You should be able to download the stack now.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Sun Jun 08, 2008 11:49 pm

Hi Mark, thank you, that's just what I need! :)

My personal summary of all this: the aspect of Menu Bars is definitely half-baked to me, and at a guess, 99% of people wouldn't want to skin a Windows Menu Bar anyhow. So maybe one day the menu bar aspect will be added to the top of windows (stacks) created in Rev - for Windows - on a Mac, leaving the original window/graphics/controls, etc based on 0,0... I hope so; it would certainly stop a lot of hassle trying to visually match (using a custom interface) the same app on different platforms...

I'm still confuddled concerning a straightforward About box on a Windows machine: surely this doesn't have a menu bar as well, could I ask please :?:

Post Reply