2017년 1월 16일 월요일

A guide to manually (ugh) converting AI Classic projects to AI2 beta


No, this is no magic bullet, but so many of you have been requesting a way to convert your apps.

There is a conversion tool in the plans, but it is a few months off as I understand it.
So, what to do?

I can offer these words of advice:
.:
Don't be in such a hurry to convert every one of your apps as soon as possible. Focus on only the one or two that need to be done ASAP

Give yourself a little time to become familiar with how AI2 works differently from AI Classic.
Try to develop a few simple apps to start with.
Do some of the MIT tutorials.
Do or watch the YouTube videos.
My Interactive Blocks learning tool app might be a fun way to try out and become more familiar with the language blocks.
Finally, when you are somewhat comforatble with the new layout you might put AI Classic open to a Project to be copied on the left half of the screen and AI2 beta open on the right.
Copying the Designer should be pretty straight forward if you are aware of the following changes:

Look over the Component Reference

In the Designer, some of the components in the Palette have been moved around and some of the category names changed.
This reminds me of a Law Student in training at the Law Offices where I was working.
He took it upon himself to 'organize' the copy room -- rearranging everything in the process.
The result was Attorneys scratching their heads and looking befuddled and Legal Secretaries looking in nooks and crannies for reams of copy paper - noone with a clue where anything was.
But I digress...
The changes to the Palette are 

(Bolded items indicate Category name changes or items that have moved from their original group)

AI Classic
AI2 beta
Basic: Button,Canvas,CheckBox,Clock,Image,Label,ListPicker,PasswordTextBox,Slider,TextBox,TinyDB
User Interface: Button,CheckBox,Clock,Image,Label,ListPicker,Notifier,PasswordTextBox,Slider,TextBox,WebViewer
Media: Camcorder, Camera, ImagePicker, Player, Sound, VideoPlayer
Media: Camcorder, Camera, ImagePicker, Player, Sound, SoundRecorderSpeechRecognizerTextToSpeech, VideoPlayer
Animation: Ball, ImageSprite
Drawing and Animation: Ball, Canvas, ImageSprite
Social: ContactPicker, EmailPicker, PhoneCall, PhoneNumberPicker, Texting, Twitter
Social: ContactPicker, EmailPicker, PhoneCall, PhoneNumberPicker, Texting, Twitter
Sensors: AccelerometerSensor, LocationSensor, OrientationSensor
Sensors: AccelerometerSensor, BarcodeScanner, LocationSensor,NearField, OrientationSensor
Screen Arrangement: HorizontalArrangement, TableArrangement, VerticalArrangement
Layout: HorizontalArrangement, TableArrangement, VerticalArrangement
LEGO(r) MINDSTORMS(r): NxtColorSensor, NxtDirectCommands, NxtDrive, NxtLightSensor, NxtSoundSensor, NxtTouchSensor, NxtUltrasonicSensor
LEGO(r) MINDSTORMS(r): NxtColorSensor, NxtDirectCommands, NxtDrive, NxtLightSensor, NxtSoundSensor, NxtTouchSensor, NxtUltrasonicSensor
Other stuff: ActivityStarter, BarcodeScanner, BluetoothClient, BluetoothServer, Notifier, SpeechRecognizer, TextToSpeech, TinyWebDB, Web
Connectivity: ActiivtyStarter, BluetoothClient, BlutoothServer, Web
Not ready for prime time: FusiontablesControl, GameClient, SoundRecorder, Voting, WebViewer
StorageFusiontablesControlTinyDBTinyWebDB
---
R.I.P. Voting and GameClient :(
---

In the Blocks Viewer, you will see the the appearance of the blocks has changed somewhat and some of the names have changed.
This is minor, but may be confusing.
Some of these changes are:

(Courtesy of OllyDave:)

- TinyDB
There are new blocks in the tinyDb (getTags, clearTags and clearAll) which are extremely useful. Also the get Tag has a new input block "valueIfTagNotThere". Very impressive and will save loads of block spaces and time.

- ListPicker
There is now a show filter bar. This is a great option. comes with Ailivecomplete but good to see it in the MIT version.

-Slider
There is colorLeft and colorRight. Before you could only change the right colour. Wish we would be able to change the knob and horizontal image itself pretty soon

- Notifier
There is now a backgroundcolor and textcolor. This is a great update! You can also choose the length

I found: 
⦁ evaluate but ignore result block
⦁ local variables block
⦁ do result block
⦁ for-range is now: for each <number> from <expr> to <expr> by <expr>
⦁ create empty list is new
⦁ inline if then else (returns a value) - replaces the choose block; you can no longer execute blocks inside this block before returning a value but you can attach do result blocks to give the same functionality if necessary
Features:
⦁ typing 0 then enter on canvas to create a 0 number block
⦁ typing 'your text here or "your text here (no closing quote) to create a text block containing [your text here]
⦁ typing the word text then pressing Enter inserts an empty text block
⦁ the upper left corner of a procedure block allows you to add arguments to your procedures
⦁ the upper left corner of a make a list block lets you add list items in a similar way to adding arguments to a procedure block

But for the most part, the new blocks look similar to the old blocks and I find copying the blocks is pretty easy.
Yes it may be somewhat time consuming, but think of it not as a waste of time, but rather a learning experience :)

One last word about local variables. Although you could reproduce your old projects using only global variables, you would miss out on greater efficiency and a better design that can be achieved with local variables.
These blocks are especially useful to define one or more variables used in your procedures where that variable will not be needed anywhere else in the project/app.

Good luck and
---
hAPPy INVENTORing!
---

--
Sweet!  Thanks Scott!  The Interactive Blocks learning tool is a wonderful new users guide.  Everyone should benefit from this!!  As Taifun would say "WOO HOO"

--
Thanks. It was truly a labor of Luv :)

--
Woo Hoo! (originally from Gary)
Great job Scott!

--
Hi, guys, especially Scott and Taifun, your enthusiasm and help meant a lot to my programming development practice and I want to thank you for that. I am inviting you to visit my web on www.qqlj-it.com (under dev, but usable). 

Once again, thanks! You are great and keep on being like that, the help you provide is essential, with it a lot of us bridged the gap!

--
Nice web site and apps, Zoran :)

--
Thanks, my English is a bit rusty, but no body is perfect :)

--

댓글 없음:

댓글 쓰기