New locs for old dialogs
Wilhelm Sanke
sanke at hrz.uni-kassel.de
Fri May 2 07:43:00 EDT 2003
On Thu May 1 Richard Gaskin wrote:
> Wilhelm Sanke wrote:
>
> > No need even to comment the respective lines of the answer dialog of
the
> > Mac version of Revolution that define the loc as long you add the
above
> > line "if the Newloc....." just before "end preopenstack".
>
> Alternatively, you could put this in a frontscript and never worry
about
> customizing the dialogs:
>
>
> on preOpenStack
> if the short name of this stack is in "answer dialog,ask dialog"
then
> set the loc of this stack to the screenLoc
> end if
> pass preOpenStack
> end preOpenStack
>
>
> Richard Gaskin
>
Richard,
That depends on what you are looking for.
If you want all the dialogs to be placed at one and the same place, such
a frontscript would be handy.
If you want to have the option to decide for each single modal dialog
where you want to place it - for instance because you want to avoid
specific areas of a card or the screen to be hidden - a solution with
an added scriptline in the modal stack itself and another scriptline
directly inside the triggering handler for determining the loc would
probably be more convenient.
With "customization", I did not think so much of slightly modifying the
prefabricated answer and ask dialogs (which can additionally be modified
by setting other fore- and background colors or patterns, setting the
decorations to empty etc.).
What I had in mind and recommended was the possibility - if necessary
or adequate - to build entirely new dialogs that may have less in common
with the purposes of answer and ask dialogs, but answer to other
specific needs of an application. Such custom dialogs could have more
than one input field, radio buttons, scrollbars (like in my
"modal_dialogs" sample stack with a sixpack of substacks), any kind of
images and icons and even a non-rectangular form using the windowshape
property.
It should be easy to construct your own dialogs once you are familiar
with the use of the dialogdata property and custom properties for the
exchange of data between a mainstack and a modal dialog,
Regards,
Wilhelm Sanke
More information about the use-livecode
mailing list