CompuServe Messages

#AM TCL Lists

    20-Jul-93 23:09:23
Sb: #7240-#AM TCL Lists
Fm: David Jokinen 70713,1603
To: Burt Johnson 76304,3574
>>>the instance variable is not global, so what do I refer to when I want to say "x->addrow()"?<<< From within any subclass of CArrayPane, do this: itsArray->AddRow(…your instructions…); From anywhere else, do this: CArrayPane *myArrayPane; // You can only get 'myArrayPane' from whoever created it, // which is tricky if it wasn't you! If AppMaker is using // CDLOGDirector and a DITL resource, you can ask // CDirector::FindViewByID(…DITL index…) from the // relevant DialogDirector. myArrayPane->GetArray()->AddRow(…your instructions…); I suggest you use the first technique. It's cleaner and more general. To do this, subclass CArrayPane for each type of list you want to implement, then either have the class update itself, or create access functions for the different ways you want to effect your list. I have a whole suite of classes for the different types of dynamic lists I maintain.