Re: NTLK Programming question

From: Laurent Daudelin (laurent_daudelin@fanniemae.com)
Date: Fri Jul 28 2000 - 14:32:28 CDT


Jim Anderson wrote:

> I've got a programming question for the newtonscript gurus. I want
> to create a confirmation slip to ask the user if they really want to delete
> something. According to the UI guide, I should give this box a wavy border.
> How do I do this? Can I give any view a wavy border, or is there a special
> "confirmaion view" that I should use. The Newton programming guide and
> references don't seem to have this.
>
> Thanks in advance,

Why not using "ModalConfirm(confirmMessage, buttonList)"? From the Newton Programmer's Reference (pg. 2-32), here's the relevant doc:

"This method creates and displays a slip that returns the result of the user’s
choice. Because this method causes a new task to be spawned, it is less
efficient and takes more system overhead, so you should use
AsyncConfirm in most cases."

As the doc recommends, you could use "AsyncConfirm", but this method immediately returns execution to the NewtonScript code that called it. Since you're looking for a real confirmation,
it might be easier to put up this modal so that your code resumes only once the user has made his choice. Depending on what you're doing, it might be easier. However, if you could
handle that reply asynchronously, then you should use "AsyncConfirm", which takes one more argument, a method to call that takes one argument, the result of the user's choice.

HTH!

-Laurent.
=====================================================================
Laurent Daudelin Developer, Adaptive Infrastructure, CIS
Fannie Mae Washington, DC, USA
Phone: 703-833-4266 mailto:Laurent_Daudelin@fanniemae.com
           ********** Usual disclaimers apply **********

***************************************
NewtonTalk brought to you by:

EVOTE.COM -- the ESPN of politics on the Internet! All the players, all the news, and the hottest analysis and features (plus 'toons!) anywhere.... visit http://www.evote.com today!

***************************************
Need Subscribe/Unsubscribe info?

Visit the NewtonTalk section at http://www.planetnewton.com



This archive was generated by hypermail 2b29 : Tue Aug 01 2000 - 06:50:09 CDT