On May 25, 2011, at 8:55 PM, Alexandre Bergel wrote:
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.
I also would like a good one. What makes you think that this is not the case. I just
tried to see a solution without relying on Morph. If this cannot be done, then no problem
in using Morph.
so you are writing in a canvas directly?
so you are relying on Morph. Because the mondrian canvas is pasteUpMorph no?
So what is the difference.
This will make the html generation more difficult
because we will have to take care of Morph, and not only on Mondrian shapes.
but if you ask the shape its contents and
TextShape>>contents
^ textMorph contents
So I do not understand why this is a problem
But this is okay for now. We will take care of this
when the problem appears on its own.
I am seeing this with your fix right now.
I will publish a new version of textMorph where I fixed all the broken behavior
so we will be able to do left justified and the rest.
Stef
Alexandre
> -=-=-=-=-=-=-=-=-=-=-=-=
> "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(a)iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel
http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev