Hello
Sorry if this is the
wrong place to ask this. I am trying to understand how Magritte works, initially
by following the first example in Ch. 26.2 of the Seaside book. I have
started with a fresh download of Pharo 3.0, and I have installed Magritte 3
and Seaside 3. I realise that the Seaside book example is based on Magritte 2,
so I have made necessary changes to the example code (descriptions are on
the instance side, insert <magritteDescription> pragmas, change
#description to #magritteDescription). All works well up to the point where I
try to generate the Seaside editor. This fails because the
code:
Address example1
asComponent
produces a 'does not
understand' message for #asComponent. I have not been able to work through all
of Seaside to see where this method is defined, and I am at a bit of a loss. I
know this is rather elementary, but could someone give me a
pointer?
Also, if Magritte 3
is now the norm, will the Seaside book examples be updated to reflect
this?
Thanks in advance
for any help
Peter
Kenny
|
Hi Peter
That sounds like you have independently installed Seaside and Magritte. You might miss the part connecting them together. Seaside can be used without Magritte, and Magritte without Seaside. That happens if you just install stable Seaside and stable Magritte from the configuration browser. Can you check if you have Magritte-Seaside loaded? That is in the Seaside group of Magritte. If not, you need the other option in the configuration browser, just loading the configuration of Magritte3. Then in a workspace, do-it (ConfigurationOfMagritte3 project version: #stable) load: 'Seaside'. A faster way to start can be to use one of the images from https://ci.inria.fr/pharo-contribution/ Pier, QCMagritte and Forum all come with both Magritte and Seaside preloaded. Stephan |
2014-05-12 20:21 GMT-03:00 Stephan Eggermont <[hidden email]>:
> A faster way to start can be to use one of the images from > https://ci.inria.fr/pharo-contribution/ > Pier, QCMagritte and Forum all come with both Magritte and Seaside > preloaded. I don't like this "faster way" of prebuilt images. Makes me think of seeds for forked branches. Unless something is wrong with the package system, I would encourage its use, even if it takes long. Regards, Esteban A. Maringolo |
In reply to this post by Peter Kenny
Esteban wrote:
>I don't like this "faster way" of prebuilt images. >Makes me think of seeds for forked branches. >Unless something is wrong with the package system, I would encourage >its use, even if it takes long. I strongly encourage the use of ci images. And of course you should add your own, once you've decided what packages you need. The main advantage is that it provides feedback to the core pharo development on changes. Stephan |
2014-05-12 20:47 GMT-03:00 Stephan Eggermont <[hidden email]>:
> Esteban wrote: >>I don't like this "faster way" of prebuilt images. >>Makes me think of seeds for forked branches. >>Unless something is wrong with the package system, I would encourage >>its use, even if it takes long. > > I strongly encourage the use of ci images. And of course you should > add your own, once you've decided what packages you need. > The main advantage is that it provides feedback to the core pharo > development on changes. |
In reply to this post by Stephan Eggermont-3
2014-05-12 20:47 GMT-03:00 Stephan Eggermont <[hidden email]>:
> Esteban wrote: >>I don't like this "faster way" of prebuilt images. >>Makes me think of seeds for forked branches. >>Unless something is wrong with the package system, I would encourage >>its use, even if it takes long. > > I strongly encourage the use of ci images. And of course you should > add your own, once you've decided what packages you need. > The main advantage is that it provides feedback to the core pharo > development on changes. I'm totally in about CI images for testing purposes, but not for distribution. Maybe it's a matter of personal taste. Esteban A. Maringolo ps: sorry for the off topic |
In reply to this post by Peter Kenny
On 13/5/14 00:50, PBK Research wrote:
They should but only I - reverse engineer Magritte 3 - get the time to do it I was planning to write an independent Chapter on Magrritte 3 but I got the same limits. So if somebody knowlegeable wants to start writing two/three blog posts we could turn it into a book chapter.
|
In reply to this post by Esteban A. Maringolo
On 13/5/14 01:34, Esteban A. Maringolo wrote: > 2014-05-12 20:21 GMT-03:00 Stephan Eggermont <[hidden email]>: > >> A faster way to start can be to use one of the images from >> https://ci.inria.fr/pharo-contribution/ >> Pier, QCMagritte and Forum all come with both Magritte and Seaside >> preloaded. > I don't like this "faster way" of prebuilt images. > Makes me think of seeds for forked branches. > Unless something is wrong with the package system, I would encourage > its use, even if it takes long. why? you can just read the configuration of the jenkins job and you know how to build it. The difference is that with the jenkins job we are SURE that the script to load works. Stef > > Regards, > > Esteban A. Maringolo > > |
I ve both of these things working in my app on pharo3. I'll have a look. Le 13 mai 2014 09:25, "stepharo" <[hidden email]> a écrit :
|
In reply to this post by Stephan Eggermont-3
Hi Stephan
Many thanks. I was missing the Magritte-Seaside component. The problem is now fixed. No doubt I will find others! I started from scratch and loaded all the packages because I wanted to understand how these things work, and because I needed a combination of things installed - I have also loaded Voyage and PetitParser, hoping to use all these things together. I did not expect to find all of these in a pre-built image - maybe I was wrong. Many thanks also for the speedy response. I posted my question and went to bed. I did not expect to get an answer after midnight. It is interesting to see that others work even stranger hours than I do! Thanks also to others who commented. To Stepharo: I did not mean to sound critical. I was wondering if an updated version already exists and I have not yet found it. I know quite a bit about Smalltalk from Dolphin, but I am new to Pharo and I feel like a blind man stumbling about. There are so many packages around, and I do not understand what most of them do. Could I just try one supplementary question about using Magritte. The paper 'Magritte - A Meta-Driven Approach to Empower Developers and End Users' by Lukas Renggli, Stephane Ducasse and Adrian Kuhn has a section 3.2 on building an editor, which shows how the same description can generate an editor in Seaside or in Morphic Squeak (!). I know that #asComponent will generate the Seaside version; is there a method #asMorph which will give the morphic version as easily, or if not how do I get an editor as a Pharo window? Thanks again for the help. Peter Kenny -----Original Message----- From: Pharo-users [mailto:[hidden email]] On Behalf Of Stephan Eggermont Sent: 13 May 2014 00:22 To: [hidden email] Subject: Re: [Pharo-users] Problem learning about Magritte Hi Peter That sounds like you have independently installed Seaside and Magritte. You might miss the part connecting them together. Seaside can be used without Magritte, and Magritte without Seaside. That happens if you just install stable Seaside and stable Magritte from the configuration browser. Can you check if you have Magritte-Seaside loaded? That is in the Seaside group of Magritte. If not, you need the other option in the configuration browser, just loading the configuration of Magritte3. Then in a workspace, do-it (ConfigurationOfMagritte3 project version: #stable) load: 'Seaside'. A faster way to start can be to use one of the images from https://ci.inria.fr/pharo-contribution/ Pier, QCMagritte and Forum all come with both Magritte and Seaside preloaded. Stephan |
In reply to this post by stepharo
2014-05-13 4:25 GMT-03:00 stepharo <[hidden email]>:
> > On 13/5/14 01:34, Esteban A. Maringolo wrote: >> >> 2014-05-12 20:21 GMT-03:00 Stephan Eggermont <[hidden email]>: >> >>> A faster way to start can be to use one of the images from >>> https://ci.inria.fr/pharo-contribution/ >>> Pier, QCMagritte and Forum all come with both Magritte and Seaside >>> preloaded. >> >> I don't like this "faster way" of prebuilt images. >> Makes me think of seeds for forked branches. >> Unless something is wrong with the package system, I would encourage >> its use, even if it takes long. > > > why? > you can just read the configuration of the jenkins job and you know how to > build it. > The difference is that with the jenkins job we are SURE that the script to > load works. If the script to load works in a clean image I would put it in the project page in SmalltalkHub or similar. And a reference to the CI image in case running the script gets convoluted. Again, CI images for testing of important contributions is great, but if projects/packages can't be loaded easily into an existing image it could mean the packaging is done wrong (developer) or the right packaging can't be specified (Metacello and friends), 99% of the times it is the former. Regards, Esteban A. Maringolo |
In reply to this post by Peter Kenny
Peter wrote:
>is there a method #asMorph which will give the >morphic version as easily, or if not how do I get an editor as a Pharo >window? There is asMagritteMorph yes, defined in Magritte-Morph. You might need to load that additionally (it is loaded in the Forum image). Stephan |
Stephan
Thanks. I have Magritte-Morph in my image, but I wonder if anyone has debugged it. I send asMagritteMorph to a Magritte description and I get a MAContainerMorph, which is OK. Try sending openInWorld to this, and it falls over in MADescriptionMorph>>buildMorph, which calls MADescriptionMorph>>rectangleMorph, which tries to create an instance of the non-existent class RectangleMorph. I have tried to trace this back, and it is true that my original Pharo 3.0 image, downloaded on 30 Apr 2014, does not have the class RectangleMorph. I have looked at older images, and the class exists. Maybe my mistake was to try to use the Pharo 3.0 image the day it was announced. Perhaps I would be better off using one of the pre-packed images you mention. My only worry is that there is a list of dozens of contributions on https://ci.inria.fr/pharo-contribution/, and unless you have far more knowledge than I have it is impossible to know which might be helpful. For now I will follow your hint and use the Forum image. Thanks again for your help. Peter Kenny -----Original Message----- From: Pharo-users [mailto:[hidden email]] On Behalf Of Stephan Eggermont Sent: 14 May 2014 00:25 To: [hidden email] Subject: Re: [Pharo-users] Problem learning about Magritte Peter wrote: >is there a method #asMorph which will give the >morphic version as easily, or if not how do I get an editor as a Pharo >window? There is asMagritteMorph yes, defined in Magritte-Morph. You might need to load that additionally (it is loaded in the Forum image). Stephan |
you have an older version (configuration is probably not up to date)… just open project in monticello and load latest magritte-morph, it should work.
and yes, I use it all the time :) Esteban On 14 May 2014, at 12:00, PBK Research <[hidden email]> wrote: > Stephan > > Thanks. I have Magritte-Morph in my image, but I wonder if anyone has > debugged it. I send asMagritteMorph to a Magritte description and I get a > MAContainerMorph, which is OK. Try sending openInWorld to this, and it falls > over in MADescriptionMorph>>buildMorph, which calls > MADescriptionMorph>>rectangleMorph, which tries to create an instance of the > non-existent class RectangleMorph. > > I have tried to trace this back, and it is true that my original Pharo 3.0 > image, downloaded on 30 Apr 2014, does not have the class RectangleMorph. I > have looked at older images, and the class exists. Maybe my mistake was to > try to use the Pharo 3.0 image the day it was announced. Perhaps I would be > better off using one of the pre-packed images you mention. My only worry is > that there is a list of dozens of contributions on > https://ci.inria.fr/pharo-contribution/, and unless you have far more > knowledge than I have it is impossible to know which might be helpful. For > now I will follow your hint and use the Forum image. > > Thanks again for your help. > > Peter Kenny > > -----Original Message----- > From: Pharo-users [mailto:[hidden email]] On Behalf Of > Stephan Eggermont > Sent: 14 May 2014 00:25 > To: [hidden email] > Subject: Re: [Pharo-users] Problem learning about Magritte > > Peter wrote: > >> is there a method #asMorph which will give the >> morphic version as easily, or if not how do I get an editor as a Pharo >> window? > > There is asMagritteMorph yes, defined in Magritte-Morph. > You might need to load that additionally (it is loaded in the Forum image). > > Stephan > > > |
In reply to this post by Peter Kenny
Peter wrote:
>Thanks. I have Magritte-Morph in my image, but I wonder if anyone has >debugged it. I send asMagritteMorph to a Magritte description and I get a >MAContainerMorph, which is OK. Try sending openInWorld to this, and it falls >over in MADescriptionMorph>>buildMorph, which calls >MADescriptionMorph>>rectangleMorph, which tries to create an instance of the >non-existent class RectangleMorph. Hmm, that looks like you have an old version of Magritte-Morph loaded. If you open the Monticello browser, you can select the Magritte-Morph package and then open its repository to see if there is a newer version. If you select a newer version and click Changes, you can see if this newer version is likely to solve your problem (it is). If you take a look at the ConfigurationOfMagritte3, you can see what goes wrong. version32 is the first one referring to a Magritte-Morph newer than version 70. stable: installs version311 however. So ConfigurationOfMagritte3 needs a new stable version. (Done) >I have tried to trace this back, and it is true that my original Pharo 3.0 >image, downloaded on 30 Apr 2014, does not have the class RectangleMorph. I >have looked at older images, and the class exists. Maybe my mistake was to >try to use the Pharo 3.0 image the day it was announced. Perhaps I would be >better off using one of the pre-packed images you mention. Pharo 3 has lots of improvements and clean-ups. RectangleMorph behavior was folded back into BorderedMorph. The projects running on top of Pharo have different ideas of what should be stable and what development versions. The people developing them mostly use development releases or specific versions. If there are not a lot of non-developing users the stable version tends to lag behind. And if the specific problem is not in the tests, CI will not break. Just before the release, there are lots of fixes and the image changes fast. Not all projects will be able to synchronize fast, and have sufficient trust to declare a new version stable. So just after a release, you might have to use a lot of development versions, check repositories and ask questions on the mailing lists. Please do, that is the only way we can improve. >My only worry is that there is a list of dozens of contributions on >https://ci.inria.fr/pharo-contribution/, and unless you have far more >knowledge than I have it is impossible to know which might be helpful. For >now I will follow your hint and use the Forum image. That's a helpful comment. Thank you. We should improve the project descriptions (at least I should for mine). Stephan |
In reply to this post by EstebanLM
Esteban
Well I don't have /such/ an old version. As I said, I downloaded the new Pharo 3.0 on 30 April. On 5 May I opened the configuration browser and loaded ConfigurationOfMagritte3. So presumably what I have is at most 9 days old. One of the frustrations of using Pharo is that everything seems to be always changing. I have in fact sorted it out by looking at the Forum image, following Stephan's suggestion. There I found that the call to RectangleMorph class has become BorderedMorph, and when I change that it all works. I now have an editor window which will change the instance, so I more or less understand how to use it. I still can't get it to produce an editor in a browser using Seaside, but that is less important. Peter Kenny -----Original Message----- From: Pharo-users [mailto:[hidden email]] On Behalf Of Esteban Lorenzano Sent: 14 May 2014 12:35 To: Any question about pharo is welcome Subject: Re: [Pharo-users] Problem learning about Magritte you have an older version (configuration is probably not up to date). just open project in monticello and load latest magritte-morph, it should work. and yes, I use it all the time :) Esteban On 14 May 2014, at 12:00, PBK Research <[hidden email]> wrote: > Stephan > > Thanks. I have Magritte-Morph in my image, but I wonder if anyone has > debugged it. I send asMagritteMorph to a Magritte description and I get a > MAContainerMorph, which is OK. Try sending openInWorld to this, and it falls > over in MADescriptionMorph>>buildMorph, which calls > MADescriptionMorph>>rectangleMorph, which tries to create an instance of the > non-existent class RectangleMorph. > > I have tried to trace this back, and it is true that my original Pharo 3.0 > image, downloaded on 30 Apr 2014, does not have the class RectangleMorph. I > have looked at older images, and the class exists. Maybe my mistake was to > try to use the Pharo 3.0 image the day it was announced. Perhaps I would be > better off using one of the pre-packed images you mention. My only worry is > that there is a list of dozens of contributions on > https://ci.inria.fr/pharo-contribution/, and unless you have far more > knowledge than I have it is impossible to know which might be helpful. For > now I will follow your hint and use the Forum image. > > Thanks again for your help. > > Peter Kenny > > -----Original Message----- > From: Pharo-users [mailto:[hidden email]] On Behalf > Stephan Eggermont > Sent: 14 May 2014 00:25 > To: [hidden email] > Subject: Re: [Pharo-users] Problem learning about Magritte > > Peter wrote: > >> is there a method #asMorph which will give the >> morphic version as easily, or if not how do I get an editor as a Pharo >> window? > > There is asMagritteMorph yes, defined in Magritte-Morph. > You might need to load that additionally (it is loaded in the Forum > > Stephan > > > |
In reply to this post by Stephan Eggermont-3
Stephan
Thanks for the comment. I understand the point about development and things not always being in step. But if you look at it from my point of view, I am an elderly retired statistician who does programming for fun, I am not an expert in development and I am pretty new to Pharo. It all looks a maze of new terminology to me - I don't understand the difference between Monticello and Metacello, for instance. I am sure to an expert your explanation of how to check the correct version of Magritte3 is quite straightforward, but I would never have found my way to that conclusion myself. As I pointed out to Esteban, I used the configuration browser on 5 May to get the stable version of Magritte3. If that was already out of date, I am pretty well lost. Still, I am making progress with my original aim of learning about Magritte, and there are many helpful people on this group, so you can just regard this as me blowing off steam after things had not gone completely easily. Peter Kenny -----Original Message----- From: Pharo-users [mailto:[hidden email]] On Behalf Of Stephan Eggermont Sent: 14 May 2014 12:58 To: [hidden email] Subject: Re: [Pharo-users] Problem learning about Magritte Peter wrote: >Thanks. I have Magritte-Morph in my image, but I wonder if anyone has >debugged it. I send asMagritteMorph to a Magritte description and I get a >MAContainerMorph, which is OK. Try sending openInWorld to this, and it falls >over in MADescriptionMorph>>buildMorph, which calls >MADescriptionMorph>>rectangleMorph, which tries to create an instance of the >non-existent class RectangleMorph. Hmm, that looks like you have an old version of Magritte-Morph loaded. If you open the Monticello browser, you can select the Magritte-Morph package and then open its repository to see if there is a newer version. If you select a newer version and click Changes, you can see if this newer version is likely to solve your problem (it is). If you take a look at the ConfigurationOfMagritte3, you can see what goes wrong. version32 is the first one referring to a Magritte-Morph newer than version 70. stable: installs version311 however. So ConfigurationOfMagritte3 needs a new stable version. (Done) >I have tried to trace this back, and it is true that my original Pharo 3.0 >image, downloaded on 30 Apr 2014, does not have the class RectangleMorph. I >have looked at older images, and the class exists. Maybe my mistake was to >try to use the Pharo 3.0 image the day it was announced. Perhaps I would be >better off using one of the pre-packed images you mention. Pharo 3 has lots of improvements and clean-ups. RectangleMorph behavior was folded back into BorderedMorph. The projects running on top of Pharo have different ideas of what should be stable and what development versions. The people developing them mostly use development releases or specific versions. If there are not a lot of non-developing users the stable version tends to lag behind. And if the specific problem is not in the tests, CI will not break. Just before the release, there are lots of fixes and the image changes fast. Not all projects will be able to synchronize fast, and have sufficient trust to declare a new version stable. So just after a release, you might have to use a lot of development versions, check repositories and ask questions on the mailing lists. Please do, that is the only way we can improve. >My only worry is that there is a list of dozens of contributions on >https://ci.inria.fr/pharo-contribution/, and unless you have far more >knowledge than I have it is impossible to know which might be helpful. For >now I will follow your hint and use the Forum image. That's a helpful comment. Thank you. We should improve the project descriptions (at least I should for mine). Stephan |
2014-05-14 9:25 GMT-03:00 PBK Research <[hidden email]>:
> Stephan > Still, I am making progress with my original aim of learning about Magritte, > and there are many helpful people on this group, so you can just regard this > as me blowing off steam after things had not gone completely easily. Plus, you mention you're coming from Dolphin Smalltalk. Which is easier than the average, in terms of straightforwardness. Pharo has A LOT to offer, once you get used to aim at a moving target :) Esteban A. Maringolo |
I, for one, need to learn the Unicode UTF-128 "steam release" emoticon ... it must be in some supplement codepage. It should look like the icon on my "Do you REALLY want to post this ?" mail client DialogLastChance window ...
;-) ( and this maillist is just a nice bunch of Smalltalkers, too ! ) #LastChance2Dialog
On 14 May 2014 09:30, Esteban A. Maringolo <[hidden email]> wrote: 2014-05-14 9:25 GMT-03:00 PBK Research <[hidden email]>: |
2014-05-14 10:38 GMT-03:00 Robert Shiplett <[hidden email]>:
> I, for one, need to learn the Unicode UTF-128 "steam release" emoticon ... > it must be in some supplement codepage. > > It should look like the icon on my "Do you REALLY want to post this ?" mail > client DialogLastChance window ... > > ;-) > > ( and this maillist is just a nice bunch of Smalltalkers, too ! ) > > #LastChance2Dialog Sorry, but I didn't get the meaning of this. #lostInTranslation But to clarify my intention, I was encouraging Peter to keep betting on Pharo, given the visible frustration he had when told that something downloaded a week ago is outdated. Regards, Esteban. |
Free forum by Nabble | Edit this page |