Koda

Welcome to Koda bug tracker!

At the moment you can post bugreports or suggestions anonymously. But registered users have some benefits: attaching files, commenting, voting, tracking tasks e.t.c.

Due some asshole started spamming tracker, now (at least for some time) it’s not allowed to create anonymous tasks. Sorry for unconvenience.

In edit fields you can use DokuWiki syntax for formatting.

Tasklist

FS#294 - Adding context menu to an icon error in on event mode

Attached to Project: Koda
Opened by Martin Gibson (martin) - Sunday, 29 May 2011, 21:10 GMT+3
Type Bug Report
Category Application
Status Assigned
Assigned To Admin (Lazycat)
Operating System All
Severity Medium
Priority Normal
Reported Version 1.7.3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Using On Event mode, if you add a context menu to an icon there is an error in the code generated. The code for the menus is inserted between the code for the icon and the code for the onclick definition for the icon

$IconBox = GUICtrlCreateIcon("shell32.dll", -10, 748, 223, 34, 34, BitOR($GUI_SS_DEFAULT_ICON,$SS_SUNKEN))
GUICtrlSetResizing(-1, $GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUICtrlSetTip(-1, "Create a containing rectangle")
$IconBoxcontext = GUICtrlCreateContextMenu($IconBox)
$MenuAskMargins = GUICtrlCreateMenuItem("Always ask for the margins", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuAskMarginsClick")
$MenuFixedMargins = GUICtrlCreateMenuItem("Use the set margins", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuFixedMarginsClick")
$MenuSetMargins = GUICtrlCreateMenuItem("Set the container margins", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuSetMarginsClick")
$MenuRemoveBox = GUICtrlCreateMenuItem("delete the Container", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuRemoveBoxClick")
GUICtrlSetOnEvent(-1, "IconBoxClick") ;<---------------------------------this line should be before CreateContextMenu line
This task depends upon

Comment by Martin Gibson (martin) - Monday, 30 May 2011, 03:14 GMT+3

But if you set the Generate code option to 'variables instead "-1" where possible' then it is no longer a problem.

Loading...