>*-- 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