mIRC Home    About    Download    Register    News    Help

Print Thread
Dialog icon bug #58359 30/10/03 02:00 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline OP
Hoopy frood
OP Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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)

Re: Dialog icon bug #58360 30/10/03 07:15 AM
Joined: Jan 2003
Posts: 150
J
J0ke Offline
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
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
}


Go ahead, jump. 100,000 lemmings can't be wrong.
Re: Dialog icon bug #58361 30/10/03 08:11 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline OP
Hoopy frood
OP Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Re: Dialog icon bug #58362 30/10/03 12:08 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Dialog icon bug #58363 30/10/03 04:16 PM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
There is the "%icon," bug, though.


* cold edits his posts 24/7
Re: Dialog icon bug #58364 30/10/03 07:38 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Yes, I suppose we could call this one a bug.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Dialog icon bug #58365 30/10/03 08:08 PM
Joined: Jan 2003
Posts: 3
S
sirnarf Offline
Self-satisified door
Offline
Self-satisified door
S
Joined: Jan 2003
Posts: 3
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.

Re: Dialog icon bug #58366 31/10/03 02:10 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
what does that have to do with this bug? -_-


Need amazing web design for low price: http://www.matrixn3t.net