DataGrid again

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 8 15:19:14 EDT 2014


On 10/8/2014, 9:44 AM, Terence Heaford wrote:
> There is without doubt issues with the way livecode handles Mac
> Menus.
>
> Again along with the geometry issues noted in an earlier post this is
> making Livecode unusable as I cannot get consistent results.
>
> It not only applies to 6.7 but also 6.6.4.
>
> I have been evaluating both LiveCode and Xojo for a few months now
> and although I prefer scripting languages rather than basic I can say
> at least Xojo works in this area.
>
> I have thought about reporting a bug but this is so fundamental I
> don’t see why I should. If I had purchased LiveCode I would now be
> thinking “what a waste of money”, fortunately I am using the
> community edition so am only wasting my time in researching and
> posting this.

You're right it has to do with menus, but it isn't a bug, it's how menus 
work. When they become available soon, you may want to view my RevLive 
talk on menus which goes into some detail about the behavior. There is 
also a summary in my tutorial here: 
<http://www.hyperactivesw.com/mctutorial/rraboutMenus.html>

In short, a menu group on a Mac is scrolled up out of view. The size of 
the card remains the same but the size of the window does not. When 
editMenus are false (menus are scrolled out of view, the default that 
Menu Builder sets) try this:

on resizeStack x,y
   put y && the height of this stack
end resizeStack

You will get two different numbers, and if you are using the default 
menubar size, the difference is 22 pixels. This behavior has been in all 
versions of LC since 1.0, and in MetaCard before that.

Now set the editmenus of the stack to true -- which removes the menu 
from the system menu and puts the group back into the stack where you 
can see it. The stack window changes to accomodate it. Run the above 
handler again and the two numbers will be identical.

On Windows machines, the two numbers are always identical because 
Windows always shows the menu inside the stack.

For cross-platform work, use the number passed in the parameter in the 
resizeStack handler. It represents the true size of the card and 
geometry rearrangements will work consistently.

Next time just ask before you get frustrated. That's why we're here.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com





More information about the use-livecode mailing list