[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
eXept User Forum • View topic - Adding a method to class
Page 1 of 1

Adding a method to class

PostPosted: 3. Jan 2010, 06:26
by smalltalker89
hello,

how can i add a simple method to a simple class in smalltalk x
by using just code without browser .

for example:
why this is not good?

(i tried to do it by the tutorial of smalltalk x.. )

Object subclass: #Tokenizer
instanceVariableNames: 'name'
classVariableNames: ''
poolDictionaries: ''
category: 'MakingSmalltalk-Article2'

Tokenizer>>setName:newName
name:= newName

|t|
t:=Tokenizer new.
t setName:'Miller'.

it doesn't know the method
i want it to connect setName with the class Tokenizer

thanks

Re: Adding a method to class

PostPosted: 3. Jan 2010, 11:12
by jan_vrany