Glamour-Examples comparison 4.5 v 4.6 - Class GLMBasicExamples

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

Glamour-Examples comparison 4.5 v 4.6 - Class GLMBasicExamples

Ben Coman

I am just starting to learn Glamour and thought it would be instructive
to see what had changed in the example between 4.5 & 4.6.  I thought
someone else might be mildly interested in the results I compiled.
(notation...   4.5-code   ==>   4.6 code)

I'll begin by thanking those that took the time to provide these
examples.  They are a great way to learn the system.  The addition in
4.6 of GLMExamplesBrowser is nice, and the menu item [View browser tree]
provides an interesting rendition of each example.


_EXAMPLES NOW WORKING IN 4.6, WAS NOT IN 4.5_
    Double click  #doubleClick
    Simple table  #simpleTable
    Text ports  #textPortsExamples
    Icons  #tableWithIcons - 4.5 did not transmit to next pane, but same
code to 4.6 does work.
        Also 4.6 refactors.... selectionAct: [:tree | tree inspect ]  
==>  selectionAct: [:tree | tree selection inspect ]
        Also 4.6 adds alternating icons.


_EXAMPLES THAT OPERATE THE SAME IN 4.6 AS 4.5 - CODE IDENTICAL _
    * Tree with menu  #treeWithMenu - but might need the same change to
selectionAct: as for  "Icons #tableWithIcons"
    * Dashboard  #dashboard
    * Dashboard specifying extents  #dashboardWithSpecificExtents
    * Dashboards in dashboard  #dashboardsInDashboard
    * Composite arrangements  #differentComposites
    * Complex morphs (StarBrowser simulation)  #starBrowser
    * EyeSee interactive bar chart  #eyeseeBarDiagram
    * Mondrian painting  #mondrianPainting
    * Multiple actions  #multipleActions
    * Simple Expander  #simpleExpander
    * Smart lists  #treeWithAmountFiltering
    * Stacker  #stacker
    * Tabs with different actions  #tabsWithDifferentActions
    * Three inter-dependent panes  #threeInterdependentPanes
    * Tree with children by level  #treeWithChildrenByLevel
    * Tree with expansion  #treeWithExpansion
    * Tree with tags  #treeWithTags
    * (no glmBrowser pragma)    #taggedTree

    * Tree withTags more levels  #treeWithTagsMoreLevels [*1] -
enhancement... it would be good if after deselecting the tags, it
remembered which node had previously been expanded.  When when I click a
tag twice, I expect to get back the same view I had before.

    * Magritte presentation  #magritte - This was one a was I was REALLY
interested to see regarding the update to Magritte 3.  However 4.6 code
is identical to 4.5 and produce the same error....
  [Save] ==> error MAWriteError: Not supposed to write to something.
  [Cancel] ==> no change. Now without knowing anything about Magritte, I
would expect the text box to revert to the original text.

What would be a REALLY great would be a Magritte 3 example here of
something like a tiny address book of a few entries that in one pane
browsed the list and in another pane showed the detail via Magritte


_EXAMPLE THAT OPERATE THE SAME AS 4.5 - CODE REFACTORED AS NOTED

?? Perhaps someone could comment on the general nature of these
refactorings...

1. #using seems to be being purged from Glamour.  Perhaps(?) to remove a
lot of methods from GLMBrowser & GLMTPresentationBuilder, leaving these
only in GLMCompositePresentation. Examples...
    showOn: ... using: [ browser mondrian    ==>    transmit to: ....
andShow: [ :a | a mondrian
    showOn: ... using: [ browser list     ==>     transmit to: ...
andShow: [ :a | a list
    showOn: ... using: [ browser morph  ==>    transmit to: ... andShow:
[ :a | a morph

    * Action list  #simpleActionList
    * Allowing all nil  #allowAllNil
    * Allowing nil  #allowNil
    * Drop-down  #dropDownList  [
    * Drop-down with initial value   #dropDownListWithInitialValue
    * Dynamic validator   #validatorDynamic
    * Fix size pane  #fixSizePanes
    * Morph icons  #morphIcons
    * Tags  #compoundTaggedTree
    * Updated selection  #listsWithUpdatedSelection
    * Validator  #validator - but I don't actually see any difference to
operation of "Dynamic Validator #dynamicValidator" method - what am I
missing ?
    * (no glmBrowser pragma) #singleInitialSelection



2. Clean up similar to [1.]
    finder list   ==>       finder show: [ :a | a list
    browser text    ==>   browser show: [ :a | a text
    finder table   ==>    finder show: [ :a | a table

    * Browser menu  #simpleFinderWithMenu
    * Filter   #multipleFinderWithFilter
    * Finder  #simpleFinder
    * Populate port action  #populatePortAction
    * Search  #multipleFinderWithFilterAndSearch
    * Toolbar  #browserWithToolbar
    * Tabs with different labels  #tabsWithDifferentLabels
   * (no glmBrowser pragma) #treeWithInitialSelection - however this
gets a MNU GLMTabulator>>text in 4.6 - requires one more   browser text  
===> a text


3.  #sendTo: from: with:  ==>      #transmit: port:   ;  #from:  ;  
#transformed

    * Updated selection  #listsWithUpdatedSelection


4. Transcript     ==>      Inspector    (not really a significant change?)

    * Action list  #simpleActionList
    * Menus  #staticAndDynamicMenu


_EXAMPLE CODE AND OPERATION CHANGED SIGNIFICANTLY FROM 4.5 TO 4.6 _

    * Accumulator   #accumulator

    * Updateable browser  #updateableBrowser  -  Completely different
code and operation. What is the difference in operation between the
'Upadted automatically' tab and 'Updated via menu' -


_NEW EXAMPLES IN 4.6_
?? Do the following demonstrate new functionality in 4.6 or just a new
example of existing 4.5 functionality ?

    * Format  #formatAsWords - what does this have to do with composites
protocol it is located in?
    * Smalltalk code  #smalltalkCode
    * Spawn browser actions  #spawnBrowserActions - it would be useful
to also see how a single selected item could be opened in a new window -
not just the whole list)
    * Spawn browser selection actions  #spawnBrowserSelectionActions
(note, the method of in-comment example is incorrect)

    *(no glmBrowser pragma)   #listDragAndDrop - very nice :)  However
dropping onto a number in [Source] causes an error.  Also a useful
additional example would dropping on to the [Target] background  (which
might use item + 0)


_ISSUES WITH 4.6 EXAMPLES_

    * Two inter-dependent panes  #interdependentPanes - code is flagged
as not working. does not work in 4.5 either.

    * (no glmBrowser pragma)   #treeWithInitialSelection - 4.6 has a
nice additional functionality of auto-expand when moving from [first
tree] to [second tree].  However in both 4.5 & 4.6, upon initial opening
and also when switching from [first tree] to [second tree] an erroneous
additional line spacing occurs as shown in _
treeWithInitialSelection-extra-line-spacing.jpg _ (attached)

    * Text selection  #textSelection - execute from method comment works
in 4.5 but fails in 4.6 with unknown selector #textSelectionInterval.
However it works from Example Browser

    * (no glmBrowser pragma)  #wizard - It is not clear how to get hold
of the selected items

    * (no glmBrowser pragma) #multiInitialSelection - I am only able to
multi-select contiguous items with the SHIFT key.  I am unable to
multi-select non-contiguous items as I would expect using the CTRL key.  
Instead a context menu for MorphTreeMorph appears.   Is this unfortunate
behaviour just me?

cheers, -ben

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

treeWithInitialSelection-extra-line-spacing.gif (32K) Download Attachment