mIRC Homepage
Posted By: Online Dialog icon bug - 30/10/03 02:00 AM
Put this dialog in the remote,
  • Code:
    dialog x {
      size -1 -1 50 50
      icon 3, 10 10 32 32, %icon
    }
and type /set %icon mirc.exe

Now, open the dialog once by typing /dialog -m x x. A dialog will open, showing the mIRC icon at the middle. Close the dialog, and re-open it. This time, you will get an error:
  • * /dialog: 'x' error loading icon '0 C:\path\to\mirc.exe'
This is happening because mIRC changes the variable value to "0" (the icon index) followed by the full path of the icon file.

I don't know why it's necessary to modify the variable at all. Anyway, please fix to the next version.

(Credit goes to ATMA for locating the bug cool)
Posted By: J0ke Re: Dialog icon bug - 30/10/03 07:15 AM
from mIRC.hlp: icon id, x y w h, filename, index, style (noborder top left bottom right)

;this works fine
dialog x {
size -1 -1 50 50
icon 3, 10 10 32 32, %icon, 0
}
Posted By: Online Re: Dialog icon bug - 30/10/03 08:11 AM
Yes it works, but after you open the dialog, you will notice that a new, even odder variable was created:
  • %icon, 0 C:\PROGRAMS\MIRC\mirc.exe
The reason why the dialog still works is because %icon wasn't overwritten this time, but a new variable (%icon,) was made. So the bug is still there.

Btw the index property should be optional, and 0 would be used when it wasn't specified.
Posted By: qwerty Re: Dialog icon bug - 30/10/03 12:08 PM
This is an unfortunate result of this feature (off the help file):

Variables
If you specify a %variable name in a dialog item definition, the %variable will be set with the contents of that item when the dialog is closed.

edit "", 2, 10 10 100 20, autohs %result


There is no bug, as mirc does what it's supposed to: fills %icon with the contents of the icon control (ie $did(x,3), which returns "0 path to\mirc.exe") when the dialog is closed. The problem comes from the (imo cumbersome) way mirc handles variables in dialog tables, combined with the inconsistent way it handles icon filenames and indexes (the dialog table requires the "filename, index" format but $did() and /did use the "index filename" format).
Posted By: cold Re: Dialog icon bug - 30/10/03 04:16 PM
There is the "%icon," bug, though.
Posted By: qwerty Re: Dialog icon bug - 30/10/03 07:38 PM
Yes, I suppose we could call this one a bug.
Posted By: sirnarf Re: Dialog icon bug - 30/10/03 08:08 PM
Doesn't affect me

Windows ME (4.90 - 3000)
mIRC 6.12

12:59) * Dns resolving 66.134.31.2
-
(12:59) * Dns unable to resolve 66.134.31.2
-

I also had a friend test on Freebsd bitchx

It doesn't crash it either.
Posted By: ATMA Re: Dialog icon bug - 31/10/03 02:10 AM
what does that have to do with this bug? -_-
© mIRC Discussion Forums