[Newbies] Re: SBECell

Sean P. DeNigris sean at clipperadams.com
Mon Aug 16 15:30:00 UTC 2010



john mcelhose wrote:
> 
> messageSelectorAndArgumentNames
>  "create quinto game"
>  
>  | initialize |
>  initialize
>      super initialize.
>      self label:''.
>      self borderWidth: 2.
>      bounds:= 0 at 0 corner: 16 at 16.
>      offColor := Color paleYellow.
>      onColor := Color paleBlue darker.
>      self useSquareCorners.
>      self turnOf
> 
It looks like you kept the "messageSelectorAndArgumentNames" part of the
template.  So what you have now is:
* a method called messageSelectorAndArgumentNames
* which uses a temporary variable "initialize" (when you wrote "initialize"
on a line by itself, Squeak thought it was an undeclared temporary variable
(which is why it added the declaration | initialize |)

You should have:
initialize
     "create quinto game"
 
     super initialize.
     self label:''.
     ...

i.e. "messageSelectorAndArgumentNames" and the rest of the template gets
replaced with your code
n.b. "self turnOf" should be "self turnOff"


john mcelhose wrote:
> 
> I can inspect it, but if I do the 'openInWorld', Squeak objects that it
> doesn't know Initialize, or 'openInWorld' The lower screen in inspection
> shows
> |openInWorld|
> Nothing more expected.
> How do I get it to open? 		 	   		  
> 
A few things:
1. As someone pointed out before, methods are case-sensitive i.e.
initialize, not Initialize
2. The more detailed and precise the better - when you say inspect "it,"
what is the it?  So that people can support you, clearly state the steps to
reproduce what you're talking about.  The community is friendly and
supportive, and if you put in the effort to ask a good question, this will
be multiplied.
For example:
1. inspect from workspace: "SBECell new"
2. in inspector, doit: "self openInWorld"
3. error: "SBECell does not understand..."

Sean
-- 
View this message in context: http://forum.world.st/SBECell-tp2326268p2327033.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.


More information about the Beginners mailing list