Normal Topic [Fixed] Startup Form and Events (Read 1563 times)
MP
Full Member
***
Offline



Posts: 104
Joined: Sep 3rd, 2007
[Fixed] Startup Form and Events
Dec 21st, 2007 at 12:45pm
Print Post Print Post  
Added as feature in 2.0.5

This is a feature request.  I think that the Form and Layout Elements on a Startup form should trigger events such as On Form Change and On Element Change.  Here's why.

My Startup form acts as the primary control panel for the application.  The intent is to provide all of the functionality necessary such that I can hide the Sesame command panel.  The goal is to keep the application as simple as possible, and I feel that the command panel is only useful for more highly skilled users.  One of the things that I do is provide the ability to generate reports from the Startup form.  This involves having layout elements such as radio buttons, check boxes, text boxes, etc.  However, because Sesame doesn't trigger the standard form and element events on the Startup form (beyond On Element Entry), I'm limited in what I can do with the layout elements.  For example, I can't have the check box only exist in a True/False state (i.e. eliminate the NULL state).  Also, I can't have text box modifications trigger XLOOKUPs.  There's a lot one could do with form/element events on the Startup form.

I guess a workaround would be to utilize popup dialog boxes to handle some of this advanced functionality on the Startup form.  I haven't played with these yet, but I'm assuming the popup dialog boxes allow for form/layout events.  But still, it's certainly an unnecessary step from a GUI design perspective.  In my view, if there's no real need to pop up an extraneous window, it should be avoided.
« Last Edit: Jan 4th, 2008 at 2:38am by Hammer »  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Startup Form and Events
Reply #1 - Dec 21st, 2007 at 2:00pm
Print Post Print Post  
Why not have a command button that executes your code based on the setting in the other elements? Or if you still want full fuctionality, you can still use SetDefaultTab() instead of Startup Form.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Startup Form and Events
Reply #2 - Dec 21st, 2007 at 2:33pm
Print Post Print Post  
BTW, if you want to make sure that bug reports and feature requests get processed and placed in the Development queue, use the Online Support Request Form.
  

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



Posts: 104
Joined: Sep 3rd, 2007
Re: Startup Form and Events
Reply #3 - Dec 21st, 2007 at 2:34pm
Print Post Print Post  
Quote:
Why not have a command button that executes your code based on the setting in the other elements? Or if you still want full fuctionality, you can still use SetDefaultTab() instead of Startup Form.

Both are possible, but neither are clean.

With your first suggestion, you force the user to initiate actions that should be able to happen automatically.  And also, it doesn't solve all issues.  As per the example I presented, you'll still be stuck with having a check box be able to exist in a NULL state.

Your second suggestion is better.  It overcomes most of the shortcomings I mentioned.  However, it's aesthetically awkward.  This is because you now have, on startup, two tabs.  One called Application Menu, which effectively serves no purpose (especially when using -closed on startup) and one called (using the programming example in the documentation) "Search/Update Main Menu".  "Search/Update Main Menu" is a confusing tab name for the user, as it isn't really a Search/Update window.

The cleanest solution would be to have a fully functional form exist as the Application Menu tab.
  
Back to top
 
IP Logged
 
MP
Full Member
***
Offline



Posts: 104
Joined: Sep 3rd, 2007
Re: Startup Form and Events
Reply #4 - Dec 21st, 2007 at 2:36pm
Print Post Print Post  
Hammer wrote on Dec 21st, 2007 at 2:33pm:
BTW, if you want to make sure that bug reports and feature requests get processed and placed in the Development queue, use the Online Support Request Form.

Will do.  Thx.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Startup Form and Events
Reply #5 - Dec 22nd, 2007 at 6:27am
Print Post Print Post  
MP wrote on Dec 21st, 2007 at 2:34pm:
and one called "Search/Update Main Menu".  "Search/Update Main Menu" is a confusing tab name for the user, as it isn't really a Search/Update window.

These will rename the tabs.
AddToTranslationTable("Search/Update Main Menu", "Main Menu")
AddToTranslationTable("Application Menu", "")


This will show just "Main Menu" and a very small, blank, tab. It's not perfect, but better than the confusing view of "Application Menu" and "Search/Update Main Menu".

BTW, for full fuctionality in a Menu (i.e. default form), you would want to use Add mode, not Search mode. I suspect you already knew that, anyway.
  


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



Posts: 104
Joined: Sep 3rd, 2007
Re: [Fixed] Startup Form and Events
Reply #6 - Jan 30th, 2008 at 12:56am
Print Post Print Post  
(Cross posted to Lantica Online Support Request)

The change log for 2.0.5 states: "Startup forms now respond to all SBasic events."  My testing shows that at least the following events aren't responded to:

On Form Entry
On Form Exit
On Form Reveal
On Form Hide

On Form Entry is of particular importance, since it contains the initialization code of the startup form.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: [Fixed] Startup Form and Events
Reply #7 - Jan 30th, 2008 at 1:35pm
Print Post Print Post  
MP: On Form Exit would never be triggered for a Start Up form, as it never moves between records. We'll look into the other three events. Depending on what your initialization code does, you may be able to put it in GLOBAL CODE and get the effect you want.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged