Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) First click doesn't always 'take' (Read 3788 times)
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: First click doesn't always 'take'
Reply #15 - Dec 18th, 2009 at 3:56pm
Print Post Print Post  
lksseven wrote on Dec 18th, 2009 at 3:29pm:
I will test per your instructions.  (update:  tested - same results.  no stutter with Snapshot 1 FormFieldValue code (also no stutter with all three snapshots commented out.   Snapshot 2 produces the stutter.   The stutter doesn't happen until the user proceeds to click into the subform on the PlaceLineItems command button for the first time.   Could somehow the code from this button not like the XResultSet code in the OnFormEntry ?   I will post that code if you want to see it.)  


We may need to see the entire app. You've got so much going on, it's hard to debug it piecemeal like this.

Quote:
I only have the two @FormFieldValue and FormFieldValue lines in there to test this stutter (or to eliminate @FormFieldValue and FormFieldValue by themselves as causing the stutter).

Those two lines were just an example. I see this all through your code. If you are doing a FormField Value or @FormFieldValue where the form name argument is "" and the instance argument is 0, then you are working with the record you are on anyway and don't need to go around the long way to get/set values. Just use the LE name.
  

- Hammer
The plural of anecdote is not data.
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: First click doesn't always 'take'
Reply #16 - Dec 19th, 2009 at 2:07am
Print Post Print Post  
This reply is probaly too late, and not needed in light of what you are doing now....

But I missed this earlier question:
Quote:
Is there a command to 'setting the focus', or is that just a function of FormThrowFocus to the subform element before performing the desired action?


There are two commands possible:  ThrowFocus() and FormThrowFocus().  For what we were discussing, then I think the FormThrowFocus() command would be the better one.  I used "set focus" because I frequently work with other languages that have commands similar to Sesame.  I was actually thinking of the process, not the command.  Sorry for any confusion.
  



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



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: First click doesn't always 'take'
Reply #17 - Dec 19th, 2009 at 4:49am
Print Post Print Post  
Hi Bob,

ok, thanks for the followup.  I had used formthrowfocus to send focus to the subform in the logical sequence of field entry (navigational order of tabbing would send the cursor from field to field in a logic flow of input) ... but some of my users just can't get on that bandwagon.  They're mouse-crazy and just input something and click on wherever they want to go next.  In that case, throwfocus can get things wiggy, especially if a field entry has certain 'met criteria' that calls forth a @MsgBox ...

Hammer,  thanks for the instruction to just use the LE.  I will.
        Question:  When I click on a command button as my first contact with a subform, which code then fires first - the 'subform OnFormEntry' code, or the 'command button OnElementEntry' code? 

What I can't puzzle past, is regardless of what's going on with this or that, why does the music make a melody when XResultSet is commented out, but does not make a melody when XResultSet is active?

I can send you the app if you wish.  My fear is that my code will look like the Family Circus cartoon where Billy travels the equivalent of 3 blocks (climbing trees, crawling under cars, crossing the street, chasing a cat, playing catch) just to go next door and borrow a cup of sugar for his mom.
« Last Edit: Dec 19th, 2009 at 5:32pm by lksseven »  

Larry
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: First click doesn't always 'take'
Reply #18 - Dec 19th, 2009 at 6:40pm
Print Post Print Post  
lksseven wrote on Dec 19th, 2009 at 4:49am:
Question:  When I click on a command button as my first contact with a subform, which code then fires first - the 'subform OnFormEntry' code, or the 'command button OnElementEntry' code?


My testing shows that the command button is the very last code to execute. The following is the order of execution when beginning with focus in the parent form, then clicking directly on a command button in the subform.

Code
Select All
This is an example of a subform with 3 elements in addition to the command button.

Form     : On Form Entry
Element1 : On Form Entry
Element2 : On Form Entry
Element3 : On Form Entry
Form     : On Element Change
Form     : On Form Change
Element1 : On Form Change
Element2 : On Form Change
Element3 : On Form Change
Form     : On Element Entry
Button1  : On Element Entry 



The stutter you see must be code that is executing in one of the events listed above the Button1 : On Element Entry event.
  


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



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: First click doesn't always 'take'
Reply #19 - Dec 19th, 2009 at 8:36pm
Print Post Print Post  
Thanks for the 'clarify', Carl!  I'm printing that off and sticking it in my prog. manual.
  

Larry
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: First click doesn't always 'take'
Reply #20 - Dec 19th, 2009 at 10:40pm
Print Post Print Post  
I also should explain (or clarify) that the On Element Change line was only in that list because I had some On Form Entry code that made a change to a 4th element, which was not really supposed be part of my test.
« Last Edit: Dec 22nd, 2009 at 2:26am by Carl Underwood »  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print