can't find in appinventor 'Definitions'

1,622 views
Skip to first unread message

fernand

unread,
Dec 17, 2013, 1:55:07 AM12/17/13
to mitappinv...@googlegroups.com
OS win 7
browser firefox
appinventor AI2

Hi,
I can not find the definitions after I checked it now several times. In my built-in it is only listing: Control, Logic, Math, Text, Lists, Colors, Variables and Procedures but not Definitions.

But I need definitions to be able to finished my project Xylophone.

Thank you very much.

Scott Ferguson

unread,
Dec 17, 2013, 6:19:56 AM12/17/13
to mitappinv...@googlegroups.com
Things have been moved around a bit but everything is still there.

While there was a Definitions palette in AI Classic:

In AI2 the Procedure blocks are in the Procedures palette:

The variables are in the Variables palette:

And the Control palette contains the evaluate but ignore result block which replaces the '|' block:

---

Scott

fernand

unread,
Dec 17, 2013, 8:57:17 AM12/17/13
to mitappinv...@googlegroups.com
OS win 7
browser firefox
appinventor AI2

Hi Scott,
 
in my appinventor Ai2 you can find the built-in button but not the My Blocks button where you find My Definitions. So I miss
   the My Blocks button where I can find the text-block where I put inside the wave-file. In my only built-in button for instance
   there is a text button but no option to fill in with a wave-file, here you can only fill in with a simple text.
  Greetings  
 
Message has been deleted

fturbak

unread,
Dec 17, 2013, 9:22:14 AM12/17/13
to mitappinv...@googlegroups.com


Hi, 

I'm not sure exactly what your asking, but I sense it has something to do with the way that procedures and parameters are handled in AI2 vs. Classic AI. 

In Classic AI, the PlayNote procedure in the xylophone tutorial is declared and invoked as follows:

Here's how to do the same thing in AI2:


If this is not the problem you're trying to solve, please let us know!

- lyn -=

fernand

unread,
Dec 17, 2013, 10:09:04 AM12/17/13
to mitappinv...@googlegroups.com


Am Dienstag, 17. Dezember 2013 07:55:07 UTC+1 schrieb fernand:
OS win 7
browser firefox
appinventor AI2

Hi fturbak,
 
thanks for your reply but I can't read your answer at all. You wrote: Here's how to do the same thing in AI2: but after the double
quote the space is invisible. The same  after Here's how to do the same thing in AI2:? I cant' read nothing. Can it be a problem
with the configurations in this side. I am not sure.

Concern my problem it can be that the configuration of the classic appinventor is different than the appinventor AI2. For instance
in the appinventor2 here is no section with My Blocks and Advanced. But I need the section My Blocks to be able to complete my Xylophone-project. Exist a possiblity to import this feature to appinventor Ai2.

Greetings 

Scott Ferguson

unread,
Dec 17, 2013, 10:21:15 AM12/17/13
to mitappinv...@googlegroups.com
@fernand-
You have to click the blank spaces between the text to see the images.
That worked for me.
---
Scott

fernand

unread,
Dec 17, 2013, 10:24:57 AM12/17/13
to mitappinv...@googlegroups.com
Thanks now I found it. Indeed the blocks in classic Appinventor are a little bit different than in appinventor AI2.

fturbak

unread,
Dec 17, 2013, 10:41:41 AM12/17/13
to mitappinv...@googlegroups.com
If you are reading my response at http://appinventor.mit.edu/explore/forums/ and the images are not displaying, look for a box at the top of the message that says "Images are not displayed". Below this title, there should be an option "Display Images in this Post" that you can click on. Alternatively, clicking on the blank space may show the image. 

I am also attaching the two images from my previous response to this response in case you can't access them another way. 

Finally, in AI2 it is possible to do everything that you can do in AI Classic, but the way you do it is often different. There are no Built-In>Definitions or My Blocks>My Definitions sections in AI2 because you accomplish the goals of these sections in a different way in AI2:
  • Defining a global variable: In AI Classic, you use a "def" block from Built-In>Definitions, but in AI2, you use an "initialize global" block from the Variables drawer.
  • Getting/setting a global variable:  In AI Classic, you use a "global" or "set global" block from My Blocks>My Definitions, but in AI2, you use a "get" or "set" block from the Variables drawer. Alternatively, if you hover over the variable name in the "initialize global" block, you will get a flyout of the "get" and "set" blocks for the global variable. 
  • Defining a procedure: In AI Classic, procedure definition blocks are in  Built-In>Definitions, but in AI2, they are in the Procedures drawer.
  • Calling a procedure:  In AI Classic, procedure caller blocks are in My Blocks>My Definitions, but in AI2, they are in the Procedures drawer.
  • Declaring a procedure parameter: In AI Classic, you use a "name" block from Built-In>Definitions, but in AI2, you use a mutator on the procedure definition block to add the parameter (click on the blue gear icon in the upper left corner of the procedure). 
  • Getting the value of a procedure parameter:  In AI Classic, you use a "value"  block from My Blocks>My Definitions, but in AI2, you use a "get" block from the Variables drawer. Alternatively, if you hover over the variable name in the procedure block, you will get a flyout that includes the "get" block for the parameter. 
- lyn -
Screen Shot 2013-12-17 at 9.08.45 AM.png
Screen Shot 2013-12-17 at 9.19.03 AM.png

Bartek Hajnas

unread,
Jan 1, 2014, 5:02:58 PM1/1/14
to mitappinv...@googlegroups.com

Does anyone can help me turn this into AI2 please

Taifun

unread,
Jan 1, 2014, 6:02:26 PM1/1/14
to mitappinv...@googlegroups.com
@Bartek: you might want to start with the conversion into AI2 yourself and if you get stuck, post a new question and add a screenshot
it also might help to read this What's different?
Taifun
PS: for new questions please start a new thread next time


Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Reply all
Reply to author
Forward
0 new messages