alice-teacher Alice Array Elements calling Methods

Donald Slater dslater at andrew.cmu.edu
Sun May 5 17:55:53 EDT 2019


Terri,
Would you mind sending a copy of your program? I am trying to recreate the problem based on your description, but I do not think I am getting it right, as everything seems to be working for me… I must be missing something…

Also, I am using the latest download of Alice available on alice.org <http://alice.org/> (3.5). We added set and get indexed value into procedure and function list for all array properties, but I do not think that is related to your issue. But if you are using an older version of Alice you might try it.

Looking forward to hearing from you.

All the best,
Don Slater

Alice Project

> On May 4, 2019, at 4:27 PM, Kelly, Terri <kellyt at bishopireton.org> wrote:
> 
> I have a world which is not behaving like I am expecting it to.
> 
> I have an array of automobiles called rowA[]
> I have a method created for automobiles called go
> In go, the first thing I have this do is say it's Sthing (this say "" + SThing this)
> 
> If I call go with blueTruck, it works fine, the truck says blueTruck and then moves forward
> 
> blueTruck.go()
> 
> If I call go with rowA[0].go ... Alice hangs, 
> 
> So, from the test method I have
> 
> blueTruck.go()
> rowA[0] = blueTruck
> rowA[0].say "" + Sthing rowA[0]
> rowA[0].go
> 
> Is there any reason why I should not be able to call a class level method from an array that is of that type class?  
> 
> Terri Kelly
> Computer Science
> Bishop Ireton High School
> Alexandria, VA
> 
> The information contained in this communication may be subject to legal confidentiality protection or privilege. It is intended solely for use by the intended recipient and others authorized to receive it. If you have received this communication in error, please notify the sender and delete it immediately. You are hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly prohibited and may be unlawful.  The school accepts no liability whatsoever for any damage, loss, or expense arising from any misuse of this e-mail and/or from the accessing of any files attached to this e-mail._______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> To change settings or unsubscribe visit:
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20190505/34bf02db/attachment.html>


More information about the alice-teachers mailing list