>I have this import that takes
forever and I don't want the user to think their computer's locked up. So I'm trying to force some type of changing message to be displayed. I have this one line of code:
>
>
append from c:\textfile for (thisform.ForceStatus)
>
>that should do the import.
>
>The code in the ForceStatus method doesn't do a whole lot. Basically it's just a case statement, such as this:
>
>
select case
> case mod(recno(), 20) = 0
> msg = "Importing...."
> case mod(recno(), 30) = 0
> msg = "Importing........"
> (and so forth through mod(recno(), 90))
>endcase
>wait window msg nowait
>return .t.
>
>But when I try to run the form I get an error back up at the "append from " line stating that ForceStatus is a method or event or object (or something very similar to that message).
>
>So my question is, where should I put this subroutine so that it may be called by the append statement so that I can have some type of changing message. Thanks!
I haven't tested this... but, my guess is that append shells out to some C++ routine to do its stuff, so ThisForm actually has no context... in other words, append is not running the the scope of the form. Do you have a progress bar form?
Private oProgress
oProgress = create('MyProgressBar')
append from c:\textfile.txt for iif(mod(_tally,10)=0, oProgress.Do(_tally_ , .t.)
oProgress.Release()
release oProgress
***************
What you are doing may work if you do something like...
Private oThisForm
oThisForm = ThisForm
append from c:\textfile for (thisform.ForceStatus)
oThisForm = null
************
BOb