newbie question: Reading code difficulty.
Ned Konz
ned at bike-nomad.com
Thu Jan 17 16:58:07 UTC 2002
On Wednesday 16 January 2002 02:45 pm, CarlosIAm at aol.com wrote:
> Hello all,
> I am trying to understand the code for PDA. In openAsMorphIn:win various
> PluggableListMorphs are created. In the first one
> PluggableListMorph on: self list: #peopleListItems
> selected: #peopleListIndex changeSelected: #peopleListIndex:
> menu: #peopleMenu: keystroke: #peopleListKey:from:)
>
> I go to the peopleListItems -> ^ peopleList collect: [:p | p asListItem]
>
> My Question: I fail to find where the peopleList instance variable is being
> initialized. The only method where that occurs is updatePeopleList and that
> is not called so far.
Simple answer: put a breakpoint in updatePeopleList, which looks to be the
only place where it's set (assuming that it gets set at all):
updatePeopleList
self halt.
peopleList _ (allPeople select: [:c | c matchesKey: category]) sort.
peopleListIndex _ peopleList indexOf: currentItem.
self changed: #peopleListItems
Now make a new one (I dragged one from the Objects tool). You'll see that it
gets called from initialize (indirectly):
PDA>>updatePeopleList
PDA>>selectCategory:
PDA>>userCategories:allPeople:allEvents:recurringEvents:...
PDA>>initialize
PDAMorph>>initialize
PDAMorph>>initializeToStandAlone
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|