[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nsbasic-palm
Subject:    Re: [nsbasic-palm] Digest Number 1250
From:       Douglas Handy <dhandy1 () bellsouth ! net>
Date:       2002-07-31 16:04:04
Message-ID: v02gkusd6kio3s82edr3a7mj1eg1nn12n7 () 4ax ! com
[Download RAW message or body]

Stephen,

>My code on form A checks through a list of sensors. If a sensor is not 
>in the database, then I need to bring up a form to get some user info on 
>the new entry, then return to the previous form and continue the 
>checking routine. I may be in a bit of a brain warp, but I cannot see 
>how to do this under the Palm systems. Any suggestions would be welcome.

How to do this under Palm OS varies with what info you need to get from the
user.  If it can be done by them selecting a given button (eg, no field input,
lists or popups, etc), then you may be able to get by with using Alert().

If you only have to ask for a single piece of text information, I made a small C
program called InputBox which lets you display a prompt of your choice and
accept back a text response.  You can control how many characters they are
allowed to key.  This can be used from within a code block, much like Alert(),
but gets you a single text response rather than a button selection.  If this
fills the bill, search the archives for InputBox.  I think I posted it in a
message in Sep 2001.  It *may* also be on the CD which accompanies Mike V's
book.  (I don't recall.)

If you have to ask for multiple pieces of information, or need a more complex or
custom designed form, the "Zen of Palm" method would be to use a modal form,
particularly one with a private event loop.  Modal forms are not yet fully
supported in NSB, and even if / when they are, I am not sure they will allow a
private event loop.  So for now we'll set aside this choice.

That leaves us with using a separate form to collect the data.  As discussed in
the thread ealier, that mandates your existing code block exits to allow the new
form to process.  Thus, as Mike suggests you need to set a global variable to
remember where you were at in the list of sensors, and be able to have the
"previous" form restart at that sensor rather than the top of the list.

Doug

Community email addresses:
 Post message: nsbasic-palm@yahoogroups.com 
 Subscribe:  nsbasic-palm-subscribe@yahoogroups.com 
 Unsubscribe:  nsbasic-palm-unsubscribe@yahoogroups.com  
 List owner:  nsbasic-palm-owner@yahoogroups.com 

Shortcut URL to this page:
 http://groups.yahoo.com/group/nsbasic-palm  

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic