Because it hampers to have nice fly by help of source code.
Stef _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
We do not know how. We asked for this on the Pharo mailing list a long time ago and nobody knew why it is like that.
Cheers, Doru On 25 May 2011, at 15:31, Stéphane Ducasse wrote: > Because it hampers to have nice fly by help of source code. > > Stef > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "We cannot reach the flow of things unless we let go." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
do you have a code snippet for text creation because I will ask
Stef On May 25, 2011, at 3:35 PM, Tudor Girba wrote: > We do not know how. We asked for this on the Pharo mailing list a long time ago and nobody knew why it is like that. > > Cheers, > Doru > > > On 25 May 2011, at 15:31, Stéphane Ducasse wrote: > >> Because it hampers to have nice fly by help of source code. >> >> Stef >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "We cannot reach the flow of things unless we let go." > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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 [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
please use changeAlignment: for the method.
Rigt now I cleaning TextMorph and I will add a couple of method for emphasis, alignment and others. Stef On May 25, 2011, at 5:25 PM, 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 > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Stéphane Ducasse
Thanks Stef.
However, I am not sure we should rely on TextMorph in Mondrian. Try the following and let me know what you think: -=-=-=-=-=-=-=-=-=-=-=-= "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 > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
why not?
I'm fixing now centered and friend Stef On May 25, 2011, at 6:15 PM, Alexandre Bergel wrote: > Thanks Stef. > However, I am not sure we should rely on TextMorph in Mondrian. Try the following and let me know what you think: > > > -=-=-=-=-=-=-=-=-=-=-=-= > "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 >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
> 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. Alexandre > > > On May 25, 2011, at 6:15 PM, Alexandre Bergel wrote: > >> Thanks Stef. >> However, I am not sure we should rely on TextMorph in Mondrian. Try the following and let me know what you think: >> >> >> -=-=-=-=-=-=-=-=-=-=-=-= >> "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 >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
>> 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 >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
> 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. This will make the html generation more difficult because we will have to take care of Morph, and not only on Mondrian shapes. 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. 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 >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> -- >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>> Alexandre Bergel http://www.bergel.eu >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi,
A solution to this problem would be to introduce a popupCode: that returns a string and that properly formats it in a TextMorph. This has the advantage of keeping the script declarative. Another solution would be to introduce popupMorph: and this will only be treated for Morphic rendering. We have that in Glamour. Cheers, Doru On 25 May 2011, at 20:55, 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. > > This will make the html generation more difficult because we will have to take care of Morph, and not only on Mondrian shapes. 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. > > 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 >>>>>> [hidden email] >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>> >>>>> -- >>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>> Alexandre Bergel http://www.bergel.eu >>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Moose-dev mailing list >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Not knowing how to do something is not an argument for how it cannot be done." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
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 >>>>>> [hidden email] >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>> >>>>> -- >>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>> Alexandre Bergel http://www.bergel.eu >>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Moose-dev mailing list >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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 >>>>>>> [hidden email] >>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>> >>>>>> -- >>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>>> Alexandre Bergel http://www.bergel.eu >>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Moose-dev mailing list >>>>>> [hidden email] >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>> >>>>> >>>>> _______________________________________________ >>>>> Moose-dev mailing list >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> -- >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>> Alexandre Bergel http://www.bergel.eu >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
If we are on this subject, could we try to also tackle this issue:
http://code.google.com/p/moose-technology/issues/detail?id=432 ? :) Cheers, Doru On 25 May 2011, at 21:18, 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 >>>>>>>> [hidden email] >>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>>> >>>>>>> -- >>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>>>> Alexandre Bergel http://www.bergel.eu >>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Moose-dev mailing list >>>>>>> [hidden email] >>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Moose-dev mailing list >>>>>> [hidden email] >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>> >>>>> -- >>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>> Alexandre Bergel http://www.bergel.eu >>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Moose-dev mailing list >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
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 >>>>>>>> [hidden email] >>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>>> >>>>>>> -- >>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>>>> Alexandre Bergel http://www.bergel.eu >>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Moose-dev mailing list >>>>>>> [hidden email] >>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Moose-dev mailing list >>>>>> [hidden email] >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>> >>>>> -- >>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>> Alexandre Bergel http://www.bergel.eu >>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Moose-dev mailing list >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |