why not? I'm fixing now centered and friend
Because relying on Morph widget will complicate generation of html. Especially since this is not necessary as the script below shows. Better to improve Mondrian than to make it rely on Morph.
yes but what you are displaying is not nice to read. character and tab are important. For me now you cannot tell me that TextMorph does not work. After I do not buy the argument of html generation. The generation should ask the textmorph about its contents and this is done.
So between a not looking nice without morph and a good one with Morph I vote for a good one. Especially because this is something ****really**** important and frustrating. So I will ask jannik to hack Mondrian if you do not support it because we need it for other projects.
I'm fed up to browse code badly when it can be under my mouse.
Stef
-=-=-=-=-=-=-=-=-=-=-=-= "Simple example of a distribution map. Green methods are short. Orange are long. Red are very long"
| classes d | d := IdentityDictionary new. classes := Collection withAllSubclasses. classes do: [:aClass | aClass methods do: [:m | d at: m put: m getSource lineCount ] ].
view shape rectangle withoutBorder. view nodes: classes forEach: [ :each | view shape label. view node: each. view node: each forIt: [ view shape rectangle size: 12; if: [:m | (d at: m) < 5 ] fillColor: Color green; if: [:m | (d at: m) >= 5 and: [ (d at: m) < 25 ] ] fillColor: Color orange; if: [:m | (d at: m) >= 25 ] fillColor: Color red. view interaction popupView: [ :el :myView | myView node: 'source' forIt: [myView shape label. myView node: el getSource] ]. view nodes: (each methods sortedAs: [:m | (d at: m) ]). view gridLayout gapSize: 2 ]. view verticalLineLayout ].
view gridLayout
"view interaction popupText" => invoke the Popup in Morph "view interaction popupView: [ :el :myView | ... ]" => open a new view
I think popupText: should be redirected to a popupView: Tell me if you like this
Cheers, Alexandre
On 25 May 2011, at 11:25, Stéphane Ducasse wrote:
Ok now can we have that in Mondrian.... I really want to get source method as fly by help everywhere :)
'khkjhjkhjkhjkh kjhj kjhkjhkjh kjh kjhkjh kjh jh jh jh jh kjh kjh ' asTextMorph openInWorld inspect
after
self selectAll ; chooseEmphasisOrAlignment
So now for you :)
| t | t := 'khkjhjkhjkhjkh kjhj kjhkjhkjh kjh kjhkjh kjh jh jh jh jh kjh kjh ' asTextMorph. t openInWorld. t selectAll; changeFormatting: #rightFlush. t inspect
if you add this little method (which soon will be in your favorite environment) you get it. TextMorph>>changeFormatting: aSymbol "leftFlush centered rightFlush justified "
self editor applyAttribute: (TextAlignment perform: aSymbol). self updateFromParagraph
Stef _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev