Discussion:
ON KEY usage in your apps
m***@mbsoftwaresolutions.com
2018-09-18 21:03:18 UTC
Permalink
VFP9SP2 on Win7/8/10 pcs

I really never fully took advantage of this gem in VFP. In my apps, I
haven't allowed editing in grids in probably 14 years. Some of my users
seem to want that though so I'm thinking of allowing such ability now.
I was thinking of using ON KEY to pop up a lookup form to add data
records to the grids (instead of that native whatever way of doing an
APPEND blank in the native VFP grid).

In the past, I've really just used ON KEY to pop up the help file on
demand.

In what other ways have you used ON KEY in your designs?

tia,
--Mike

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-09-18 21:05:33 UTC
Permalink
Post by m***@mbsoftwaresolutions.com
VFP9SP2 on Win7/8/10 pcs
I really never fully took advantage of this gem in VFP. In my apps, I
haven't allowed editing in grids in probably 14 years. Some of my
users seem to want that though so I'm thinking of allowing such
ability now. I was thinking of using ON KEY to pop up a lookup form
to add data records to the grids (instead of that native whatever way
of doing an APPEND blank in the native VFP grid).
In the past, I've really just used ON KEY to pop up the help file on
demand.
In what other ways have you used ON KEY in your designs?
It's worth noting too that I use disconnected cursors (like Charlie
Coleman's approach from the late 1990s!). Backend is MySQL and I
basically just use the current app handle (or re-establish if not
connected) and perform the add/edit/delete. So it's not like I have to
worry about updateable views or anything like that. My own framework is
all SPT calls.

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Frank Cazabon
2018-09-18 23:29:12 UTC
Permalink
Not sure I'm understanding. Do you want to allow editing in the grid or do you want a popup form to edit the records from the grid?

I have allowed editing in grids with no problems for many years using visual max frame.

I would never use an on key label for anything in an application. I would use buttons with hot keys or if that is not possible use the form's key press.
Post by m***@mbsoftwaresolutions.com
VFP9SP2 on Win7/8/10 pcs
I really never fully took advantage of this gem in VFP. In my apps, I
haven't allowed editing in grids in probably 14 years. Some of my users
seem to want that though so I'm thinking of allowing such ability now.
I was thinking of using ON KEY to pop up a lookup form to add data
records to the grids (instead of that native whatever way of doing an
APPEND blank in the native VFP grid).
In the past, I've really just used ON KEY to pop up the help file on
demand.
In what other ways have you used ON KEY in your designs?
tia,
--Mike
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/C8A291C6-A0E2-468B-B16C-***@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-09-19 03:41:41 UTC
Permalink
Post by Frank Cazabon
Not sure I'm understanding. Do you want to allow editing in the grid
or do you want a popup form to edit the records from the grid?
I've always used a separate form for single record add/edit. Then took
that object and validated it in the business object (my controls were
always thisform.oRecord.cLastName, etc.), then passed that to my data
object to add/edit/delete in the backend (MySQL) database via my SPT
code.
Post by Frank Cazabon
I have allowed editing in grids with no problems for many years using visual max frame.
For some reason (probably years before I switched to non-binding VFP
cursors instead of local views or direct tables in my earliest VFP
days), I favored avoiding data entry in grids. Some here may have
helped me form that position too.
Post by Frank Cazabon
I would never use an on key label for anything in an application. I
would use buttons with hot keys or if that is not possible use the
form's key press.
I liked the Help manual idea for it!

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Gene Wirchenko
2018-09-19 01:18:03 UTC
Permalink
Post by m***@mbsoftwaresolutions.com
VFP9SP2 on Win7/8/10 pcs
I really never fully took advantage of this gem in VFP. In my apps,
I haven't allowed editing in grids in probably 14 years. Some of my
users seem to want that though so I'm thinking of allowing such ability now.
I was thinking of using ON KEY to pop up a lookup form to add data
records to the grids (instead of that native whatever way of doing
an APPEND blank in the native VFP grid).
In the past, I've really just used ON KEY to pop up the help file on demand.
In what other ways have you used ON KEY in your designs?
I use
on key label "ctrl+0" *
so .null. can not be entered into controls.

I also enjoy the minor joke of
*
being executable in this control. Note that it does not mean the same as
on key label "ctrl+0"

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000085
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-09-19 03:37:40 UTC
Permalink
Post by Gene Wirchenko
I use
on key label "ctrl+0" *
so .null. can not be entered into controls.
Clever!!!!

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Gene Wirchenko
2018-09-19 04:41:17 UTC
Permalink
Post by m***@mbsoftwaresolutions.com
Post by Gene Wirchenko
I use
on key label "ctrl+0" *
so .null. can not be entered into controls.
Clever!!!!
Thank you, but ...

I do not think of the above as particularly clever; it is
simply something that I worked out to avoid nulls. I happened to
think that way; you did not. With something else, it may go the
other way. Because we can communicate our
discoveries/solutions/what-have-yous, we each end up with more as a result.

This is a big reason why I like forums and lists.

On another point, I had an icase() function about five years
before Microsoft added it to VFP. Except for that Microsoft's
version has selected parameter evaluation and mine has all parameters
evaluated -- not something programmers can control in the VFP
language -- our icase()s work the same.

I wonder if Microsoft came up with the idea themselves -- not
that difficult; it seemed obvious to me -- or glommed onto my idea
(which I had posted publicly). Either way is fine with me, just as I
do not mind anyone using the above bit of code.

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000084
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Christof Wollenhaupt
2018-09-19 04:57:59 UTC
Permalink
Except for that Microsoft's version has selected parameter evaluation and mine has all parameters evaluated -- not something programmers can control in the VFP language -- our icase()s work the same.
Technically speaking, you would be able to achieve this by rewriting the FXP file which must not be encrypted. There's a token for SkipOnTrue and SkipOnFalse that VFP inserts into expressions that are not fully evaluated, such as AND or OR. Whether this is really worth the effort is an entirely different question, though.
--
Christof
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/404CDC5D-46B5-4A33-A4E9-***@wollenhaupt.org
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
John Weller
2018-09-19 07:53:11 UTC
Permalink
I use ON KEY Alt+F2 SUSPEND in my main program for when I get in a loop 😊

John Weller
01380 723235
07976 393631
VFP9SP2 on Win7/8/10 pcs

I really never fully took advantage of this gem in VFP. In my apps, I haven't allowed editing in grids in probably 14 years. Some of my users seem to want that though so I'm thinking of allowing such ability now.
I was thinking of using ON KEY to pop up a lookup form to add data records to the grids (instead of that native whatever way of doing an APPEND blank in the native VFP grid).



_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000f01d44fed$d0e9be50$72bd3af0$@johnweller.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stup
Alan Bourke
2018-09-19 08:51:26 UTC
Permalink
We use ON KEY LABEL F1 for throwing up the application help file. Aside from that we almost exclusively use form KeyPreview() methods I think.
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@webmail.messagingengine.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Fernando D. Bozzo
2018-09-19 11:53:58 UTC
Permalink
I use ON KEY LABEL just for debugging purposes, like suspending, opening
dev tools menu or admin maintenance, dumping memory variables to disk and
the like.
Post by Alan Bourke
We use ON KEY LABEL F1 for throwing up the application help file. Aside
from that we almost exclusively use form KeyPreview() methods I think.
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for th
Koen Piller
2018-09-19 12:24:04 UTC
Permalink
Me too, On Key label activates several app to assist on development. Not
for production except F1 to activate help
Koen
Post by Fernando D. Bozzo
I use ON KEY LABEL just for debugging purposes, like suspending, opening
dev tools menu or admin maintenance, dumping memory variables to disk and
the like.
Post by Alan Bourke
We use ON KEY LABEL F1 for throwing up the application help file. Aside
from that we almost exclusively use form KeyPreview() methods I think.
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACUu1Svz3PJrASACvE-xe64=KRDjwS=dUEFfuj+***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those l
m***@mbsoftwaresolutions.com
2018-09-19 14:22:51 UTC
Permalink
Post by Alan Bourke
We use ON KEY LABEL F1 for throwing up the application help file.
Aside from that we almost exclusively use form KeyPreview() methods I
think.
I think I used the form.KeyPreview method maybe once or twice in 20
years. Hmmmm.....

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Frank Cazabon
2018-09-19 15:19:42 UTC
Permalink
I thought set help on and set help to <file name> automatically make the
F1 key work without having to use on key label. At least I have never
had to set on key label f1 to get my help to work in my applications.

Frank.

Frank Cazabon
Post by Alan Bourke
We use ON KEY LABEL F1 for throwing up the application help file. Aside from that we almost exclusively use form KeyPreview() methods I think.
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/b5ad9bba-280c-44c3-1b3a-***@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-09-20 02:16:11 UTC
Permalink
Post by Frank Cazabon
I thought set help on and set help to <file name> automatically make
the F1 key work without having to use on key label. At least I have
never had to set on key label f1 to get my help to work in my
applications.
I never used the integrated help like that. My F1 key simply called the
routine to launch the appropriate help document (PDF) via ShellExecute.

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Frank Cazabon
2018-09-20 12:37:09 UTC
Permalink
Thinking about it some more, I always have a menu available with the 2
help bars: _mst_hpsch and _mst_help so maybe that's why F1 works by
default, but then again, maybe it just works by default. I have my
screens and controls set (HelpContextID) to bring up specific places in
the help file (CHM) so that the help is context sensitive. If you're not
using the built in help functionality I guess you need to handle the F1
key some other way. It's amazing how much we forget if we don't do this
stuff regularly.

Frank.

Frank Cazabon
Post by Frank Cazabon
I thought set help on and set help to <file name> automatically make
the F1 key work without having to use on key label. At least I have
never had to set on key label f1 to get my help to work in my
applications.
I never used the integrated help like that.  My F1 key simply called
the routine to launch the appropriate help document (PDF) via
ShellExecute.
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/b329627c-0bc8-668d-99f3-***@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages
Stephen Russell
2018-09-19 13:36:39 UTC
Permalink
I wrote software for the used car business and one early customer paid me
big money to put an ON KEY command to format the hard disk. This was
either in 89 or 1990 time frame.

The other On Key was to bring up the command window to execute commands in
an attempt to find out what might be wrong at a client's site.
Post by m***@mbsoftwaresolutions.com
VFP9SP2 on Win7/8/10 pcs
I really never fully took advantage of this gem in VFP. In my apps, I
haven't allowed editing in grids in probably 14 years. Some of my users
seem to want that though so I'm thinking of allowing such ability now.
I was thinking of using ON KEY to pop up a lookup form to add data
records to the grids (instead of that native whatever way of doing an
APPEND blank in the native VFP grid).
In the past, I've really just used ON KEY to pop up the help file on
demand.
In what other ways have you used ON KEY in your designs?
tia,
--Mike
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMY+H1-eEMU9SpOUm8eZJAAOAyUL_3pHJgb=_0t=***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-09-19 14:19:17 UTC
Permalink
Post by Stephen Russell
I wrote software for the used car business and one early customer paid me
big money to put an ON KEY command to format the hard disk. This was
either in 89 or 1990 time frame.
LOL!!! Sounds like the "self-destruct button" on the St. Georges secret
spy ship in the beginning of For Your Eyes Only! "Destruct ATAC
system!"



_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Stephen Russell
2018-09-19 14:59:34 UTC
Permalink
He got the program to do all of his forms but didn't want any "real" facts
outside of his books. Accounting for the auto industry is pretty "obscure"
to be honest. Values you see on contracts are not the same in the GL for
the actual transaction, especially if there was a trade in in the deal as
well as "packaged" add-ons.
Post by m***@mbsoftwaresolutions.com
Post by Stephen Russell
I wrote software for the used car business and one early customer paid me
big money to put an ON KEY command to format the hard disk. This was
either in 89 or 1990 time frame.
LOL!!! Sounds like the "self-destruct button" on the St. Georges secret
spy ship in the beginning of For Your Eyes Only! "Destruct ATAC
system!"
http://youtu.be/vsEMeXATt00
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYLaL+RQrEU-pAQj9A-0RJteMFmgbmOwbkzQuJ2MU6J=***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Gene Wirchenko
2018-09-20 01:16:26 UTC
Permalink
Post by Gene Wirchenko
Post by m***@mbsoftwaresolutions.com
VFP9SP2 on Win7/8/10 pcs
I really never fully took advantage of this gem in VFP. In my
apps, I haven't allowed editing in grids in probably 14
years. Some of my users seem to want that though so I'm thinking
of allowing such ability now.
I was thinking of using ON KEY to pop up a lookup form to add data
records to the grids (instead of that native whatever way of doing
an APPEND blank in the native VFP grid).
In the past, I've really just used ON KEY to pop up the help file on demand.
In what other ways have you used ON KEY in your designs?
I use
on key label "ctrl+0" *
so .null. can not be entered into controls.
I also enjoy the minor joke of
*
being executable in this control. Note that it does not mean the same as
on key label "ctrl+0"
I forgot about my setup code. I use on key label <function
key> for deleting my app's .fxp files, compiling my app, and starting
my app with various options.

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000084
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Continue reading on narkive:
Loading...