Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
With thisform - we ain't got no stinkin' ...
Message
From
29/10/2004 05:26:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
With thisform - we ain't got no stinkin' ...
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00955711
Message ID:
00955711
Views:
60
Can anyone see anything wrong with this code below? It's a whole method in itself. It works fine. That's the issue. Maybe I've missed something over the years but I always assumed, if you reference a container's objects, you have to reference the container first. Note there is no "With thisform" surrounding the code with .cboTables in it.

I also noticed this with a form property that I'd referenced in another method, without the "thisform" before it.

Is this feature well known, is this a freak or what. Am I the last to realise this?

Terry
LOCAL	lcSafetySet, lnNoFiles, lnLenFileName, lcGenericBody

Create CURSOR csrS3Files (	FILENAME c(12), SIZE n(8,0), CREATED d, INCLUDE l DEFAULT .F.)
APPEND from ARRAY thisform.aFileArray  && csr with list of S3 files - array got in .init()

= ASORT( thisform.aFileArray, 1)	&& Sort array by filename
lnNoFiles			= ALEN( thisform.aFileArray, 1)
With .cboTables	&& Add file names array to combo, inc. size and date last mod. info
  For I = 1 to lnNoFiles
    lnLenFileName	= LEN( ALLTRIM( thisform.aFileArray( I, 1)))	&& Actual length of full filename
    lcGenericBody	= SUBSTR( thisform.aFileArray( I, 1), 3, lnLenFileName-6)
    .AddListItem( PADR( lcGenericBody, 12), I, 1)
    .AddListItem( STR( thisform.aFileArray( I, 2)), I, 2)		    
    .AddListItem( DTOC( thisform.aFileArray( I, 3)), I, 3)
  EndFor
  .Value	  = .List( 1, 1)
  .Enabled = .T.
Endwith 
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Next
Reply
Map
View

Click here to load this message in the networking platform