"Instance of SampleForm did not understand #myInstanceVariable"

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

"Instance of SampleForm did not understand #myInstanceVariable"

test email
I am going through the "Spec UI framework" manual and creating a simple UI interface for a program I am writing. When I do a:
foo := SampleForm new openWithSpec.

I am getting the following error:
"Instance of SampleForm did not understand #okButton"

okButton is an "instance variable" of the [SampleForm] class and for some reason the class method is not seeing it. The exact line that brings up this error is here:

SampleForm class >> defaultSpec
   ^ SpecLayout composed
     newRow: [ :row |
       row add: #okButton ]  <----- error happens here
     origin: 0 @ 0 corner: 1 @ 0.7;
     yourself

Am I missing something incredibly simple? Should I refer to a instance variable with a hash tag in front of it?