logo       

Some sample code to help understand Morphic applications: msg#00098

Subject: Some sample code to help understand Morphic applications

On 10/17/06, Matthew Fulmer < tapplek@xxxxxxxxx> wrote:

Cool. That heavily commented SampleImageViewerMorph>>initialize is
especially useful

Yes, that took a while to get working as I wanted!

>    The code is attached, and can also be found at
>    http://www.squeaksource.com/SampleImageViewer.html
>
>    I'd appreciate it if anyone could spare some time to have a look at this
>    sample and see if I'm making any obvious mistakes (especially my
>    termination of processes, which I suspect isn't very robust), or if the
>    'squeakiness' of the code could be improved.

I am not sure, but every time I hit enter in the dir box, or
click the main panel, I get a debug window. What Squeak version
is this made for? I am using 3.8. A quick question: is the
correct way to run this program:
SampleImageViewerMorph new openInWorld

Just "SampleImageViewerMorph new" is enough.
I found that I was using a couple of newish features (String>>startsWith: and Collection>>select:thenDo:), so I've replaced them. I've tested Version 2 (attached) on a 3.7/3.8 image.

>    If anyone from the Documentation team is building a repository of sample
>    code for beginners, I'd be happy to incorporate this application into such
>    a repository.

We have not considered a code repository, but this morph is
quite simple, and may be useful in a tutorial. I might
incorporate it into my beginner's tutorial:
http://minnow.cc.gatech.edu/squeak/5869

Please feel free to do so. I'd be happy to contribute some more commentary if it would help. Maybe I should have written a test-case to go with it as well!

I think it would be a useful to have a set of such simple applications available to point new users at once they'd worked their way through tutorial materials and were wanting to get their teeth into something more meaty.

For instance, I'm now working on a simple rss reader which might sit nicely alongside this (grabbing content from the BBC news rss, parsing xml, and displaying the articles on a map background). I'd be interested in seeing if other people have some simple applications that could demonstrate other aspects which I know can be difficult to 'get' eg, communicating with the OS, use of DBs, persistency solutions. If there was a reasonable cross-section of code, it would be striaghtforward to have a set of "SampleCode-..." packages on SqueakMap to provide easy access.

Cheers,
Michael


Attachment: SampleCode-ImageViewer.st
Description: Binary data

_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe