KomHttpServer in pharo 1.2

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

KomHttpServer in pharo 1.2

Guillermo Polito
HttpServices class>>platform

    ^SmalltalkImage current platformName


Should be

HttpServices class>>platform

    ^OSPlatform platformName



How can it be adapted to pharo?

Cheers!

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Henrik Sperre Johansen
On 05.10.2010 23:08, Guillermo Polito wrote:
HttpServices class>>platform

    ^SmalltalkImage current platformName


Should be

HttpServices class>>platform

    ^OSPlatform platformName



How can it be adapted to pharo?

Cheers!

For Pharo 1.1/1.2 + Squeak 4.1/4.2, use
^Smalltalk os platformName

Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Guillermo Polito
Why not

self class environment platformName

?

BTW, I wanted to know who do I have to talk to in order to do one of those improvements :).

2010/10/5 Henrik Sperre Johansen <[hidden email]>
On 05.10.2010 23:08, Guillermo Polito wrote:
HttpServices class>>platform

    ^SmalltalkImage current platformName


Should be

HttpServices class>>platform

    ^OSPlatform platformName



How can it be adapted to pharo?

Cheers!

For Pharo 1.1/1.2 + Squeak 4.1/4.2, use
^Smalltalk os platformName

Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Henrik Sperre Johansen
  On 05.10.2010 23:29, Guillermo Polito wrote:
> Why not
>
> self class environment platformName
>
> ?
Because it doesn't work? ;)

The class environment is the SystemDictionary instance containing
classes and globals, not the SmalltalkImage instance,
(Smalltalk is now a shortcut for the sole SmalltalkImage instance),
where you find access to OSPlatform through the #os delegation method.
SmalltalkImage platformName is deprecated in 1.2, the cross-dialect way
to do it is through using Smalltalk os platformName.

Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Guillermo Polito
Jaja, you're right :).

What is better?  Having SmalltalkImage or OSPlatform hardcoded there?  If we decide the right answer is SmalltalkImage, then we should change the deprecation in SmalltalkImage which currently is:

platformName
    "Return the name of the platform we're running on"

    self deprecated: 'Use OSPlatform'.
    ^ OSPlatform platformName


And maybe it's better as

platformName
    "Return the name of the platform we're running on"

    self deprecated: 'Use OSPlatform'.
    ^ self os platformName


Cheers!

On Tue, Oct 5, 2010 at 6:36 PM, Henrik Sperre Johansen <[hidden email]> wrote:
 On 05.10.2010 23:29, Guillermo Polito wrote:
Why not

self class environment platformName

?
Because it doesn't work? ;)

The class environment is the SystemDictionary instance containing classes and globals, not the SmalltalkImage instance,
(Smalltalk is now a shortcut for the sole SmalltalkImage instance), where you find access to OSPlatform through the #os delegation method.
SmalltalkImage platformName is deprecated in 1.2, the cross-dialect way to do it is through using Smalltalk os platformName.


Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Sven Van Caekenberghe
In reply to this post by Henrik Sperre Johansen

On 05 Oct 2010, at 23:25, Henrik Sperre Johansen wrote:

> For Pharo 1.1/1.2 + Squeak 4.1/4.2, use
> ^Smalltalk os platformName

Thanks, Hendrik, for the portable 'solution' to this 'problem'.

I would suggest putting this in the deprecation warning, the current advice creates non-portable code.

Sven



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Mariano Martinez Peck
In reply to this post by Guillermo Polito
I've cc the authors that are in the squeaksource project.

2010/10/6 Guillermo Polito <[hidden email]>
Jaja, you're right :).

What is better?  Having SmalltalkImage or OSPlatform hardcoded there?  If we decide the right answer is SmalltalkImage, then we should change the deprecation in SmalltalkImage which currently is:

platformName
    "Return the name of the platform we're running on"

    self deprecated: 'Use OSPlatform'.
    ^ OSPlatform platformName


And maybe it's better as

platformName
    "Return the name of the platform we're running on"

    self deprecated: 'Use OSPlatform'.
    ^ self os platformName


Cheers!


On Tue, Oct 5, 2010 at 6:36 PM, Henrik Sperre Johansen <[hidden email]> wrote:
 On 05.10.2010 23:29, Guillermo Polito wrote:
Why not

self class environment platformName

?
Because it doesn't work? ;)

The class environment is the SystemDictionary instance containing classes and globals, not the SmalltalkImage instance,
(Smalltalk is now a shortcut for the sole SmalltalkImage instance), where you find access to OSPlatform through the #os delegation method.
SmalltalkImage platformName is deprecated in 1.2, the cross-dialect way to do it is through using Smalltalk os platformName.


Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Giovanni Corriga
Hola Guillermo,

the KomHttpServer repository on SqueakSource has no write restrictions
- feel free to upload a new .mcz file :)

    Giovanni

2010/10/6 Mariano Martinez Peck <[hidden email]>:

> I've cc the authors that are in the squeaksource project.
>
> 2010/10/6 Guillermo Polito <[hidden email]>
>>
>> Jaja, you're right :).
>>
>> What is better?  Having SmalltalkImage or OSPlatform hardcoded there?  If
>> we decide the right answer is SmalltalkImage, then we should change the
>> deprecation in SmalltalkImage which currently is:
>>
>> platformName
>>     "Return the name of the platform we're running on"
>>
>>     self deprecated: 'Use OSPlatform'.
>>     ^ OSPlatform platformName
>>
>> And maybe it's better as
>>
>> platformName
>>     "Return the name of the platform we're running on"
>>
>>     self deprecated: 'Use OSPlatform'.
>>     ^ self os platformName
>>
>> Cheers!
>>
>> On Tue, Oct 5, 2010 at 6:36 PM, Henrik Sperre Johansen
>> <[hidden email]> wrote:
>>>
>>>  On 05.10.2010 23:29, Guillermo Polito wrote:
>>>>
>>>> Why not
>>>>
>>>> self class environment platformName
>>>>
>>>> ?
>>>
>>> Because it doesn't work? ;)
>>>
>>> The class environment is the SystemDictionary instance containing classes
>>> and globals, not the SmalltalkImage instance,
>>> (Smalltalk is now a shortcut for the sole SmalltalkImage instance), where
>>> you find access to OSPlatform through the #os delegation method.
>>> SmalltalkImage platformName is deprecated in 1.2, the cross-dialect way
>>> to do it is through using Smalltalk os platformName.
>>>
>>> Cheers,
>>> Henry
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: KomHttpServer in pharo 1.2

Guillermo Polito
SmalltalkImage>>platformName: Ticket and fix in http://code.google.com/p/pharo/issues/detail?id=3068

KomHttpServer,  I submitted the fix to the repo.

Thank you everyone :D!!!

On Wed, Oct 6, 2010 at 5:10 PM, Giovanni Corriga <[hidden email]> wrote:
Hola Guillermo,

the KomHttpServer repository on SqueakSource has no write restrictions
- feel free to upload a new .mcz file :)

   Giovanni

2010/10/6 Mariano Martinez Peck <[hidden email]>:
> I've cc the authors that are in the squeaksource project.
>
> 2010/10/6 Guillermo Polito <[hidden email]>
>>
>> Jaja, you're right :).
>>
>> What is better?  Having SmalltalkImage or OSPlatform hardcoded there?  If
>> we decide the right answer is SmalltalkImage, then we should change the
>> deprecation in SmalltalkImage which currently is:
>>
>> platformName
>>     "Return the name of the platform we're running on"
>>
>>     self deprecated: 'Use OSPlatform'.
>>     ^ OSPlatform platformName
>>
>> And maybe it's better as
>>
>> platformName
>>     "Return the name of the platform we're running on"
>>
>>     self deprecated: 'Use OSPlatform'.
>>     ^ self os platformName
>>
>> Cheers!
>>
>> On Tue, Oct 5, 2010 at 6:36 PM, Henrik Sperre Johansen
>> <[hidden email]> wrote:
>>>
>>>  On 05.10.2010 23:29, Guillermo Polito wrote:
>>>>
>>>> Why not
>>>>
>>>> self class environment platformName
>>>>
>>>> ?
>>>
>>> Because it doesn't work? ;)
>>>
>>> The class environment is the SystemDictionary instance containing classes
>>> and globals, not the SmalltalkImage instance,
>>> (Smalltalk is now a shortcut for the sole SmalltalkImage instance), where
>>> you find access to OSPlatform through the #os delegation method.
>>> SmalltalkImage platformName is deprecated in 1.2, the cross-dialect way
>>> to do it is through using Smalltalk os platformName.
>>>
>>> Cheers,
>>> Henry
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project