Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can not get it right
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01092465
Message ID:
01092499
Vues:
18
So the new object name is tcObjectName + lcSuffix? It's no the name you pass in.

>I'm passing the name of the object to add. Here is a code from Add method of the class:
>
>*-- Since bars can be added and removed dynamically, care must
>*-- be taken not to accidentally redefine an exising bar.
>IF INLIST(UPPER(tcClass), "CWINDOWBAR", "CSEPARATORBAR")
>  *-- Get the last bar number
>  IF CNTBAR(this.Name) <> 0 AND UPPER(tcClass) = 'CWINDOWBAR'
>    lnBarNumber = GETBAR(this.Name, CNTBAR(this.Name)) + 1
>  ENDIF
>  lcSuffix = ALLT(STR(ABS(lnBarNumber)))
>ENDIF
>
>DO CASE
>  CASE PCOUNT() = 2
>    this.AddObject(tcObjectName + lcSuffix, tcClass, lnBarNumber, this.Name)
>  CASE PCOUNT() = 3
>    this.AddObject(tcObjectName + lcSuffix, tcClass, lnBarNumber, this.Name, tuParm1)
>  CASE PCOUNT() = 4
>    this.AddObject(tcObjectName + lcSuffix, tcClass, lnBarNumber, this.Name, tuParm1, tuParm2)
>  CASE PCOUNT() = 5
>    this.AddObject(tcObjectName + lcSuffix, tcClass, lnBarNumber, this.Name, tuParm1, tuParm2, tuparm3)
>  CASE PCOUNT() = 6
>    this.AddObject(tcObjectName + lcSuffix, tcClass, lnBarNumber, this.Name, tuParm1, tuParm2, tuparm3, tuParm4)
>  CASE PCOUNT() = 7
>    this.AddObject(tcObjectName + lcSuffix, tcClass, lnBarNumber, this.Name, tuParm1, tuParm2, tuparm3, tuParm4, tuParm5)
>  OTHERWISE
>    RETURN .F.
>ENDCASE
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform