Paul DeBruicker | 1 Dec 18:06 2009
Picon

Replaceing AnObsolete....Class

Hi - 

In my image I have at least two obsolete classes that are still 
referenced by some code.   They were created when I inadvertently 
deleted some classes from the image and reinstalled them from a file out 
of an older image.  How can I point the code that is looking for the 
obsolete classes towards the re-created classes?  The re-created classes 
have the same name as the classes I mistakenly deleted.  Thanks

Paul
Bert Freudenberg | 1 Dec 18:21 2009
Picon

Re: Replaceing AnObsolete....Class

On 01.12.2009, at 18:06, Paul DeBruicker wrote:
> 
> Hi - 
> 
> In my image I have at least two obsolete classes that are still 
> referenced by some code.   They were created when I inadvertently 
> deleted some classes from the image and reinstalled them from a file out 
> of an older image.  How can I point the code that is looking for the 
> obsolete classes towards the re-created classes?  The re-created classes 
> have the same name as the classes I mistakenly deleted.  Thanks

Try

	SmalltalkImage current fixObsoleteReferences

Or recompile the classes referencing the obsolete classes:

	MyClass compileAll

- Bert -
Steinar Bang | 1 Dec 20:16 2009
Picon
Picon

Re: [semi-OT] (fwd) Re: What Killed Smalltalk?

>>>>> Ralph Johnson <johnson <at> cs.uiuc.edu>:

> Smalltalk didn't die.  It's growth was killed.  The dream of taking
> over the world was killed.  But there are still people making their
> living with Smalltalk.  It is hard to find good Smalltalk jobs, but
> they exist.

I actually made my living 1993-1995, programming Smalltalk.
Göran Krampe | 2 Dec 13:06 2009
Picon

Re: Indenting Code

Ole Voß wrote:
> P E R F E C T!
> 
> Exactly what I was looking for!

More goodies along that line here:

http://web.cecs.pdx.edu/~black/OOP/Tutorial/SqueakLanguageRef.html

...indirectly reachable from:

http://www.squeak.org/Documentation

regards, Göran
LordGeoffrey | 2 Dec 21:07 2009
Picon

Re: Indenting Code

Thanks. Ctrl-q is just what i wanted.

Göran Krampe wrote:
> Ole Voß wrote:
>> P E R F E C T!
>>
>> Exactly what I was looking for!
>
> More goodies along that line here:
>
> http://web.cecs.pdx.edu/~black/OOP/Tutorial/SqueakLanguageRef.html
>
> ...indirectly reachable from:
>
> http://www.squeak.org/Documentation
>
> regards, Göran
>
> _______________________________________________
> Beginners mailing list
> Beginners <at> lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
Herbert König | 3 Dec 10:01 2009
Picon
Picon

Re: UDP client-server revisited...

Hello Lawson,

Sorry this went private.

LE> Well, trying to get the example code working using class OldSocket.
LE> Doesn't seem to work with squeak or cobalt.

this is a bit unspecific. OldSocket was OldSocket already in a 3.6
image and the class has not a single user (Socket has 84 in a 3.6
image). So I used Socket when I controlled an Asteroids Game via UDP.

LE> I'm stuck trying to figure out how to do it period, and when the 
LE> examples don't work, I'm lost... ;-/

LE> Suggestions? Help?
On this list we had a discussion about this beginning of last month.

I posted the snippet from the end of this message which I tested in
Squeak 3.8 and latest Pharo.

Cheers,

Herbert                            mailto:herbertkoenig <at> gmx.net

Some code:

Socket initializeNetwork  "Only once per image"
dst := Socket newUDP setPort: 1979.
src := Socket newUDP setPort: 2345.
buff := ByteArray new: 1026.
(Continue reading)

Amir Ansari | 3 Dec 12:59 2009

Referencing a variable?

Dear list

I've been looking through books, blogs and lists for a solution to this 
problem, but can't find anything!  Which means that I'm not thinking 
about it in the right way...  I'd be very grateful if someone could 
enlighten me!

I have myLibrary (an OrderedCollection) of Books (class with 'title' 
and 'author' instance variables):

myLibrary := OrderedCollection new.
myLibrary
	add: (Book new
		title: 'Hamlet';
		author: 'Shakespeare');
	add: (Book new
		title: 'The Hobbit';
		author: 'Tolkien');
	add: (Book new
		title: 'Ben Hur';
		author: 'Wallace').

Now, if I want to gather all the titles and authors into new 
collections, I can do the following:

titles := myLibrary collect: [:each | each title].
authors := myLibrary collect: [:each | each author].

But I'd like to reuse the code as much as possible, so I'd prefer to do 
something like this:
(Continue reading)

Bert Freudenberg | 3 Dec 13:05 2009
Picon

Re: Referencing a variable?

On 03.12.2009, at 12:59, Amir Ansari wrote:
> 
> But I'd like to reuse the code as much as possible, so I'd prefer to do something like this:
> 
> element := 'title'.
> choice := myLibrary collect: [:each | each element].

element := #title.
choice := myLibrary collect: [:each | each perform: element].

Note that this sends the "title" message. There is no way to directly access an instance variable from
outside the object. Objects in Smalltalk are true objects, not data structures. The code above only works
if you implemented a "title" method that returns the instance variable.

- Bert -
Amir Ansari | 3 Dec 13:46 2009

Re: Referencing a variable?

Yes!  That did it!

First time I've used 'perform:'; I'd never have considered it.

Thank you so much!

Amir

On 3 Dec 2009, at 12:05, Bert Freudenberg wrote:

> On 03.12.2009, at 12:59, Amir Ansari wrote:
>>
>> But I'd like to reuse the code as much as possible, so I'd prefer to 
>> do something like this:
>>
>> element := 'title'.
>> choice := myLibrary collect: [:each | each element].
>
> element := #title.
> choice := myLibrary collect: [:each | each perform: element].
>
> Note that this sends the "title" message. There is no way to directly 
> access an instance variable from outside the object. Objects in 
> Smalltalk are true objects, not data structures. The code above only 
> works if you implemented a "title" method that returns the instance 
> variable.
>
> - Bert -
>
>
(Continue reading)

Bert Freudenberg | 3 Dec 13:49 2009
Picon

Re: Referencing a variable?

On 03.12.2009, at 13:46, Amir Ansari wrote:
> 
> Yes!  That did it!
> 
> First time I've used 'perform:'; I'd never have considered it.
> 
> Thank you so much!
> 
> Amir

You just graduated into the first level of meta-programming :)

- Bert -

Gmane