[Newbies] Creating a Form Editor

stephane ducasse stephane.ducasse at free.fr
Fri Jan 5 07:49:36 UTC 2007


instance methods are sent to objects:
	(10 at 100) x
	x is an instance method sent to a point
	@ is an instance method sent to 10

	Now have a look at the class side (press the button class) on the  
class Form
	apparently there is a method extent: aPoint
	
	This method is a method that will be executed when a class receives  
the message extent:
	Not that conceptually
	Form new extent: aPoint
	apparently there is no instance method name extent:
	but if you try  (Form new setExtent: 100 at 100 depth: 1) you will get  
a form
	but set* may indicate that this is a method that you should not  
direcly invoke (as explained in the book of Beck or Smalltalk by 	
	Example)

Stef
	

On 5 janv. 07, at 05:56, Bruce Prior wrote:

> Hi Squeakers,
>
> I have been reading Adele Goldberg's classic text, "Smalltalk-80  
> The Interactive Programming Environment," and came across this in  
> Chapter 7, "How to make Pictures."
>
> Adele states, "Create a Form Editor by evaluating an expression of  
> the form,
>
> (Form new extent: 300 @ 400) edit"
>
> It didn't work for me in Squeak 3.8 (on my Macintosh).
>
> Further down, Adele says, "The message edit can be sent to any  
> instance of Form." But when I checked with my browser I found that  
> Form has a class method extent: but not an instance method extent:.
>
> So I tried (Form extent: 300 @ 400) edit and the Form Editor  
> appeared as desired. Is this because Smalltalk and Squeak are  
> different somehow, or is there a mistake in the text, or?

Squeak has 26 years more :)

> If the text is correct, then I still don't fully appreciate the  
> difference between class and instance methods.
>
> Bruce Prior (still looking for "ah - ha!" and I think it's close....)
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>



More information about the Beginners mailing list