Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Undefined error at build time
Message
 
À
03/12/2003 17:00:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00855601
Message ID:
00855728
Vues:
16
>Hehe, stranger still ...
>
>This compiled without a hitch (both to .app and .exe) in VFP8/3117:
>
>
LOCAL oSeries, myObject
>external array oSeries
>
>oSeries=This.Parent.Series
>
>IF oSeries.Count=1
>   myObject=oSeries(1)
>ELSE
>   myObject=oSeries
>ENDIF
>
>There was no FUNC oSeries or DIME oSeries[1] or whatever anywhere in the project.


The real code was a clas definition as I said earlier.
More like this:
*In the Main PRG
*(some code)
SET PROC TO OtherPRG.PRG ADDI
MyObject=CREATEOBJECT("SomeObject")
*(more code)


*Other PRG

* I have to add "DIME oSeries[1]" here

DEFINE CLASS SomeObject AS Custom
  FUNCTION INIT()
  *(some code)
    This.AddObject("Serie","SerieClass")
    This.AddObject("Problem","ProblematicClass")
  ENDFUNC
ENDDEFINE

DEFINE CLASS SerieClass AS Collection
  *(some code)
ENDDEFINE

DEFINE CLASS ProblematicClass AS Custom
*(some code)

  FUNCTION WithTheProblem
    
    LOCAL oSeries,myObject,(others ...)
    
    * ok now with "EXTERNAL ARRAY oSeries" here

    oSeries=This.Parent.Series
    IF oSeries.Count=1
	myObject=oSeries(1)
    ELSE
	myObject=oSeries
    ENDIF
    *(other code...)

  ENDFUNC

ENDDEFINE
Thanks again for your time :-)

UPDATE:

I have done the test again, and it seems that you were right, the DIMENSION was not needed at all...

Really strange.
BTW i have restarted VFP before the later test, maybe something was stock on memory?

EOF :-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform