|
overwriting #new: msg#00077lang.smalltalk.squeak.beginners
-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Hello, I have a class Foo inherited from Object. When I try to create a user defined #new (newFoo), to avoid the #initialize instance method to run as part of the object instantiation, I get the following error: ... class(Object)>>doesNotUnderstand: #newFoo ... method definition: - -------------- newFoo | model| model := self basicNew. .. do something .. model initialize. ^model - -------------- usage: someMethod | foo | foo := Foo newFoo. .. do something .. - -------------- Is there something that I missed to overwrite the #new method? Cheers, Daniel. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlpV2gUMEmDMCeAARA5uvAKCDAw6ag+qHEDrFce8EjNKjD+QYbQCfZVLw OypIlyLFBLJOLB/rIktphwI= =Rfyg -----END PGP SIGNATURE-----
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Morphic Tutorial for Basic Window Functions, Michael van der Gulik |
|---|---|
| Next by Date: | Re: overwriting #new, Klaus D. Witzel |
| Previous by Thread: | descriptionForPartsBin, Konrad.Krentz |
| Next by Thread: | Re: overwriting #new, Klaus D. Witzel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |