Disappointed

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

Disappointed

Jeff-146
I'm pretty disappointed with this list at the moment. My last post, "beginners questions" talked about how beginners often don't get their questions answered and pointed out that often when the experts see that an answer, ANY answer, was given they then assume the question was answered, so they don't offer anything more. Now I do appreciate Matthias's honest attempt to answer the question, so I don't want this to be misconstrued as an attack on him. But he obviously misread it. And, well, once people saw that the question of how to make a wonderland actor move in response to mouse clicks had been answered, I didn't get any more help. The question I asked was how to move a wonderland actor with the arrow keys, and I need to do that without the actor having the focus. Unfortunately, since it's been taking so many hours for the messages I've tried to send to get posted on here, (I think I had screwed up joining the list somehow, and redid it so hopefully that problem is solved), it took me a full day to get my question asked and now another full day to explain that the answer I got was to a different question. By the by, I've been spending about 10 hours a day for 5 days now trying to solve this problem. It's getting quite frustrating for me and making me want to give up on squeak.


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: Disappointed

Andrew Burton-2
Jeff wrote:
> I'm pretty disappointed with this list at the moment.

For what it's worth: I wish I could help you.

At the moment, I'm pretty puzzled/stumped by Squeak myself.  I started
getting into this in an attempt to wrap my head around Croquet by
wrapping my head around Squeak.  At the moment I've had to go back and
start over by wrapping my head around Smalltalk.  (Which isn't even
talking about real life stuff; trying to learn Smalltalk while working
with PHP and Perl during the day is a great way to forget everything
you've learned the night before.)

I've just about got objects down, and hopefully will get to the
Wonderland stuff this weekend.  If I find anything useful regarding
keyboard controls, I'll be sure to post!  (Though, I get the feeling
you're likely to figure it out before I even start on Wonderland.)

Good luck.

--
Andrew Burton
[hidden email]
http://utilitarian.us - A Guide to Esoteric Technology in Paragon City
http://jarodrussell.livejournal.com/ - Take a guess. ;)
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Disappointed

stephane ducasse

On 8 nov. 06, at 07:10, Andrew Burton wrote:

> Jeff wrote:
>> I'm pretty disappointed with this list at the moment.
>
> For what it's worth: I wish I could help you.
>
> At the moment, I'm pretty puzzled/stumped by Squeak myself.  I  
> started getting into this in an attempt to wrap my head around  
> Croquet by wrapping my head around Squeak.  At the moment I've had  
> to go back and start over by wrapping my head around Smalltalk.  
> (Which isn't even talking about real life stuff; trying to learn  
> Smalltalk while working with PHP and Perl during the day is a great  
> way to forget everything you've learned the night before.)

may be the best is to try seaside in that case :)


> I've just about got objects down, and hopefully will get to the  
> Wonderland stuff this weekend.  If I find anything useful regarding  
> keyboard controls, I'll be sure to post!  (Though, I get the  
> feeling you're likely to figure it out before I even start on  
> Wonderland.)
>
> Good luck.
>
> --
> Andrew Burton
> [hidden email]
> http://utilitarian.us - A Guide to Esoteric Technology in Paragon City
> http://jarodrussell.livejournal.com/ - Take a guess. ;)
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

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

Re: Disappointed

stephane ducasse
In reply to this post by Jeff-146
Hi jeff

Not everybody read this mailing-list.
So post also in squeak-dev your question.
And people are also busy.
BTW: you should have repeated your question

Stef

PS: I read nearly 120 mails per day and I have to reply to 25% at least.


On 8 nov. 06, at 06:28, Jeff wrote:

> I'm pretty disappointed with this list at the moment. My last post,  
> "beginners questions" talked about how beginners often don't get  
> their questions answered and pointed out that often when the  
> experts see that an answer, ANY answer, was given they then assume  
> the question was answered, so they don't offer anything more. Now I  
> do appreciate Matthias's honest attempt to answer the question, so  
> I don't want this to be misconstrued as an attack on him. But he  
> obviously misread it. And, well, once people saw that the question  
> of how to make a wonderland actor move in response to mouse clicks  
> had been answered, I didn't get any more help. The question I asked  
> was how to move a wonderland actor with the arrow keys, and I need  
> to do that without the actor having the focus. Unfortunately, since  
> it's been taking so many hours for the messages I've tried to send  
> to get posted on here, (I think I had screwed up joining the list  
> somehow, and redid it so hopefully that problem is solved), it took  
> me a full day to get my question asked and now another full day to  
> explain that the answer I got was to a different question. By the  
> by, I've been spending about 10 hours a day for 5 days now trying  
> to solve this problem. It's getting quite frustrating for me and  
> making me want to give up on squeak.
>
> 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

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

Re: Disappointed

Kyle Hamilton
In reply to this post by Jeff-146
I've not been reading this list religiously, I've been dealing with personal issues and poring over certification requirements for FIPS 140-2 and Common Criteria.
 
Honestly, I don't know how to solve the issue.  I haven't looked at Wonderland.
 
-Kyle H
----- Original Message -----
Sent: Tuesday, November 07, 2006 10:28 PM
Subject: [Newbies] Disappointed

I'm pretty disappointed with this list at the moment. My last post, "beginners questions" talked about how beginners often don't get their questions answered and pointed out that often when the experts see that an answer, ANY answer, was given they then assume the question was answered, so they don't offer anything more. Now I do appreciate Matthias's honest attempt to answer the question, so I don't want this to be misconstrued as an attack on him. But he obviously misread it. And, well, once people saw that the question of how to make a wonderland actor move in response to mouse clicks had been answered, I didn't get any more help. The question I asked was how to move a wonderland actor with the arrow keys, and I need to do that without the actor having the focus. Unfortunately, since it's been taking so many hours for the messages I've tried to send to get posted on here, (I think I had screwed up joining the list somehow, and redid it so hopefully that problem is solved), it took me a full day to get my question asked and now another full day to explain that the answer I got was to a different question. By the by, I've been spending about 10 hours a day for 5 days now trying to solve this problem. It's getting quite frustrating for me and making me want to give up on squeak.


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

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

Re: Disappointed

Matthias Berth-2
In reply to this post by Jeff-146
Hi Jeff,


sorry, in the enthusiasm over having found out something, I totally forgot that you were asking about reactions to key strokes, not mouse clicks :-)

Let me give you my 2 cents about your frustrations. Again, I'm just trying to help, so please don't take it personally.

- Ask early. I would not have spent 5 days trying (and failing) to solve a particular problem, that only builds frustration. Couldn't you have asked a bit earlier? A good rule of thumb is, I think, to start asking when you're not making significant progress anymore.

- Don't get stuck. Can you structure your work / play so that you can have more patience waiting for an answer? Maybe you can ask a question and get something else done in the mean time? That way you make progress even while you're stuck on that issue

- Ask in small chunks. I have read somewhere that on mailing lists the answers are generated by people for whom it was _not much work_ to find the solution. It's like you ask 200 people the same question, 20 would know the answer with some effort, but 2 know it right away and only have to write it down, takes them a few seconds to minutes. Those are the two from whom you get an answer. So make it easy for your question to stick out in the flow of emails and catch the attention of those 2 people. In more concrete terms, instead of one email with 8 questions, post 8 emails with one question each. Make a meaningful subject line. Don't mix general commentary with concrete questions.

- Ask the right people. When you don't get an answer on the beginners mailing list, try squeak-dev. I think only a fraction of the experts on squeak-dev are also subscribed to the beginners mailing list. There is a lot of traffic on squeak-dev, so it's even more important to make your questions easy to find and easy to answer.

- Ask on irc. There is an irc channel where you can chat with other squeakers in real time:
  http://people.squeakfoundation.org/article/7.html

I hope that you'll have better experiences with the squeak community. BTW, what are you trying to create? Maybe you can give a short description in a separate email?


best regards

Matthias



On 11/8/06, Jeff <[hidden email]> wrote:
I'm pretty disappointed with this list at the moment. My last post, "beginners questions" talked about how beginners often don't get their questions answered and pointed out that often when the experts see that an answer, ANY answer, was given they then assume the question was answered, so they don't offer anything more. Now I do appreciate Matthias's honest attempt to answer the question, so I don't want this to be misconstrued as an attack on him. But he obviously misread it. And, well, once people saw that the question of how to make a wonderland actor move in response to mouse clicks had been answered, I didn't get any more help. The question I asked was how to move a wonderland actor with the arrow keys, and I need to do that without the actor having the focus. Unfortunately, since it's been taking so many hours for the messages I've tried to send to get posted on here, (I think I had screwed up joining the list somehow, and redid it so hopefully that problem is solved), it took me a full day to get my question asked and now another full day to explain that the answer I got was to a different question. By the by, I've been spending about 10 hours a day for 5 days now trying to solve this problem. It's getting quite frustrating for me and making me want to give up on squeak.


No banners. No pop-ups. No kidding.
Make My Way your home on the Web - <a href="http://www.myway.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.myway.com


_______________________________________________
Beginners mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners




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

KeyPress On World of Squeak Wonderland (was: Disappointed)

Ron Teitelbaum
In reply to this post by Jeff-146

Hi Jeff,

 

Welcome to the beginners list!

 

I appreciate the fact that you are sticking with the problem.  That in my opinion is the best way to learn.  I didn’t answer your question because I do not feel that I am an expert in Wonderland.  If the question was something like how can I map a key to so some action that is pretty easy, IF that action is an isolated easily called method.  Something like: Utilities garbageCollectAndReport.  This is a class method and there is no instance that needs to be sent to.  

 

If a key stroke needs to be captured and affect a running instance it is a bit more difficult to do but still very possible.  The issue here is that there is a complicated event loop that needs to be tapped into but this would be very difficult to explain to someone with limited experience.  The fact that you are using wonderland means that there is probably already a hook to do what you want so a complicated explanation of what I know will probably only confuse the matter and make things more difficult for you.  

 

There are people on this list that have much more experience with Wonderland, but nobody that will answer your question within hours.

 

I would love to have Squeak be much more a pleasant experience for you.  My suggestion is that you start slower and work on understanding basic concepts of Squeak.  Do more tutorials; look into how some things work before trying to extend them.

 

Also a comment, starting with the assumption that people are not going to help you is discouraging to people who might.  People are more likely to help people that work hard themselves and will benefit from the help and will appreciate that help.  I think you have the work hard part down.  You need to be a bit more appreciative of the effort and time that goes into helping you.

 

Now to your question: Matthias was right and he sent you to exactly the place you needed to go.   I just loaded a 3.8 image and did the helicopter tutorial.  I have to say it was great fun!  Wonderland is a very nice piece of code and I can see that it would be fun to play with.  The tutorial is fun but the concepts are not easy and how the authors did what they did is very clever but also difficult especially when you venture off the beaten path.  You picked a hard place to start!  That by itself can be very frustrating.   

 

Here is your answer but the answer is not perfect.  What I noticed is that the keys only have focus when the actor is under the mouse.  There may be a way to make this work in the context of a world but I couldn’t get it to work that way.  The world does not appear to have a reactions collection, but there does seem to be a little hook in Scene that might have been intended to work that way.  Again this is an advanced concept.  I also tried adding a reaction to the ground to make it easier for this to work.  The ground accepted the reaction but did not act on it.  I added a reaction of [:event | self halt] but that did nothing so maybe background items like ground and sky don’t quite work or don’t respond to certain reactions the way other actors do.  It makes sense that Wonderland might be written this way.  If you added a right key press to multiple objects how is it supposed to know which item the key press should control.  There could be a number of ways to fix this like adding an actor that is a control stick or something, then placing the mouse over the control stick would work the helicopter.  (just a suggestion of where you might go from here)

 

Ok so here is the code:

 

helicopter addResponse: [:event |

            event getMorphicEvent keyString = '<left>'

                        ifTrue: [helicopter move: #left].

            event getMorphicEvent keyString = '<right>'

                        ifTrue: [helicopter move: #right].

] to: #keyPress

 

I hope that helps, welcome to the list and

 

Happy coding,

 

Ron Teitelbaum

President / Principal Software Engineer

US Medical Record Specialists

[hidden email]

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Jeff
Sent: Wednesday, November 08, 2006 12:28 AM
To: [hidden email]
Subject: [Newbies] Disappointed

 

I'm pretty disappointed with this list at the moment. My last post, "beginners questions" talked about how beginners often don't get their questions answered and pointed out that often when the experts see that an answer, ANY answer, was given they then assume the question was answered, so they don't offer anything more. Now I do appreciate Matthias's honest attempt to answer the question, so I don't want this to be misconstrued as an attack on him. But he obviously misread it. And, well, once people saw that the question of how to make a wonderland actor move in response to mouse clicks had been answered, I didn't get any more help. The question I asked was how to move a wonderland actor with the arrow keys, and I need to do that without the actor having the focus. Unfortunately, since it's been taking so many hours for the messages I've tried to send to get posted on here, (I think I had screwed up joining the list somehow, and redid it so hopefully that problem is solved), it took me a full day to get my question asked and now another full day to explain that the answer I got was to a different question. By the by, I've been spending about 10 hours a day for 5 days now trying to solve this problem. It's getting quite frustrating for me and making me want to give up on squeak.

 


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

RE: KeyPress On World of Squeak Wonderland (was: Disappointed)

Jeff-146
Thanks Ron,
There's some good info. in there. Unfortunately, scene doesn't have respondWith: to: method, but I might be able to find a workaround.

One method I was trying to use in the past was to create a script from tiles, and have that script always ticking and just send the helicopter the command to move in response to the world's last keystroke. I couldn't get the script to find the helicopter at all, and have been having trouble with going from one workspace to another attempting to refer to the same thing, and also with the differences between tile scripts and workspace scripts, for some reason they don't act the same and I'm not sure why. Even when I tried creating a class MyWonderland with instance variables | wonder copter |, I couldn't figure out how to get a method to understand what 'copter' was and pass messages to it other than the one that created it. Also related, when I define jump as
jumpup := wonder helicopter move:#up.

I still don't know exactly how to make this method do this again. I've tried World jumpup. jumpup. wonder helicopter jumpup. but only jumpup loop. seems to work, and again only from the particular workspace I defined it in. I know all of this is related somehow. Anyone got a hint?







--- On Wed 11/08, Ron Teitelbaum < [hidden email] > wrote:
From: Ron Teitelbaum [mailto: [hidden email]]
To: [hidden email], [hidden email]
Date: Wed, 8 Nov 2006 11:07:48 -0500
Subject: KeyPress On World of Squeak Wonderland (was: Disappointed)















Hi Jeff,





Welcome to the beginners list!





I appreciate the fact that you are
sticking with the problem. That in my opinion is the best way to learn. I
didn’t answer your question because I do not feel that I am an expert in
Wonderland. If the question was something like how can I map a key to so
some action that is pretty easy, IF that action is an isolated easily called
method. Something like: Utilities garbageCollectAndReport. This is
a class method and there is no instance that needs to be sent to.





If a key stroke needs to be captured and affect
a running instance it is a bit more difficult to do but still very possible. The
issue here is that there is a complicated event loop that needs to be tapped
into but this would be very difficult to explain to someone with limited experience.
The fact that you are using wonderland means that there is probably already a
hook to do what you want so a complicated explanation of what I know will
probably only confuse the matter and make things more difficult for you.





There are people on this list that have
much more experience with Wonderland, but nobody that will answer your question
within hours.





I would love to have Squeak be much more a
pleasant experience for you. My suggestion is that you start slower and
work on understanding basic concepts of Squeak. Do more tutorials; look
into how some things work before trying to extend them.





Also a comment, starting with the
assumption that people are not going to help you is discouraging to people who
might. People are more likely to help people that work hard themselves
and will benefit from the help and will appreciate that help. I think you
have the work hard part down. You need to be a bit more appreciative of
the effort and time that goes into helping you.





Now to your question: Matthias was right
and he sent you to exactly the place you needed to go. I just
loaded a 3.8 image and did the helicopter tutorial. I have to say it was
great fun! Wonderland is a very nice piece of code and I can see that it
would be fun to play with. The tutorial is fun but the concepts are not
easy and how the authors did what they did is very clever but also difficult especially
when you venture off the beaten path. You picked a hard place to
start! That by itself can be very frustrating.





Here is your answer but the answer is not
perfect. What I noticed is that the keys only have focus when the actor
is under the mouse. There may be a way to make this work in the context
of a world but I couldn’t get it to work that way. The world does
not appear to have a reactions collection, but there does seem to be a little hook
in Scene that might have been intended to work that way. Again this is an
advanced concept. I also tried adding a reaction to the ground to make it
easier for this to work. The ground accepted the reaction but did not act
on it. I added a reaction of [:event | self halt] but that did nothing so
maybe background items like ground and sky don’t quite work or don’t
respond to certain reactions the way other actors do. It makes sense that
Wonderland might be written this way. If you added a right key press to
multiple objects how is it supposed to know which item the key press should
control. There could be a number of ways to fix this like adding an actor
that is a control stick or something, then placing the mouse over the control
stick would work the helicopter. (just a suggestion of where you might go
from here)





Ok so here is the code:





helicopter addResponse: [:event |



event
getMorphicEvent keyString = ''



ifTrue:
[helicopter move: #left].



event
getMorphicEvent keyString = ''



ifTrue:
[helicopter move: #right].



] to: #keyPress





I hope that helps, welcome to the list and





Happy coding,





Ron Teitelbaum



President / Principal Software Engineer



US Medical Record Specialists



[hidden email]









face="Times New Roman">






From:face=Tahoma>
[hidden email]
[[hidden email]]
style='font-weight:bold'>On Behalf Of
Jeff
Sent: Wednesday, November 08, 2006
12:28 AM
To:
[hidden email]
Subject: [Newbies] Disappointed







I'm pretty disappointed with this list at the moment. My last post,
"beginners questions" talked about how beginners often don't get
their questions answered and pointed out that often when the experts see that
an answer, ANY answer, was given they then assume the question was answered, so
they don't offer anything more. Now I do appreciate Matthias's honest attempt
to answer the question, so I don't want this to be misconstrued as an attack on
him. But he obviously misread it. And, well, once people saw that the question
of how to make a wonderland actor move in response to mouse clicks had been
answered, I didn't get any more help. The question I asked was how to move a
wonderland actor with the arrow keys, and I need to do that without the actor
having the focus. Unfortunately, since it's been taking so many hours for the
messages I've tried to send to get posted on here, (I think I had screwed up
joining the list somehow, and redid it so hopefully that problem is solved), it
took me a full day to get my question asked and now another full day to explain
that the answer I got was to a different question. By the by, I've been
spending about 10 hours a day for 5 days now trying to solve this problem. It's
getting quite frustrating for me and making me want to give up on squeak.
border=0 width=23 height=23 id="_x0000_i1025"
src="http://imgfarm.com/images/webmail/rt/img/img1017a1.gif">













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: RE: KeyPress On World of Squeak Wonderland (was:Disappointed)

Ron Teitelbaum

Hi Jeff,

 

This is actually one of the things that I found interesting about wonderland.  It’s a bit too cleaver.  In my block I would have expected to have

 

[:event | self move: #left] since the code is being stored on a helicopter but instead I needed to put in [:event | helicopter move: #left].  Now it seems that Wonderland is doing what it is you want but at the expense of making you believe this is some sort of magic.  

 

The answer to your question is rather simple, but it will be confusing with what you have already seen.  

 

The answer is: Object message.  Every message is sent to an object, and objects can be either Classes or instances.  But even this is a bit confusing since Classes are instances of a Class, but forget I mentioned that.

 

Now a Class can have instances.  Like this:    aGlass := Glass new.

 

This sets the temp variable aGlass to an instance of the Class Glass.  It’s relatively easy to find a class in Smalltalk since it does it for you automatically.  If you had created the class Glass then select Glass and inspect_it will bring up the class definition.  This is not true for instances.  You are required to manage your own instances of a class.  Normally we do this by storing instances in instance variables.  This helps to form a relationship between objects.

 

So if I did this

 

            Object subclass: Glass

                        instanceVariables: ‘content’

            Glass>>initialize

                        “initialize the instance of Glass”

                        content := OrderedCollection new.

            Glass>>content

                        “return a collection of matter that represents contents of a glass”

                        ^content

           

            Object subclass: Matter

 

Matter subclass: Liquid

 

            Liquid subclass: Water

 

            Matter subclass: Solid

 

            Solid subclass: Ice

 

Then I could make an Instance of Ice and put it in the Glass.

 

            aGlass := Glass new.

            aGlass content add: Ice new.

            ^aGlass

 

If I do this then I get back an instance of Glass with some ice in it.  Now I could set some properties so that ice over time turns into water.

 

Notice something about this.  If I go to another workspace and do

 

            aGlass := Glass new. 

 

I get a new glass, not the same one as before.  Is it possible for me to go to another workspace and get the same glass back?  Yes but this is not the way that we normally do things.  If I add an id to glass this will make more sense.

 

            aGlass := Glass new;

                        id: ‘Glass 1’;

                        yourself.

 

Now in another workspace I can do:

 

            myGlass1 := Glass allInstnaces detect: [:a | a id = ‘Glass 1’] ifNone: [Transcript show: ‘you need glasses’].

 

So if this is not how we would normally do things what is?  Well remember ice?  We made an instance of Ice and it’s still in the glass.

 

            aGlass := Glass new.

            aGlass content add: Ice new.

           

            If we wanted to get this back in the same code we could use the aGlass temporary variable to retrieve it.

 

            myContent := aGlass content at: 1 ifAbsent: [Transcript show: ‘you still need glasses’. nil].

 

            Now myContent has Ice in it.

 

            (we would actually do something like this instead.  But instead of talking about methods and browsers since we are still in a workspace, I’m trying to give you an example that will make sense:

 

            aGlass := Glass new.

            myIce := Ice new.

            aGlass content add: myIce.

 

            See now we don’t have to retrieve it back since we already have a temp variable)

 

What is wonderland doing?

            Well something very interesting, it is holding onto instances of Actor and naming them and replacing those names for you.  So while it looks like you are just using the name, you are really using temporary variables.  Cool huh?

 

How does all this help you?  Well if you start wonderland in a workspace:

 

            Wonderland new.

 

You can inspect this.  (not do_it but inspect_it instead).  You will get back an inspector which IS the wonderland instance you are looking for.  You can now write any code you want to try out on the instance.  w or your instance of Wonderland is now: self, so on your inspector you can do: self addActor: … or whatever.  You can find your actors, browse code, do all kinds of cool stuff.  You can not save this code.  This is a way for you to get used to what’s going on.  It’s a try it area.  Look around, inspect more things, browse code that makes up these instances.  

 

The key take away here is that instances are like children.  They are not interchangeable.  It’s like children.  You don’t get the same one each time you make a new one.  And you don’t ask a question of just any child.  You need to ask your daughter to clean up the backyard, and your son to do the dishes, or whatever. 

 

Happy coding,

 

Ron Teitelbaum

President / Principal Software Engineer

US Medical Record Specialists

[hidden email]

 

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Jeff
Sent: Wednesday, November 08, 2006 1:44 PM
To: [hidden email]; [hidden email]; [hidden email]
Subject: [Newbies] RE: KeyPress On World of Squeak Wonderland (was:Disappointed)

 

Thanks Ron,
There's some good info. in there. Unfortunately, scene doesn't have respondWith: to: method, but I might be able to find a workaround.

One method I was trying to use in the past was to create a script from tiles, and have that script always ticking and just send the helicopter the command to move in response to the world's last keystroke. I couldn't get the script to find the helicopter at all, and have been having trouble with going from one workspace to another attempting to refer to the same thing, and also with the differences between tile scripts and workspace scripts, for some reason they don't act the same and I'm not sure why. Even when I tried creating a class MyWonderland with instance variables | wonder copter |, I couldn't figure out how to get a method to understand what 'copter' was and pass messages to it other than the one that created it. Also related, when I define jump as
jumpup := wonder helicopter move:#up.

I still don't know exactly how to make this method do this again. I've tried World jumpup. jumpup. wonder helicopter jumpup. but only jumpup loop. seems to work, and again only from the particular workspace I defined it in. I know all of this is related somehow. Anyone got a hint?







--- On Wed 11/08, Ron Teitelbaum < [hidden email] > wrote:

From: Ron Teitelbaum [mailto: [hidden email]]
To: [hidden email], [hidden email]
Date: Wed, 8 Nov 2006 11:07:48 -0500
Subject: KeyPress On World of Squeak Wonderland (was: Disappointed)












 

Hi Jeff,

 

 

Welcome to the beginners list!

 

 

I appreciate the fact that you are
sticking with the problem. That in my opinion is the best way to learn. I
didnt answer your question because I do not feel that I am an expert in
Wonderland. If the question was something like how can I map a key to so
some action that is pretty easy, IF that action is an isolated easily called
method. Something like: Utilities garbageCollectAndReport. This is
a class method and there is no instance that needs to be sent to.

 

 

If a key stroke needs to be captured and affect
a running instance it is a bit more difficult to do but still very possible. The
issue here is that there is a complicated event loop that needs to be tapped
into but this would be very difficult to explain to someone with limited experience.
The fact that you are using wonderland means that there is probably already a
hook to do what you want so a complicated explanation of what I know will
probably only confuse the matter and make things more difficult for you.

 

 

There are people on this list that have
much more experience with Wonderland, but nobody that will answer your question
within hours.

 

 

I would love to have Squeak be much more a
pleasant experience for you. My suggestion is that you start slower and
work on understanding basic concepts of Squeak. Do more tutorials; look
into how some things work before trying to extend them.

 

 

Also a comment, starting with the
assumption that people are not going to help you is discouraging to people who
might. People are more likely to help people that work hard themselves
and will benefit from the help and will appreciate that help. I think you
have the work hard part down. You need to be a bit more appreciative of
the effort and time that goes into helping you.

 

 

Now to your question: Matthias was right
and he sent you to exactly the place you needed to go. I just
loaded a 3.8 image and did the helicopter tutorial. I have to say it was
great fun! Wonderland is a very nice piece of code and I can see that it
would be fun to play with. The tutorial is fun but the concepts are not
easy and how the authors did what they did is very clever but also difficult especially
when you venture off the beaten path. You picked a hard place to
start! That by itself can be very frustrating.

 

 

Here is your answer but the answer is not
perfect. What I noticed is that the keys only have focus when the actor
is under the mouse. There may be a way to make this work in the context
of a world but I couldnt get it to work that way. The world does
not appear to have a reactions collection, but there does seem to be a little hook
in Scene that might have been intended to work that way. Again this is an
advanced concept. I also tried adding a reaction to the ground to make it
easier for this to work. The ground accepted the reaction but did not act
on it. I added a reaction of [:event | self halt] but that did nothing so
maybe background items like ground and sky dont quite work or dont
respond to certain reactions the way other actors do. It makes sense that
Wonderland might be written this way. If you added a right key press to
multiple objects how is it supposed to know which item the key press should
control. There could be a number of ways to fix this like adding an actor
that is a control stick or something, then placing the mouse over the control
stick would work the helicopter. (just a suggestion of where you might go
from here)

 

 

Ok so here is the code:

 

 

helicopter addResponse: [:event |

 

event
getMorphicEvent keyString = ''

 

ifTrue:
[helicopter move: #left].

 

event
getMorphicEvent keyString = ''

 

ifTrue:
[helicopter move: #right].

 

] to: #keyPress

 

 

I hope that helps, welcome to the list and

 

 

Happy coding,

 

 

Ron Teitelbaum

 

President / Principal Software Engineer

 

US Medical Record Specialists

 

[hidden email]

 

 

 

 

face="Times New Roman">


 

 

From:face=Tahoma>
[hidden email]
[[hidden email]]
style='font-weight:bold'>On Behalf Of
Jeff
Sent: Wednesday, November 08, 2006
12:28 AM
To:
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Disappointed

tblanchard
In reply to this post by Jeff-146
This isn't really a newbies kind of question - jumped right into the deep end I'd say.

FWIW, probably not many people know the answer.  I myself know next to nothing about Wonderlands.  I will tell you that you can find most of the event delivery code in HandMorph.  So there's someplace to look.

Sorry I can't tell you more.

-Todd Blanchard

On Nov 7, 2006, at 9:28 PM, Jeff wrote:

I'm pretty disappointed with this list at the moment. My last post, "beginners questions" talked about how beginners often don't get their questions answered and pointed out that often when the experts see that an answer, ANY answer, was given they then assume the question was answered, so they don't offer anything more. Now I do appreciate Matthias's honest attempt to answer the question, so I don't want this to be misconstrued as an attack on him. But he obviously misread it. And, well, once people saw that the question of how to make a wonderland actor move in response to mouse clicks had been answered, I didn't get any more help. The question I asked was how to move a wonderland actor with the arrow keys, and I need to do that without the actor having the focus. Unfortunately, since it's been taking so many hours for the messages I've tried to send to get posted on here, (I think I had screwed up joining the list somehow, and redid it so hopefully that problem is solved), it took me a full day to get my question asked and now another full day to explain that the answer I got was to a different question. By the by, I've been spending about 10 hours a day for 5 days now trying to solve this problem. It's getting quite frustrating for me and making me want to give up on squeak.


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


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