[Squeakland] Re: Unscalable picture Re: [Etoys] Squeak activity about Measure

Hilaire Fernandes hilaire at ofset.org
Tue Apr 22 08:30:29 PDT 2008


2008/4/22, karl <karl.ramberg at comhem.se>:

>  Inspect the SketchMorph and do it:
>  ImageMorph new image: originalForm;openInWorld
>
>  Or file in this change set that adds a menu item that toggles SketchMorphs
> scalability.

The one from your .cs is even greater so that kids can still redraw on
the sticker to construct sub-unit (as shown in my .pr file).

Although this example is simple like stupid, it really shows the
pedagogical effectiveness of Squeak. Indeed all the step necessary to
prepare the .pr file (importing the sticker from a scan, cutting the
sticker, preparing a stickers distributor, writing the text, saving
the projet, distributing it to the learner) is in the scope of a
teacher even with low ICT experience.

And at the end, it is still a nice activity going into knowledge construction.

I will propose later some more with a mix of DrGeo and usual squeak
manipulation (some as bad example and other as good example)

Hilaire

>
>
>  Karl
>
> > Hilaire
> >
> > 2008/4/22, karl <karl.ramberg at comhem.se>:
> >
> >
> > > Hilaire Fernandes wrote:
> > >
> > >
> > >
> > > > A simple pedagogical activity about measure for primary school
> students.
> > > > http://swiki.ofset.org:8000/super/337
> > > > You need to install Squeakland:
> > > > http://www.squeakland.org/
> > > >
> > > > Eventually I would like to be able to lock the resize of the sticker.
> > > >
> > > >
> > > > Hilaire
> > > >
> > > >
> > > >
> > > >
> > > >
> > >  My French is really horrible but I recognize animal names :-)
> > >  If you use ImageMorphs they will not resize.
> > >
> > >  Karl
> > >
> > >
> > >
> >
> >
> >
> >
>
>
> 'From etoys3.0 of 24 February 2008 [latest update: #1985] on 22 April 2008
> at 4:47:36 pm'!
>  "Change Set:            UnscalableSketch
>  Date:                   22 April 2008
>  Author:                 Karl Ramberg
>
>  Adds a menu item  to toggle scalability if a picture"!
>
>  Morph subclass: #SketchMorph
>         instanceVariableNames: 'originalForm rotationStyle scalePoint
> framesToDwell rotatedForm unscalable '
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Morphic-Basic'!
>
>  !SketchMorph methodsFor: 'geometry' stamp: '<no author> 4/22/2008 16:21'!
>  extent: newExtent
>         "Change my scale to fit myself into the given extent.
>         Avoid extents where X or Y is zero."
>         unscalable ifNotNil:[ unscalable ifTrue:[^self]].
>         (newExtent y = 0 or: [ newExtent x = 0 ]) ifTrue: [ ^self ].
>         self extent = newExtent ifTrue:[^self].
>         scalePoint _ newExtent asFloatPoint / (originalForm extent max:
> 1 at 1).
>         self layoutChanged.
>  ! !
>
>  !SketchMorph methodsFor: 'menu' stamp: 'kfr 4/22/2008 16:36'!
>  toggleUnscalable
>         ^self unscalable: (self unscalable not)! !
>
>  !SketchMorph methodsFor: 'menu' stamp: 'kfr 4/22/2008 16:30'!
>  unscalable
>         unscalable ifNil:[unscalable _ false].
>         ^unscalable! !
>
>  !SketchMorph methodsFor: 'menu' stamp: 'kfr 4/22/2008 16:42'!
>  unscalableString
>         ^ (self unscalable
>                 ifTrue: ['<yes>']
>                 ifFalse: ['<no>'])
>                 , 'unscalable image' translated! !
>
>  !SketchMorph methodsFor: 'menu' stamp: 'kfr 4/22/2008 16:29'!
>  unscalable: aBoolean
>           unscalable _ aBoolean! !
>
>  !SketchMorph methodsFor: 'menus' stamp: 'kfr 4/22/2008 16:43'!
>  addToggleItemsToHaloMenu: aCustomMenu
>         "Add  toggle-items to the halo menu"
>
>         super addToggleItemsToHaloMenu: aCustomMenu.
>         aCustomMenu addUpdating: #unscalableString target: self action:
> #toggleUnscalable.
>         (Smalltalk includesKey: #B3DRenderEngine) ifTrue: [
>                 aCustomMenu addUpdating: #useInterpolationString target:
> self action: #toggleInterpolation.
>         ].
>  ! !
>
>  SketchMorph removeSelector: #unscaleable!
>  Morph subclass: #SketchMorph
>         instanceVariableNames: 'originalForm rotationStyle scalePoint
> framesToDwell rotatedForm unscalable'
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Morphic-Basic'!
>
>
>


-- 
http://blog.ofset.org/hilaire



More information about the Squeakland mailing list