[Newbies] Beginner wants to start graphic windows in Smalltalk 80 - need help

Michael Rice limitcase at gmail.com
Wed Nov 26 17:08:52 UTC 2014


I was just browsing FormEditor. A lot has changed since the original MVC,
some to make it compatible with Morphic, e.g., the instance method 'edit'
of Form

edit
"Open a form editor on this form. "

Project current formEdit: self

As you can see, the current project has some responsibilities.

Project current ->  a MVCProject (Unnamed) in a ControlManager


current
"Answer the project that is currently being used."

^CurrentProject

a class variable of Project.


For Project:

formEdit: aForm
"Start up an instance of the form editor on a form."

self subclassResponsibility


Subclasses of Project are MVCProject and MorphicProject

For MVCProject:


formEdit: aForm
"Start up an instance of the FormEditor on a form..."

FormEditor openOnForm: aForm

Poking around in FormEditor and its associated classes, while tedious, can
yield useful information on how these views, models, and controllers
inter-operate.


Michael





On Wed, Nov 26, 2014 at 9:13 AM, David T. Lewis <lewis at mail.msen.com> wrote:

> On Wed, Nov 26, 2014 at 02:10:42PM +0100, Hans Schueren wrote:
> >
> > To whom it may concern ,
> >
> >
> > may i ask for some help about standard graphic routines ?
> >
> > As a beginner i just have learned all the first level SYNTAX of
> > smalltalk 80.
> >
> > Now , you can imagine , i am interested in writing little GUI windows
> > and graphics for
> >
> > placing some text in the right positions.
> >
> >
> > Theese are the statements i have studied from my material.
> >
> >
> > Does anybody know why the statements not work?
> >
> > Are there any "replacements" for the syntax that i posted here as
> example ?
> >
> > Have a nice day
> >
>
> Hello Hans,
>
> Can you please say what book or paper you are using? Also check if your
> learning material specifies what version of Smalltalk was used for the
> examples.
>
> Your examples look like some version of the MVC user interface, which
> was the original (and still very interesting) user interface in Smalltalk
> and Squeak. Squeak still provides some support for MVC, so for example
> there probably is some equivalent to the ScheduledWindow class used in
> your example below. You may also be interested in other user interface
> approaches, such as Morphic, which are very different from MVC.
>
> Dave
>
>
> >
> >
> >
> > HERE ARE THE EXAMPLES :
> >
> >
> >
> >
> > | window |
> > window := ScheduledWindow new.
> > window component: 'Hello World' asComposedText.
> > window open
> >
> >
> >
> >
> > | window |
> > window := ScheduledWindow new.
> > window label: 'Fenster ohne Inhalt'.
> > window minimumSize: 200 @ 100; maximumSize: 400 @ 300.
> > window open
> >
> >
> >
> >
> > displayOn: aGraphicsContext
> > 1 to: 10 do:
> > [:i|
> > aGraphicsContext translation printString
> >    asComposedText displayOn: aGraphicsContext.
> > aGraphicsContext translateBy: 15 @ 15]
> >
> >
> >
> >
> > Greetings
> >
> >
> > Hans
> > The Byte Surfer
> >
> > _______________________________________________
> > Beginners mailing list
> > Beginners at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20141126/33955e66/attachment.htm


More information about the Beginners mailing list