going through the tutorial..

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

going through the tutorial..

sergio_101-2
i am working through the ToDo list tutorial, and running into a slight problem..

i am up to the point where i have defined my tasks, users, and
list/menu components..

my menu and list components look like:

WAComponent subclass: #StMenuComponent
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: 'STTutTodoApp'

and

WAComponent subclass: #StListComponent
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: 'STTutTodoApp'

when i run the demo so far, initializing StRootComponent, i am getting:

initialize
        super initialize.
        self
  menuComponent: StMenuComponent new;
  listComponent: StListComponent new.

with an error:

StRootComponent(Object)>>doesNotUnderstand: #menuComponent:

any ideas?

thanks!
___
peace,
sergio
www.village-buzz.com
photographer, journalist, visionary
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: going through the tutorial..

Julian Fitzell-2
On Sat, Feb 7, 2009 at 7:51 AM, sergio_101 <[hidden email]> wrote:
i am working through the ToDo list tutorial, and running into a slight problem..

i am up to the point where i have defined my tasks, users, and
list/menu components..

my menu and list components look like:

WAComponent subclass: #StMenuComponent
       instanceVariableNames: ''
       classVariableNames: ''
       poolDictionaries: ''
       category: 'STTutTodoApp'

and

WAComponent subclass: #StListComponent
       instanceVariableNames: ''
       classVariableNames: ''
       poolDictionaries: ''
       category: 'STTutTodoApp'

when i run the demo so far, initializing StRootComponent, i am getting:

initialize
       super initialize.
       self
       menuComponent: StMenuComponent new;
       listComponent: StListComponent new.

with an error:

StRootComponent(Object)>>doesNotUnderstand: #menuComponent:

any ideas?

StRootComponent does not have a method called #menuComponent:

Perhaps you missed a step where you were supposed to add that? Or perhaps you added it to the wrong class or as a class method rather than an instance method?

Julian

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: going through the tutorial..

sergio_101-2
i found it.. i missed the part where you add the instance variables..
then you add the accessor.. it works now..

while i am on this.. what is the difference between instanceVariable
and instanceVariable: ?

--
___
peace,
sergio
www.village-buzz.com
photographer, journalist, visionary
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: going through the tutorial..

Martin Polák

On 8.2.2009, at 7:48, sergio_101 wrote:

> i found it.. i missed the part where you add the instance variables..
> then you add the accessor.. it works now..
>
> while i am on this.. what is the difference between instanceVariable
> and instanceVariable: ?
>

Hi Sergio,
        instanceVariable allows you to get value of desired variable outside  
the class. Similary instanceVariable: is designed to set variable's  
value. This is because of encapsulation, while you have acccess to  
variables only inside the class, where they are defined.


Martin
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside