[etoys-dev] Persistent preferences

Steve Thomas sthomas1 at gosargon.com
Mon Aug 9 16:32:48 EDT 2010


The questions I understood Walter to raise are how do we: (I have included
him in this email so he can comment).

   - encourage children to get into the habit of taking notes and reflection
   - encourage children to store versions of their work for later review and
   reflection

My initial thoughts were  simply to allow an individual user to specify the
initial project state. This could be accomplished by having a project that
is in that state that they use as a basis for projects. In my case I am
starting to do all projects in a book with flaps.

I was not suggesting we change what happens by default when you "start a new
project".  I was considering whether we should allow individual users could
change the default state of their starting projects.

One thing I believe we should do and can hopefully all agree upon is putting
a flap in the Supplies Bin as now they are too hard to discover and most
people don't easily or quickly figure out how to copy the flap from the home
page to a new project.

The other point I was thinking about was how we deal with re-usable
artifacts which I would prefer to deal with in a separate email thread and
after I have thought harder about the problem. (I still remember your
questions Kathleen, they are good ones, and I am still thinking about them).

Stephen


On Mon, Aug 9, 2010 at 1:20 PM, <kharness at illinois.edu> wrote:

> Rita,
> Sure I can compromise, I was just giving an opinion not an edict.

Contrary to Kathleen's approach, everything I say is an edict (which only
applies to me ;)

>

Some things to consider if a flap is added:
> What label will be the default? What location, what color?
> Also, a flap that an author decides not to fill will need to be deleted, so
> make that simple to do. An empty flap may lead the person using the project,
> not the author, to wonder if something is missing or broken.
>
> Here are some concerns about a book on the opening screen.
> Books are conveniently available in Supplies but using them is not
> conveniently straightforward for beginners. I am thinking of my young
> students who click on a book, then click on a page turn arrow and nothing
> happens. The far left arrow that opens more controls is not the first thing
> they usually try and then the burst of new icons takes a while to
> understand. I have watched children delete pages thinking they were turning
> back; the same for the plus which adds new pages but which young children
> think will move them from page to page.
>
> Books also require working with layers and that too is not intuitive. We
> know the halos are labeled but beginning readers don't always see the label
> nor if they do, read it for meaning. Putting objects on the page of a book
> using the black halo handle is required and yet many children close the
> paints and see their drawing above a page and then are dismayed when they
> turn the page and the drawing appears to be on it too. Of course, all of
> this can be learned but for beginners, and we have so many of those, is this
> the first thing we want them to confront?
>
> I used all three of the other OOPLs and I think they each have strengths
> and features than compliment learning from the others.  It has been a great
> joy to me to find the knowledge I have gained from Etoys has made it easy to
> learn the others. And where they differ is not a problem either because I
> have a scaffolding of knowledge from Etoys that lets me say, hmm that is how
> it is different.
>
> Colors, strong colors do influence us just think of all the ads in print
> and TV; calming colors for hospitals and jails, the orange in McDonalds was
> chosen to encourage people to move on, red white blue national identities,
> camouflage military, etc. A strong colorful interface makes pastel colors
> look weak and yet if a project is best expressed with pastels the author
> must ignore the contrast with the interface and count on the visitor to do
> the same.
> Regards,
> Kathleen
>
>
>
> ---- Original message ----
> >Date: Mon, 9 Aug 2010 15:42:37 +0200
> >From: Rita Freudenberg <rita at isg.cs.uni-magdeburg.de>
> >Subject: Re: [etoys-dev] Persistent preferences
> >To: <kharness at illinois.edu>
> >Cc: etoys-dev dev <etoys-dev at squeakland.org>,
> etoys-education-team at googlegroups.com
> >
> >
> >On Aug 9, 2010, at 3:00 PM, <kharness at illinois.edu> wrote:
> >
> >> Hi,
> >> I think the real estate of the blank screen is a valuable feature of
> Etoys and adding an extra flap and book to the opening page sort of demands
> that authors decide to use them or to discard them. I'd prefer that we not
> try to manage their thinking that much.
> >>
> >> If you give lined paper to people, they follow the lines and thinking is
> linear and text based. If you give them graph paper you send them in another
> direction and if you give them a blank slate you give them the option to do
> . . . anything.
> >
> >Kathleen, I agree. I think Etoys should stay as open as possible. But
> maybe we could find a compromise here? At Squeakfest, Walter embraced the
> habit of students taking notes and reflecting on their work during the
> process of creation. So maybe having a flap as a temporary place for notes,
> painted objects, scripts, etc. would be valuable?
> >It just happens that I did put a flap in my own project to outline my
> plans instead of opening a word document writing it down.
> >>
> >> Making template projects for your uses of Etoys is a good one. I would
> not want to start every project by having to delete a flap and book. Since
> it is so easy to move objects from one project to another I do not
> understand what benefit to authors, who we will never meet, is gained by
> loading the Supplies Bin and Object Catalog with objects. The clip art in
> Alice, Scratch and StarLogo TNG is one of the features I like the least; the
> images limit imagination, creativity, and originality.
> >>
> >> A different topic but I will add it here. I also like the lack of strong
> colors in the Etoys interface; it is a functional and neutral place to work.
> >
> >Interesting, since Scratch has rather strong colors, and I assume that
> they did some testing of the user interface. Do I understand you correct
> that you prefer the Etoys colors because they do not distract the kids from
> their creative process?
> >
> >Greetings,
> >Rita
> >
> >> Regards,
> >> Kathleen
> >>
> >> ---- Original message ----
> >>> Date: Sun, 8 Aug 2010 23:53:29 -0400
> >>> From: Steve Thomas <sthomas1 at gosargon.com>
> >>> Subject: Re: [etoys-dev] Persistent preferences
> >>> To: etoys-dev at squeakland.org
> >>>
> >>>  Does this change apply only to preferences?
> >>>  Or does it cover the things Scott Wallace mentioned
> >>>  in tracker:
> >>>
> >>>    More things than just preference values might also
> >>>    be stored in such a file, e.g. default screen
> >>>    background color/picture, maybe even presence of
> >>>    some "standard morphs" to be inserted into new
> >>>    projects, etc
> >>>
> >>>  The ability to have "standard morphs" (either in the
> >>>  Object Catalog,  or Supplies Bin) would be useful.
> >>>  Also after Squeakfest and thinking about Walter
> >>>  Benders comments on flaps and books, the ability to
> >>>  start all new projects with a book and default flap
> >>>  would be nice as well.  Of course I could
> >>>  accomplish this with a few extra mouse clicks by
> >>>  simply making a "starter project" that has these
> >>>  objects and then modify  and rename that project.
> >>>  Stephen
> >>>  On Sun, Aug 8, 2010 at 12:58 PM, Bert Freudenberg
> >>>  <bert at freudenbergs.de> wrote:
> >>>
> >>>    Hi folks,
> >>>
> >>>    I uploaded a proposed implementation to the inbox.
> >>>    This allows you a user to change certain
> >>>    preferences automatically on startup. The feature
> >>>    has been requested quite often, e.g. you could
> >>>    turn on unlimitedPaintArea permanently, or
> >>>    debugHaloHandle, etc.
> >>>
> >>>    We are in feature freeze, but OTH we still have no
> >>>    alpha version yet. I think it's relatively low
> >>>    risk. Please comment.
> >>>
> >>>    - Bert -
> >>>
> >>>    On 08.08.2010, at 16:46, commits at source.squeak.org
> >>>    wrote:
> >>>
> >>>> Bert Freudenberg uploaded a new version of
> >>>    System to project Etoys Inbox:
> >>>>
> >>>    http://source.squeak.org/etoysinbox/System-bf.26.mcz
> >>>>
> >>>> ==================== Summary
> >>>    ====================
> >>>>
> >>>> Name: System-bf.26
> >>>> Author: bf
> >>>> Time: 8 August 2010, 6:46:40 pm
> >>>> UUID: 49a53b17-2294-4f3a-9fe1-f4051afce791
> >>>> Ancestors: System-bf.25
> >>>>
> >>>> - allow to persist preferences (SQ-134)
> >>>> - store value using menu in preferences tool
> >>>> - restore on startup
> >>>>
> >>>> =============== Diff against System-bf.25
> >>>    ===============
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>persistedValueFor: (in category
> >>>    'persistence') -----
> >>>> + persistedValueFor: aSymbol
> >>>> +     ^self persistedValueFor: aSymbol in:
> >>>    ExternalSettings preferenceDirectory!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>persistedFileNameFor: (in category
> >>>    'persistence') -----
> >>>> + persistedFileNameFor: aSymbol
> >>>> +     ^aSymbol, self
> >>>    persistedFileNameExtension!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>fetchExternalSettingsIn: (in category
> >>>    'persistence') -----
> >>>> + fetchExternalSettingsIn: aDirectory
> >>>> +     "Load persisted preferences"
> >>>> +     "Preferences fetchExternalSettingsIn:
> >>>    ExternalSettings preferenceDirectory"
> >>>> +
> >>>> +     ^ (aDirectory fileNamesMatching: '*',
> >>>    self persistedFileNameExtension)
> >>>> +                     do: [:fileName |
> >>>> +                             |
> >>>    pref value |
> >>>> +                             pref
> >>>    := fileName allButLast: self
> >>>    persistedFileNameExtension size.
> >>>> +
> >>>    value := self persistedValueFor: pref in:
> >>>    aDirectory.
> >>>> +
> >>>    (value isKindOf: Boolean) ifTrue:
> >>>> +
> >>>          [self enableOrDisable: pref asSymbol
> >>>    asPer: value]]!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method:
> >>>    Preference>>isNotSetOnStartupString (in category
> >>>    'persistence') -----
> >>>> + isNotSetOnStartupString
> >>>> +     "Answer a string representing whether
> >>>    this preference is not persisted"
> >>>> +
> >>>> +     | aStr |
> >>>> +     aStr :=  'do not set preference on
> >>>    startup' translated.
> >>>> +     ^ self persistedValue == nil
> >>>> +             ifTrue: ['<yes>', aStr]
> >>>> +             ifFalse:        ['<no>',
> >>>    aStr]!
> >>>>
> >>>> Item was changed:
> >>>>  ----- Method: ExternalSettings
> >>>    class>>preferenceDirectory (in category
> >>>    'accessing') -----
> >>>>  preferenceDirectory
> >>>> +     | prefDirName imgPath vmPath secDir |
> >>>> -     | prefDirName imgPath vmPath |
> >>>>       prefDirName := self
> >>>    preferenceDirectoryName.
> >>>> +     Preferences startInUntrustedDirectory
> >>>> +             ifTrue: [
> >>>> +                     secDir :=
> >>>    (FileDirectory on: SecurityManager default
> >>>    secureUserDirectory)
> >>>> +
> >>>    directoryNamed: prefDirName.
> >>>> +                     ^secDir exists
> >>>    ifTrue: [secDir]].
> >>>>       imgPath := SmalltalkImage current
> >>>    imagePath. "might be different from default!!"
> >>>>       vmPath := SmalltalkImage current
> >>>    vmPath.
> >>>>       ^((FileDirectory on: imgPath)
> >>>    directoryExists: prefDirName)
> >>>>               ifTrue: [(FileDirectory on:
> >>>    imgPath) directoryNamed: prefDirName]
> >>>>               ifFalse: [
> >>>>                       ((FileDirectory
> >>>    on: vmPath) directoryExists: prefDirName)
> >>>>
> >>>    ifTrue: [(FileDirectory on: vmPath)
> >>>    directoryNamed: prefDirName]
> >>>>
> >>>    ifFalse: [nil]]
> >>>>  !
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>persistedFileNameExtension (in category
> >>>    'persistence') -----
> >>>> + persistedFileNameExtension
> >>>> +     ^'.pref'!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>persistValue:for: (in category
> >>>    'persistence') -----
> >>>> + persistValue: aBooleanOrNil for: aSymbol
> >>>> +     "Save the preference aSymbol on file, so
> >>>    it can be restored to the given value on startup.
> >>>    If nil, delete persistent value."
> >>>> +
> >>>> +     | fileName file |
> >>>> +     fileName := self persistedFileNameFor:
> >>>    aSymbol.
> >>>> +     aBooleanOrNil ifNil: [
> >>>> +             ^ExternalSettings
> >>>    preferenceDirectory ifNotNilDo: [:fd |
> >>>> +                     fd
> >>>    deleteFileNamed: fileName ifAbsent: []]].
> >>>> +     file := ExternalSettings
> >>>    assuredPreferenceDirectory
> >>>> +             forceNewFileNamed: fileName.
> >>>> +     [file
> >>>> +             wantsLineEndConversion:
> >>>    true;
> >>>> +             nextPutAll: 'value: ';
> >>>    print: aBooleanOrNil; cr.
> >>>> +     ]       ensure: [file close]!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>persistedValueFor:in: (in category
> >>>    'persistence') -----
> >>>> + persistedValueFor: aSymbol in: aDirectory
> >>>> +     "Read the value of preference aSymbol
> >>>    from file. Answer nil if not found."
> >>>> +
> >>>> +     | tokens value f |
> >>>> +     aDirectory ifNil: [^nil].
> >>>> +     f := (aDirectory oldFileOrNoneNamed:
> >>>    (self persistedFileNameFor: aSymbol)) ifNil:
> >>>    [^nil].
> >>>> +     [
> >>>> +             f wantsLineEndConversion:
> >>>    true.
> >>>> +             f contentsOfEntireFile
> >>>    linesDo: [:line |
> >>>> +                     tokens := line
> >>>    findTokens: '    :' keep: ':'.
> >>>> +                     (tokens size = 3
> >>>    and: [tokens second = ':']) ifTrue: [
> >>>> +
> >>>    tokens first caseOf: {
> >>>> +
> >>>          ['value'] -> [tokens third caseOf: {
> >>>> +
> >>>                  ['true'] -> [value := true].
> >>>> +
> >>>                  ['false'] -> [value :=
> >>>    false].
> >>>> +
> >>>          } otherwise: []].
> >>>> +                             }
> >>>    otherwise: []]].
> >>>> +     ] ensure: [f close].
> >>>> +     ^value!
> >>>>
> >>>> Item was changed:
> >>>>  ----- Method: Preferences class>>initialize
> >>>    (in category 'class initialization') -----
> >>>>  initialize
> >>>>
> >>>> +     ExternalSettings registerClient: self.
> >>>> +     self registerInFlapsRegistry.
> >>>> + !
> >>>> -     self registerInFlapsRegistry.   !
> >>>>
> >>>> Item was changed:
> >>>>  ----- Method: ExternalSettings
> >>>    class>>assuredPreferenceDirectory (in category
> >>>    'accessing') -----
> >>>>  assuredPreferenceDirectory
> >>>>       "Answer the preference directory,
> >>>    creating it if necessary"
> >>>>
> >>>> +     |  prefDir topDir |
> >>>> +     prefDir := self preferenceDirectory.
> >>>> -     |  prefDir |
> >>>> -     prefDir _ self preferenceDirectory.
> >>>>       prefDir
> >>>>               ifNil:
> >>>> +                     [topDir :=
> >>>    Preferences startInUntrustedDirectory
> >>>> +
> >>>    ifTrue: [FileDirectory on: SecurityManager default
> >>>    secureUserDirectory]
> >>>> +
> >>>    ifFalse: [FileDirectory default].
> >>>> +                     prefDir :=
> >>>    topDir directoryNamed: self
> >>>    preferenceDirectoryName.
> >>>> -                     [prefDir _
> >>>    FileDirectory default directoryNamed: self
> >>>    preferenceDirectoryName.
> >>>>                       prefDir
> >>>    assureExistence].
> >>>>       ^ prefDir!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method:
> >>>    Preference>>isDisabledOnStartupString (in category
> >>>    'persistence') -----
> >>>> + isDisabledOnStartupString
> >>>> +     "Answer a string representing whether
> >>>    this preference is persisted to false"
> >>>> +
> >>>> +     | aStr |
> >>>> +     aStr :=  'disable preference on
> >>>    startup' translated.
> >>>> +     ^ self persistedValue == false
> >>>> +             ifTrue: ['<yes>', aStr]
> >>>> +             ifFalse:        ['<no>',
> >>>    aStr]!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method:
> >>>    Preference>>isEnabledOnStartupString (in category
> >>>    'persistence') -----
> >>>> + isEnabledOnStartupString
> >>>> +     "Answer a string representing whether
> >>>    this preference is persisted to true"
> >>>> +
> >>>> +     | aStr |
> >>>> +     aStr :=  'enable preference on startup'
> >>>    translated.
> >>>> +     ^ self persistedValue == true
> >>>> +             ifTrue: ['<yes>', aStr]
> >>>> +             ifFalse:        ['<no>',
> >>>    aStr]!
> >>>>
> >>>> Item was changed:
> >>>>  ----- Method:
> >>>    BooleanPreferenceView>>offerPreferenceNameMenu:with:in:
> >>>    (in category 'user interface') -----
> >>>>  offerPreferenceNameMenu: aPanel with: ignored1
> >>>    in: ignored2
> >>>>       "the user clicked on a preference name
> >>>    -- put up a menu"
> >>>>
> >>>>       | aMenu |
> >>>>       ActiveHand showTemporaryCursor: nil.
> >>>>       aMenu := MenuMorph new defaultTarget:
> >>>    self preference.
> >>>>       aMenu addTitle: self preference name.
> >>>>
> >>>>       (Preferences
> >>>    okayToChangeProjectLocalnessOf: self preference
> >>>    name) ifTrue:
> >>>>               [aMenu addUpdating:
> >>>    #isProjectLocalString target: self preference
> >>>    action: #toggleProjectLocalness.
> >>>>               aMenu
> >>>    balloonTextForLastItem: 'Some preferences are best
> >>>    applied uniformly to all projects, and others are
> >>>    best set by each individual project.  If this
> >>>    item is checked, then this preference will be
> >>>    printed in bold and will have a separate value for
> >>>    each project' translated].
> >>>>
> >>>>       aMenu add: 'browse senders' translated
> >>>    target: self systemNavigation selector:
> >>>    #browseAllCallsOn: argument: self preference name.
> >>>>       aMenu balloonTextForLastItem: 'This
> >>>    will open a method-list browser on all methods
> >>>    that the send the preference "' translated, self
> >>>    preference name, '".'.
> >>>>       aMenu add: 'show category...'
> >>>    translated target: aPanel selector:
> >>>    #findCategoryFromPreference: argument: self
> >>>    preference name.
> >>>>       aMenu balloonTextForLastItem: 'Allows
> >>>    you to find out which category, or categories,
> >>>    this preference belongs to.' translated.
> >>>>
> >>>>       Smalltalk isMorphic ifTrue:
> >>>>               [aMenu add: 'hand me a
> >>>    button for this preference' translated target:
> >>>    self selector: #tearOffButton.
> >>>>               aMenu
> >>>    balloonTextForLastItem: 'Will give you a button
> >>>    that governs this preference, which you may
> >>>    deposit wherever you wish' translated].
> >>>>
> >>>>       aMenu add: 'copy this name to
> >>>    clipboard' translated target: self preference
> >>>    selector: #copyName.
> >>>>       aMenu balloonTextForLastItem: 'Copy the
> >>>    name of the preference to the text clipboard, so
> >>>    that you can paste into code somewhere'
> >>>    translated.
> >>>> +     aMenu add: 'set automatically on
> >>>    startup...' translated target: self selector:
> >>>    #offerPersistenceMenu.
> >>>> +     aMenu balloonTextForLastItem: 'Store a
> >>>    value for this preference on file. On startup, it
> >>>    will be automatically restored.' translated.
> >>>>
> >>>>       aMenu popUpInWorld!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method:
> >>>    BooleanPreferenceView>>offerPersistenceMenu (in
> >>>    category 'user interface') -----
> >>>> + offerPersistenceMenu
> >>>> +     | aMenu |
> >>>> +     Preferences
> >>>    persistedPreferencesAccessible
> >>>> +             ifFalse: [^self inform:
> >>>    ('{1} is in secure mode.
> >>>> + You cannot access the persistent preferences
> >>>    now.
> >>>> + To change them, start {1} without loading a
> >>>    project.' translated
> >>>> +     format: {SystemVersion current baseName
> >>>    capitalized})].
> >>>> +
> >>>> +     aMenu := MenuMorph new defaultTarget:
> >>>    self preference.
> >>>> +     aMenu addTitle: self preference name.
> >>>> +     aMenu addUpdating:
> >>>    #isEnabledOnStartupString target: self preference
> >>>     selector: #persistValue: argumentList: {true}.
> >>>> +     aMenu addUpdating:
> >>>    #isDisabledOnStartupString target: self preference
> >>>     selector: #persistValue: argumentList: {false}.
> >>>> +     aMenu addUpdating:
> >>>    #isNotSetOnStartupString target: self preference
> >>>     selector: #persistValue: argumentList: {nil}.
> >>>> +     aMenu popUpInWorld!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preference>>persistValue: (in
> >>>    category 'persistence') -----
> >>>> + persistValue: aBooleanOrNil
> >>>> +     "Save this preference on file, so it can
> >>>    be restored on startup. If nil, delete persistent
> >>>    value."
> >>>> +     Preferences persistValue: aBooleanOrNil
> >>>    for: self name!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preference>>persistedValue (in
> >>>    category 'persistence') -----
> >>>> + persistedValue
> >>>> +     "Answer the value of this preference
> >>>    saved on file, otherwise nil"
> >>>> +     ^Preferences persistedValueFor: self
> >>>    name!
> >>>>
> >>>> Item was added:
> >>>> + ----- Method: Preferences
> >>>    class>>persistedPreferencesAccessible (in category
> >>>    'persistence') -----
> >>>> + persistedPreferencesAccessible
> >>>> +     ^SecurityManager default hasFileAccess
> >>>> + !
> >>>
> >>>    _______________________________________________
> >>>    etoys-dev mailing list
> >>>    etoys-dev at squeakland.org
> >>>    http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >>> ________________
> >>> _______________________________________________
> >>> etoys-dev mailing list
> >>> etoys-dev at squeakland.org
> >>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >> _______________________________________________
> >> etoys-dev mailing list
> >> etoys-dev at squeakland.org
> >> http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >>
> >
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100809/968297c5/attachment-0001.html>


More information about the etoys-dev mailing list