Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
Creating functions and procedures
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Creating functions and procedures - 06-03-2009, 10:19 AM

Another observation - apparently the approach for creating changed a bit changed a bit during development (and since the early tutorial videos).

In the present version, there is one basic pull down menu (see below) for this, which seems to work fine. There are also several display options, which I haven't even begun to explore.
Attached Images
File Type: jpg Procedure.JPG (32.3 KB, 153 views)
File Type: jpg WondowOptions.JPG (25.5 KB, 150 views)
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 06-04-2009, 12:07 PM

I agree Dr. Jim that the Beta release is different. I downloaded the two Alice ScreenCasts thinking they might act as tutorials, but the released software is nothing similar to what is described in the screencasts.

Like you, it took me a while to do something as simple as create a new method (methods are now called procedures). I also stumbled across how to remove the this java keyword.

If I have to hunt & peck my way through learning 3.0 (beta) without documentation this summer this is no way I can introduce it in September.

Where is Dick Baldwin when we need him most!!

Keep posting any new revelations you stumble across as we all begin the learning process and I will do likewise. Currently I'm off to play with opening/modifying Alice worlds in NetBeans.

(It's sad that most school systems don't have the budget to pay for attending workshops this summer - but we are in an economic crisis.)
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 06-04-2009, 05:29 PM

Quote:
Originally Posted by lanceA View Post
I also stumbled across how to remove the this java keyword.
How did you do that? I haven't yet figured out a way - and the problem is rather annoying.
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 06-04-2009, 07:20 PM

From the menus at the top of the Alice window select Window, from the drop down menu. Check "Is Omission Of This For Field Access Desired". That will remove the Java reserved word this.

I also note that the UNDO function is not implemented in this release.

Also, when you drag a tile to the Edit window you get a mysterious message "rendering is disabled...."

Good luck and continue to post in this room. We need to know how Alice 3.0-Beta works.

Last edited by lanceA; 06-04-2009 at 07:27 PM.
   
Reply With Quote
Old
Sophie
Guest
 
Status:
Posts: n/a
Default 06-05-2009, 12:22 AM

I find that option only works on World/scene. On the "Ground" I see
"this (a.k.a. grassyGround)" in the left panel, and "this" in the code panel. In fact (take with a grain of salt, please ... I've just been at this a few days) some things in 3.0 seem to add syntactical noise from concrete Java syntax without much apparent benefit.

Is this forum a suitable way of getting feedback / suggestions back to the development team?

[And thanks, DrJim, I even thought Add procedures/functions was missing until I saw your post!]
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 06-05-2009, 11:07 AM

Quote:
Originally Posted by Sophie View Post
I find that option only works on World/scene. On the "Ground" I see
"this (a.k.a. grassyGround)" in the left panel, and "this" in the code panel. In fact (take with a grain of salt, please ... I've just been at this a few days) some things in 3.0 seem to add syntactical noise from concrete Java syntax without much apparent benefit.

Is this forum a suitable way of getting feedback / suggestions back to the development team?

[And thanks, DrJim, I even thought Add procedures/functions was missing until I saw your post!]
Sophie the Java reserved word 'this' does remain on this(a.k.a.scene) but it is removed from all of my other objects, including grassyGround and any new objects that I add. And since I'm not sure what to do with this(a.k.a.scene) then I can live with it remaining on the screen. I have the Set Locale --> English(United States).

As far as '...syntactical noise' I'm waiting on the Netbeans plugin to really see what can be done with Alice 3.0. (I saw Dennis Cosgrove talking about it in a film clip from the JavaOne conference.)

Also I think this is the forum for this type of constructive comment about the new Alice. Gabe seems to be monitoring it well. We all just need to remember the current release is under heavy construction at the moment.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 06-05-2009, 01:40 PM

Quote:
Originally Posted by lanceA View Post
From the menus at the top of the Alice window select Window, from the drop down menu. Check "Is Omission Of This For Field Access Desired". That will remove the Java reserved word this.
An embarrased thanks. Guess I should actually read the menu options - but isn't that sort of like actually reading the manual, i.e., not something a macho programmer would do?
   
Reply With Quote
Confused (as usual)
Old
DrJim
Guest
 
Status:
Posts: n/a
Question Confused (as usual) - 06-05-2009, 02:38 PM

Just completed the attached project, which was a test of various functions. Everything seemed to work fine, but on the first call, I needed to put in a string variable (which was what the function returned).

I really don't understand what that string was supposed to do - since it's value doesn't seem to affect anything. I suspect it's some sort of a dummy, since I really haven't found anyway to just create a local parameter.

Any ideas or suggestions?
Attached Images
File Type: jpg Why.JPG (9.2 KB, 132 views)
Attached Files
File Type: zip Cow with Function.zip (13.1 KB, 14 views)
   
Reply With Quote
Old
Sophie
Guest
 
Status:
Posts: n/a
Default 06-07-2009, 05:39 PM

Where can I find the 3.0 equivalent of 2.x "events"?

Thanks
   
Reply With Quote
Pascal or Java?
Old
ttkrakus
Guest
 
Status:
Posts: n/a
Default Pascal or Java? - 06-09-2009, 12:58 AM

I am getting a little frustrated with v3.0...what about those "procedures"

There is so much Java jargon in this version that seing "procedures" gives me indigestion. We have "this" and "classes" and "mouseListeners", why do you have to talk about "procedures" where such syntactical construct does not exist in Java --or was it added recently and I did not notice?

Of course, we can also argue that the "for all together" does not have a syntactically counterpart in Java either...which reinforces my view that Alice should be language independent, but this is not a popular idea in this forum.

I am a bit concerned that Alice 3.0 is getting so complex that we are going to have to learn Alice 2.X first to ease the transition to Alice 3.0!

Anyways...
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.