Scamper in Squeak6.0a-17230

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

Scamper in Squeak6.0a-17230

Hannes Hirzel
A short report about how to make Scamper work in Scamper in Squeak6.0a-17230
---------------------------------------------------------------------------------------------------------------------

Scamper loads fine in Squeak5.1-release, see

http://forum.world.st/How-do-I-install-the-Scamper-browser-tp4945136p4945199.html

First you need to load Metacello
https://github.com/dalehenrich/metacello-work
and then Scamper with


Metacello new
  baseline: 'Scamper';
  repository: 'github://HPI-SWA-Teaching/Scamper:dev/packages';
  onConflict: [:ex | ex allow];
  load

Necessary are also fonts and the scamper-icons folder.
The scamper-icons folder needs to be in a folder 'Scamper' which is on
the level of the image.

https://github.com/HPI-SWA-Teaching/Scamper/tree/dev/build-support/scamper-icons


Then you get some errors caused by deprecation warning.
They are easy to fix.

--------------------------------------------------------------------------------------------------------------------


When loading Scamper into Squeak6.0a-17230 I get the error

ScrollPane>>#hideScrollBarsIndefinitely: has been deprecated.


This is in

ScrollPane subclass: #WebPageMorph
        instanceVariableNames: 'scamper document documentMorph'
        classVariableNames: ''
        poolDictionaries: ''
        category: 'Scamper-Core'




--------------------------------------------------------------------------------------------------------------
To make it work:
--------------------------------------------------------------------------------------------------------------



ScrollPane
hideScrollBarsIndefinitely: bool
        "Get rid of scroll bar for short panes that don't want it shown."

        "self deprecated."
        self flag: #deprecationMessageDeactivated.

        self hideVScrollBarIndefinitely: bool.
        self hideHScrollBarIndefinitely: bool.


..............................................................................................................

ScrollPane
hideVScrollBarIndefinitely: bool
        "Get rid of scroll bar for short panes that don't want it shown."

        "self deprecated. "
        self flag: #deprecationMessageDeactivated.
       
        self setProperty: #noVScrollBarPlease toValue: bool.
       
        bool
                ifTrue: [self vScrollBarPolicy: #never]
                ifFalse: [self vScrollBarPolicy: #whenNeeded].
       
        self vHideOrShowScrollBar.


..............................................................................................
ScrollPane
hideHScrollBarIndefinitely: bool


the same.

...............................................................................................
Then I loaded the fonts from
https://github.com/HPI-SWA-Teaching/Scamper/tree/master/build-support
(see attached screen shot).


Simple web pages like
http://wiki.squeak.org/squeak/6572

load fine.
.......................................................................................................


Now more testing needed.



Fonts_to_load_for_Scamper_2017-05-02.png (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Scamper in Squeak6.0a-17230

Hannes Hirzel
And Scamper in Squeak6.0a (probably as well in Squeak5.1) needs the
two more following fixes


......................................................................................................................

In
    ScamperButton>>
    changeBetweenReloadAndStopWithState:

replace

    (browserState = 'done.' | browserState = 'sittin')

with parentheses added

    (browserState = 'done.' | (browserState = 'sittin'))

or the more traditional

    (browserState = 'done.' or: [browserState = 'sittin'])

..............................................................................................................................
And I prefer to have UTF8 as default, not utf8ToSqueak (isoLatin1)


So Scamper (old code)

displayTextHtmlPage: newSource
        "HTML page--format it"
        | utf8mode |
        currentUrl := newSource url.
        utf8mode := UTF8TextConverter strictUtf8Conversions.
        UTF8TextConverter strictUtf8Conversions: false.
       
        pageSource := newSource content utf8ToSqueak.
        UTF8TextConverter strictUtf8Conversions: utf8mode.
       
        .....


Changed to new code

    displayTextHtmlPage: newSource
        "HTML page--format it"
        | utf8mode |
        currentUrl := newSource url.
        utf8mode := UTF8TextConverter strictUtf8Conversions.
        UTF8TextConverter strictUtf8Conversions: false.
       
        self flag: #deactivatedUtf8ToSqueakConversions.
        "pageSource := newSource content utf8ToSqueak".
        "UTF8TextConverter strictUtf8Conversions: utf8mode."
       
        "added instead"
        pageSource := newSource content.

         ...........


BTW simple tables load fine.



On 5/2/17, H. Hirzel <[hidden email]> wrote:

> A short report about how to make Scamper work in Scamper in
> Squeak6.0a-17230
> ---------------------------------------------------------------------------------------------------------------------
>
> Scamper loads fine in Squeak5.1-release, see
>
> http://forum.world.st/How-do-I-install-the-Scamper-browser-tp4945136p4945199.html
>
> First you need to load Metacello
> https://github.com/dalehenrich/metacello-work
> and then Scamper with
>
>
> Metacello new
>   baseline: 'Scamper';
>   repository: 'github://HPI-SWA-Teaching/Scamper:dev/packages';
>   onConflict: [:ex | ex allow];
>   load
>
> Necessary are also fonts and the scamper-icons folder.
> The scamper-icons folder needs to be in a folder 'Scamper' which is on
> the level of the image.
>
> https://github.com/HPI-SWA-Teaching/Scamper/tree/dev/build-support/scamper-icons
>
>
> Then you get some errors caused by deprecation warning.
> They are easy to fix.
>
> --------------------------------------------------------------------------------------------------------------------
>
>
> When loading Scamper into Squeak6.0a-17230 I get the error
>
> ScrollPane>>#hideScrollBarsIndefinitely: has been deprecated.
>
>
> This is in
>
> ScrollPane subclass: #WebPageMorph
> instanceVariableNames: 'scamper document documentMorph'
> classVariableNames: ''
> poolDictionaries: ''
> category: 'Scamper-Core'
>
>
>
>
> --------------------------------------------------------------------------------------------------------------
> To make it work:
> --------------------------------------------------------------------------------------------------------------
>
>
>
> ScrollPane
> hideScrollBarsIndefinitely: bool
> "Get rid of scroll bar for short panes that don't want it shown."
>
> "self deprecated."
> self flag: #deprecationMessageDeactivated.
>
> self hideVScrollBarIndefinitely: bool.
> self hideHScrollBarIndefinitely: bool.
>
>
> ..............................................................................................................
>
> ScrollPane
> hideVScrollBarIndefinitely: bool
> "Get rid of scroll bar for short panes that don't want it shown."
>
> "self deprecated. "
> self flag: #deprecationMessageDeactivated.
>
> self setProperty: #noVScrollBarPlease toValue: bool.
>
> bool
> ifTrue: [self vScrollBarPolicy: #never]
> ifFalse: [self vScrollBarPolicy: #whenNeeded].
>
> self vHideOrShowScrollBar.
>
>
> ..............................................................................................
> ScrollPane
> hideHScrollBarIndefinitely: bool
>
>
> the same.
>
> ...............................................................................................
> Then I loaded the fonts from
> https://github.com/HPI-SWA-Teaching/Scamper/tree/master/build-support
> (see attached screen shot).
>
>
> Simple web pages like
> http://wiki.squeak.org/squeak/6572
>
> load fine.
> .......................................................................................................
>
>
> Now more testing needed.
>