[Pharo-project] How to handle Squeak / Pharo differences
Hi, I've tried to load Koans ( https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/...) on Pharo. In KoanInterface>>progressHeight ^Preferences standardButtonFont height + 25 but Preferences is removed from Pharo. Which project can I look at to see how to handle common Squeak / Pharo incompatibilities ? Cheers, Laurent
I do not get why Seaside should provide a package to deal with Preferences a la squeak? I imagine that Seaside does not rely on Preferences so. I probably got it wrong. Stef On Dec 26, 2011, at 11:10 AM, Lukas Renggli wrote:
but Preferences is removed from Pharo. Which project can I look at to see how to handle common Squeak / Pharo incompatibilities ?
OmniBrowser, Seaside, ... they all have platform packages that handle such things.
Lukas
-- Lukas Renggli www.lukas-renggli.ch
I do not get why Seaside should provide a package to deal with Preferences a la squeak? I imagine that Seaside does not rely on Preferences so.
Indeed, Seaside does not deal with Preferences, but the question was about how to deal with differences in general. Lukas -- Lukas Renggli www.lukas-renggli.ch
On Mon, Dec 26, 2011 at 11:31 AM, Lukas Renggli <renggli@gmail.com> wrote:
I do not get why Seaside should provide a package to deal with Preferences a la squeak? I imagine that Seaside does not rely on Preferences so.
Indeed, Seaside does not deal with Preferences, but the question was about how to deal with differences in general.
Yes. Lukas, do you have some Seaside / OB class names in mind so I can find faster ? Thanks Laurent
Lukas
-- Lukas Renggli www.lukas-renggli.ch
For Seaside 2.x this is the global variable SeasidePlatformSupport that has to be bound to some implementation (this was a bit hacky). For Seaside 3.x this is the abstract class GRPlatform, and the Pharo implementation is GRPharoPlatform. There are countless *-Pharo packages that add Pharo specific code (mostly to GRPharoPlatform). For OmniBrowser this is the abstract class OBPlatform, and the Pharo implementation in OBPharoPlatform. It redirects some of the preference code. For the UI differences this is the abstract class OBInterface, and the Pharo implementation OBPolymorphInterface. Again the code is in platform specific packages, so you typically won't see the code for other platforms. Lukas On 26 December 2011 11:38, laurent laffont <laurent.laffont@gmail.com> wrote:
On Mon, Dec 26, 2011 at 11:31 AM, Lukas Renggli <renggli@gmail.com> wrote:
I do not get why Seaside should provide a package to deal with Preferences a la squeak? I imagine that Seaside does not rely on Preferences so.
Indeed, Seaside does not deal with Preferences, but the question was about how to deal with differences in general.
Yes.
Lukas, do you have some Seaside / OB class names in mind so I can find faster ? Thanks
Laurent
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
Thank you Lukas, I will look at this. Laurent On Mon, Dec 26, 2011 at 11:52 AM, Lukas Renggli <renggli@gmail.com> wrote:
For Seaside 2.x this is the global variable SeasidePlatformSupport that has to be bound to some implementation (this was a bit hacky).
For Seaside 3.x this is the abstract class GRPlatform, and the Pharo implementation is GRPharoPlatform. There are countless *-Pharo packages that add Pharo specific code (mostly to GRPharoPlatform).
For OmniBrowser this is the abstract class OBPlatform, and the Pharo implementation in OBPharoPlatform. It redirects some of the preference code. For the UI differences this is the abstract class OBInterface, and the Pharo implementation OBPolymorphInterface. Again the code is in platform specific packages, so you typically won't see the code for other platforms.
Lukas
On 26 December 2011 11:38, laurent laffont <laurent.laffont@gmail.com> wrote:
On Mon, Dec 26, 2011 at 11:31 AM, Lukas Renggli <renggli@gmail.com> wrote:
I do not get why Seaside should provide a package to deal with Preferences a la squeak? I imagine that Seaside does not rely on Preferences so.
Indeed, Seaside does not deal with Preferences, but the question was about how to deal with differences in general.
Yes.
Lukas, do you have some Seaside / OB class names in mind so I can find faster ? Thanks
Laurent
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
Preferences SUCKS by (total absence of) design. Now you can create a class and add the missing methods. Stef
Hi,
I've tried to load Koans (https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/...) on Pharo.
In KoanInterface>>progressHeight ^Preferences standardButtonFont height + 25
but Preferences is removed from Pharo. Which project can I look at to see how to handle common Squeak / Pharo incompatibilities ?
Cheers,
Laurent
2011/12/26 laurent laffont <laurent.laffont@gmail.com>:
Hi,
I've tried to load Koans (https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/...) on Pharo.
This is this the same code than this one: https://github.com/sl4m/gnu_smalltalk_koans ? -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
laurent laffont wrote
how to handle common Squeak / Pharo incompatibilities ?
Laurent, also see http://groups.google.com/group/metacello/browse_thread/thread/000ec71f38f278... for two ways to manage platform packages via Metacello -- View this message in context: http://forum.world.st/How-to-handle-Squeak-Pharo-differences-tp4234225p42349... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (5)
-
laurent laffont -
Lukas Renggli -
Sean P. DeNigris -
Serge Stinckwich -
Stéphane Ducasse