Normal Topic @PopupMenu problem (Read 759 times)
CapitalG
Full Member
Members
***
Offline



Posts: 143
Location: Phoenix, Arizona
Joined: Mar 4th, 2003
@PopupMenu problem
May 7th, 2004 at 5:06pm
Print Post Print Post  
I am looking at the Invoicing System featured in the March and April 2004 Inside Sesame.  I have a part of the programming that does not appear to be working correctly(meaning I've goofed again.)  The PopupMenu should show a list of numbers(quantities) from 1 - 9 and then another line that reads more...

1
2
3
4
5
6
7
8
9
more...

Instead, the PopupMenu displays

1,2,3,4,5,6,7,8,9,more...

What am I doing wrong?

Here is the code

vStartQty = 1
vEndQty = 9
vSelectedQty = "More..."
while vSelectedQty = "More..."
{
For i = vStartQty to vEndQty
vQuantities = vQuantities + i + ","
Next
vSelectedQty = @PopupMenu(vQuantities + "More...", "SELECT QUANTITY for" + @Newline() + vSelectedItem)
vStartQty = vEndQty + 1
vEndQty = vStartQty + 9
vQuantities = ""
}
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: @PopupMenu problem
Reply #1 - May 7th, 2004 at 5:51pm
Print Post Print Post  
I haven't tested this yet, but it looks like you may have a typo in the program.

Try changing from this:
Quote:
For i = vStartQty to vEndQty
vQuantities = vQuantities + i + ","
Next

To this:
Quote:
For i = vStartQty to vEndQty
vQuantities = vQuantities + i + ";"
Next


Changed the comma to a semicolon.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
TJCajun
Junior Member
**
Offline


"Laissez les bons temps
rouler"

Posts: 72
Location: Louisiana
Joined: Nov 25th, 2002
Re: @PopupMenu problem
Reply #2 - May 7th, 2004 at 6:07pm
Print Post Print Post  
If the change from a "comma" to a "semi-colon" corrects the problem, then it looks like it is wrong in the article.  I just looked, and it definitely looks like a "comma" on p5 of the March 2004 issue. 

Page 37 of the Programming Guide for @PopupMenu states:
   Displays a popup menu/selection list containing semicolon-delimited list with specified menu header y.

  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @PopupMenu problem
Reply #3 - May 7th, 2004 at 6:13pm
Print Post Print Post  
Both the comma and the semicolon worked in earlier versions. In later versions, only semicolon works for PopupMenu. The comma is being phased out as a valid separator. It will be retained in the old Q&A commands for compatibility, but is deprecated.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
CapitalG
Full Member
Members
***
Offline



Posts: 143
Location: Phoenix, Arizona
Joined: Mar 4th, 2003
Re: @PopupMenu problem
Reply #4 - May 7th, 2004 at 6:38pm
Print Post Print Post  
Thanks!   The semicolon did the trick.

  
Back to top
 
IP Logged