Hmmm, check this out. I decided to make an MDX button on my custom nicklist (Yup, X-Fusion - I have one, too!) using the MDX toolbar feature, that has my nick on it. Soooo, the idea is that as well as my nick, the icon wil also change with various levels - Op, Hop, Voice etc. Pretty basic stuff. This is what I found interesting on my test button (i'm using two icons for the experiment one red the other green). The idea is that on each event change, the button will still display my nickname, and reflect the appropriate icon suit what status I'm on.
When clicking the update button, it performs as it should, however, it then actualy creates a new button on every click there after. I bet I'm doing something really, really stupid. Maybe with how I'm calling on the icon to change.
Any ideas? ![]()
alias m {
dialog -m ico.test ico.test
}
dialog ico.test {
title "New Project"
size -1 -1 72 128
option dbu
list 1, 2 3 66 10, size
button "Update", 2, 30 112 37 12
}
on *:dialog:ico.test:init:*:{
createmdx
dll $mdx SetControlMDX $dname 1 ToolBar list wrap nodivider > $bar
dll $mdx SetBorderStyle $dname 1 noborder
did -i $dname 1 1 bmpsize 18 18
did -i $dname 1 1 setimage icon medium $icon(famfam/user_red.ico)
did -i $dname 1 1 setimage icon medium $icon(famfam/user_green.ico)
did -a $dname 1 1 $me
}
alias update {
did -o ico.test 1 2 1
did -a $dname 1 1 $me
}
On *:Dialog:ico.test:sclick:2:{
update
}