how to clear dialog?

fraction's icon

i'd like to be able to clear the dialog when the dialog has been already filled one time with a symbol/string.

If you have a dialog, then after a first bang, and if you or a random user has enter a string, i don't find the way that the dialog is prompt with a cleared field.
I think we miss a clear message here. Sending symbol " " obviously doesn't work as it opens up the dialog again

thx in advance for the help!

Max Patch
Copy patch and select New From Clipboard in Max.

florian1947's icon

clear the 'label' attribute, using attrui

fraction's icon

thx but that's not working. It clears the label of the dialog, which is not my need.
I need a way, in mode 0, to clear the field (as symbol) when the dialog is prompt so the field is empty (always). As i understand, the field is only cleared when the patcher is closed.

Source Audio's icon

This is what I used in old max versions which had no attributes
(127 = delete key)

still works best

fraction's icon

thx @source audio - it works indeed!
i tried also symbol " " but it gets this weird uncleared field

thx a lot! :)

Roman Thilenius's icon

using dialog is a neat trick!

Dan Laüt's icon

I tried clearing dialog with char(127) as the argument of the "symbol" message, but the results were inconsistent. Then I used char(0) instead and that seems to work seamlessly.

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

sprintf symbol \"\"

fraction's icon

there is a clearsymbol message from max 8.6.5

Roman Thilenius's icon

in max 8.1, i just send "symbol" to [dialog] and it will open with emptied textfield, similar to what "set" does to a messagebox.

Source Audio's icon
Roman Thilenius's icon

just tried it again and while it works to clear, it sometimes also opens the dialog and sometimes not, and i can´t tell a pattern.

so 0-itoa or yours are best, but only required for pre 8.6.3