Re: answer

Scott Raney (raney@metacard.com)
Thu, 27 Feb 1997 11:07:55 -0700 (MST)

On Wed, 26 Feb 1997, Simon Lord wrote:

> When using the answer dialog box my bet is that I can place a custom
> icon rather than have the "!" or "?". How easily is this done.

It's very easy to do, but there are a couple of tricks. The issue is
that the "answer dialog" stack is a substack of the tools stack
(mctools.mc), and if you edit it, you'll need to either save the tools
stack, or move "answer dialog" to make it a substack of your main
stack.

As for the change itself, you can just toplevel the stack "answer
dialog", select the button, and change its icon in the normal way.
You'll also need to remove the part of the preOpenStack handler in the
card script that sets the icon based on the prompt string supplied
with the "answer" command.

But instead of hacking the answer dialog, you'd probably be better off
building your own stack and opening it with the "modal" command. That
way you have total control over how the dialog looks, and you don't
run the risk of making "answer" non-functional for other scripts that
need it. You can pass information back to the calling script either
using global variables, custom properties, or the "return" statement
(see the MetaTalk Reference card on the "modal" command for details).
Regards,
Scott

> --
> [---------------------------] Simon Lord
> [Important letters that.....] Database Engineer, CAE Electronics
> [contain no errors will.....] tel: (514) 341-2000 x3861
> [develop errors in the mail.] fax: (514) 340-5496
> [---------------------------] email: simonl@cae.ca
>

***************************************************************
Scott Raney raney@metacard.com http://www.metacard.com
Any sufficiently advanced technology
is virtually indistinguishable from magic -- Clark's law