Menubar at the top of Pharo's main window
Hi, First of all, congratulations for the new 1.4 release. Iâm not new to Smalltalk but I am to Pharoâs UI. All I did until now in Pharo was using it as server (Seaside). I saw some applications done with Pharo that show a menu bar at the very top of its main window (lets say, above Pharoâs logo). Iâm wandering how to do that. All samples I saw (and correct me if Iâm wrong) first create a new window (ie a StandardWindow) and then add the menubar and menu to it. Any sample I can look at? Thanks Christian
On Mon, Apr 23, 2012 at 8:01 PM, Christian Caldeiro < christian.caldeiro@googlemail.com> wrote:
Hi,
First of all, congratulations for the new 1.4 release.
Iâm not new to Smalltalk but I am to Pharoâs UI. All I did until now in Pharo was using it as server (Seaside).
I saw some applications done with Pharo that show a menu bar at the very top of its main window (lets say, above Pharoâs logo). Iâm wandering how to do that. All samples I saw (and correct me if Iâm wrong) first create a new window (ie a StandardWindow) and then add the menubar and menu to it.
Any sample I can look at?
Something like that ? |dock| dock := DockingBarMorph new adhereToTop; openInWorld. dock addMorph: ( PluggableButtonMorph new label: 'Hello'; model: [UIManager inform: 'Hello Pharo !']; actionSelector: #value); addMorph: ( PluggableButtonMorph new label: 'Close'; model: [dock delete]; actionSelector: #value); addMorph: ( MenuItemMorph new contents: 'A menu'; subMenu: (MenuMorph new add: 'Hello' target: [UIManager inform: 'Hello from menu'] action: #value; add: 'Goodbye' target: [dock delete] action: #value; yourself)). Laurent Laffont - @lolgzs <http://twitter.com/#!/lolgzs> Blog: http://magaloma.blogspot.com/ Developer group: http://www.cara74.org Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Pharo web deployment: http://www.alpha.smallharbour.org
Thanks
Christian
Exactly that! Thanks, Laurent! Regards, Christian On Mon, Apr 23, 2012 at 4:42 PM, laurent laffont <laurent.laffont@gmail.com>wrote:
On Mon, Apr 23, 2012 at 8:01 PM, Christian Caldeiro < christian.caldeiro@googlemail.com> wrote:
Hi,
First of all, congratulations for the new 1.4 release.
Iâm not new to Smalltalk but I am to Pharoâs UI. All I did until now in Pharo was using it as server (Seaside).
I saw some applications done with Pharo that show a menu bar at the very top of its main window (lets say, above Pharoâs logo). Iâm wandering how to do that. All samples I saw (and correct me if Iâm wrong) first create a new window (ie a StandardWindow) and then add the menubar and menu to it.
Any sample I can look at?
Something like that ?
|dock| dock := DockingBarMorph new adhereToTop; openInWorld. dock addMorph: ( PluggableButtonMorph new label: 'Hello'; model: [UIManager inform: 'Hello Pharo !']; actionSelector: #value); addMorph: ( PluggableButtonMorph new label: 'Close'; model: [dock delete]; actionSelector: #value); addMorph: ( MenuItemMorph new contents: 'A menu'; subMenu: (MenuMorph new add: 'Hello' target: [UIManager inform: 'Hello from menu'] action: #value; add: 'Goodbye' target: [dock delete] action: #value; yourself)).
Laurent Laffont - @lolgzs <http://twitter.com/#%21/lolgzs>
Blog: http://magaloma.blogspot.com/ Developer group: http://www.cara74.org Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Pharo web deployment: http://www.alpha.smallharbour.org
Thanks
Christian
Hello, I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------ This is a normal paragraph. And this too! '. parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
hi kris, beware that the markdown parser isn't complete yet :/. normally you would write a visitor which walks over the returned data (markdown nodes in this case). If you inspect further the returned elements you will see how they reflect the different markdown entities... I didn't add a default implementation to the petit-markdown package yet, but you can find an implementation for seaside in the following repos http://ss3.gemstone.com/ss/webdoc look for the CommentFormatter class. hope that helps a bit cami On 2012-04-29, at 14:49, Kristinn wrote:
Hello, I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------
This is a normal paragraph. And this too! '.
parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
Yes, that helps a lot. Thank you. I'll take a look at webdoc. I do want to use it with Seaside, so that may be just what I'm looking for. Cheers, Kris On 04/29/2012 04:53 PM, Camillo Bruni wrote:
hi kris,
beware that the markdown parser isn't complete yet :/.
normally you would write a visitor which walks over the returned data (markdown nodes in this case). If you inspect further the returned elements you will see how they reflect the different markdown entities...
I didn't add a default implementation to the petit-markdown package yet, but you can find an implementation for seaside in the following repos
http://ss3.gemstone.com/ss/webdoc
look for the CommentFormatter class.
hope that helps a bit cami
On 2012-04-29, at 14:49, Kristinn wrote:
Hello, I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------
This is a normal paragraph. And this too! '.
parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
This may offer a way to convert data into HTML.. from a seaside app.. http://skrishnamachari.wordpress.com/2010/07/06/markupbuilder-in-smalltalk/ On Mon, Apr 30, 2012 at 2:42 AM, Kristinn <kristinn@webmasterfu.com> wrote:
Yes, that helps a lot. Thank you. I'll take a look at webdoc. I do want to use it with Seaside, so that may be just what I'm looking for. Cheers, Kris
On 04/29/2012 04:53 PM, Camillo Bruni wrote:
hi kris,
beware that the markdown parser isn't complete yet :/.
normally you would write a visitor which walks over the returned data (markdown nodes in this case). If you inspect further the returned elements you will see how they reflect the different markdown entities...
I didn't add a default implementation to the petit-markdown package yet, but you can find an implementation for seaside in the following repos
http://ss3.gemstone.com/ss/**webdoc <http://ss3.gemstone.com/ss/webdoc>
look for the CommentFormatter class.
hope that helps a bit cami
On 2012-04-29, at 14:49, Kristinn wrote:
Hello,
I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------
This is a normal paragraph. And this too! '.
parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
I tried to load webdoc and got an error. I'm using Pharo 1.4. "The symbolic version #stable is not defined in...for the current platform" was the error message. Kris On 04/29/2012 04:53 PM, Camillo Bruni wrote:
hi kris,
beware that the markdown parser isn't complete yet :/.
normally you would write a visitor which walks over the returned data (markdown nodes in this case). If you inspect further the returned elements you will see how they reflect the different markdown entities...
I didn't add a default implementation to the petit-markdown package yet, but you can find an implementation for seaside in the following repos
http://ss3.gemstone.com/ss/webdoc
look for the CommentFormatter class.
hope that helps a bit cami
On 2012-04-29, at 14:49, Kristinn wrote:
Hello, I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------
This is a normal paragraph. And this too! '.
parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
try ConfigurationOfWebDoc loadDevelopment AFAIK that should load all the dependencies... On 2012-04-29, at 23:36, Kristinn wrote:
I tried to load webdoc and got an error. I'm using Pharo 1.4. "The symbolic version #stable is not defined in...for the current platform" was the error message. Kris
On 04/29/2012 04:53 PM, Camillo Bruni wrote:
hi kris,
beware that the markdown parser isn't complete yet :/.
normally you would write a visitor which walks over the returned data (markdown nodes in this case). If you inspect further the returned elements you will see how they reflect the different markdown entities...
I didn't add a default implementation to the petit-markdown package yet, but you can find an implementation for seaside in the following repos
http://ss3.gemstone.com/ss/webdoc
look for the CommentFormatter class.
hope that helps a bit cami
On 2012-04-29, at 14:49, Kristinn wrote:
Hello, I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------
This is a normal paragraph. And this too! '.
parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
Hello, I get an error. Could not resolve WebDoc[WebDoc-DamienPollet-70] in my local package-cache. I got it trying a few different images (with and without Seaside loaded and on Vista and Ubuntu using Pharo 1.4). Kris On 5/1/2012 4:54 AM, Camillo Bruni wrote:
try
ConfigurationOfWebDoc loadDevelopment
AFAIK that should load all the dependencies...
On 2012-04-29, at 23:36, Kristinn wrote:
I tried to load webdoc and got an error. I'm using Pharo 1.4. "The symbolic version #stable is not defined in...for the current platform" was the error message. Kris
On 04/29/2012 04:53 PM, Camillo Bruni wrote:
hi kris,
beware that the markdown parser isn't complete yet :/.
normally you would write a visitor which walks over the returned data (markdown nodes in this case). If you inspect further the returned elements you will see how they reflect the different markdown entities...
I didn't add a default implementation to the petit-markdown package yet, but you can find an implementation for seaside in the following repos
http://ss3.gemstone.com/ss/webdoc
look for the CommentFormatter class.
hope that helps a bit cami
On 2012-04-29, at 14:49, Kristinn wrote:
Hello, I'm trying to use the PetitParserMarkdown package. I run the code below in a workspace and get an array. I'm not sure how to turn the array into HTML. Any help is greatly appreciated. Thanks, Kris | doc parsedDoc| doc := ' This is Markdown! ================= and another header ------------------
This is a normal paragraph. And this too! '.
parsedDoc := PPMarkdownParser new parse: doc . parsedDoc .
participants (6)
-
Camillo Bruni -
Christian Caldeiro -
Kristinn -
Kristinn Didriksson -
laurent laffont -
S Krish