Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-04

Is MenuItem.Commad Zero based?

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Zaher Dirkey

Hi
Before i post a bug
In Windows/WinCE is Menu ID (MenuItem.Commad) is Zero based? By my logic ID must be start from 1, zero mean no ID or Command

In Menus unit MenuItem.inc line 110
-------------------------------------------
FCommand := UniqueCommand;
-------------------------------------------

UniqueCommand started from 0

Look at line 209 when destroying the menu item, zero here not set to false. -------------------------------------------
if FCommand 0 then CommandPool[FCommand] := False; -------------------------------------------

I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130413/07c85a9f/attachment-0001.html>

Reply by email

Zaher Dirkey
to Zaher Dirkey

Hi team,
Up and
And please check this patch here
http://bugs.freepascal.org/view.php?id=17519

Zaher Dirkey wrote 18 lines
Hi Before i post a bug In Windows/WinCE is Menu ID (MenuItem.Commad) is Zero based? By my logic ID must be start from 1, zero mean no ID or Command In Menus unit MenuItem.inc line 110 ------------------------------------------- FCommand := UniqueCommand; ------------------------------------------- UniqueCommand started from 0 Look at line 209 when destroying the menu item, zero here not set to false. ------------------------------------------- if FCommand 0 then CommandPool[FCommand] := False; -------------------------------------------

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130702/6351c40b/attachment.html>

Reply by email

Felipe Monteiro de Carvalho
to Zaher Dirkey

Hello,

The patch looks good, but menu items in WinCE are a horrible swamp of problems, you fix something and it breaks something else ... did you test in many possible device types? Like in smartphone mode, WinCE 5.0. And multiple kinds of menus, like only 1 menu item, or 2 menu items, some with sub-items, some not, etc, etc.

If yes, then I'll apply.

thanks,

Felipe Monteiro de Carvalho

Reply by email

Zaher Dirkey
to Felipe Monteiro de Carvalho

On Wed, Jul 3, 2013 at 11:28 AM, Felipe Monteiro de Carvalho <

Show quoted text 8 lines
wrote: The patch looks good, but menu items in WinCE are a horrible swamp of problems, you fix something and it breaks something else ... did you test in many possible device types? Like in smartphone mode, WinCE 5.0. And multiple kinds of menus, like only 1 menu item, or 2 menu items, some with sub-items, some not, etc, etc.

I do not think it is break? something, i used shifted the ID as like many examples for WinCE using C++, and i tried it on real device WM5 and WM6.1, not sure about WinCE 4.

If you like i will retest it again.

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130703/87a38a56/attachment.html>

Reply by email