Normal Topic [Solved] Simple Menu Setup ? (Read 841 times)
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
[Solved] Simple Menu Setup ?
Oct 17th, 2007 at 9:56pm
Print Post Print Post  
I have several applications for a client, and decided to explore a simple menu, similar to the one found in the SAMPLES folder, called "FirstLook."  In that file, after clicking the GETTING STARTED button, a menu appears, showing several buttons: Customers, Employees and ZipCodes.  I believe this application calles the ZipCodes database (Application?) by clicking on that button. 

So, I decided it would be a good idea to use that technique to call several applications for my client. 
I copied the code, and tried to use it to call the BUSINFO database. (This database is one of several for a school bus company, and stores data for each bus.)

The Add Data and Search window appears, titled "Bus Information".
When I click either option, (Add Data, or Search),  it will not call the database called BUSINFO.

I think I missed something.  I want to use buttons for other databases such as Personnel, Payroll and Students, etc.; and was hoping to use a single menu to call each of these applications. 

The BUSINFO program is a copy of the FirstLook sample, modified to call the Businfo application.
(I am using version 2.0.3 Personal)  Am I missing something very simple?


var vButton as String
var vMenu as Int

     // Ask the user what mode to enter
     // Position the choices over the clicked button
     PopupSelectPosition(4, @XPos(ThisElement) + 80, @YPos(ThisElement))
     
     vButton = @PopupMenu("1. Search\\Update;2. Add", "BUS INFORMATION")

     // Once the selection is made, run the menu tree command
     If vButton = "1. Search\Update" Then

     {      
           vMenu = @SelectTreeItem(@Application + "!Forms!Search/Update!BUSINFO!BUSINFO")

     }
     Else If vButton = "2. Add"
     {
           vMenu = @SelectTreeItem(@Application + "!Forms!Add Data!BUSINFO!BUSINFO")
     }
###END###
« Last Edit: Oct 18th, 2007 at 9:44am by Hammer »  
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: Simple Menu Setup ?
Reply #1 - Oct 18th, 2007 at 1:08am
Print Post Print Post  
I have used the same sample code successfuly.  Great model.

I am looking at your syntax and don't see any glaring errors.  Are you sure the spelling of the database and the forms are correct? No missing/trailing spaces in the labels for the 2 options?

It sounds like the popup menu to Search or to Add is appearing, is that correct?  It is when you click on option 1 or 2 that the expected form does not open?

If Menu Tree is open can you open the Add/Search forms .... not a secutiry issue of permissions?
  



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


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Re: Simple Menu Setup ?
Reply #2 - Oct 18th, 2007 at 1:32am
Print Post Print Post  
Bob,
Thanks for checking this.  Yes the syntax is correct.  I discovered my problem.  Being an old Q&A guy, I had the databases in separate applications.  When I merged the databases into a single application, it works as I intended.  Problem solved.  Yahoo...
I am sure having fun browsing the new User Guide, and putting little yellow Post-it markers on important pages.  Having been away from Sesame for over a year, I have to re-learn some of it.  Wink
Jack
  
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: Simple Menu Setup ?
Reply #3 - Oct 18th, 2007 at 4:45am
Print Post Print Post  
I know the feeling about Q&A habits.  In this past week I had to instruct two Sesame users on the method of combining multiple Q&A databases into one Sesame container called an application. 

Sorry I did not think of it for this problem, but glad you got it resolved.  Sometimes it helps just to know there is someone to talk to about a problem, and suddenly the solution jumps right out. 

Well done! Smiley
  



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