Chess Game / UpdatingStringMorph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Chess Game / UpdatingStringMorph

volkert-2
I am trying to load the old chess game from Squeak [1] into Pharo 4.0.

The game depends on the class "UpdatingStringMorph", but this is not
part of Pharo.

What happened to it? Was it renamed?

BW,
Volkert

[1] http://map.squeak.org/package/cb19b6f1-e371-47b2-b814-4bad079d0fbc



Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

Nicolai Hess


2015-06-29 21:17 GMT+02:00 Volkert <[hidden email]>:
I am trying to load the old chess game from Squeak [1] into Pharo 4.0.

The game depends on the class "UpdatingStringMorph", but this is not part of Pharo.

What happened to it? Was it renamed?

removed, but I don't know why:

Kill UpdatingStringMorph, UpdatingMenu, and NameInHaloMorph

 

BW,
Volkert

[1] http://map.squeak.org/package/cb19b6f1-e371-47b2-b814-4bad079d0fbc




Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

MerwanOuddane
In reply to this post by volkert-2
On 29/06/2015 21:17, Volkert wrote:
> I am trying to load the old chess game from Squeak [1] into Pharo 4.0.
>
> The game depends on the class "UpdatingStringMorph", but this is not
> part of Pharo.
I think it is a StringMorph who's watching changes by calling a method
on an object.
>
> What happened to it? Was it renamed?
You should just replace it with a StringMorph and figure out how to
update the morph right on time :)
>
> BW,
> Volkert
>
> [1] http://map.squeak.org/package/cb19b6f1-e371-47b2-b814-4bad079d0fbc
>
>
>
Cheers
Merwan

Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

Sean P. DeNigris
Administrator
MerwanOuddane wrote
You should just replace it with a StringMorph and figure out how to
update the morph right on time :)
It seems like there should be Morph>>#addAlarm:every:, but I don't see anything like that...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

MerwanOuddane
On lun., 2015-06-29 at 14:09 -0700, Sean P. DeNigris wrote:
> MerwanOuddane wrote
> > You should just replace it with a StringMorph and figure out how to
> > update the morph right on time :)
>
> It seems like there should be Morph>>#addAlarm:every:, but I don't see
> anything like that...
>
Is it really usefull to have a process checking an acessor instead of
notifying changes to the StringMorph ?
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Chess-Game-UpdatingStringMorph-tp4834675p4834703.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>



Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

stepharo
In reply to this post by volkert-2
I think that if you use StringMorph it will work.
We should accept that Pharo is moving and that some old abstractions
were not good. :)
You do not want something doing constant polling in the UI.

Stef

Le 29/6/15 21:17, Volkert a écrit :

> I am trying to load the old chess game from Squeak [1] into Pharo 4.0.
>
> The game depends on the class "UpdatingStringMorph", but this is not
> part of Pharo.
>
> What happened to it? Was it renamed?
>
> BW,
> Volkert
>
> [1] http://map.squeak.org/package/cb19b6f1-e371-47b2-b814-4bad079d0fbc
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

stepharo
In reply to this post by MerwanOuddane


Le 30/6/15 10:12, Merwan Ouddane a écrit :
> On lun., 2015-06-29 at 14:09 -0700, Sean P. DeNigris wrote:
>> MerwanOuddane wrote
>>> You should just replace it with a StringMorph and figure out how to
>>> update the morph right on time :)
>> It seems like there should be Morph>>#addAlarm:every:, but I don't see
>> anything like that...
>>
> Is it really usefull to have a process checking an acessor instead of
> notifying changes to the StringMorph ?
Merwane you are right.
Polling is a bad idea from an architecture point of view. And dated :)

Stef

>>
>> -----
>> Cheers,
>> Sean
>> --
>> View this message in context: http://forum.world.st/Chess-Game-UpdatingStringMorph-tp4834675p4834703.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Chess Game / UpdatingStringMorph

Sean P. DeNigris
Administrator
stepharo wrote
Polling is a bad idea from an architecture point of view. And dated :)
While in this case that might be true (I haven't looked at the code), IMHO it's overstated to say that polling is always a bad idea. For exploratory spikes, mockups, throwaway tools, etc it can be very useful. Morphic stepping is based on the idea that polling makes it easy to observe underlying objects that are not designed for UI support (no change/update, announcements, etc), and may be inexpensive if the widget doesn't have to be redrawn.
Cheers,
Sean