mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,185
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,185
When using /did -a on a box control in a dialog, it does not append, it simply replaces/overwrites.

This is inconsistent with how -a works for others control.
The help file does not describe this difference and only documents -a as 'adding line of text at the end'.

Not an annoying bug, not preventing functionality (easy workaround is to use did -a name $did().text $+ newtext) and probably here since its implementation, so no fix required, but the help file should definitely be talking about this difference.

Code:
dialog testbox {
  size -1 -1 100 100
  box "text", 1, 5 5 90 90
}
alias testbox {
  dialog -m testbox testbox
  did -a testbox 1 text2
  echo -ag $did(testbox, 1).text
}
/testbox


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,490
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,490
Thanks for your bug report. This is indeed intentional. The -radio switches were originally added to support multi-line listbox/combox/editbox controls. Using these switches with any other controls results in default behaviour of either setting or clearing text. This has been the behaviour ever since these features were added, so unfortunately cannot be changed now.

Joined: Jul 2006
Posts: 4,185
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,185
Right, I mentioned I wasn't asking for a change in behavior, just that the help file should be updated.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard