Dialog box blues
OK, I'm up to around 4 hours now trying to make a decent dialog box, with "OK'/"cancel" functionality. i have scanned forums, found some hits, but I'm unable to get anything working that has no toolbar, no menu. i tried using bpatcher (which I've not used before). in the end, i could not get the connector lines to not show in presentation mode (strange but that is where i seemed to get stuck). i have tried various things, now the latest being using pcontrol. I like the simplicity. Problem currently is I cannot get the "window nomemu" and "window notitle" etc messages to thispatcher to work (i.e. already activated when the window opens). They only work after i have already opened the window and manually send those messages (followed by the "window exec" message of course). i tried loadbang'ing the windows messages - no dice. i tried using deferlow between the loadbang and windows messages - no dice. i tried including "savewindow 1" - no dice. I also cannot get the window to open in presentation mode or even in locked mode (using pcontrol). I seem to be skunked. if anyone has a solution, and/or a working (clean looking, with "ok" and "Cancel" outputs), I'd be very interested.
You'll no doubt need to do some tweaks to suit your purposes. (To check what's going on in the subpatcher - you can use keys 1 & 2 on the (main) keyboard to change the popup window settings)
I'm looking at this and not sure how it is done. i tried basically this same thing, then setting various attributes for the dialog patcher, such as no toolbox and also using nomenu message to thispatcher, and could still never get this result. i still don't understand how you did this?! i could never get the open in presentation mode or the no toolbox mode to stick. I also noticed that if you unselect then reselect the "openinpresentationmode" attribute in your example, it thereafter will not open in presentation mode. This behavior seems at the root of my problems yesterday. The only way i could get it to work was to use the convert attributes to arguments thingy and edit the toolbox and menu bar settings. Even then i noticed that it sometimes doesn't "stick" and I have to "edit" the arguments (by adding and then removing a character) to get it back to where it will stick. Also not sure what attributes to edit to get rid of the window frame like yours.
Also, how do you get the window to close on selecting either button, and how would you get the output?
Never mind, I think I (mostly ) get it now. Thanks a million!
Here's pretty much the same solution as Spectro's with a few comments.
Also Don't forget that if you just need a text dialog box there is a 'dialog' object for this purpose.
Yes, tried that at the start, but I didn't want to have the text entry box. There has been some discussion about this in the forums.
I still see some apparently weird behaviors. like the attribute box in Spectro's example, now seems to have no effect either way. Always opens in same mode.
i wish there was a better reference as to what some of the commands like "float" etc. do. Christopher, is that how you get the toolbar to popup like that?
Now I cannot figure out how to change the window size in my (slighlty modified) version of the example. When in presentation mode, how to get/modify the window size to accommodate the added buttons in my version?