I'm working on a new pahro version with textMorph fixed.
Stef
On May 25, 2011, at 9:18 PM, Alexandre Bergel wrote:
I just committed Mondrian 2.95. It should do what one
would expect. Try the following:
-=-=-=-=-=-=-=-=-=-=-=-=
view nodes: {Object . Class } forEach: [ :each |
view interaction popupText: #getSource.
view shape rectangle size: 10.
view nodes: each methods.
view gridLayout gapSize: 2
]
-=-=-=-=-=-=-=-=-=-=-=-=
so you are writing in a canvas directly?
Yes. In a FormCanvas.
so you are relying on Morph. Because the mondrian
canvas is pasteUpMorph no?
No, MOCanvas is a subclass of Morph.
This is the only morph we use in Mondrian.
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
Text rendering happens in MORectangleShape and MOBoundedShape. Popup is done via MOPopup,
which use the UITheme builder. There is no problem right now and I cannot predict the
future. We will see if increasing the dependency of Morph will cause 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.
I put it in a class extension in Mondrian. It should be okay for now.
So try with the last version of Mondrian.
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
_______________________________________________
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