Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Subform - On Element Change (Read 2187 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Subform - On Element Change
Reply #15 - Jan 23rd, 2006 at 5:25pm
Print Post Print Post  
Thanks for the clarification pictures Mark.  That is not clear in my mind.

Thanks lots for all the detailed explanations, Ray.

I will have to digest them later today, no time right now.  I hope I asked all of the potential questions.  I will have to Cut/Past your reply into my personal Sesame Notes.  (Would still like to see a Decision Tree about Form/Element OnEntry/Exit triggers with respect to standalone and subform conditions and various modes).
-------------------------
Re immediate change question......
I am quite sure that nothing is changing in that element.  It is possible that other elements are changed on FormEntry, like UserID/Date/Time stamps.  But I talking specifically about program code in a specific element firing if I just click into that blank element.  No access to double check right now.....

---------------------------
Perhaps add info to the manuals/guides that only NotifyForm(4) value is valid in TableView subforms.  This explains why NotifyForm() 1 and 0 are not working in FormEntry and FormExit.  Arrgh!  Thanks for this belated information.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
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: Subform - On Element Change
Reply #16 - Jan 23rd, 2006 at 5:45pm
Print Post Print Post  
Quote:
So, if you mean that if an LE box is outlined in a Table View subform, that means we are in Navigate Mode, and ElementExit programming will not execute?  Do I have that correct now?


No you do not have that correct. If you are moving around inside the table view subform the on element exit events will run. Once more, The only time On Element Exit event does not appear to fire is when you are in Navigate mode on a Table View subform and you click on the Parent Form. or on another subform. The reason for this is because that element in the subform still has focus although that form is no longer the form with focus.

Quote:
If we are in Edit Mode, and use an arrow or mouse to exit from the LE, does that immediately put us into Navigation Mode and prevent the Exit code from executing?


Leaving an element/cell in a table view subform and moving to another element/cell in the SAME table view subform will fire the On Element Exit for the element that you are leaving and yes you will be in Navigation Mode.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: Subform - On Element Change
Reply #17 - Jan 23rd, 2006 at 6:35pm
Print Post Print Post  
Quote:
Leaving an element/cell in a table view subform and moving to another element/cell in the SAME table view subform will fire the On Element Exit for the element that you are leaving and yes you will be in Navigation Mode.

So...The  Exit Code fires, and then the Mode Changes.

Moving along......
And since we are now in Navigate Mode, that means that the On Entry code for the LE with focus will not run when we moved because we used a mouse.  BUT...if moved with a TAB, we would still be in Edit Mode and the OnEntry code will run immediately, right?  f we moved with the mouse, we will have to click in that LE again to put us into Edit Mode which will then fire the On Entry for that LE. 

The On Entry for the form will not fire also because we never left the form, therefore we are not entering it again.
=================================

Here is a beginning, feel free to correct and improve.
Part of Decision Tree:

START
1.  Focus comes into Form.  Is Navigate Mode?
.....Yes>No programming is run.  Goto End
......NO>(In Edit Mode) Run Form On Entry programming
......Throw focus to first field if not done in OnEntry program.

2.  Focus lands on LE
3.  Is this a subform?
......NO> goto PARENT FORM SECTION
......YES> Continue to 3.
4.  In Navigate Mode?
.....YES>No programming will be executed.  goto End
.....NO>(In Edit Mode)Run LE OnEntry Programming.
............Wait for user input........
............Receive input>Run LE On ImmediateChange
............NotifyForm=4?
...................NO>Ignore NotifyForm
...................YES>Prevent Delete.
............Lose LE Focus?
............YES>Run LE OnExit programming.  Move focus .
.............NO>.....Wait for user input.........
............ 

PARENT FORM SECTION
5.  In Navigate Mode?
.....YES>No programming will be executed.  goto End
.....NO>(In Edit Mode)Run le OnEntry Programming.
............Wait for user input........
............Receive input>Run LE On ImmediateChange
............NotifyForm?
...................YES>Set Flags per value
............Lose LE Focus?
............YES>Run LE OnExit programming.  Move focus from LE .
.............NO>Lose focus on Form?
....................NO>.Wait for user input.........
...................YES> Goto START

END
=================================
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
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: Subform - On Element Change
Reply #18 - Jan 23rd, 2006 at 7:53pm
Print Post Print Post  
Quote:
So...The  Exit Code fires, and then the Mode Changes.


Yes

Quote:
Moving along......
And since we are now in Navigate Mode, that means that the On Entry code for the LE with focus will not run when we moved because we used a mouse.


No. The on Entry event for the element you are going to is going to run and it does not matter if you use the mouse or the keyboard to get there.

Quote:
BUT...if moved with a TAB, we would still be in Edit Mode....


No, You would be in Navigation mode.

Quote:
If we moved with the mouse, we will have to click in that LE again to put us into Edit Mode which will then fire the On Entry for that LE. 


You will have to either click once more in that element, no matter how you moved there, to get into edit mode or type a character. Typing something automatically puts you in update mode.

Quote:
The On Entry for the form will not fire also because we never left the form, therefore we are not entering it
again.


Did you move to a different record or not? The On Form Entry and Exit commands are slightly misguiding because their names would probably be better off as On Record Entry and On Record Exit.


Quote:
START
1.  Focus comes into Form.  Is Navigate Mode?

You are always going to be in navigate mode when focus is first put on the form.

Quote:
.....Yes>No programming is run.  Goto End
Wrong. The On Element Entry event for the element getting focus is going to run. Also the On Form Entry event is going to run.

Quote:
......NO>(In Edit Mode) Run Form On Entry programming

Nope. You are not going to be in Edit Mode. but Yes the programming is going to run.

Quote:
......Throw focus to first field if not done in OnEntry program.

Huh. Focus is put in the first element/cell of the first record in a Table view subform automatically by Sesame when you advance the parent record.

Quote:
3.  Is this a subform?
......YES> Continue to 3.

This is number 3.

Quote:
4.  In Navigate Mode?
.....YES>No programming will be executed.  goto End


Wrong. Table View Subform Programming is Executed in Navigate Mode. The only event that is not is the on Element Exit event, IF AND ONLY IF you are leaving an element that is in Navigate mode on a table view subform and clicking on an element on the PARENT Form.

Quote:
Receive input>Run LE On ImmediateChange

Only if the keystroke changes the value in the element

Quote:
............NotifyForm=4?
...................NO>Ignore NotifyForm
...................YES>Prevent Delete.

This has nothing to do with an On immediate Change event. If the User hits F3 or Clicks Delete Record on the Menu tree then NotifyForm() is checked to see if it is set to 4.

Quote:
............Lose LE Focus?
............YES>Run LE OnExit programming.  Move focus .
.............NO>.....Wait for user input.........

Yes

Quote:
PARENT FORM SECTION
5.  In Navigate Mode?
.....YES>No programming will be executed.  goto End
.....NO>(In Edit Mode)Run le OnEntry Programming.


No. Parent Forms do not have a navigate or edit mode. ONLY Table View does. And Once again Table View Subform Programming is Executed in Navigate Mode.

Quote:
............Receive input>Run LE On ImmediateChange

Yes

Quote:
............NotifyForm?
...................YES>Set Flags per value

NotifyForm has nothing to do with the programming events. It is a state.

Quote:
............Lose LE Focus?
............YES>Run LE OnExit programming.  Move focus from LE .

Yes, when you leave an element the On Exit event programming will run for that element, assuming you are moving to another element on same form.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: Subform - On Element Change
Reply #19 - Jan 23rd, 2006 at 8:33pm
Print Post Print Post  
Thanks again for clearing that all up.  Grin

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print