App inventor 教學講義chapter4 - [PDF Document] - Cupdf

文章推薦指數: 80 %
投票人數:10人

1. App Inventor 教學講義4 吳為勇2. 2 Chapter 4 Procedure 副程式指令 當我們程式越寫越多越寫越大時有些程式片段會不停的重複出現,可以利用副程… jerry-wu Home Comments ClickheretoloadreaderMatchcaseLimitresults1perpageEmbedHomeAppinventor教學講義chapter4Dec05,2014ReportDownloadCategory:MobileAuthor:jerry-wuDescription: 介紹Procedure副程式指令&ActivityStarter元件 Transcript:1.AppInventor42.2Chapter4Procedure1Procedures3.3ProceduredoAppInventorAppInventorAppInventorxprocedureresult(result)return4.42*()/2:Button(),Label()HorizantalArrangemant()Step1:1.LayoutHorizantalArrgementViewer2.Button(btnRect)(btnTriangle)(btnCircle)3.LabelTextBoxLabellblText1TextBoxtxtField14.LabelTextBoxLabellblText2TextBoxtxtField25.LabelLabelAnswerLabellblAnswer6.Button(btnClick)7.5.52_Step2:1.BlocksBuiltinVariablespi3.14159type12332.I.BuiltinScreen1btnRectWhenbtnClick.ClickdoViewerII.BuiltinVariablessettypetoWhenbtnClick.Clickdosettypeto16.6III.BuiltinScreen1lblText1lblText2set.texttosettypetoTextIV.BuiltinScreen1txtField1lblField2set.texttoset.texttoTextV.BuiltinScreen1lblAnswerset.texttoTextVI.LabelTextBoxLabelTextBoxLabelTextBoxBuiltinScreen1Controlifthenset.texttoIfBuiltinScreen1Logicxxx=yyyxxxlblText2.VisibleyyyfalsethensetlblText2.VisibletotruesettxtField2.Visibletotrue3.lblText1lblText2set.texttosettypetoText4.lblText1txtField1lblText2txtField2lblText1txtField1lblAnswer47.75.BuiltinProceduretoprocedureresultproceduregetRectAreaheightwidthresultheight*width56.67.I.BuiltinScreen1btnClickWhenbtnClick.ClickdoViewerII.BuiltinControlifthenelseifWhenbtnClick.ClickdoIII.BlocksMath=ifIV.BlocksVariablegetglobaltype=8.8V.BlocksMathNumber1=VI.BlocksScreen1lblAnswersetlblAnswer.TexttoifthenVII.BlocksProcedurescallgetRectAreaheightwidthsetlblAnswer.TexttoVIII.BlocksScreen1txtFieldtxtField1.TextheightIX.BlocksScreen1txtFieldtxtField2TextwidthX.elseif7Blocks9.98.8,Blocks10.109.11.11ActivityStarterActivityStarterAppInventorCameraGoogleMapAndroidStartActivityActivityStarterActivityStarter1.http://beta.appinventor.mit.edu/learn/reference/other/activitystarter.html2.http://www.appinventor.tw/activitystarteroogleImage,ListPicker,ActivityStarterStep1:1.ImageScreen12.ListPickerScreen112.123.ActivityStarterScreen1ComponentsActivityStarter1Action:android.intent.action.VIEWActivityClass:com.google.android.maps.MapsActivityActivityPackage:com.google.android.apps.maps9ActivityStarter13.13Step2:1.BlocksEditor2.BuiltinVariablesInitializeglobalnametonameplaces3.BuiltinListsmakealistInitializeglobalnametoListItem6BuiltinText()makealist,,,,,(http://okgo.tw/buty/taoyuan.html)4.BuiltinScreen1ListPicker1whenListPicker1.AfterPickingdoUSERI.BuiltinScreen1ctivityStarter1setActivityStarter1.DataUritowhenListPicker1.AfterPickingdo14.14II.BuiltinTextjoinsetActivityStarter1.DataUritoIII.BuiltinTextjoingeo:0,0?q=IV.BuiltinScreen1ListPicker1Listpicker1.Selection(serItem)joinV.StartctivityGoogleMapBuiltinScreen1ctivityStarter1setActivityStarter1.StartActivitysetActivityStarter1.DataUrito5.appI.BuiltinScreen1WhenScreen1InitalizedoViewerListPickerList15.15II.Screen1ListPicker1setListpicker1.ElementtoWhenScreen1InitalizedoIII.VariablesgetglobalplacessetListpicker1.ElementtoBlocksEditor10Blocks16.16111217.17131418.181.AndroidAppInventorCAVE2.GoogleAppInventorAPP1.http://appinventor.mit.edu2.http://www.appinventor.tw/CommentsRelatedDocumentsSeemore>Chapter4DemandCategory:DocumentsChapter4:First-orderdifferentialequations...Category:DocumentsChapter4Statistik.pptCategory:DocumentsChapter4tissuesmariebpart1Category:TechnologyPpchapter4Category:EducationChapter4DifferentiationCategory:DocumentsPoweredbyCupdfPrivacyPolicyTermOfServiceAboutUsSHAREDOCUMENT×EmbedSize(px)344x292429x357514x422599x487ModaltitleLoremIpsumissimplydummytextoftheprintingandtypesettingindustry.LoremIpsumhasbeentheindustry'sstandarddummytexteversincethe1500s,whenanunknownprintertookagalleyoftypeandscrambledittomakeatypespecimenbook.CloseSavechangesNewMessageEmail:Message:Select:Alaska2345CloseSavemessageREGISTER ×UserName:FullName:Email:Password:Bycreatinganaccount,youagreetoourtermsandconditions.SubmitAlreadymember?SIGNIN>Oruseyoursocialaccount:Loading...Pleasewait!LoremIpsumissimplydummytext.ClosexOops..!Somethingwentwronghere.We'reworkingonitandwe'llgetitfixedassoonpossible.Thankyou!Youraccounthasbeencreated..Pleasecheckyourregistedemailforverification.OK



請為這篇文章評分?