dbTalk Databases Forums  

Tab sequence with script triggers

comp.databases.filemaker comp.databases.filemaker


Discuss Tab sequence with script triggers in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Tab sequence with script triggers - 04-25-2011 , 02:17 PM






FMP 10: I want the tab to jump to a new object depending on various
stuff I need to calculate; meaning the good old tab sequence is not good
enough, but there are script triggers.

Trouble is, OnObjectLeave fires upon various actions, not just when tab
has been pressed, and it seems impossible to calculate what has been
done. This is a pity because the user doesn't want go anywhere if he
pressed enter or clicked outside the field.

The only way I see is the OnObjectKeystroke trigger:

If ( code ( get ( triggerkey ) ) = 9 ) // tab
go to that dozen dead oceans
exit script (0) // ignore the key that fired the script
Else
exit script (1) // false alarm: process the key that fired the script
End if

Fire a script after each and every keystroke does not look efficient to
me. Is there a better way?

--
http://clk.ch

Reply With Quote
  #2  
Old   
cortical
 
Posts: n/a

Default Re: Tab sequence with script triggers - 04-27-2011 , 03:28 AM






On 26/04/11 4:47 AM, Christoph Kaufmann wrote:
Quote:
FMP 10: I want the tab to jump to a new object depending on various
stuff I need to calculate; meaning the good old tab sequence is not good
enough, but there are script triggers.

Trouble is, OnObjectLeave fires upon various actions, not just when tab
has been pressed, and it seems impossible to calculate what has been
done. This is a pity because the user doesn't want go anywhere if he
pressed enter or clicked outside the field.

The only way I see is the OnObjectKeystroke trigger:

If ( code ( get ( triggerkey ) ) = 9 ) // tab
go to that dozen dead oceans
exit script (0) // ignore the key that fired the script
Else
exit script (1) // false alarm: process the key that fired the script
End if

Fire a script after each and every keystroke does not look efficient to
me. Is there a better way?


Hi Christoph,

I use the same approach ( st; OnObjectExit ; get trigger keystroke) for
search fields to return the cursor to the same point while triggering
refreshing the portal search result (i.e re-insert the cursor at teh
same point if keystroke not tab/rtn/enter. Haven't found it to be
noticeably inefficient





Chris

Reply With Quote
  #3  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Tab sequence with script triggers - 04-27-2011 , 06:16 AM



cortical <cb (AT) corticaldata (DOT) com.au> wrote:

Quote:
I use the same approach ( st; OnObjectExit ; get trigger keystroke)
I use on OnObjectKeystroke because get ( trigger keystroke ) doesn't
return anything when I use OnObjectExit.

Does it work for you?
--
http://clk.ch

Reply With Quote
  #4  
Old   
cortical
 
Posts: n/a

Default Re: Tab sequence with script triggers - 04-27-2011 , 07:45 PM



On 27/04/11 8:46 PM, Christoph Kaufmann wrote:
Quote:
cortical<cb (AT) corticaldata (DOT) com.au> wrote:

I use the same approach ( st; OnObjectExit ; get trigger keystroke)

I use on OnObjectKeystroke because get ( trigger keystroke ) doesn't
return anything when I use OnObjectExit.

Does it work for you?
No, poor explanation on my part. I use OnObjectModify as a ST, with the
field defined go next object using tab/rtn/enter, and OnObjectExit to
trigger a refresh, or other script or subprocess

The triggered script sets a variable using Get (TriggerKeystroke) (9,13,10).

OnObjectExit does not return a Get (TriggerKeystroke) value.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.