have a question for morphic Designer in pharo.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

have a question for morphic Designer in pharo.

peter yoo
hello smalltalker! this is my first thread.

first! im smalltalk newbie and use ogly english. sorry!!!


i want using "Morphic Designer" in pharo.
because pharo is smart smalltalk environment, and morphic designer is useful(maybe.... only loook movie file)


but use not easy! because squeak and pharo is not same.
ok i can try.

i make a this guide.
Morphic Designer in Pharo2-writeen korean.
http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2



now i can run in pharo. but encounterd error in playtime.

look this section please.
http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2#Step_06_::_.ED.94.84.EB.A1.9C.EA.B7.B8.EB.9E.A8_.EA.B5.AC.EB.8F.99.EC.84.B1.EA.B3.B5.21_.EA.B7.B8.EB.9F.AC.EB.82.98_.EC.95.84.EC.A7.81_.EB.81.9D.EB.82.98.EC.A7.80_.EC.95.8A.EC.95.98.EB.8B.A4._positionInWorld_.EB.A9.94.EC.84.9C.EB.93.9C


start drag item but rise debug error.
debugger display "positionInWord" is nil.


i misssion way for solution.
where look then can find way to answer?


you can then little hint give to me please.

thank you...T.T
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Igor Stasenko



On 20 December 2013 02:24, peter yoo <[hidden email]> wrote:
hello smalltalker! this is my first thread.

first! im smalltalk newbie and use ogly english. sorry!!!

welcome aboard!
 

i want using "Morphic Designer" in pharo.
because pharo is smart smalltalk environment, and morphic designer is useful(maybe.... only loook movie file)


but use not easy! because squeak and pharo is not same.
ok i can try.

i make a this guide.
Morphic Designer in Pharo2-writeen korean.
http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2



now i can run in pharo. but encounterd error in playtime.

look this section please.
http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2#Step_06_::_.ED.94.84.EB.A1.9C.EA.B7.B8.EB.9E.A8_.EA.B5.AC.EB.8F.99.EC.84.B1.EA.B3.B5.21_.EA.B7.B8.EB.9F.AC.EB.82.98_.EC.95.84.EC.A7.81_.EB.81.9D.EB.82.98.EC.A7.80_.EC.95.8A.EC.95.98.EB.8B.A4._positionInWorld_.EB.A9.94.EC.84.9C.EB.93.9C


start drag item but rise debug error.
debugger display "positionInWord" is nil.


no idea, i cannot even find any references (senders/implementors) to #positionInWord in my pharo image
(though it is 3.0 one).
 
i misssion way for solution.
where look then can find way to answer?


i guess you better contact with authors/developers of Morphic Designer project.


you can then little hint give to me please.

My little hint:
1. read code
2. try to understand what's wrong
3. contact authors of code for help
4. try to fix it
5. if nothing helps, repeat from step 1.
:)

 
thank you...T.T



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stéphane Ducasse
In reply to this post by peter yoo

hello smalltalker! this is my first thread.

Welcome :)


first! im smalltalk newbie and use ogly english. sorry!!!

Don’t worry our korean is near to zero ;)

i want using "Morphic Designer" in pharo.
because pharo is smart smalltalk environment, and morphic designer is useful(maybe.... only loook movie file)

Yes it is nice. Now you should pay attention because once we looked at the events and it used a different event 
mechanism that used thisContext (too costly to be used for every morph events).

Now I would be really interested to know if you succeed to make it work even partly. 

but use not easy! because squeak and pharo is not same.
ok i can try.

i make a this guide.
Morphic Designer in Pharo2-writeen korean.
http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2

this is REALLY impressive!

now i can run in pharo. but encounterd error in playtime.

look this section please.
http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2#Step_06_::_.ED.94.84.EB.A1.9C.EA.B7.B8.EB.9E.A8_.EA.B5.AC.EB.8F.99.EC.84.B1.EA.B3.B5.21_.EA.B7.B8.EB.9F.AC.EB.82.98_.EC.95.84.EC.A7.81_.EB.81.9D.EB.82.98.EC.A7.80_.EC.95.8A.EC.95.98.EB.8B.A4._positionInWorld_.EB.A9.94.EC.84.9C.EB.93.9C


start drag item but rise debug error.
debugger display "positionInWord" is nil.


i misssion way for solution.
where look then can find way to answer?

try to see in squeak how positionInWorld was implemented and see how to migrate it to Pharo. 
I do not know if the implementors of Morphic Designer is still maintaining it. 
May be he can help or else I suggest that you fork and publish your work. 

May be we were too aggressive about some methods that we removed. 
If you get some methods that you need for your project, let us know because we could add them into 
pharo or you can package them as extension of your project.

let us know if you make progress. what could be good is if you put an image somewhere so that we can have a look.

Stef

you can then little hint give to me please.

thank you...T.T

Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stephan Eggermont-3
In reply to this post by peter yoo
Thank you for the excellent problem description. Even though I don't know any Korean,
the case was easy to follow. You came already quite far in making the designer work
in Pharo. 

I tried reproducing it, but got stuck pretty fast.
In a Pharo 2.0 20628 image on a mac, I opened monticello and 
added the repository
  MCHttpRepository
location: 'http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/MetacelloRepository'
user: ''
password: ''

In your description, you show that it contains a version 30. The latest version I see is 24.
Is there anything you wrote in Korean that I missed to do?


The Morphic Designer is maintained by Marcel Taeumel (@ hpi.uni-potsdam.de) in Squeak, and though it is no longer 
the focus of his research, he makes sure it runs in the latest versions of squeak. I don't think he regularly follows the 
pharo mailing lists. I think Marcel earlier programmed in Qt, and wanted an event mechanism as similar
as possible to that used there. I already told him once that uptake might be better for an announcements 
based designer. It has a configuration, and the changes you have had to make should not be very difficult 
to put in a pharo-specific package.  

positionInWorld is implemented in 
Morph>positionInWorld
^ self pointInWorld: self position

in both Pharo and Squeak. A difference is in the implementation of TransferMorph, where squeak
has withPassenger:from: and pharo uses withPassenger:from:hand:

Stephan
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

peter yoo
1. im look monticello now. can look more version now. 28, 30

2. email to Marcel Taeumel already. but not receive return mail. mabe into spam?

3. latest squeak is cannot use too. squeak 4.1 image(in squeak 4.4 all in one vm) with morphic designer standard version can use. but class not same(squeak version and pharo version). im little panic.

4. im look already. pharo canvas class not same squeak canvas class. this problem not easy. i try more now. but im newbie user. maybe so hard work.

5. im look already another UI project(http://uipainter-gsoc.over-blog.com/). but not handsome(little joke). maybe can then i want use this project. now im trace another way(for UiItemViewport class. but mouse event is not same to squeak env).


thank you your answer. stephan !!!
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stéphane Ducasse

On 27 Dec 2013, at 01:41, peter yoo <[hidden email]> wrote:

1. im look monticello now. can look more version now. 28, 30

2. email to Marcel Taeumel already. but not receive return mail. mabe into spam?

3. latest squeak is cannot use too. squeak 4.1 image(in squeak 4.4 all in one vm) with morphic designer standard version can use. but class not same(squeak version and pharo version). im little panic.

No don’t I think that you are doing a really good job but this is difficult when the platform changes.

4. im look already. pharo canvas class not same squeak canvas class. this problem not easy. i try more now. but im newbie user. maybe so hard work.

Yes this is hard and I’m sorry that you have to face this situation. 

5. im look already another UI project(http://uipainter-gsoc.over-blog.com/). but not handsome(little joke). maybe can then i want use this project. now im trace another way(for UiItemViewport class. but mouse event is not same to squeak env).

What could be interesting is to port some widgets to pharo and learn how we can turn the event into announcement. 
then only have one pane and one widget to start and learn.



thank you your answer. stephan !!!

Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stephan Eggermont-3
In reply to this post by peter yoo
Peter Yoo wrote:
>1. im look monticello now. can look more version now. 28, 30

Interesting. I still cannot see anything newer than .24 in
http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/MetacelloRepository
Are you sure that it is exactly the same repository? There is likely to be a
different one for designer itself.

>2. email to Marcel Taeumel already. but not receive return mail. mabe into spam?

Possible, but unlikely. The last days were the worst time of the year to reach someone
in Germany. The weeks around christmas (24-26 december) and newyear are family
holidays, so it's likely that he doesn't read his mail. He reacted to your stackoverflow
post though.

>3. latest squeak is cannot use too. squeak 4.1 image(in squeak 4.4 all in one vm)
>with morphic designer standard version can use. but class not same(squeak version
>and pharo version). im little panic.

It should work in the latest squeak image. It is not used enough/doesn't have enough
test coverage that all mistakes are immediately noticed, but Marcel fixes bugs that are
found. With the quality of issue report you provide the major problem should be his
availability/priorities. The next week he's likely to have holidays.

>4. im look already. pharo canvas class not same squeak canvas class.
>this problem not easy. i try more now. but im newbie user. maybe so hard work.

They started as the same, but Pharo has made more radical and drastic clean-ups.
Pharo will break existing applications in order to improve things. The advantage
is that innovation can be much faster in Pharo, a disadvantage is that applications
need to co-evolve. The support for co-evolving is gradually improving, the
continuous integration server provided for Pharo contributions gives fast feedback
on consequences of changes.

Squeak tries to keep compatible with older applications while gradually making
everything unloadable. That is a much slower and more difficult approach.

Quite a lot of code that was not used was removed. Once in a while we find out that
a project uses that code and needs to be reintroduced. Or should be in a separate
extension package, or be moved into the using project. The issue you are now running
into seems to be the cleaning up of event handling that has taken place in Pharo
and not yet or not in the same way in Squeak. A lot of the code deep in the system
was very difficult to understand, so yes, this can be difficult work.

>5. im look already another UI project(http://uipainter-gsoc.over-blog.com/).
>but not handsome(little joke). maybe can then i want use this project. now im trace
>another way(for UiItemViewport class. but mouse event is not same to squeak env).

Yes, this years GSoC project did not get as far as Marcel's one. And the event handling
has changed since Marcel wrote the Designer. Signals was pretty intrusive.

UITreeViewPort doesn't seem to correctly set the source of its dragSpec.
I tried to change dragDropSpec in UiItemViewPort to

dragDropSpec
        ^ dragDropSpec
                source: self;
                yourself

That allowed the drag-and-dropping of a lot of the widgets, but created errors
where the dragDropSpec was set to nil (Tree widget). Then I looked at where
UiItemViewDragDropSpec was used, and found out that the source was not
set in UIDesigner initialize.

I can do drag and drop of all widgets with

        self ui widgetList
                selectionMode: UiViewSingleSelection;
                dragDropSpec: (UiItemViewDragDropSpec new
                        source: (self ui widgetList);
                        dropEnabled: false;
                        dragTransferType: #widgetClass).

So, in all I needed to make the following changes to make the designer
work in 20628 after loading development of ConfigurationOfDesigner-mt.24.mcz:

UIDesigner>gridForm

        | form canvas |
        form := Form extent: 20@20 depth: 32.
        form floodFill2: (Color gray: 0.98) at: 0@0.
       
        canvas := FormCanvas on: form.
       
        form pixelValueAt: 0@0 put: (form pixelValueFor: (Color gray: 0.2)).
        ^ form

UIDesigner>initialize

        super initialize.
        self ui setupUi: self.
        self ui prop addPaneSplitters.
       
        self selectDefaultModel.
       
        self ui centralScroller
                borderWidth: 0;
                fillStyle: (BitmapFillStyle fromForm: self gridForm).
       
        "BAD: Viewport should not be accessed from the outside."
        self ui widgetList viewport dragEnabled: true.
        self ui widgetList
                selectionMode: UiViewSingleSelection;
                dragDropSpec: (UiItemViewDragDropSpec new
                        source: (self ui widgetList);
                        dropEnabled: false;
                        dragTransferType: #widgetClass).
       
         self ui filterEdit deferEditSignalTime: 300.
       
        propertyTable := self ui propertyScroller widget.
               
        self connect: self ui filterEdit signal: #textEdited: toSelector: #nameFilter:.
               
        self connect: self ui newBtn signal: #clicked: toSelector: #reset.
        self connect: self ui saveBtn signal: #clicked: toSelector: #save.
        self connect: self ui openBtn signal: #clicked: toSelector: #load.

UIAbstractWidgetModel>initialize

        super initialize.
        self updateWidgets.
       
        SystemAnnouncer uniqueInstance
                on: ClassAdded
                send: #updateWidgets
                to: self.









 
 


Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stephan Eggermont-3
In reply to this post by peter yoo
When trying to load Designer in Pharo 3.0 I find uncompilable code in Animations:

'updateCurrentValue: aValue

        self target ifNil: [^ self].
       
        self target
                perform: (self property, #:) asSymbol
                with: aValue.'



Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stephan Eggermont-3
In reply to this post by peter yoo
I was successfull in making Designer start in Pharo 3.0 30659, with some help from 
Tobias Pape. 

The following changes were needed (compared to what was needed for Pharo 2.0)
- floodfill2:at: is gone from Form. I replaced it with a simple fillColor: 
  That it had gone missing was not clear from issue 11570
- outsetBy: is deprecated and replaced by expandBy: in a lot of places
- (some symbol or string or something else, #:) asSymbol is replaced by ... asMutator
  in a lot of places.
- TranslucentColor is replaced by Color


TextMorph handleInteraction:forEvent: no longer exists, but gives a different problem in Pharo 2 than in 3
just replacing it by handleInteraction: does not work. That makes a mess of the selection in
theUiTextLineMorphs in the object inspector.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

peter yoo
great!

"source: (self ui widgetList);"

this code line is real solution. before i dont know, where inittilize "source".




drag and drop is ok. and look object is ok.
but cannot edit object property.(maybe mouse focus event problem)

encounter new error then make new thread right?



ps. thank you. Stephan Eggermont/Stéphane Ducasse
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stéphane Ducasse
In reply to this post by Stephan Eggermont-3
I guess that

#: should be #’:’

On 27 Dec 2013, at 19:44, Stephan Eggermont <[hidden email]> wrote:

> When trying to load Designer in Pharo 3.0 I find uncompilable code in Animations:
>
> 'updateCurrentValue: aValue
>
> self target ifNil: [^ self].
>
> self target
> perform: (self property, #:) asSymbol
> with: aValue.'
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stéphane Ducasse
In reply to this post by Stephan Eggermont-3
This is really cool :)

I would love to see how we could change the event system used because using thisContext all the time
does not work and breaks the idea of not reifying the stack all the time.

Once it will be working, it would be really nice to see if we can generate spec specification.

Stef

> I was successfull in making Designer start in Pharo 3.0 30659, with some help from
> Tobias Pape.

Tx tobias.

> The following changes were needed (compared to what was needed for Pharo 2.0)
> - floodfill2:at: is gone from Form. I replaced it with a simple fillColor:
>  That it had gone missing was not clear from issue 11570
        Do you like method with floodFill23 in their name and not invoked at all :)?
       
> - outsetBy: is deprecated and replaced by expandBy: in a lot of places
        we also cleaned a lot the logic and added MorphMargin to support polymorphic margins. So may be this is beneficial

> - (some symbol or string or something else, #:) asSymbol is replaced by ... asMutator
>  in a lot of places.
> - TranslucentColor is replaced by Color
>
> <PastedGraphic-1.png>
>
> TextMorph handleInteraction:forEvent: no longer exists, but gives a different problem in Pharo 2 than in 3
> just replacing it by handleInteraction: does not work. That makes a mess of the selection in
> theUiTextLineMorphs in the object inspector.

That I have no idea.
>
> Stephan
>
>


Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Tobias Pape
In reply to this post by Stéphane Ducasse

On 28.12.2013, at 10:07, Stéphane Ducasse <[hidden email]> wrote:

> I guess that
>
> #: should be #’:’

That is one way.
In this particular case,
  self property asMutator
was the better version, tho.

Best
        -Tobias
PS: Just curious, what was the reason to no longer allow #: ?
    Or, where can I find the respective discussion, just want to lern.

>
> On 27 Dec 2013, at 19:44, Stephan Eggermont <[hidden email]> wrote:
>
>> When trying to load Designer in Pharo 3.0 I find uncompilable code in Animations:
>>
>> 'updateCurrentValue: aValue
>>
>> self target ifNil: [^ self].
>>
>> self target
>> perform: (self property, #:) asSymbol
>> with: aValue.'
>>
>>
>>
>
>


signature.asc (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Stéphane Ducasse

On 28 Dec 2013, at 14:24, Tobias Pape <[hidden email]> wrote:

>
> On 28.12.2013, at 10:07, Stéphane Ducasse <[hidden email]> wrote:
>
>> I guess that
>>
>> #: should be #’:’
>
> That is one way.
> In this particular case,
>  self property asMutator
> was the better version, tho.
>
> Best
> -Tobias
> PS: Just curious, what was the reason to no longer allow #: ?

I do not remember but may be this is ansi.
In visualworks #’zork foo’ is the way to have symbol with string with space.

>    Or, where can I find the respective discussion, just want to lern.
>
>>
>> On 27 Dec 2013, at 19:44, Stephan Eggermont <[hidden email]> wrote:
>>
>>> When trying to load Designer in Pharo 3.0 I find uncompilable code in Animations:
>>>
>>> 'updateCurrentValue: aValue
>>>
>>> self target ifNil: [^ self].
>>>
>>> self target
>>> perform: (self property, #:) asSymbol
>>> with: aValue.'
>>>
>>>
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Tobias Pape

On 29.12.2013, at 08:56, Stéphane Ducasse <[hidden email]> wrote:

>
> On 28 Dec 2013, at 14:24, Tobias Pape <[hidden email]> wrote:
>
>>
>> On 28.12.2013, at 10:07, Stéphane Ducasse <[hidden email]> wrote:
>>
>>> I guess that
>>>
>>> #: should be #’:’
>>
>> That is one way.
>> In this particular case,
>> self property asMutator
>> was the better version, tho.
>>
>> Best
>> -Tobias
>> PS: Just curious, what was the reason to no longer allow #: ?
>
> I do not remember but may be this is ansi.
> In visualworks #’zork foo’ is the way to have symbol with string with space.
Yes, I know the #'anything' form and I am completely ok with it.
I just was wondering, because things like #> #< scan directly :)
Thanks anyway.

Best
        -Tobias


signature.asc (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Marcus Denker-4
In reply to this post by Tobias Pape

On 28 Dec 2013, at 14:25, Tobias Pape <[hidden email]> wrote:

>
> On 28.12.2013, at 10:07, Stéphane Ducasse <[hidden email]> wrote:
>
>> I guess that
>>
>> #: should be #’:’
>
> That is one way.
> In this particular case,
>  self property asMutator
> was the better version, tho.
>
> Best
> -Tobias
> PS: Just curious, what was the reason to no longer allow #: ?
>    Or, where can I find the respective discussion, just want to lern.
Pharo3 uses the new compiler infrastructure by default. This means that
instead of the old (hand-written) parser, we now use RBParser (hand written, too).

It seems that RBParser does not implement it. The question is who was wrong: the old
parser or the new? I have no idea.
But the good news is that we now just have two Parsers, not three… (syntax highlighting implements it’s
own parser, too).

What we need is a real grammar… that can solve these differences which come from the implementation.

Another example is #9 —> both RB and the old compile it as an integer, there is special code in the Parser
for that even. But do we want that? If we would have a definition of our grammar, we could look there and
say “yes, it’s part of the definition”.

Even better would be an executable grammar… we should explore of we can use PetitParser in the future,
but there are some open questions (error handling, speed…).

The most beautiful would be to have just *one* parser that has a high level model of it’s grammar that is
reusable everywhere.

        Marcus

signature.asc (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: have a question for morphic Designer in pharo.

Tobias Pape

On 30.12.2013, at 10:44, Marcus Denker <[hidden email]> wrote:

>
> On 28 Dec 2013, at 14:25, Tobias Pape <[hidden email]> wrote:
>
>>
>> On 28.12.2013, at 10:07, Stéphane Ducasse <[hidden email]> wrote:
>>
>>> I guess that
>>>
>>> #: should be #’:’
>>
>> That is one way.
>> In this particular case,
>> self property asMutator
>> was the better version, tho.
>>
>> Best
>> -Tobias
>> PS: Just curious, what was the reason to no longer allow #: ?
>>   Or, where can I find the respective discussion, just want to lern.
>
> Pharo3 uses the new compiler infrastructure by default. This means that
> instead of the old (hand-written) parser, we now use RBParser (hand written, too).
>
> It seems that RBParser does not implement it. The question is who was wrong: the old
> parser or the new? I have no idea.
> But the good news is that we now just have two Parsers, not three… (syntax highlighting implements it’s
> own parser, too).
>
> What we need is a real grammar… that can solve these differences which come from the implementation.
Ansi has one, but I think it is unpractical, dividing “symbols” and “quoted selectors” :(

>
> Another example is #9 —> both RB and the old compile it as an integer, there is special code in the Parser
> for that even. But do we want that? If we would have a definition of our grammar, we could look there and
> say “yes, it’s part of the definition”.
>
> Even better would be an executable grammar… we should explore of we can use PetitParser in the future,
> but there are some open questions (error handling, speed…).
>
> The most beautiful would be to have just *one* parser that has a high level model of it’s grammar that is
> reusable everywhere.
Hehe. I think, both PP and Ometa would fit that criterion but I agree
that this is hard-think for the core-Parser of a Smalltalk :)


Best
        -Tobias


signature.asc (1K) Download Attachment