Normal Topic On Application Open event...not working? (Read 958 times)
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
On Application Open event...not working?
May 8th, 2007 at 6:44pm
Print Post Print Post  
Time to cry uncle!

I have a simple menu created as a front end for three smal databases.

When a user opens the menu I just want the menu to appear...in other words I want to completey eliminate the menu tree structure altogether.

To do this I have added and tested (the test posts no errors) the following code in the Application Property Manager as described on page 15 of the Sesame Programming Guide.  (I have also searched this forum for topics to this end and it appears that others have been able to make this work):

Code: var N as Int
n = @SelectTreeItem("MENU!Forms!Search/Update!MENU!MENU!")

Can anyone please lend this stranded sojourner a hand?

Thank you...

Cliff
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: On Application Open event...not working?
Reply #1 - May 8th, 2007 at 6:52pm
Print Post Print Post  
Hello Cliff,

Is your application title 'Menu'? The application title is the top line in the menu tree when you are looking at the application menu.

Also you have an extra ! at the end, you do not need it there.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: On Application Open event...not working?
Reply #2 - May 8th, 2007 at 6:58pm
Print Post Print Post  
Yes the application name is Menu.
I removed the last "!" and retested...same results.

I don't know if I am confusing terms or whatever but the desired end is that a user would open Sesame, select the application file to open and upon doing so be immediately presented with the menu.

As it remains the user must select from among a host of items that they are not familiar with in the menu tree.

You probably understood me in this...however, I am just not sure I communicated this very well...

Again...Thanks...
  
Back to top
 
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: On Application Open event...not working?
Reply #3 - May 8th, 2007 at 7:23pm
Print Post Print Post  
Hi Ray:

Newbie that I am I "ripped off" and tweaked the following code from "DesignTips" and we seem to be good to go for now...unless you have any concerns about the efficiency of this...

Thanks again for your help...

Cliff

Var vTree as INT
var vHideTree as INT

// Hide all Tree Items at the Application Menu Level
vHideTree = @HideTreeItem("MENU! Forms")
vHideTree = @HideTreeItem("MENU!Application Utilities")

// Open Main Menu
vTree = @SelectTreeItem("MENU!Forms!Add Data!MENU!MENU")

SetDefaultTab("Add Data MENU")
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: On Application Open event...not working?
Reply #4 - May 8th, 2007 at 7:52pm
Print Post Print Post  
Cliff,

You might consider using CloseCommandArea to hide the command tree (and specs window). If you do, remember to put code in to toggle the command area on a button, so the users can, if they want to, get to the command tree and specs.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Application Open event...not working?
Reply #5 - May 9th, 2007 at 12:32am
Print Post Print Post  
If you decide to follow Mark's suggestion, this is how it's done.

In the On Application Open event:
Code
Select All
var Success as Int

Success = @SelectTreeItem(@Application + "!Forms!Search/Update!Menu!Menu")

SetDefaultTab("Search/Update Menu")

AddToTranslationTable("Search/Update Menu", "Main Menu")

CloseCommandArea(1) 



In the On Element Entry event for a command button used to toggle the command area, located on the menu form:
Code
Select All
If @CloseCommandArea() = 1
	CloseCommandArea(0)
Else
	CloseCommandArea(1) 

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: On Application Open event...not working?
Reply #6 - May 11th, 2007 at 1:27pm
Print Post Print Post  
Thanks all...!!

Cliff
  
Back to top
 
IP Logged