Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read/Execute forms method at design time
Message
De
01/07/2003 16:06:39
 
 
À
01/07/2003 15:47:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00805802
Message ID:
00805813
Vues:
47
Ok, I found the problem.

(By the way, I appologize for the wrong subject line. I had something else in mind when I wrote this)

I did not add the ".dbf" to the file-check. Following is the code I tried. You do not have to open the table maually anymore.

Maybe Christof can add/replace this in his ISX.prg.
*====================================================================
* SW: Fills an array with all Fields for the cursor typed in.
* Returns the number of Fields. The cursor has to be open to work
*====================================================================
Procedure CP_Tables
Lparameters toISX

	LOCAL lnCount, lcName, TblWasUsed, OldSelect
	lcName = JustStem(toISX.cEntity)
	
	* *** begin
	if ;
			!Used(m.lcName) .and. ;
			Occurs(".",toISX.cEntity)==0 .and. ;
			!upper(toISX.cEntity) == "M" .and. ;
			File(fullPath(toISX.cEntity + ".dbf")) = .t.
		OldSelect = select()
		sele 0
		use (toISX.cEntity)
		TblWasUsed = .f.
	else
		TblWasUsed = .t.
	endif
	* *** end
	
	If Occurs(".",toISX.cEntity)==0 AND USED(m.lcName)
		toISX.nCount = FCOUNT(m.lcName)
		DIMENSION toISX.aList[toISX.nCount]
		FOR m.lnCount = 1 TO toISX.nCount
			toISX.aList[m.lnCount] = PROPER(FIELD(m.lnCount, m.lcName))
		NEXT
	ENDIF
	
	* *** begin
	if TblWasUsed = .f.
		use in (m.lcName)
		sele (OldSelect)
	endif
	* *** end
	
EndProc 
I still would like to know, if it is possible to get the properties and methods/events from objects in there.

Any ideas anyone?





>Hi All
>
>I have recently downloaded the ISX program written by Christof Lange. I think it's a very nice piece of work! However, I have a view questions (I am using Vfp6Sp5):
>
>- I've noticed, that in order for the dbf-fields to be collected the table has to be opened. Since I have some forms with plenty of tables, and I am to lazy to open them every time I work on those forms, I was wondering if there is a different way to do this.
>
>I went through the code of the ISX.prg and found the place where the fields are gathered, but since I could not find an identifier specifying the source object I have difficulty opening the table only if it really is a table. Here is what I tried to do (but it does not work satisfactory):
>
>* *** starting at line 474
>*====================================================================
>* SW: Fills an array with all Fields for the cursor typed in.
>* Returns the number of Fields. The cursor has to be open to work
>*====================================================================
>Procedure CP_Tables
>Lparameters toISX
>   LOCAL lnCount, lcName, TblWasUsed, OldSelect
>   lcName = JustStem(toISX.cEntity)
>	
>   * *** begin
>   if ;
>         !Used(m.lcName) .and. ;
>         Occurs(".",toISX.cEntity)==0 .and. ;
>         !upper(toISX.cEntity) == "M" .and. ;
>         File(toISX.cEntity) = .t.
>      OldSelect = select()
>      sele 0
>      use (toISX.cEntity)
>      TblWasUsed = .f.
>   else
>      TblWasUsed = .t.
>   endif
>   * *** end
>	
>   If Occurs(".",toISX.cEntity)==0 AND USED(m.lcName)
>      toISX.nCount = FCOUNT(m.lcName)
>      DIMENSION toISX.aList[toISX.nCount]
>      FOR m.lnCount = 1 TO toISX.nCount
>         toISX.aList[m.lnCount] = PROPER(FIELD(m.lnCount, m.lcName))
>      NEXT
>   ENDIF
>	
>   * *** begin
>   if TblWasUsed = .f.
>      use in (m.lcName)
>      sele (OldSelect)
>   endif
>   * *** end
>EndProc
>
>- I saw that there is a reference to Objects and wonder if ISX is picking up properties/methods from objects? If it is, they will not come up on my computer.
>
>
>Thanks for any help/suggestions in advance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform