Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ryss Unger
  Where is Ryss Unger?
 Cape Town
 South Africa
 Ryss Unger
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: testing for empty()
Thread ID: 153 Message ID: 155 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Sunday, May 13, 2001 3:36:05 PM         
   


> This is weird. Is it possible that you have some kind of error handling system that puts you on the wrong track?
>
> For example, this line
>
> if empty(&kf2)
>
> may result in an error if the table is not in use. Perhaps you wrongly typed the value of thisform.keyfield2.
>
> ----------------
> Hth,
>
> Eric den Doop
> www.foxite.com
Hi Guys,
kf2 = thisform.keyfield2 could well relate to an object and not the value or the field in a table, thus always = .t.

also note :-
if ! empty(thisform.focustext)
ft = thisform.focustext
thisform.&ft..setfocus
endif

Could be achieved with :
if ! empty(thisform.focustext.value)
thisform.focustext
endif

I would avoid the macro substitution " &" unless absolutely required. can give unexpected behaviour.
HTH
Ryss

ENTIRE THREAD

For Eric den Doop Posted by chris smith @ 5/13/2001 1:29:33 PM
RE: For Eric den Doop Posted by Eric den Doop @ 5/13/2001 2:53:30 PM
testing for empty() Posted by Ryss Unger @ 5/13/2001 3:36:05 PM
RE: testing for empty() Posted by chris smith @ 5/13/2001 4:39:14 PM
RE: testing for empty() Posted by Ryss Unger @ 5/14/2001 1:56:22 PM
RE: testing for empty() Posted by Dale Dedoroy @ 5/14/2001 9:31:39 PM