Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) @HideTreeItem - Search Menu (Read 3613 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
@HideTreeItem - Search Menu
May 5th, 2005 at 4:42pm
Print Post Print Post  
I seem to be having problems hiding the search menu in my application.  My programming is as follows:

var vHideTree as Int

vHideTree = @HideTreeItem("Employee Database!Forms!Search/Update!Employee!Employee!Search Menu")

It is still showing the search menu when I preview the application.

I know that there is a menu choice under view, Close Command Area but would prefer to deal with it in the programming above.

Thanks,

Louis
  

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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #1 - May 5th, 2005 at 4:51pm
Print Post Print Post  
Right after the line of code above do:
WriteLn(@Error)

If it says Yes, then it can't find the item you are trying to hide. If this is the case, check your spelling and names.

If you want to prevent a Form called Employee from being opened in Search from the application menu, you probably just want:
vHideTree = @HideTreeItem("Employee Database!Forms!Search/Update!Employee!Employee")

TreeItem paths don't continue off into other menus or into dialog boxes. They are not commands. They cannot reference anything other than a findable path to a single item on a single menu tree.
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #2 - May 5th, 2005 at 6:23pm
Print Post Print Post  
Thanks for the quick response.

However, the WriteLn(@Error) does not indicate any errors when I add it to the code and run test program.

I can hide the form but I am really just  trying to hide the search menu as most users do not require this side menu due to the command buttons created in the form.  It also enhances the visual effects of the form on screen.

Is the Search or Add Data menu not part of the tree ?

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #3 - May 5th, 2005 at 6:33pm
Print Post Print Post  
Quote:
However, the WriteLn(@Error) does not indicate any errors when I add it to the code and run test program.


@Error returns runtime errors, not a syntax errors. The "test program" can only chack for syntax errors. You need to run the program to check for @error conditions.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #4 - May 5th, 2005 at 7:25pm
Print Post Print Post  
I wasn't 100% on this function WriteLn(@error).  Thanks for the clarification.

I previewed the program with this code and when it opens, it indicates NO.

I added a second HideTree function to hide the Application Utilities and that works but I can't get the Search menu to hide.

var vHideTree as Int

vHideTree = @HideTreeItem("Employee Database!Forms!Search/Update!Employee!Employee!Search Menu")

vHideTree = @HideTreeItem("Employee Database!Application Utilities")

WriteLn(@error)

Thanks,

Louis
  

Louis Galvao
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: @HideTreeItem - Search Menu
Reply #5 - May 5th, 2005 at 7:28pm
Print Post Print Post  
Hello Louis,

You have to call @Error immediatly after the first @HideTreeItem to see if it is failing.

So your code would be

var vHideTree as Int

vHideTree = @HideTreeItem("Employee Database!Forms!Search/Update!Employee!Employee!Search Menu")

WriteLn(@error)

This would tell you if there is a problem with this HideTreeItem.

The code you want is simply

Code
Select All
vHideTree = @HideTreeItem("Search Menu") 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #6 - May 5th, 2005 at 8:01pm
Print Post Print Post  
Louis,

You may want to call CloseCommandArea.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #7 - May 5th, 2005 at 8:08pm
Print Post Print Post  
Well, I tried both of the codes below with the @error function and it still indicates NO and does not hide the Search menu, so I am stumped.

Out of curiosity, why can you shorten the path to the Search menu that much ?  I assumed that you had to indicate every level for the function to work properly.

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #8 - May 5th, 2005 at 8:28pm
Print Post Print Post  
Mark:

I would prefer to keep the main menu visible but would like to hide the sub menu upon entering the form whether the user is adding or searching/updating.

The CloseCommandArea would eliminate both in my case.

Thanks,

Louis

  

Louis Galvao
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: @HideTreeItem - Search Menu
Reply #9 - May 5th, 2005 at 8:37pm
Print Post Print Post  
Hello Louis,

Put the vHideTree = @HideTreeItem("Search Menu") call in your forms on retrieve spec open programming.

Quote:
Out of curiosity, why can you shorten the path to the Search menu that much ?  I assumed that you had to indicate every level for the function to work properly.


You do have to indicate every level for the tree that you are on, but the Search Menu is not part of the Application menu. There are essentially four different trees. The Application Menu, Search Menu, Add Data Menu, and Search Update Menu.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #10 - May 5th, 2005 at 8:46pm
Print Post Print Post  
Louis,

I'm sorry. I'm giving you debugging instructions for a different command. To see if you have an invalid tree path inspect the return value from @HideTreeItem.

var vHideTree as Int

vHideTree = @HideTreeItem("Employee Database!Forms!Search/Update!Employee!Employee!Search Menu")
WriteLn(vHideTree)

If the WriteLn window shows 0, Sesame was unable to find the tree path you specified.

  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #11 - May 5th, 2005 at 9:28pm
Print Post Print Post  
Ray's previous suggestion to put the code into the On Retrieve Spec Open hides the Search menu but leaves the command area still there, but blank.  I was really trying to close this Command Area automatically when a user goes into the Search/Update mode (or add data mode) so that the whole form could be seen.

I tried Mark's suggestion with CloseCommandArea but that closes the Application menu as well. 

It sounds like I have to do a custom menu to deal with this unless there is another way to Close the command areas other than on the Application menu.

Thanks for the help.

Louis
  

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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #12 - May 5th, 2005 at 9:57pm
Print Post Print Post  
Louis,

You can put the CloseCommandArea(1) command in the On Retrieve Spec Open event. You can then reopen the command area CloseCommandArea(0) in the command buttons on your search menu, or in your On Form Entry event. Or vice-versa. I'm not really clear on when you want it closed and when you want it open.

It's not just a question of what command you issue, but also when you issue it. You should be able to find places to call this command that allow you to open and close the command tree at the time it is needed.
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #13 - May 6th, 2005 at 2:23pm
Print Post Print Post  
Thanks for following thru on this.  This is what I have done:

App Property Manager - On App open: CloseCommand Area state is open

In the Employee Form - On Form Entry: CloseCommand Area state is closed

In the Employee Form - On Form Change: CloseCommand Area state is closed

In the Employee Form - On Retrive Spec Open: CloseCommand Area state is closed

In the Employee Form - On Form Exit: 2 CloseCommand Area states: open first then closed

The effect is that the application menu should always appear but when you go into search update, the search menu is hidden when you scroll thru records or change data and when you exit back out to the App Menu, the App Menu is still visible.

One problem still:  when you exit add data, it hides the App Menu and I am not sure how to fix this.

Would an Event called On Add or Exit Data Menu / On Add or Exit Seach Menu be useful ?

Thanks,

Louis


  

Louis Galvao
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #14 - May 6th, 2005 at 3:38pm
Print Post Print Post  
Further clarification to the problem I mentioned above:

if I enter add data mode or search update mode and do nothing within the form and hit escape, the App menu closes.

I am able to manually re-open via View!Open Command Area.

If there is a way to avoid this, it would be great.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print