RE: Need Help in Dexterity
I came up with an approach for this very issue. Since I was unable to format the message text in the ask() function, I too needed to try and use a normal dexterity window (modal window type) to to give the user a better visual experience in the UI (name/value pairs separated by newlines).
I created the window as part of the form where the business logic resides (i.e. I did not create a separate form/window combination for the modal window). I really can't say if this approach is generic enough to use in all cases, but what I did was refactor the dexterity code where I needed to have a modal window, such that the 'open window' statement was the last statement in the current code path. I placed the refactored business logic into a new form procedure to be called later from a change script associated with the original field. To call the change script I used 'run script delayed' from the modal window's post script thus allowing the modal window to close before the change script is run and thus being able to execute the business logic contained in the new form procedure.
Now, since modal windows usually return something that controls the flow of code, my Yes/No buttons on the modal window had code that updated another local field on the original window which was then used by the original script to execute the operate behavior.
I hope this wasn't too confusing. It sure was a lot of work to simulate what is normal Window's modal (e.g. the ShowDialog method in .Net or DoModal in C++ CDialog class) behavior in other environments.
Of course all this could have been avoided if only I would have had the ability to create formatted text in that dexterity ask() function.
I am sure there are many other solutions to such dilemma's but finding design solutions in dexterity beyond what is contained in the manuals is very challenging. Certainly not like googling around the net for solutions in other languages and frameworks.