Hi Ben,
Thanks for the post. I think this is the first time someone looks at these examples in so
much detail :).
I added some points inline.
On 27 Feb 2012, at 15:54, Ben Coman wrote:
btw, I am on Windows 7.
The GLMExamplesBrowser menu item [View browser tree] is interesting...
Thanks :)
You can learn a bit more about it here:
http://www.humane-assessment.com/stories/rogue-announcements/
NEW IN 4.6
Do the following demonstrate new functionality in 4.6 or just a new example of existing
4.5 functionality ?
#formatAsWords - what does this have to do with composites protocol?
I do not understand the question. This example simply shows how you can use format to
customize how each item gets displayed.
#listDragAndDrop
new to 4.6 - very nice :)
A useful addition would be allowing drop onto background of [Target] (which might be item
+ 0)
Dropping onto a number in [Source] causes an error
An additional comment to describe operation of the example would be useful eg..
"Drag a number from Source into Target dropping on either an item or the
background"
This feature is only in 4.6. However, as you can see it's not quite complete.
#smalltalkCode
This one existed in a different form.
#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)
Just replace "presentation entity" with "presentation selection"
#spawnBrowserSelectionActions (note, the method of
in-comment example is incorrect)
Thanks, I corrected it. Btw, this example does what you asked above.
[*1] operational change...
4.5 has a default window menu ==> 4.6 does not - why the difference ?[3]
Because the default menu is useless. What's more it actually hurts: when you put a
meaningful action, you want the user to know it's there. But, given that the user is
used to useless actions, he will not look in the menu anymore. So, now, there is no
default menu, and it's better :)
[*2]
finder list ==> finder show: [ :a | a list
browser text ==> browser show: [ :a | a text
finder table ==> finder show: [ :a | a table
These are part of the change in the API. Now, we always use show:, andShow: or
andShowIfNone: whenever we want to define the presentations that go with the transmission.
These blocks always get one parameter with a composite presentation and the messages like
"list" or "text" are constructors of the child presentations.
Browser menu #simpleFinderWithMenu
Filter #multipleFinderWithFilter
Finder #simpleFinder
Populate port action #populatePortAction Search #multipleFinderWithFilterAndSearch
Toolbar #browserWithToolbar Tabs with different labels #tabsWithDifferentLabels
#treeWithInitialSelection - actually this gets a MNU GLMTabulator>>text in 4.6 -
needs one more refactoring
Thanks, I fixed it, but the example is still broken because it does not show the default
selection.
[*3] #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
These are part of the change in the API. See above.
Action list #simpleActionList
Allowing all nil #allowAllNil
Allowing nil #allowNil Drop-down #dropDownList [
Drop-down with initial value #dropDownListWithInitialValue
Fix size pane #fixSizePanes Morph icons #morphIcons Tags #compoundTaggedTree
Updated selection #listsWithUpdatedSelection (no glmBrowser pragma)
#singleInitialSelection
[*4] #sendTo:from:with: ==> #transmit:port: ; #from: ; #transformed
These is part of the change in the API. See above.
Updated selection #listsWithUpdatedSelection
[*6] Transcript ==> Inspector (not really a significant change?)
We have a rule in Moose to not use Transcript in the code :)
Action list #simpleActionList [*3,6]
Menus #staticAndDynamicMenu [*6]
DOES NOT WORK IN 4.6
#interdependentPanes - code is flagged as not working. does not work in 4.5 either.
Yes, this is still an enigma. Would love it if someone would take it by the horns :).
FIXED IN 4.6, WAS NON-WORKING IN 4.5
Double click #doubleClick
#simpleTable
#textPortsExamples
#accumulator - Accumulator - looks like an example design change to separate concerns.
Double clicking a number in the left pane, in the right pane brings up...
4.5 - number tab with sub-tabs 'List' & 'Text' as well as a
connect-menu item 'Inspect'
4.6 - number tab only, no sub-tabs or context menu
WORKS FROM EXAMPLE BROWSER BUT NOT FROM METHOD COMMENT
#textSelection - execute from method comment works in 4.5 but fails in 4.6 with unknown
selector
#textSelectionInterval.
Thanks. I fixed it.
OPERATES THE SAME - CODE DIFFERENCE AS NOTED
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
(no glmBrowser pragma) #taggedTree
(no glmBrowser pragma) #multiInitialSelection [*1,3] - but 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?
I noticed this, too. This is unfortunate only on Windows. For some reason we cannot use
selective select. It would be great to get some help with the MorphTreeMorph.
#magritte - This was one a was I was REALLY interested
to see regarding the update to Magritte 3. However the code is identical to 4.5. Both
4.5 and 4.6 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 actually be a fantastic example here would be a small address book of a few
entries that browsed a list in one pane and in another the magritte detail could be
edited.
Thanks. At the moment, I just improved a bit the existing magritte example. I will try to
enhance it a bit if I get some time.
#tableWithIcons
4.6 also adds alternating icons.
4.5 broken & does not transmit to next pane, but same code to 4.6 does work.
selectionAct: [:tree | tree inspect ] ==> selectionAct: [:tree | tree selection
inspect ]
This has been improved in 4.6 to auto-expand when moving from [first tree] to [second
tree]
However in both 4.5 & 4.6, upon initial opening and when switching from [first tree]
to [second tree] an erroneous additional line spacing occurs as shown in _
treeWithInitialSelection-extra-line-spacing.jpg _ (attached)
This is annoying indeed. It's a MorphTreeMorph feature again. I do not know how to fix
it :(.
#treeWithMenu - might need the same change to
selectionAct: as for #tableWithIcons
#treeWithTags [*1]
#treeWithTagsMoreLevels [*1] - 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.
This is a tough one :)
#updateableBrowser [*1] Completely different code and
operation. What is the difference in operation between the 'Upadted automatically'
tab and 'Updated via menu' -
The difference is that if you add an item in the collection using the + icon, it gets
automatically added on the left, but on the right it appears only if you manually press
refresh.
#validator [*6]
#validatorDynamic [*6] - but I don't actually see any difference to operation of
#validator method - what am I missing ?
The validatorDynamic example uses a DynamicPresentation, while the simple validator uses a
regular presentation.
#wizard - it is not clear how to get the selected
items
These parts of Glamour are work in progress.
Cheers,
Doru
--
www.tudorgirba.com
"Obvious things are difficult to teach."