PEN

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

PEN

Hans Schueren



|pen|
pen := (GraphPane openWindow: 'Simple' extent: 220 @ 200 ) pen.
pen






On 26.11.2014 19:39, [hidden email] wrote:
Send Beginners mailing list submissions to
	[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.squeakfoundation.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
	[hidden email]

You can reach the person managing the list at
	[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Beginner wants to start graphic windows in Smalltalk 80 -
      need help (Hans Schueren)
   2. Re: Beginner wants to start graphic windows in Smalltalk 80	-
      need help (David T. Lewis)
   3. Re: Beginner wants to start graphic windows in Smalltalk 80	-
      need help (Michael Rice)
   4. Re: Beginners Digest, Vol 102, Issue 13 ([hidden email])
   5. Re: Re: Beginners Digest, Vol 102, Issue 13 (Raymond Asselin)


----------------------------------------------------------------------

Message: 1
Date: Wed, 26 Nov 2014 14:10:42 +0100
From: Hans Schueren [hidden email]
Subject: [Newbies] Beginner wants to start graphic windows in
	Smalltalk 80 -	need help
To: [hidden email]
	[hidden email]
Message-ID: [hidden email]
Content-Type: text/plain; charset=utf-8; format=flowed


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




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



------------------------------

Message: 2
Date: Wed, 26 Nov 2014 09:13:54 -0500
From: "David T. Lewis" [hidden email]
Subject: Re: [Newbies] Beginner wants to start graphic windows in
	Smalltalk 80	- need help
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." [hidden email]
Message-ID: [hidden email]
Content-Type: text/plain; charset=us-ascii

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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

------------------------------

Message: 3
Date: Wed, 26 Nov 2014 12:08:52 -0500
From: Michael Rice [hidden email]
Subject: Re: [Newbies] Beginner wants to start graphic windows in
	Smalltalk 80	- need help
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." [hidden email]
Message-ID:
	[hidden email]
Content-Type: text/plain; charset="utf-8"

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 [hidden email] 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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
[hidden email]
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-0001.htm

------------------------------

Message: 4
Date: Wed, 26 Nov 2014 12:42:33 -0500 (GMT-05:00)
From: [hidden email]
Subject: [Newbies] Re: Beginners Digest, Vol 102, Issue 13
To: [hidden email]
Message-ID:
	[hidden email]
	
Content-Type: text/plain; charset="us-ascii"

An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20141126/ce3a91d8/attachment-0001.htm

------------------------------

Message: 5
Date: Wed, 26 Nov 2014 13:38:55 -0500
From: Raymond Asselin [hidden email]
Subject: Re: [Newbies] Re: Beginners Digest, Vol 102, Issue 13
To: [hidden email] [hidden email],	"A friendly
	place to get answers to even the most basic questions	about	Squeak."
	[hidden email]
Message-ID: [hidden email]
Content-Type: text/plain; charset="utf-8"

I suppose you put "self halt." ?

Envoyé de mon iPhone

Le 2014-11-26 à 12:42, [hidden email] a écrit :

Hi Casey,

The target is Browser, which does not override the method.
The hierarchy is: ProtoObject, Object, Model, StringHolder (has the method), CodeHolder, Browser, et seq.

 

I put the halt in StringHolder>>perform:orSendTo: and that didn't bring up the debugger.

 

There are 13 implementers of perform:orSendTo: and I can put a halt in each one in order to start the research, but I don't understand why the hierarchy seems to be bypassed.

 

- Dan
Date: Tue, 25 Nov 2014 21:43:57 -0800
From: Casey Ransberger 
Subject: Re: [Newbies] accept (s)
To: [hidden email] , "A friendly
place to get answers to even the most basic questions about Squeak."

Message-ID: [hidden email]
Content-Type: text/plain; charset="us-ascii"

Hi Dan,

That doesn't sound quite right. 

#perform:orSendTo: is probably overridden in Browser, but... have you looked to see if there's an implementation of it on Object or maybe ProtoObject or something like that?

I'm pretty sure that #perform: and cousins are usually general. 

Not sure (on a cellphone) without looking at an actual running system, but try looking up the inheritance chain for another implementation of the same selector. That might help. 

Let me know either way, when I get back to a real computer I'll look into it for you if you don't get it figured out by then. 

Good hunting!

Casey

On Nov 25, 2014, at 5:30 PM, wrote:

An inspector for the menu item "accept (s)" reveals a selector of "#perform:orSendTo:" which is implemented in Browser.

I want to follow the code and I put a halt in "#perform:orSendTo:" but the debugger never opened. What gives?



- Dan

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20141126/10cb5abd/attachment.htm

------------------------------

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 102, Issue 14
******************************************


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners