Seaside on Squeak?

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

Seaside on Squeak?

Johan Brichau-2
Hi,

Two tests are currently still failing for Squeak [1].
- testNamedTempAt -> fails on travis but works in an interactive image… dunno what’s going on but it’s an expected failure in Pharo for a long time as well…
- testGenericCodecMacRoman -> it seems the preferential name for the Mac-Roman encoding became ‘macroman’ in Squeak instead of ‘mac-roman’. Not sure what to think about this one…

Anybody from the Squeak community who wants to step in and check on these?

cheers
Johan


[1] https://travis-ci.org/SeasideSt/Seaside/jobs/463542906
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside on Squeak?

David T. Lewis
Replying on the squeak-dev list to get some more eyes on the issue.

Dave

On Tue, Dec 04, 2018 at 10:17:17PM +0100, Johan Brichau wrote:

> Hi,
>
> Two tests are currently still failing for Squeak [1].
> - testNamedTempAt -> fails on travis but works in an interactive image??? dunno what???s going on but it???s an expected failure in Pharo for a long time as well???
> - testGenericCodecMacRoman -> it seems the preferential name for the Mac-Roman encoding became ???macroman??? in Squeak instead of ???mac-roman???. Not sure what to think about this one???
>
> Anybody from the Squeak community who wants to step in and check on these?
>
> cheers
> Johan
>
>
> [1] https://travis-ci.org/SeasideSt/Seaside/jobs/463542906
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Very basic javascript execution

Maarten Mostert-2
Hello,

I have a very simple question here:

I would like to do something like:

answerofConfirm:= (html anchor)
class: 'button-xsmall  pure-button button-success';
callback: [
html script:[html confirm:('Hello got It ? ’)]
];
with: 
[(html tag: 'i')
class: 'fas fa-lock';
style: 'font-size: 14px;’].


I mean of course that want the basic javascript confirm response.

Thanks 


Maarten Mostert

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Very basic javascript execution

Karsten Kusche
Hi Maarten,

you’d do something like:

html anchor onClick:(html javascript return: (html javascript confirm:’sure?’));
callback:[self halt];
with:’click me’.

I didn’t try but it should present the dialog and it should only execute the callback if confirmed.

It should produce code like in this answer: https://stackoverflow.com/questions/10462839/how-to-display-a-confirmation-dialog-when-clicking-an-a-link

Kind Regards
Karsten


Am 7. Dezember 2018 um 14:19:16, Maarten Mostert ([hidden email]) schrieb:

Hello,

I have a very simple question here:

I would like to do something like:

answerofConfirm:= (html anchor)
class: 'button-xsmall  pure-button button-success';
callback: [
html script:[html confirm:('Hello got It ? ’)]
];
with: 
[(html tag: 'i')
class: 'fas fa-lock';
style: 'font-size: 14px;’].


I mean of course that want the basic javascript confirm response.

Thanks 


Maarten Mostert
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Seaside on Squeak?

tty
In reply to this post by David T. Lewis
Regarding testGenericCodecMacRoman


Within testGenericCodecMacRoman changing mac-roman to macroman fixes the test.

I believe this is a valid change based on the following change of reasoning.


Those subclasses are:
GRNullCodec
GRPharoGenericCodec
GRPharoUtf8Codec
GRPharoLatin1Codec

What this test does is loop through each subclass of GRCodec and asks each one if they support the encoding 'mac-roman'


The subclasses either hard-code their encodings in the class side supportedEncodingNames method or they define it as a subset of TextConverter allEncodingNames

TextConverter allEncodingNames inspect

TextConverter allEncodingNames select:[:element | element asString beginsWith:'mac']

MacRomanTextConverter encodingNames


---- On Wed, 05 Dec 2018 08:33:02 -0500 David T. Lewis <[hidden email]> wrote ----

Replying on the squeak-dev list to get some more eyes on the issue.

Dave

On Tue, Dec 04, 2018 at 10:17:17PM +0100, Johan Brichau wrote:
> Hi,
>
> Two tests are currently still failing for Squeak [1].
> - testNamedTempAt -> fails on travis but works in an interactive image??? dunno what???s going on but it???s an expected failure in Pharo for a long time as well???
> - testGenericCodecMacRoman -> it seems the preferential name for the Mac-Roman encoding became ???macroman??? in Squeak instead of ???mac-roman???. Not sure what to think about this one???
>
> Anybody from the Squeak community who wants to step in and check on these?
>
> cheers
> Johan
>
>
> _______________________________________________
> seaside mailing list



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Seaside on Squeak?

tty
In reply to this post by David T. Lewis


my applogies

I accidentally hit send with a control key while attempting to format the chain of reasoning.

What this test does is loop through each subclass of GRCodec and asks each one if they support the encoding 'mac-roman'


those classes are:

GRNullCodec
GRPharoGenericCodec
GRPharoUtf8Codec
GRPharoLatin1Codec

The subclasses either hard-code their encodings in the class side supportedEncodingNames method or they define it as a subset of TextConverter allEncodingNames


TextConverter allEncodingNames inspect

TextConverter allEncodingNames select:[:element | element asString beginsWith:'mac']

Like GRCodec, TextConverter loops through all its subclasses and asks them what to populate its set of names with.

The one we want is:

MacRomanTextConverter encodingNames

If you print that, you see two: #('macroman' 'mac-roman')

The issue, is in the TextConverte allEncodingNames method

allEncodingNames
"TextConverter allEncodingNames"
| encodingNames |
encodingNames := Set new.
self allSubclasses
do: [:each |
| names |
names := each encodingNames.
names notEmpty
ifTrue: [encodingNames add: names first asSymbol]].
^encodingNames

looking at the ifTrue: block you see it only adds the FIRST name to the set.

This could be a bug in TextConverter.

Since 'mac-roman' and 'macroman' both point to the same MacRomanTextConverter, it stands to reason that changing the test from 'mac-roman' to 'macroman' is safe.

Do that, and the test passes.

cheers,

t


---- On Wed, 05 Dec 2018 08:33:02 -0500 David T. Lewis <[hidden email]> wrote ----

Replying on the squeak-dev list to get some more eyes on the issue.

Dave

On Tue, Dec 04, 2018 at 10:17:17PM +0100, Johan Brichau wrote:
> Hi,
>
> Two tests are currently still failing for Squeak [1].
> - testNamedTempAt -> fails on travis but works in an interactive image??? dunno what???s going on but it???s an expected failure in Pharo for a long time as well???
> - testGenericCodecMacRoman -> it seems the preferential name for the Mac-Roman encoding became ???macroman??? in Squeak instead of ???mac-roman???. Not sure what to think about this one???
>
> Anybody from the Squeak community who wants to step in and check on these?
>
> cheers
> Johan
>
>
> _______________________________________________
> seaside mailing list



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside