Sunday, March 6, 2011

Build a XML browser

Watch this to learn how to:
  • get and parse XML
  • use Polymorph to build a GUI with a tree and text editor
  • add a button in Pharo IDE to open the XML browser
  • control when your breakpoints will trigger
Done using Pharo 1.2 (not released yet). You can download last build from the Continuous Integration server.

Update: Tudor Girba created a counter part demo for the browser building part using Glamour (browsing engine that ships with Moose).

Download screencast (1280x800): .mov 77 MB

View mobile version.



More Polymorph in Pharo GUI with Polymorph and Picasa screencast.

Get the code:
Gofer it
 squeaksource: 'Pharocasts';
 package: 'XML-Browser';
 load.
 
(Smalltalk at:#XMLBrowser)
  browseAtUrl:'http://www.pharocasts.com/feeds/posts/default'.

5 comments:

  1. As currently configured, this project won't work without some additional classes in a fresh 1.2 image.

    Attempting to run:

    (Smalltalk at:#XMLBrowser) browseAtUrl:'http://www.pharocasts.com/feeds/posts/default'.

    Gives this result:

    UndefinedObject(Object)>>doesNotUnderstand:#parse

    triggered by:

    xmlElements := {XMLElementItemWrapper with: (XMLDOMParser parse: aXMLString) document root}.

    Missing the XMLDOMParser class.

    ReplyDelete
  2. Where did you get Pharo 1.2 ? Works for me with https://pharo-ic.lille.inria.fr/hudson/view/Pharo/job/Pharo%201.2/lastSuccessfulBuild/artifact/Pharo-1.2.zip

    ReplyDelete
  3. I was using a Pharo-core image.
    Pharo1.2rc2,Latest update: #12340
    that I downloaded 3/5/11. I'll get the zip file you suggest.

    If you want to, just delete this message thread, it's probably no use to anyone else.

    Thanks.

    ReplyDelete
  4. You can load XMLSupport into PharoCore1.2 with:

    Gofer it
        squeaksource: 'MetacelloRepository';
        package: 'ConfigurationOfXMLSupport';
        load.

    (Smalltalk at:#ConfigurationOfXMLSupport) project latestVersion load.

    ReplyDelete
  5. Cool video Laurent. Thanks a lot. For me that I am a UI newbie I learnt a lot

    ReplyDelete

Note: Only a member of this blog may post a comment.