hello smalltalker! this is my first thread. first! im smalltalk newbie and use ogly english. sorry!!!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. Morphic Designer in Pharo2-writeen korean. http://workspace.onionmixer.net/mediawiki/index.php?title=Morphic_Designer_in_Pharo2 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 |
On 20 December 2013 02:24, peter yoo <[hidden email]> wrote:
welcome aboard!
no idea, i cannot even find any references (senders/implementors) to #positionInWord in my pharo image (though it is 3.0 one).
i guess you better contact with authors/developers of Morphic Designer project.
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. :)
-- Best regards, Igor Stasenko. |
In reply to this post by peter yoo
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.
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
|
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 |
1. im look monticello now. can look more version now. 28, 30 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.2. email to Marcel Taeumel already. but not receive return mail. mabe into spam? |
On 27 Dec 2013, at 01:41, peter yoo <[hidden email]> wrote:
Yes this is hard and I’m sorry that you have to face this situation.
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.
|
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. |
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.' |
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 |
great! this code line is real solution. before i dont know, where inittilize "source"."source: (self ui widgetList);" |
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.' > > > |
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 > > |
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 |
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.' >>> >>> >>> >> >> > |
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. I just was wondering, because things like #> #< scan directly :) Thanks anyway. Best -Tobias signature.asc (1K) Download Attachment |
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. 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 |
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. > > 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. that this is hard-think for the core-Parser of a Smalltalk :) Best -Tobias signature.asc (1K) Download Attachment |
Free forum by Nabble | Edit this page |