Hi sam

renderAction: anAction

^(UITheme current
newButtonIn: nil
for: anAction
getState: nil
action: #morphicActOn:
arguments: {}
getEnabled: nil
>>>>> label: (anAction icon isMorph ifFalse:[AlphaImageMorph new image: anAction icon]ifTrue:[anAction icon])    <<<<<<<<

I was reading the following and I do not like the isMorph usage (because it looks like a case statements) and I’m fighting with morphic to remove them. 

Why not making the icon always Morph or something polymorphic? 


help: (anAction title, Character tab asString, anAction shortcutAsString) trimBoth)
valueOfProperty: #noBorder ifAbsentPut: [true]; "this is a hack to tell the GLMUITheme to not draw the border and the fill"
valueOfProperty: #noFill ifAbsentPut: [true];
setProperty: #wantsKeyboardFocusNavigation toValue: false; "to disable the focus"
yourself

2) I also needed to embed morphs in table presentations to allow editing of the cell text.
Again, a single change to GLMTreeMorphNodeModel>>rowMorphForColumn:

rowMorphForColumn: aGlamourColumn

| content |
content :=  self containerTree glamourPresentation column: aGlamourColumn valueFor: self item.
>>>>> ^content isString ifTrue:[StringMorph contents: content] ifFalse:[content] <<<<<<<<

This lead me to customize a subclass of PluggableTextMorph to use blocks instead of the model>>selector approach for pluggable behavior, especially so it would work nicely in a Glamour script and all the context to be referenced on the getText/setText etc operations.

These are obviously hacks but since both cases are wanting a morph and seemingly don't really need a morph of the original type (Image or String) they should be generalized to allow arbitrary morphs.
This also led me to imagine embedding full presentations or visualizations into table cells, but that's beyond my understanding of the framework at this point.

Reminds me of the old XEROX Analyst spreadsheet.

Regards,
Sam


Sam S. Adams, CTO - Contextual Computing
IBM Distinguished Engineer, IBM Research
Mobile: 919-696-6064, email: ssadams@us.ibm.com
Assistant: Linda R. Morrison. (720) 395-0460 Fax: (845) 491-4318, Tie: 676-0460, linda.r.morrison@us.ibm.com
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, 1 Corinthians 1:10>>

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev