replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - How to update many small edit boxes at once?
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to update many small edit boxes at once?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Little-Acorn



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Fri Jul 25, 2008 4:46 pm    Post subject: How to update many small edit boxes at once? Reply with quote

I have a program where nine unrelated variables are displayed, in nine small edit boxes, all in one window. There's a program running in the background, that occasionally changes one or more of them. I'd like to update them regularly. Presently I'm doing it with nine "update" statements in a row.

Is there a way to do it with one "update" statement?

And/or is there any real harm in using nine "update" statements like this? Looks tacky, but who's looking? Seems to work fine.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2403
Location: Yateley, Hants, UK

PostPosted: Fri Jul 25, 2008 5:24 pm    Post subject: Reply with quote

There is no real harm in doing nine updates - the process is quick. Have you tried just updating one and seeing if the other 8 follow suit? (I'm never sure what happens).

If the variables were all of the same type, and stored in an array, you could do it in a loop, which is 3 statements not 9. You can always use EQUIVALENCE to give the array elements separate individual names.

Eddie
Back to top
View user's profile Send private message
Little-Acorn



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Sun Jul 27, 2008 4:22 am    Post subject: Reply with quote

Thanks, Eddie. I don't really care how a program looks, as long as it is fairly easy to debug and runs smoothly. And this does! I appreciate the feedback.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group