Richard,
I have had problems similar but not the same when the class uses some code that
moves the current selected area and doesn't put it back and the error then
relates to a variable used to create the index which is a little misleading.
Make sure that whenever you use a select() area in a function/procedure that
you save the alias in use when you enter the code and put it back before you
exit the code.
If you do this then be prepared for the situation where you don't have a
current alias() value on entry as this can screw you up big time even though it
is very rare.
I have a function SelectAlias(<cAlias>) which does this automatically so you
can do:
Function <myFunction>
Local cOldAlias, lOK
cOldAlias=SelectAlias()
...
... code
...
lOK=.T.
try
Select(cOldAlias)
catch
lOK=.F.
endtry
*
Return lOk
*
Endfunc
Obviously you can interrogate the return value if you need to see whether there
was an initial Alias specified or the initial alias has been closed somewhere
in the ..code.. without you being aware.
Dave
-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Richard Kaye
Sent: 07 October 2015 16:03
To: [email protected]
Subject: RE: Weird problem with REFRESH()
And just in case there's any confusion I'm referring to the native VFP
REFRESH() function and not the Refresh() method of some object.
--
rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Richard Kaye
Sent: Wednesday, October 07, 2015 10:51 AM
To: [email protected]
Subject: Weird problem with REFRESH()
Here you go; a real VFP question.
This has been puzzling me greatly. I have a base container class with a bunch
of buttons for nav and CRUD operations, etc. In the code that handles going in
and out of edit mode, I have a bit that fires off a REFRESH() when the user
goes into edit mode; the goal being to make sure the user has the most recent
data before they start editing. Under certain very rare but reproducible
circumstances, simply executing the REFRESH function results in a variable not
found message. I cannot for the life of me figure out why this error is coming
up when I call REFRESH. It's not a parameter for the view or a column in the
underlying table. Anyway, I'm hoping this might stir up some similar memories
out there in the finest list in the land. :-)
--
rk
--- StripMime Report -- processed MIME parts --- multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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.