Beginners questions

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

Beginners questions

Jeff-146
Hello group!

I'm hoping that this beginners list is a good place for a beginner to get answers to... well, beginner's questions. And so, with that in mind, I'll ask a few questions. But first, experience has taught me that I should be a little more clear in what I'm looking for as an answer. Imagine a total newbie to computers asked a group of experts the question "How do I run a program under windows?". One member of the group decided to respond by handing him a 400 page technical manual on windows and telling him that everything he wants to know is in there. Upon seeing that the rest of the group decides that his question has been answered and sees no need to offer additional assistance. This newbie's question wasn't actually answered by the group, ultimately what they did was say "ask the manual". The manual naturally can't hear him so it can't directly respond to his question, he has to start searching it. After skimming a bunch of pages and not seeing what he's looking for, (or anything he understands), he looks in the index. It isn't there. He looks in the table of contents to see a chapter called "Getting started with windows". Thinking that looks like what he needs, he flips to it and it starts out by telling him that the first thing he needs to do is install windows. Ok, so he looks for this Windows disk. That's strange, his computer didn't come with any windows disk. So next he goes out and spends $800 on the latest version of windows. He brings it home and spends 5 hours trying to follow the instructions for installing it, but it isn't working. He wonders if he bought the wrong version of windows or if maybe the disk is corrupted, (he read that somewhere in the manual). Or maybe his computer is bad. In any case, he finally decides never to touch a computer again out of frustration.

The problem here was that the newbie didn't have enough computer proficiency to understand the manual that was being handed to him. The steps he took were logical, and he put a lot of effort and money into trying to solve his question, which was how to run programs under windows. What would have helped him better would be if someone in the group had just told him to "double click it". He would have saved his money, known a little more about computers than he ever learned through the manual, and enjoyed PC ownership like the rest of us. So I guess what I'm saying is I'm hoping to get answers like "double-click it". Sorry if that sounds fussy, but I've gone through enough experiences similar to that fictional newbie above that I felt I had to say something. So if you're still reading, here are the questions. Actually, this is pretty long, so I'll just ask one question for now.

1. In a workspace, I've typed the following...

wonder := Wonderland new.
copter := wonder makeActorFrom: 'Objects\Vehicles\Helicopter.mdl'.
copter turn:'left'.

So far, everything works fine. The wonderland and helicopter are created, and I am able to send it messages to make it turn, move, etc. Now I'd like to make it move by using the arrow keys. How do I do that?



What I've tried so far = My first plan to try to do this was by using tile scripts. I've done the race car tutorial, and I figured out how to drive that around with the arrow keys once I looked in the world's viewer and selected the input pane, which gave me access to the "world's lastKeystroke" tiles. So, I made a tile script that used the 'test... yes... no' box and put the world's lastKeystroke = <left> as the test condition. Then I toggled the script to 'textual' and filled in the following.

script1
    World1 getLastKeystroke = '<left>' "" false
       ifTrue: [ copter turn: 'left']

and it tells me it doesn't know what copter is. Come to think of it neither do I. Is it a variable, a method, or something else? I've played around with this a lot, and the only time I got the helicopter to turn was when I scripted the whole...

script97
    | wonder copter |
    wonder := Wonderland new.
    copter := wonder makeActorFrom: 'Objects\Vehicles\Helicopter.mdl'.
    copter turn:'left'.

but that doesn't really do what I'm trying to do.

Thanks in advance and happy squeaking!
Jeff


No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Beginners questions

Enno Schwass
Hello

Dont know croquet, but squeak processes keyboard events with methods  
like keyUp:
or keyDown:

check with method finder for this. check example code in croquet image

hope it helps
Enno
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Beginners questions

lanas
In reply to this post by Jeff-146
Le Lundi 6 Novembre 2006 18:09, Jeff a écrit :

> Hello group!I'm hoping that this beginners list is a good place for a
> beginner to get answers to... well, beginner's questions. And so, with that
> in mind, I'll ask a few questions. But first, experience has taught me that
> I should be a little more clear in what I'm looking for as an answer.
> Imagine a total newbie to computers asked a group of experts the question
> &quot;How do I run a program under windows?&quot;. One member of the group
> decided to respond by handing him a 400 page technical manual on windows
> and telling him that everything he wants to know is in there. Upon seeing
> that the rest of the group decides that his question has been answered and
> sees no need to offer additional assistance. This newbie's question wasn't
> actually answered by the group, ultimately what they did was say &quot;ask
> the manual&quot;. The manual naturally can't hear him so it can't directly
> respond to his question, he has to start searching it. After skimming a
> bunch of pages and not seeing what he's looking for, (or anything he
> understands), he looks in the index. It isn't there. He looks in the table
> of contents to see a chapter called &quot;Getting started with
> windows&quot;. Thinking that looks like what he needs, he flips to it and
> it starts out by telling him that the first thing he needs to do is install
> windows. Ok, so he looks for this Windows disk.

[snip]

For what it's worth, your message appeared as a large chunck of dense text
(worse than quoted above) without any paragraphs, filling the windows' text
screen like a wall brick.

I must be frank and I must say that it was not tempting to wade through and
read it.

This being said, no, I can't answer your question ;-)

Cheers,
Al
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Beginners questions

Jeff-146
In reply to this post by Jeff-146
I've noticed on the list my mailings don't seem to parse correctly. I don't know why that is, but I can't blame you for not being tempted to wade through them. I wouldn't be either. If anyone can tall me how to solve this, I'd appreciate it.

Thanks,
Jeff




--- On Wed 11/08, lanas < [hidden email] > wrote:
From: lanas [mailto: [hidden email]]
To: [hidden email]
Date: Wed, 8 Nov 2006 07:27:57 -0500
Subject: Re: [Newbies] Beginners questions

Le Lundi 6 Novembre 2006 18:09, Jeff a écrit :

> Hello group!I'm hoping that this beginners list is a good place for a
> beginner to get answers to... well, beginner's questions. And so, with that
> in mind, I'll ask a few questions. But first, experience has taught me that
> I should be a little more clear in what I'm looking for as an answer.
> Imagine a total newbie to computers asked a group of experts the question
> "How do I run a program under windows?". One member of the group
> decided to respond by handing him a 400 page technical manual on windows
> and telling him that everything he wants to know is in there. Upon seeing
> that the rest of the group decides that his question has been answered and
> sees no need to offer additional assistance. This newbie's question wasn't
> actually answered by the group, ultimately what they did was say "ask
> the manual". The manual naturally can't hear him so it can't directly
> respond to his question, he has to start searching it. After skimming a
> bunch of pages and not seeing what he's looking for, (or anything he
> understands), he looks in the index. It isn't there. He looks in the table
> of contents to see a chapter called "Getting started with
> windows". Thinking that looks like what he needs, he flips to it and
> it starts out by telling him that the first thing he needs to do is install
> windows. Ok, so he looks for this Windows disk.

[snip]

For what it's worth, your message appeared as a large chunck of dense text
(worse than quoted above) without any paragraphs, filling the windows' text
screen like a wall brick.

I must be frank and I must say that it was not tempting to wade through and
read it.

This being said, no, I can't answer your question ;-)

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


No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Beginners questions

Klaus D. Witzel
Hi Jeff,

this is because you post in the HTML format, in which your messages  
appears quite nice

-  
http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.beginners/1368

But all these mailing lists are run in plain text mode. So perhaps you  
switch your mail client to plain text mode, like we all do, and everybody  
will be happy :)

/Klaus

On Wed, 08 Nov 2006 19:22:59 +0100, <""Jeff"<hombreviii"@myway.com>> wrote:

> I've noticed on the list my mailings don't seem to parse correctly. I  
> don't know why that is, but I can't blame you for not being tempted to  
> wade through them. I wouldn't be either. If anyone can tall me how to  
> solve this, I'd appreciate it.Thanks,Jeff --- On Wed 11/08, lanas &lt;  
> [hidden email] &gt; wrote:From: lanas [mailto:  
> [hidden email]]To: [hidden email]: Wed, 8  
> Nov 2006 07:27:57 -0500Subject: Re: [Newbies] Beginners questionsLe  
> Lundi 6 Novembre 2006 18:09, Jeff a écrit :&gt; Hello group!I'm hoping  
> that this beginners list is a good place for a&gt; beginner to get  
> answers to... well, beginner's questions. And so, with that&gt; in mind,  
> I'll ask a few questions. But first, experience has taught me that&gt; I  
> should be a little more clear in what I'm looking for as an answer.&gt;  
> Imagine a total newbie to computers asked a group of experts the qu
>  estion&gt; &quot;How do I run a program under windows?&quot;. One  
> member of the group&gt;
> decided to respond by handing him a 400 page technical manual on  
> windows&gt; and telling him that everything he wants to know is in  
> there. Upon seeing&gt; that the rest of the group decides that his  
> question has been answered and&gt; sees no need to offer additional  
> assistance. This newbie's question wasn't&gt; actually answered by the  
> group, ultimately what they did was say &quot;ask&gt; the manual&quot;.  
> The manual naturally can't hear him so it can't directly&gt; respond to  
> his question, he has to start searching it. After skimming a&gt; bunch  
> of pages and not seeing what he's looking for, (or anything he&gt;  
> understands), he looks in the index. It isn't there. He looks in the  
> table&gt; of contents to see a chapter called &quot;Getting started  
> with&gt; windows&quot;. Thinking that looks like what he needs, he flips  
> to it and&gt; it starts out by telling him that the first thing he nee
>  ds to do is install&gt; windows. Ok, so he looks for this Windows disk.  
> [snip]For what
> it's worth, your message appeared as a large chunck of dense text (worse  
> than quoted above) without any paragraphs, filling the windows' text  
> screen like a wall brick.I must be frank and I must say that it was not  
> tempting to wade through and read it.This being said, no, I can't answer  
> your question  
> ;-)Cheers,Al_______________________________________________Beginners  
> mailing  
> [hidden email]://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> No banners. No pop-ups. No kidding.
> Make My Way  your home on the Web - http://www.myway.com


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Beginners questions

Ned Konz
In reply to this post by Jeff-146
Jeff wrote:

> Hello group!
>
> I'm hoping that this beginners list is a good place for a beginner to
> get answers to... well, beginner's questions. And so, with that in mind,
> I'll ask a few questions. But first, experience has taught me that I
> should be a little more clear in what I'm looking for as an answer.
> Imagine a total newbie to computers asked a group of experts the
> question "How do I run a program under windows?". One member of the
> group decided to respond by handing him a 400 page technical manual on
> windows and telling him that everything he wants to know is in there.
> Upon seeing that the rest of the group decides that his question has
> been answered and sees no need to offer additional assistance. This
> newbie's question wasn't actually answered by the group, ultimately what
> they did was say "ask the manual". The manual naturally can't hear him
> so it can't directly respond to his question, he has to start searching
> it. After skimming a bunch of pages and not seeing what he's looking
> for, (or anything he understands), he looks in the index. It isn't
> there. He looks in the table of contents to see a chapter called
> "Getting started with windows". Thinking that looks like what he needs,
> he flips to it and it starts out by telling him that the first thing he
> needs to do is install windows. Ok, so he looks for this Windows disk.
> That's strange, his computer didn't come with any windows disk. So next
> he goes out and spends $800 on the latest version of windows. He brings
> it home and spends 5 hours trying to follow the instructions for
> installing it, but it isn't working. He wonders if he bought the wrong
> version of windows or if maybe the disk is corrupted, (he read that
> somewhere in the manual). Or maybe his computer is bad. In any case, he
> finally decides never to touch a computer again out of frustration.
>
> The problem here was that the newbie didn't have enough computer
> proficiency to understand the manual that was being handed to him. The
> steps he took were logical, and he put a lot of effort and money into
> trying to solve his question, which was how to run programs under
> windows. What would have helped him better would be if someone in the
> group had just told him to "double click it". He would have saved his
> money, known a little more about computers than he ever learned through
> the manual, and enjoyed PC ownership like the rest of us. So I guess
> what I'm saying is I'm hoping to get answers like "double-click it".
> Sorry if that sounds fussy, but I've gone through enough experiences
> similar to that fictional newbie above that I felt I had to say
> something. So if you're still reading, here are the questions. Actually,
> this is pretty long, so I'll just ask one question for now.
>
> 1. In a workspace, I've typed the following...
>
> wonder := Wonderland new.
> copter := wonder makeActorFrom: 'Objects\Vehicles\Helicopter.mdl'.
> copter turn:'left'.
>
> So far, everything works fine. The wonderland and helicopter are
> created, and I am able to send it messages to make it turn, move, etc.
> Now I'd like to make it move by using the arrow keys. How do I do that?
>
>
>
> What I've tried so far = My first plan to try to do this was by using
> tile scripts. I've done the race car tutorial, and I figured out how to
> drive that around with the arrow keys once I looked in the world's
> viewer and selected the input pane, which gave me access to the "world's
> lastKeystroke" tiles. So, I made a tile script that used the 'test...
> yes... no' box and put the world's lastKeystroke = <left> as the test
> condition. Then I toggled the script to 'textual' and filled in the
> following.
>
> script1
>     World1 getLastKeystroke = '<left>' "" false
>        ifTrue: [ copter turn: 'left']
>
> and it tells me it doesn't know what copter is. Come to think of it
> neither do I. Is it a variable, a method, or something else? I've played
> around with this a lot, and the only time I got the helicopter to turn
> was when I scripted the whole...

What happened is that when you make a reference to an unknown name in a
Workspace, that it creates a "binding" between the name and an object in
its own local (private) lookup table. So the scope of 'wonder' and
'copter' is local to the Workspace. And they are variables.

If you want to be able to refer to your "copter" from a tile script, it
has to be visible to that script. There are several ways to do this.

There is a global namespace, called 'Smalltalk'. Most of what it
contains are classes, and by tradition the names in Smalltalk begin with
a capital letter.

To add your variables to this namespace, you could do:

Smalltalk at: MyWonderland put: Wonderland new.
Smalltalk at: MyCopter put: (MyWonderland makeActorFrom:
'Objects\Vehicles\Helicopter.mdl').

This will make true globals. However, there's now no automated way to
manage their lifecycle: to initialize them and deinitialize them when
the project is entered or exited, etc.

These variables could also be attached to a class as class variables.
Then you could use the existing startup/shutdown hooks called on any
class that wants to be in the startup or shutdown lists.

Or you could attach these variables to a Morph so that you could script
it directly. The Morph could be kept offscreen (say in a Flap). You
could then trigger a script on entering the world.

> script97
>     | wonder copter |
>     wonder := Wonderland new.
>     copter := wonder makeActorFrom: 'Objects\Vehicles\Helicopter.mdl'.
>     copter turn:'left'.
>
> but that doesn't really do what I'm trying to do.
>
> Thanks in advance and happy squeaking!
> Jeff
>
> ------------------------------------------------------------------------
> No banners. No pop-ups. No kidding.
> Make My Way your home on the Web - http://www.myway.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



--
Ned Konz
[hidden email]
http://bike-nomad.com

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: Beginners questions

Giovanni Corriga
In reply to this post by Klaus D. Witzel
Il giorno mer, 08/11/2006 alle 19.30 +0100, Klaus D. Witzel ha scritto:

> Hi Jeff,
>
> this is because you post in the HTML format, in which your messages  
> appears quite nice
>
> -  
> http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.beginners/1368
>
> But all these mailing lists are run in plain text mode. So perhaps you  
> switch your mail client to plain text mode, like we all do, and everybody  
> will be happy :)

Yes, most of the subscribers of this mailing list send their messages in
plain text.

Jeff, if you wish to send messages in HTML, you may go to you membership
options page and change your settings. But please note that changing
that won't have any effect on those who reply to you and convert your
messages from HTML to text.

        Ciao,

                Giovanni

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