Very Hot Topic (More than 25 Replies) Custom Menu (Read 8634 times)
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Custom Menu
Nov 4th, 2004 at 6:34pm
Print Post Print Post  
Does anyone have examples of custom menu's they could post ?
Tips on creating custom menu's?

I have created custom menu's that work off command buttons using macro's, the problem comes in trying to return to the custom menu after executing a command button macro.I read that Bill Halperm had a demostration at the users conference that addressed this, maybe someone would shed some light on this for those of us who couldn't attend.  Wink
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Custom Menu
Reply #1 - Nov 5th, 2004 at 5:48am
Print Post Print Post  
It's been a long time since I "toyed" with a custom menu, but here's an idea:

Why not use another command button with a macro to exit from the record and return back to the menu.

So 1 macro FROM the menu, and 1 macro BACK TO the menu.

Sound good?

Steve
  
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #2 - Nov 5th, 2004 at 1:46pm
Print Post Print Post  
I tryed a on form exit macro to take me back, but for some reason it didn't work, I searched the archives yesterday and found another thread on the subject that helped a little, still trying to figure that thread out, also talked with insidesesame, and a upcoming edition will have a featured article on it.,soon I hope  Wink, seems to me like a better method would be sbasic programming, I'll keep on it till I get it. Grin The command tree is no problem for me, but when other employee's begin to use the program a custom menu system would avoid alot of problems.
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Custom Menu
Reply #3 - Nov 5th, 2004 at 3:07pm
Print Post Print Post  
I agree with you about the benefit of a menu. Our users are having a really hard time adjusting to sesame. They never learned the in and outs of Q&A, so they are lost in Sesame:

With Q&A's speed, they have gotten into the habit of just hitting escape to 'back out ' of any mistakes they have made and restart. They can do it without thinking and its FAST. Not so in Sesame....at least not yet.

I'll be eager to see that article in Inside Sesame, too. Should be a big help for many of us.

Keep us posted if you learn anything new.

Steve

ps. Something about @setdefaulttab or something like that may be a key to issue. I think its a new 1.1 function.

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


The One & The Only

Posts: 2492
Joined: Aug 20th, 2003
Re: Custom Menu
Reply #4 - Nov 5th, 2004 at 4:04pm
Print Post Print Post  
Quote:
With Q&A's speed, they have gotten into the habit of just hitting escape to 'back out ' of any mistakes they have made and restart. They can do it without thinking and its FAST. Not so in Sesame....at least not yet.


Hello Steve,

Escape works the same way in Sesame. Where in your application does Escape not exit the form or does so slowly?

-Ray
  

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Custom Menu
Reply #5 - Nov 5th, 2004 at 4:28pm
Print Post Print Post  
Ray,

Thanks for the concern. Escape works fine, but the forms 'load' MUCH slower than Q&A (I'm running p4 3ghz w/1gb ram XP pro). In Q&A everything happens instantly, not so with Sesame.

Because of the familiarity and SPEED of Q&A, our users dont need to think. Numerous mistakes and erronous keystrokes can be made up for by banging a few times on the escape key, then mindlessly slamming out 2 or 3 keystrokes to get them where they need to be, instantly. Never reaching for the mouse, never 'misfiring' on the wrong form.

No sifting through a tree, accidently opening wrong forms, accidentally double clicking (which tends to load the wrong form), etc etc.

Basically, the user interface is very different from Q&A's 'memorized' keystrokes. But, I think we all agree its for the better!

Perhaps my forms are overly saturated with buttons and programs so they tend to load slowly (3-5 seconds seems slow compared to Q&A,). As I learn sbasic, I see how more efficient they could be, especially with the functions available in 1.1.

I know things will improve with time, and it takes time to learn ANYTHING new so we'll work until we get it as smooth as possible and we'll struggle a bit along the way.

HOWEVER, I think this is for the better. Sesame has endless potential and has already become FAR more flexible than anything WE can currently do in Q&A.

Sorry to be so long-winded, but I appreciate the opportunity to share our experience with Sesame, seeing that we are committed and will be using it for a LONG time!

Steve


  
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #6 - Nov 16th, 2004 at 2:07pm
Print Post Print Post  
I got the custom menu's working last night all with "@selecttreeitem" commands, I put a command button on the forms to save the record and then call the menu back, not as sleek as I'd like but it works great, used tab forms for the menu, I'd post some screen shots if I knew how to do it. About the speed of Sesame if we all could run in Linux it runs in turbo mode, don't know what the difference is between windows & linux with the speed but it was a real eye opener, I'm guessing its the extra "fat" in the windows operating system. Cheesy
Thanks to Bob Hansen, and Ray I was able to post some screen shots.
http://tinypic.com/m34ly
http://tinypic.com/m34sn
http://tinypic.com/m3511
http://tinypic.com/m352b
« Last Edit: Nov 16th, 2004 at 3:54pm by proudpoppy »  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Custom Menu
Reply #7 - Nov 16th, 2004 at 2:30pm
Print Post Print Post  
Quote:
About the speed of Sesame if we all could run in Linux it runs in turbo mode, don't know what the difference is between windows & linux with the speed but it was a real eye opener, I'm guessing its the extra "fat" in windows.


We develop simultaneously in both Linux and Win32, so there are very few code differences between the two versions. The Sesame data engine does run much faster in Linux. This is primarily due to the much better memory / filesystem management in Unix than MS, not due to any differences actually in Sesame.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
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: Custom Menu
Reply #8 - Nov 17th, 2004 at 1:09am
Print Post Print Post  
I have been experimenting with menus.  Attached are some screen shots of some of my menu toys.  I had these with me at the Users Conference, done with 1.0.4

========================
The first screenshot has two images in the same shot for convenience here.

My first attempt was to make the existing Q&A users feel comfortable with Sesame, make it look and feel the same.   Really looks like Q&A but it really different Sesame forms being called up. Used lines with boxes and buttons.   The choices are buttons that call other forms.  Positioning is critical between forms to prevent jumpiong image of forms changing.

First image is my "Q&A style" Sesame Main Menu. 
Second image is result after clicking on File..


======================
The second screenshot has three images in one shot, again for convenience here.

I really wanted to consider something like a "normal" Main Menu Bar at the top.  Here are the results

First view is the "normal" Menu Bar at the Top.
The second image is the result after clicking on File, which does a drop down list. 
Clicking on Design File opens the menu to the right, and dropping to the bottom and clicking on Customize Application results in the third image.


=======================
The third shot is a screen shot of the Menu Bar System in the Design Mode.  It is just a bunch of buttons that turn Visibility On/Off when clicked.  This is what is underneath the images just shown above.

Buttons can actually be laid over other buttons since only one branch would be visible at any one time.  Use different colors for each drop down branch with a slight offset to the button so you can see where you have buttons on the form. 

I had to use a "Reset" button to minimize them all back to the Main Menu again, but not a big deal.  (Could probably use invisibility status to reverse branches).  One button does it all.  Use of "special characters indicates where branches will extend.

And one more button to Exit the Menu Bar system.



With some planning of labels, and the use of OnImmediateChange programming, these could be made to trigger when the first letter of each is typed.
----------------------------------
Again, these are just experimental toys.  I apologize for any typos, bad colors, unrealisitc menu choices, etc.
« Last Edit: Nov 17th, 2004 at 6:12pm by Bob_Hansen »  



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


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #9 - Nov 17th, 2004 at 11:43am
Print Post Print Post  
Nice Toys  Grin
  
Back to top
 
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #10 - Nov 17th, 2004 at 9:16pm
Print Post Print Post  
proudpoppy,
Could you post some examples of the code you used to create your menus.  I'm trying to do the same thing.

Thanks
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #11 - Nov 18th, 2004 at 1:22pm
Print Post Print Post  
To add a work order:

Var vsuccess as Int
 
vSuccess = @SelectTreeItem("gha!forms!add data!Masterwo!Masterwo")
If vSuccess = 0
{
  Writeln("It Failed")
}
To Search for a work order:
Var vsuccess as Int
 
vSuccess = @SelectTreeItem("gha!forms!Search/Update!masterwo!masterwo")
If vSuccess = 0
{
  Writeln("It Failed")
}  

Then I put a command button on the form to call back the menu:

Var Vsuccess as Int
@Save
VSuccess = @SelectTreeItem("gha!forms!add data!splashscreen!mainmenu")
If vsuccess= 0
{
Writeln("It failed")
}

Not pretty but it works. Grin Grin

  
Back to top
 
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #12 - Nov 18th, 2004 at 2:29pm
Print Post Print Post  
Does your db open to your main menu page?  How do you do that?  Will your command buttons switch between tab pages?  If so how do you do that?

Ok.  I figured out how to close the command area on form entry.  Can you create command buttons to switch between tab pages?
« Last Edit: Nov 18th, 2004 at 5:28pm by Leezerd »  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #13 - Nov 18th, 2004 at 5:55pm
Print Post Print Post  
OK.  Forget what I said about closing the command area on form entry.  Thats not what I wanted.  Can I get my db to start on a menu page? With out the Sesame Database Manager screen appearing?
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #14 - Nov 18th, 2004 at 8:17pm
Print Post Print Post  
Does your db open to your main menu page?

Mine don't, but I read somewhere that you could do that by calling a macro with a startup switch something like this "c:\sesame\programs\sesame.exe - @macro("mainmenu") the instructions maybe on this board.Its in archives pg.#5 "Custom Menus"

Will your command buttons switch between tab pages?

No but a new command in 1.0.5 should help with that.

Hope this helps.
  
Back to top
 
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #15 - Nov 18th, 2004 at 9:52pm
Print Post Print Post  
thanks poppy.  this programming stuff is really starting to strech my brain a little too far.  I have a rudimentary understanding of SBasic, but I haven't got a clue about macros.  What do you expect from a roofer in Detroit?  Do you know when 1.0.5 is being released?
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #16 - Nov 18th, 2004 at 10:55pm
Print Post Print Post  
I know all about that brain stretching, but its good to keep mind busy doing something to make you smarter, macro's are easy, read up on it in the users manual, create one to open your menu, then follow the instructions in thread,
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=archived;action=display...  if I can create something that works than anybody can, believe me I know. Wink

P.S. Last word I heard was, they were expecting it to be released around mid-October.  ???
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Custom Menu
Reply #17 - Nov 19th, 2004 at 1:06am
Print Post Print Post  
Quote:
...I read somewhere that you could do that by calling a macro with a startup switch something like this "c:\sesame\programs\sesame.exe - @macro("mainmenu")...

Here's an example of an actual shortcut's target field that I use:
C:\Sesame\Program\sesame.exe "Data\Price List.db" -macro "Data\Price List Menu.mac"

Note that the macro filename also contains the name of the application file. I did it this way because I have more than one application that uses a custom menu. (I don't close the Sesame command tree, but you could also include a startup switch to do that, if needed.)

The most helpful command button I created, is the one that automates the "Backup Application" function. One click and its done - no browsing through a list of filenames to find the correct backup file for the app I'm working with, and no popup warning message asking me to confirm - it just gets the job done.

Here is the programming for the "Backup" command button:
Code
Select All
var success as Int
var MacroFile as string

success = @SelectTreeItem("Price List!Application Utilities!Backup Application")

if success = 1 then
      {
      MacroFile = @repllas(@fn, "\", "\Backup ")            // Insert "Backup "
      MacroFile = @repllas(MacroFile, ".db", "")            // Delete ".db"
      @macro(MacroFile + ".mac")
      }
 


I could have hardcoded the macro filename, but with this code, I can simply copy & paste it into other apps, without modification.

This code looks for a macro file in this format (assuming you are using the Sesame default directory structure):
C:\Sesame\Data\Backup [AppFileName].mac

Example:
C:\Sesame\Data\Backup Price List.mac

The macro is needed because the @SelectTreeItem function only opens the file selection window where you select or type a filename for the backup copy. The macro I recorded simply contains a mouse-click in the Filename text box (be sure to click so the cursor is at the end of the default "Data\" subdirectory), and then contains the keystrokes to type out the name of the backup copy, then mouse-clicks on Accept.

I don't think it's safe to just click on the filename in the list rather than typing it out. The list of files can (and is likely to) change, and I'm not sure whether Sesame records the name you click on, or if it just records where you clicked - better to be safe than sorry.
  


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



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Custom Menu
Reply #18 - Nov 19th, 2004 at 1:23am
Print Post Print Post  
Quote:
I could have hardcoded the macro filename, but with this code, I can simply copy & paste it into other apps, without modification.

Now that I look at this... stupid me Embarrassed, I forgot that this does still need some modification. The "Price List" portion of the @SelectTreeItem line does need to be changed when used in another application.

It's probably just as easy to use this code, and change the "Price List" portions as needed:
Code
Select All
var success as Int

success = @SelectTreeItem("Price List!Application Utilities!Backup Application")

if success = 1 then
      @macro("C:\Sesame\Data\Backup Price List.mac")
 


The only danger using this simplified version, is if you were to copy the application to a new name, to use it for another set of data, and forgot to modify the programming, the Backup command button would copy the new application to the backup copy for the original application.

Bottom line: Use the more complex code I posted earlier, and simply modify the @SelectTreeItem function as needed.
  


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



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Custom Menu
Reply #19 - Nov 19th, 2004 at 1:44am
Print Post Print Post  
I just checked, and the next release will have a new funtion named @Application(), which can be used on the @SelectTreeItem line to return the name of the application as it appears at the top of the menu tree.

THEN the code can be completely portable without the need for modification. Wink
  


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


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #20 - Nov 19th, 2004 at 5:50pm
Print Post Print Post  
This is my code for executing my Backup Application function with a command button.

var success as Int

success = @SelectTreeItem("NewSesameApplication!Application Utilities!Backup Application")

if success = 1 then
     @macro("D:\My Documents\Sesame\Data\Backup bpi.mac")

Is there any way to save (F10) the record and then backup and then exit Sesame?

maybe something like:
if success = 1 then
     @Save
     @macro("D:\My Documents\Sesame\Data\Backup bpi.mac")
     @Exit

I know theres a thread about command buttons that says something about saving and exiting.  I'll look there, but I'm not sure.

  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Custom Menu
Reply #21 - Nov 20th, 2004 at 2:34am
Print Post Print Post  
@Exit will not exit out of Sesame - it only exits the FORM. You will need to use a macro to exit totally out of Sesame.

While recording a macro, Sesame will NOT exit if you select File/Exit, which is good, because this allows you to actually save a macro that WILL close Sesame during playback.

So, try something like this:
Code
Select All
var success as Int

@Save

success = @SelectTreeItem("NewSesameApplication!Application Utilities!Backup Application")

if success = 1 then
 {
 @macro("D:\My Documents\Sesame\Data\Backup bpi.mac")
 @macro("D:\My Documents\Sesame\Data\ExitSesame.mac")
 }
 


The ExitSesame.mac simply needs to have:
1) Click on File
2) Click on Exit

Or you could just re-record your Backup bpi.mac macro with those 2 steps added on.

Edit:
BTW, this code assumes that the button containing it will be on your data form.
  


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


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #22 - Nov 20th, 2004 at 4:07pm
Print Post Print Post  
Thanks Carl.  I will let you know if this works. Grin Grin 8) 8)
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #23 - Nov 23rd, 2004 at 9:15pm
Print Post Print Post  
Well Carl after sometime trying to get this the way I want it I have come up with this:  I got the save, backup, exit button to work.  And then I decided I didn't want  the exit part.  So I took that out.  I still wanted to open my database to the add data form with a shortcut on the desktop.  So I recorded a macro to do that.  The database opens just fine with the macro.  Here's the problem.  When I open my database with the open macro the save/backup macro doesn't work.  If I take the open macro out, the save/backup works.  Here's what my shortcut target looks like:

C:\Sesame\Program\Sesame.exe "D:\My Documents\Sesame\Data\bpitest.db" -macro "d:\my documents\Sesame\Data\openbpi.mac

The code for the Save/Backup button is the same as above.

The Sesame program (sesame.exe) resides on the C:\ of my computer, the .db files are located on a drive image (D:\) for backup/safety purposes.  Could that affect the way these work together?

Any suggestions on why this is happening?  ??? Cry ??? Cry
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2492
Joined: Aug 20th, 2003
Re: Custom Menu
Reply #24 - Nov 23rd, 2004 at 9:55pm
Print Post Print Post  
Hello Leezerd,

Try this.

Start Sesame with your Open Macro.
Re-Record your Save and Backup Macro
Save the Newly Created Macro as
D:\My Documents\Sesame\Data\Backup bpi2.mac
Go into Designer and change the code for your button so it now references the new macro.
Reconcile

Now test your database with both macros.
  

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


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
IRe: Custom Menu
Reply #25 - Nov 24th, 2004 at 12:38pm
Print Post Print Post  
Ray,

When I go to save the new backup macro, I can't save it in the same directory.  I only have one database root directory to choose from:  C:\Sesame\Program

All my .db files and the open macro is saved on the drive image (D:\).  When I open Sesame with a macro I cannot choose to save the backup macro in D:\.

Thats why I resorted to recording them seperate of each other.  This also causes a problem with the path of the backup .db files.  I get the same problem.  Can't save to the D:\.

Suggestions  ??? ??? ???
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Custom Menu
Reply #26 - Nov 24th, 2004 at 2:00pm
Print Post Print Post  
I had that problem, try right clicking on the icon to start Sesame and go to properties then down to "start in box" and change the path to c:\Sesame, then start sesame.  Cheesy
  
Back to top
 
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Custom Menu
Reply #27 - Nov 24th, 2004 at 4:07pm
Print Post Print Post  
That was it!!  Ray was right about recording the macro, and poppy was right with the open in command.  You all have been a great help to me with this. I appreciate it.
Grin Grin Grin
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged