menuComponent [ ^menuComponent ] menuComponent: aMenu [ menuComponent := aMenu ]initialize [ super initialize. self menuComponent: self initializeMenuComponent; listComponent: StListComponent new. ] initializeMenuComponent [ | bla | bla := StMenuComponent new. bla addEntry: 'All1' withAction: []. bla addEntry: 'All2' withAction: []. self menuComponent: bla. ]I am a Smalltalk newbie, but it looks like you are making a recursive call.
Yes, but not the way you thought. :-) And you set me on the right path, so thanks!
The last line should just "^bla". Now it's returning self, so menuComponent is initialized to self. That's recursive indeed.
Paolo _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
