ãã®è³æã«ã¯ããã®OSã®éçºäŒç€Ÿã§ããAppInventorã®ããŒã«ã«ããGoogle Androidã¢ãã€ã«ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã çšã®ã¢ããªã±ãŒã·ã§ã³ã®éçºãGoogleéçºè
ã¢ã«ãŠã³ãã®ç»é²ãäœæããã¢ããªã±ãŒã·ã§ã³ã®AndroidããŒã±ãããžã®é
眮ãæŽæ°ã®çµéšãå«ãŸããŠããŸãã
JavaãEclipseããã®ä»ã®Android SDKã®è€éããæãäžããã«ããã®OSçšã®ããªãåçŽãªããã°ã©ã ãäœæããããšã«èå³ããã人ã«ãšã£ãŠãçµéšã¯ã»ãããšããŠãéšåçã«ã圹ç«ã¡ãŸãã
ãã®ããŒãã§ã¯ïŒ
- 1.äºåæºå
- 2.ããã°ã©ã ã€ã³ã¿ãŒãã§ã€ã¹ã®éçº
- 3.ããã°ã©ã ã®ãããã¯èª¬æïŒããã°ã©ãã³ã°ïŒ
- 4.å·çãšçµæã®çµè«
1.äºåæºå
Google Android OSã§ã¢ããªã±ãŒã·ã§ã³ãäœæããã³å
¬éããã¿ã¹ã¯ãå®è¡ããã«ã¯ããã©ãŠã¶ãŒã§ããã€ãã®æäœãå®è¡ããå¿
èŠããããŸãã ãã€ã³ããèŠãŠãããŸãããã
ã Googleã«ã¢ã«ãŠã³ãããæã¡ã§ãªãå Žåã¯ãäœæããå¿
èŠããããŸãã ãããè¡ãã«ã¯ã
httpïŒ//gmail.com/ãªã©ã®ãµã€ãã«ç§»åãããã¢ã«ãŠã³ããäœæã/ãã¢ã«ãŠã³ããäœæããšããç¢æãèŠã€ããããŒãžã§èšèªåãæ¿ããèŠã€ãããªã¹ãããæ¯åœèªãéžæããããã»ã¹ã®ããã€ãã®è³ªåã«çããŸãç»é²ã ããã«ããã°ãããã¡ãŒã«ãµãŒãã¹ããããŸããå¿
èŠã«å¿ããŠãä»ã«ãå€æ°ã®äŸ¿å©ãªGoogleãµãŒãã¹ããããŸãã
b ã Google AppInventor Developer Toolkitã®ã¢ã«ãŠã³ããå¿
èŠã§ãã ãã®æ®µéã§ã¯ãGoogleã¯ããŒã«ããããžã®ã¢ã¯ã»ã¹ã誰ã«ãæäŸããŠããŸããã ãããã£ãŠãã¢ãã¬ã¹
http://appinventor.googlelabs.com/ã«ã¢ã¯ã»ã¹ããŠãGoogleã¢ã«ãŠã³ãã§ãã°ã€ã³ããèšå
¥ããŠèªåçã«éããããã©ãŒã ã§ã¢ããªã±ãŒã·ã§ã³ãéä¿¡ããå¿
èŠããããŸãã ïŒããã®ããã«ãæ¢è£œã®äŸ¿å©ãªããã°ã©ã ã ãã¯å¿
èŠãããŸãããïŒãã®ã¹ãããã®åŸãGoogleã®åæãåŸ
ã€å¿
èŠããããŸãã ç§ã¯åœŒãçŽ2é±éåŸ
ã¡ãŸããã
ååãšããŠããããã¯AppInventorã䜿çšããŠããã°ã©ã ãäœæããŸãã¯ãããã¢ã»ã³ãã«ã§ããããã«ããããã«å®è¡ããå¿
èŠãããåºæ¬çãªã¢ã¯ã·ã§ã³ã§ãã ãŸããã¢ããªã±ãŒã·ã§ã³ã®æºè¶³ãåŸ
ã€æéãç¡é§ã«ããªãããã«ããžã§ãã«å¿
èŠãªãœãããŠã§ã¢ãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ã§ããŸãïŒä»¥äžãåç
§ïŒã
éçºè
ãã¢ã»ã³ãã«ãããããã°ã©ã ã®é
åžã«é¢å¿ãããå Žåããã1ã€ã®ã¹ããããå®è¡ããå¿
èŠããããŸãã
c ã ãGoogleããããããŒãã¬ã€ã¹ã賌å
¥ããŸããã ä»æ¥ããããã®å Žæã®äŸ¡æ Œã¯ãããã25ãã«ïŒ25ç±³ãã«ïŒã§ãã å瀟ã«ããã°ããã®ãããªå¯Ÿçã¯ãAndroidãšã³ã·ã¹ãã ãããããšããã°ã©ã ã®æµãããä¿è·ããããã«èšèšãããŠããŸãã ïŒäŸã«ã€ããŠè©³ãã説æããå¿
èŠã¯ãããŸãããã»ã¯ã·ã§ã³2ã4ãèªãã§ãã ãããããããä»ã®ç®æšããããŸã...ïŒããã§ããAndroidããã°ã©ããŒãšããŠç»é²ããã«ã¯ã
httpïŒ//market.android.com/ã«ã¢ã¯ã»ã¹ããŠ
ãã ããã ãç»é²æç¶ãïŒçŸåšã¯è±èªïŒãšGoogle Checkoutã·ã¹ãã ã䜿çšããæ¯æããè¡ãå Žæã ãã®ããã«ã¯ãåœé決æžã·ã¹ãã ã®ãã©ã¹ããã¯ã«ãŒãïŒå¥é賌å
¥ïŒãå¿
èŠã§ãã ç»é²ããã»ã¹ã«ã€ããŠã¯ãã»ã¯ã·ã§ã³5ã§è©³ãã説æããŸãã
ãã ããããããã誰ããAndroidããŒã±ããã«äŸµå
¥ãããããã§ã¯ãªããããã°ã©ãã³ã°ã¹ãã«ã®ãªã人ãèªåã§ããã°ã©ã ãäœæãããã®ã§ããã®æåŸã®ç¹ã¯èª°ããå®è¡ããã¹ãã§ã¯ãããŸããã
ããã°ã©ã ãæžãããã«çŽæ¥ãããªããã°ãªããªãããšãããã€ããããŸãã Javaã¯ã©ã€ã¢ã³ãã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããAndroidãã©ã³ãžã®æ¥ç¶ãæ§æããå¿
èŠããããŸãã ãããã®æé ãå®è¡ããŠåé¡ã解決ããæ¹æ³ã«ã€ããŠã¯ã
httpïŒ//appinventor.googlelabs.com/learn/gettingstarted.htmlãã芧
ãã ãã ã æé ãç°¡åã«èª¬æããŸãã
-ã³ã³ãã¥ãŒã¿ãŒã«Javaãã€ã³ã¹ããŒã«ãããŠããªãå Žåã¯ã
httpïŒ//java.com/ããææ°ããŒãžã§ã³ãããŠã³ããŒãããŠã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ããå¿
èŠããããŸãïŒJavaãã€ã³ã¹ããŒã«ãããŠãããã©ããã¯ã
httpïŒ//www.java.com/en/download/ã§ç¢ºèªã§ã
ãŸãïŒ help / testvm.xml ãææ°ããŒãžã§ã³ã®ã€ã³ã¹ããŒã«ãæšå¥šïŒ;
-次ã«ããã©ã€ããŒãšä»ã®ãœãããŠã§ã¢ãå«ãAppInventor ExtrasãœãããŠã§ã¢ããã±ãŒãžãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã ããŸããŸãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãªã³ã¯ïŒ
Mac OS X ã
Windows ã
Linux ã éçºè
ã¯ãã€ã³ã¹ããŒã«äžã«ãã©ã¡ãŒã¿ãŒãå€æŽããªãããšããå§ãããŸãã
-æåŸã«ãé»è©±ã®ããã€ãã®èšå®ãå€æŽããå¿
èŠããããŸãã ããã§ãããã°ã©ã ãèšè¿°ããããã«é»è©±ãAppInventorã«æ¥ç¶ããå¿
èŠã¯ãŸã£ãããªãããšã«æ³šæããŠãã ãããã³ã³ãã€ã«ãããããã°ã©ã ïŒ.apkïŒã¯ãããŒã«ã®Webã€ã³ã¿ãŒãã§ã€ã¹ããããŠã³ããŒãããŠããã€ã§ãé»è©±ã«æåã§ã€ã³ã¹ããŒã«ã§ããŸãã ãã ããé»è©±ã«æ¥ç¶ãããšãæåŸã«ãªã¢ã«ã¿ã€ã ã§éçºããããããžã§ã¯ããå®è¡ãããŸããããã¯ããŸããŸãªãã°ãæ€åºããã®ã«éåžžã«äŸ¿å©ãªã®ã§ãç¶è¡ããŸãã ãã®ãããé»è©±ã§ã¯ãç»é¢ã®èªåå転ããªãã«ãïŒèšå®-ç»é¢-èªåç»é¢å転ïŒãäžæãªãœãŒã¹ããã®ã€ã³ã¹ããŒã«ãæå¹ã«ãïŒèšå®-ã¢ããªã±ãŒã·ã§ã³-äžæãªãœãŒã¹ïŒãUSBãããã°ãæå¹ã«ãïŒèšå®-ã¢ããªã±ãŒã·ã§ã³-éçº-USBçµç±ã®ãããã°ïŒãèšå®ããªãã§ãã ããã³ã³ãã¥ãŒã¿ãŒã«æ¥ç¶ãããšãã«ç»é¢ããªãã«ã§ããããã«ããŸãïŒ[èšå®]-[ã¢ããªã±ãŒã·ã§ã³]-[éçº]-[ãªã³ã®ãŸãŸ]ïŒã ãŸããé»è©±æ©ãã³ã³ãã¥ãŒã¿ãŒã«æ¥ç¶ããããšã«ãããSDã«ãŒããUSBãã©ãã·ã¥ãã©ã€ããšããŠããŠã³ãããããšã¯ãããŸããã
ãŸããé»è©±ã«æ¥ç¶ããåŸãããã°ã©ã ã¯ãµã€ãºãAppInventorPhoneApp 3.81 Mbãã€ã³ã¹ããŒã«ããããšãèæ
®ããå¿
èŠããããŸãã ç¡æã®æºåž¯é»è©±ã®ã¡ã¢ãªãå¿
èŠã«ãªããŸãã
AppInventorã§ã®å€æ°ã®æºåæäœãšã¢ããªã±ãŒã·ã§ã³ã®æ¿èªåŸãé»åã¡ãŒã«ãåãåãããã®Webã¢ããªã±ãŒã·ã§ã³ã«ã¢ã¯ã»ã¹ããŸãã åµé çãªèšç»ã®å®è£
ãéå§ã§ããŸãïŒ
2.ããã°ã©ã ã€ã³ã¿ãŒãã§ã€ã¹ã®éçº
AndroidããŒã±ããã§ã®å
¬éçšã«äœæããããšã«ããã¢ããªã±ãŒã·ã§ã³ã¯ãç©äºã®è€éãã«ããµããŠããŸããã ããã°ã©ã ã«2次æ¹çšåŒã®æ ¹ãèšç®ãããŸãã ã¢ããããŒãã«ãããããã°ã©ã ã¯ã¹ã ãŒãºã«æ¹çšåŒç³»ã解ããååã§ããã°ãäžçåŒç³»ã解ãããšãã§ããŸãã ãã¹ãŠã¯ãç«ã®é³Žã声ã®åçãäœãããããŸãã§ãã
ãã®ããã®èŠä»¶ã決å®ããŸããããã°ã©ã ã¯2次æ¹çšåŒã®æ ¹ãèšç®ãããããå°ãªããšãä¿æ°ã®å
¥åãšçµæã®åºåãå®è£
ããå¿
èŠããããŸãã
ææ¡ãããã€ã³ã¿ãŒãã§ã€ã¹ã¯ãçŽãŸãã¯ãã¬ãŒã³ããŒã·ã§ã³ã®ã¹ã±ããã§æšå®ã§ããŸãã æåã®ããŒãžã§ã³ã§ã¯ã次ã®ããã«ãªããŸãã
ãããå§ããŸãããïŒ
é»è©±ãã³ã³ãã¥ãŒã¿ãŒã«æ¥ç¶ããã«ãŒãããã©ã€ããšããŠããŠã³ãããã«ãããŒãž
http://appinventor.googlelabs.com/ã«ã¢ã¯ã»ã¹ããŠç»é²ããŒã¿ãå
¥åããããµã€ã³ã€ã³ããã¯ãªãã¯ããŠAppInventor BETAã«ã¢ã¯ã»ã¹ããŸãã
衚瀺ãããããŒãžã説æããã®ã¯ããŸãæå³ããããŸããïŒããŒãžäžéšã®äžå€®ã«ãããåŠç¿ããªã³ã¯ã®ã¿ãæçšã§ãïŒã
ãããã£ãŠããæ°èŠããã¿ã³ã倧èã«æŒããŠãæ°ãããããžã§ã¯ãã®ååã衚瀺ããããŠã£ã³ããŠã«å
¥åããŸã-uSolverãã€ãŸããŠãããŒãµã«ãœã«ããŒãã€ãŸã ãŠãããŒãµã«ãœã«ããŒïŒDeep Thoughtãšæ··åããªãã§ãã ããïŒã
ãOKããã¯ãªãã¯ããŠããèšèšãã¢ãžã¥ãŒã«ã«å
¥ããŸãã
説æãããã®ããã§ã«ãããŸãã
ãŠã£ã³ããŠã®äžå€®ã«ã¯ãéçºäžã®ã¢ããªã±ãŒã·ã§ã³ã®ã€ã³ã¿ãŒãã§ãŒã¹ããã¬ãã¥ãŒããå¶åŸ¡èŠçŽ ãéžæãããã¥ãŒã¢ãŒããã«ããããŸãïŒããã¯ãšãã¥ã¬ãŒã¿ãŒãŠã£ã³ããŠã§ãã·ãã¥ã¬ãŒã¿ãŠã£ã³ããŠã§ããããŸããïŒïŒã ã€ã³ã¿ãŒãã§ãŒã¹èŠçŽ èªäœããã³ãã®ä»ã®å¶åŸ¡æ§é ã¯ããã¬ããããââã«ã«å«ãŸããŠãããåé¡ãããŠããŸãã 䜿çšãããåã¢ã€ãã ã®èšå®ã¯ã[ããããã£]ããã«ã§å©çšã§ããŸãã ã€ã³ã¿ãŒãã§ã€ã¹èŠçŽ ã®äžè¬çãªæ§é ã¯[ã³ã³ããŒãã³ã]ããã«ã«è¡šç€ºãããèŠçŽ ãåé€ããŠååãå€æŽã§ããŸãã
ããããã¯ãšãã£ã¿ãŒãéãããã¿ã³ãã¯ãªãã¯ããŠããã«é»è©±ã«æ¥ç¶ããŠãã©ã€ããã¶ã€ã³ã®å€æŽã远跡ã§ããŸãããåããŠå¥ã®ããã¡ãã§é ãæ£ãããããšã¯ãå§ãããŸããã
ã€ã³ã¿ãŒãã§ãŒã¹ã«ã€ããŠç解ãæ·±ããŠãã ããã éå§ç»é¢ã®ã¿ã€ãã«ã®ååãå€æŽããèæ¯è²ãå€æŽããŸãïŒçœãç²ããªãããã«ïŒïŒ
ã³ã³ãããŒã«ïŒã³ã³ãããŒã«ïŒã®å Žæãå¶åŸ¡ããããã«ããç»é¢é
眮ãã®ã«ããŽãªããããŸãã äžããäžãžã®èŠçŽ ã®äžè²«ããã·ãŒã±ã³ã¹ã«èå³ããããŸãã ç®çã®ã«ããŽãªïŒKOïŒãã¡ããããããå·Šã¯ãªãã¯ïŒãéžæãããã®ã³ã³ãã³ããéããç®çã®é
眮ãååŸããŠãã¢ããªã±ãŒã·ã§ã³ã®ç»é¢ã®ç©ºã®ã¹ããŒã¹ã«ãã©ãã°ããããããã£ããã«ã§å€èŠ³ãå°ã調æŽããŸãã
ã³ã³ããŒãã³ãã®éžæã倱ãããå ŽåããViewerããŸãã¯ãComponentsãã§ãããã¯ãªãã¯ãããšãããããã£ã®èšå®ã«äœ¿çšã§ããããã«ãªããŸãã
éžæããã³ã³ã»ããã«åŸã£ãŠç»é¢ã®å¡ãã€ã¶ããå§ããŸããã...
æåã«ãã¹ãããšã¯ã解ãæ¹çšåŒã®äžè¬çãªåœ¢åŒã§ãã Labelã§ããã·ã¥ããŸãã ããã¬ããã->ãåºæ¬ã->ãã©ãã«ããéžæããé
眮å
ã«ãã©ãã°ããŠãã©ã¡ãŒã¿ãŒã調æŽããŸãã
次ã«ãä¿æ°ã®å
¥åãã£ãŒã«ãã1æ¬ã®æ°Žå¹³ç·ã«é
眮ãããããã®ã°ã«ãŒããç»é¢ã®äžå€®ã«é
眮ããå¿
èŠããããŸãã ãããè¡ãããã«ã1è¡ã«5ã»ã«ã®ããŒãã«é
眮ã䜿çšããŸãã
3ã€ã®äžå€®ã»ã«ãå
¥åãã£ãŒã«ããå æããŸãã ãããè¡ãã«ã¯ãããããã®ã»ã«äœçœ®ã«ãã£ãŒã«ãããã©ãã°ããŸãã
奜ã¿ã«åãããŠèšå®ã調æŽããããšãå¿ããªãã§ãã ããã
æ¹çšåŒã®è§£ãå°ãåºãããã«ã2ã€ã®ã³ã³ãããŒã«ãã©ãã«ããæäŸããŸãã ãããã¯ãããŒãã«ã®é
眮ãæã€ãããã¯ã®åŸã«åçŽé
眮ã§äºãã®äžã«æ¿å
¥ã§ããŸãã
ãããè¡ãããäºå®ã ã£ããã¹ãŠã®ããã§ãã ããã€ãã®å
¥åãã£ãŒã«ãïŒTextBoxïŒãšã©ãã«ïŒLabelïŒã®ååã«æ³šæãæãããã§ãã ãããã®ååã¯å°æ¥äœ¿çšãããå°ãªããšãããçš®ã®ã»ãã³ãã£ãã¯ã®è² è·ãè² æ
ããå¿
èŠããããŸããããããªããšããããã¯ã®ãã³ãŒãããã³ã³ãã€ã«ããããã»ã¹ã§èª€è§£ãçããå¯èœæ§ããããŸãã ãã ããå¿
èŠãªååã®ã¿ãå€æŽããŸããã
3.ããã°ã©ã ã®ãããã¯èª¬æïŒããã°ã©ãã³ã°ïŒ
ã€ã³ã¿ãŒãã§ã€ã¹ãäœæããããããã°ã©ã ããžãã¯ããã¢ã»ã³ãã«ãããŸãã ãããè¡ãã«ã¯ã[ãããã¯ãšãã£ã¿ãŒãéã]ãã¿ã³ãã¯ãªãã¯ããŸãã
ãã©ãŠã¶ã¯ç¹å®ã®ãã¡ã€ã«ãããŠã³ããŒãããå¿
èŠããããŸããããã¯ã以åã«ã€ã³ã¹ããŒã«ãããJavaã䜿çšããŠéãå¿
èŠããããŸãã éåžžããã¹ãŠã®ã¢ã¯ã·ã§ã³ã¯èªåçã«è¡ãããŸãã éå§åŸãJavaã¯ãäºåã«ããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããAppInventors Extraãã¡ã€ã«ã®å Žæãå°ããå ŽåããããŸãã
é»è©±ãžã®æ¥ç¶ãæäŸããå¿
èŠãããå Žåã¯ãæäœãå®è¡ããå¿
èŠãããããšã«æ³šæããŠãã ããã æ¥ç¶ãäžèŠãªå Žå-ããã£ã³ã»ã«ããã¯ãªãã¯ããŸãã
ãŸããBlock Editorã®èªã¿èŸŒã¿ããã»ã¹ã¯é«éã§ã¯ãããŸããããããã«ã€ããŠå¿é
ããå¿
èŠã¯ãããŸããã
ãã¡ãããæ¥ç¶ãå¿
èŠãªå Žåã¯ãèµ·ååŸã«ãé»è©±ã«æ¥ç¶ããã¯ãªãã¯ããŸãã é»è©±ãžã®æ¥ç¶ããœãããŠã§ã¢ã®ã€ã³ã¹ããŒã«ãããã³éçºãããããã°ã©ã ã®èµ·åããããŸãããåäœããŸããã
ãã¹ãŠãããŸãããã°ããããã¯ãšãã£ã¿ã«æ»ããŸãã
ãããã¯ãšãã£ã¿ãŒã€ã³ã¿ãŒãã§ã€ã¹ã¯ãã·ã³ãã«åããã€ã³ã¿ãŒãã§ã€ã¹ãšãã£ã¿ãŒã€ã³ã¿ãŒãã§ã€ã¹ã«éåžžã«äŒŒãŠããŸãã ãã«ãã€ã³ãããã¯ïŒãã«ãã€ã³ïŒã«ã¯ãã³ã³ãããŒã«ãããã¯ãMy Blocksãããã¯ãå«ãŸããããã°ã©ã ã€ã³ã¿ãŒãã§ã€ã¹èŠçŽ ãšå¯Ÿè©±ããŸãã ãã¹ãŠãæ確ã«ãªã£ãããã§ã¯ãªãå Žåã¯ãããã¹ãã®çµéãç解ããããšãå¯èœã«ãªããŸãã次ã«ãããžãã¹ã«åãæãããŸãããã
ãŸããããã€ãã®å€æ°ãå®çŸ©ããŸã-æ¹çšåŒã®ä¿æ°ãšãã®æ ¹ïŒaãbãcãx1ãx2ã ãããè¡ãã«ã¯ãçµã¿èŸŒã¿ã®ãçµã¿èŸŒã¿ããããã¯ã®ã¿ãã§ãå®çŸ©->å€æ°ãéžæãããã®ãããã¯ã空ã®ãã£ãŒã«ãã«ãã©ãã°ããŸãã ãaãã®ãå€æ°ããã¯ãªãã¯ããŠååãå€æŽããå€æ°ã®ã¿ã€ããèšå®ããŸã-æ°åãæ·»ä»ã®æããè¶è²ã®ãããã¯ã®è³ªåãæããã¡ãã¥ãŒã§ã123ããéžæããŸãã å€æ°ã®ããã©ã«ãå€ã¯ãã123ããã¯ãªãã¯ããŠã123ãã§ã¯ãªãã0ããå
¥åããããšã§ã0ãã«èšå®ãããŸããå€ãå
¥åããããEnterããŒãæŒããŠãã ããã
æ®ãã®å€æ°ã«å¯ŸããŠåãæé ãç¹°ãè¿ããŸãã æ®å¿µãªããããããã¯ãã³ããŒããæ¹æ³ãèŠã€ããããªãã£ãã®ã§ããããšäžã®ããã€ãã®å Žæã§ææ
¢ããå¿
èŠããããŸãïŒéçºè
ã¯é¢å¿ã®ãããŠãŒã¶ãŒããéç¥ãããæ¢ã«ãããã¯ã®ã³ããŒ/貌ãä»ãã«åãçµãã§ãããšèšã䟡å€ããããŸãïŒ
ããã§ãå€æ°aãbãcã«ã¯ããŠãŒã¶ãŒãå
¥åããå€ãå²ãåœãŠãå¿
èŠããããŸãã å€æ°aããå§ããŸãããã
ãMy Blocksãã¿ãã§ãAããããã¯ïŒããã¯ä¿æ°aã®å€ãå
¥åããããã®ããã¹ããã£ãŒã«ãã§ãïŒãéžæãããA.LostFocusãã³ã³ã¹ãã©ã¯ãã空ã®ã¹ããŒã¹ã«ãã©ãã°ããŸãïŒãã®kagbeã¯ãããã¹ããã£ãŒã«ããTã倱ããšãããã¯ãå®è¡ãããããšãæå³ããŸãïŒãã©ãŒã«ã¹ãã€ãŸããŠãŒã¶ãŒãå¥ã®ã³ã³ãããŒã«èŠçŽ ã«åãæ¿ããŸãïŒã ãMy Definitionsããã£ãŒã«ãã§ãset global a toãã³ã³ã¹ãã©ã¯ããéžæãããA.LostFocusããããã¯å
ã«ãã©ãã°ããŠåºå®ããŸãïŒããã¯ç¹åŸŽçãªãµãŠã³ãã§çºçããŸãïŒã 次ã«ãããäžåºŠãAããããã¯ãã¯ãªãã¯ãããA.Textãã³ã³ã¹ãã©ã¯ãããglobal global toãããºã«ã«ããã¢ãŠãã«ãã©ãã°ããŸãã ãã®çµæã次ã®ããã«ãªããŸãïŒããã»ã¹ã¯ã³ã³ããŒãã³ããBãã®äŸã«ç€ºãããŠããŸãïŒã
ãã®ãããŒãã£ãŒãã¯ããã©ãŒã«ã¹ãä¿æ°ãaãã®å
¥åãã£ãŒã«ãã«ãã£ãŠå€±ããããšãå€æ°ãaãã«ãã®ãã£ãŒã«ãã«å«ãŸããããã¹ããå²ãåœãŠãããããšãæå³ããŸãã ãããã¯ãBããšãCãã«ã€ããŠåãæé ãç¹°ãè¿ããŸãã
次ã®ã¹ãããã§ã¯ãå€æ°x1ãšx2ãå®çŸ©ããŸãã æ¹çšåŒã®æ ¹ãèŠã€ããŸãã
ç§ã®ç¥ãéããAppInventorã®çŸåšã®ããŒãžã§ã³ã«æ°åŠèšç®ãå®è£
ããããšã¯ãç§ãæžããåŒã ãã§ã¯ãããŸããã æé ããã§ã³ã¹ããè¿œå ã®å€æ°ãå°å
¥ããŸã...
å€å¥åŒã®å€ïŒ
D = b ^ 2-4ac ïŒãèšç®ããŸãããã®ãããå€æ°aãbãcãx1ãx2ã«æå®ãããã¹ããŒã ã«åŸã£ãŠè¿œå ã®æ°å€å€æ°ãDããå°å
¥ããèšå®ãããã°ããŒãã«DãåãåºããŠã¯ãŒã¯ã¹ããŒã¹ã«ãããã¯ããŸãã ããã§æãäžæå¿«ãªããšãå§ãŸããŸãïŒã·ãŒã±ã³ã¹å
ã®æ°åŠæŒç®åãçµã¿åãããŠç®çã®å€ãèšç®ããŸã-çµã¿èŸŒã¿-> Mathãããã¯ããå¿
èŠãªæŒç®åãåŒãåºãããããã¯ããã°ããŒãã«Dã®ã¹ãããã«é
眮ããŸãã å¿
èŠãªå€æ°ãæŒç®åã®åŒæ°ã«ä»£å
¥ããŸãã ããã¯ãããããèšèã§èª¬æãããããåçã§èŠãæ¹ãç°¡åã§ãïŒ
ãã³ãïŒå€å¥åŒã¯äž»ã«éãã§ããããšãç解ããå¿
èŠããããŸãã bã«ãã補åbãšcã«ãã補åaã«ãã補å4ã®å·®ã 4ã¯æ°å€å®æ°ã§ãã
ã¡ãªã¿ã«ã空ã®ã¹ããŒã¹ãå·Šã¯ãªãã¯ããŠæ°å€å®æ°ãååŸããããã§[æ°åŠ]-> [123]ãéžæãããã®123ãç®çã®æ°å€ã«çœ®ãæãããšäŸ¿å©ã§ãã ä»ã®ãã¹ãŠã®çµã¿èŸŒã¿ãããã¯ã§ãåãããšãã§ããŸãïŒ
ä»ã®ãšãããå€å¥åŒã®ç¬Šå·ã®æ€èšŒãå°å
¥ãããäœã§ã«ãŒããèšç®ããŸãã
ã»ããã®ã°ããŒãã«x1ãæœåºããŠMy Definitionsãã空ã®ã¹ããŒã¹ã«æ§ç¯ããåŒ
x1 =ïŒ-b + sqrtïŒDïŒïŒ/ïŒ2 * aïŒã«åŸã£ãŠå€æ°x1ã®å€ãååŸããŸãã x2ã§ãåãããšãè¡ããŸããããã§ã
x2 =ïŒ-b-sqrtïŒDïŒïŒ/ïŒ2 * aïŒã§ãã
ããã§ãå¿
èŠãªãã¹ãŠã®å€ãèšç®ãããŸããã
æ¹çšåŒä¿æ°ã®å
¥åãã£ãŒã«ãã®ããããã®ããã©ãŒã«ã¹ãã倱ã£ãåŸã«ã«ãŠã³ããããã«ãŒããè¿ããããšæ³å®ãããŠãããããã³ããŒïŒããŒã¹ãããªãå ŽåããåŒããããã«æ°åå
¥åããã®ã¯éåžžã«é¢åãªã®ã§ãããLostFocusããããã¯ã§åŒã³åºãæé ãèšè¿°ããŸãã
å§ããŸãããã Built-In-> Definition-> procedureãããã¯ãåŒãåºããX12ã«ååãå€æŽãïŒãprocedureããšããåèªãã¯ãªãã¯ããŠïŒãBuilt-In-> Definition-> nameãããã¯ããargãã¹ãããã«åºå®ãããaxãããbx "ã" Cx "ïŒãã¹ãŠã®å€æ°ã¯ã°ããŒãã«ã§ãããããååã®å€æŽãå¿
èŠã§ãïŒã
æé ã®äžã§ãèšç®ãDãããx1ãããx2ããããã³My Blocks-> X1-> "set X1.Text to"ãããã¯ããã¹ãããã«ã«ãŒãå€x1ïŒMy Blocks-> My Definitions- >ã°ããŒãã«x1ïŒããã³ããã¹ãã©ãã«ãX2ãã«ã€ããŠãåæ§ïŒ
ãã®æé ã¯ãããã©ãŒã«ã¹ã®åªå€±ãã®åãããã¯ã§åŒã³åºããŸãã åŒã³åºãã¯ãMy Blocks-> My Definitions-> call "X12 block"ã§ãã©ã¡ãŒã¿ãŒ "global a"ã "global b"ãããã³ "global c"ã䜿çšããŠè¡ãããŸãã
äžã®åçã¯ããA.LostFocusããããã¯ãå解ãããã®ã³ã³ãã³ãã®ãã§ãŒã³ã空ãã¹ããŒã¹ã«æ§ç¯ããããšã瀺ããŠããŸãã ããã¯ãããã·ãŒãžã£ã³ãŒã«ããã§ãŒã³å
ã®é©åãªå Žæã«é
眮ããã®ãç§ã«ãšã£ãŠããªãé£ããã£ããšããäºå®ã«ãããã®ã§ãã ãã®ãããªåé¡ã¯éåžžã«é »ç¹ã«çºçãããããåŒã³åºãã®å€åŽã§ãããã¯ã®ãã§ãŒã³ãæ§æãããã¹ãŠãå
åŽã«æ¥ç¶ããæ¹æ³ãèŠã€ããŸããã
ãŸã£ããåãåŒã³åºããæ®ãã®ãããã¯.LostFocusã«é
眮ãããŸãã æåŸã«ããã¹ãŠã次ã®ããã«ãªããŸãã
é»è©±ã§ã¯ãæ¹çšåŒx ^ 2-9x + 20 = 0ã解ããšæ¬¡ã®ããã«ãªããŸãã
ããã«ãäžéšã®ã³ã³ãããŒã«ã®èšå®ã®æ¬ é¥ããªããªããŸãã...æŽæ°æã«ä¿®æ£ãããã®ããããŸãã
é»è©±ãã³ã³ãã¥ãŒã¿ãŒã«æ¥ç¶ãããŠããªãå Žåã¯ãAppInventor Webã€ã³ã¿ãŒãã§ã€ã¹ã§ã¢ããªã±ãŒã·ã§ã³ãã³ã³ãã€ã«ããããŒã³ãŒããäœæã§ããŸãã
ã¢ããªã±ãŒã·ã§ã³ãäœæãããŸãããããã€ãã®çµè«ãåºããŸãããã
4.äœæããã»ã¹ãšçµæã®çµè«
Googleã¯ãè€éãªã¢ããªã±ãŒã·ã§ã³ã§ãããäœæã§ããªãéåžžã«ã·ã³ãã«ãªããŒã«ãæäŸããŠãããšèšããŸãã ãã®ããŒã«ã¯ç¢ºãã«æªå å·¥ã§ãããSDKã«ã¯å€ãã®é¢æ°ãã¡ãœãããããã³ãã¹ãŠã¯ãããŸããã ãã ããGoogleããŒã ã¯å€ãã®æ°æ©èœãå®è£
ããææ¡ãšèšç»ã«å¯Ÿå¿ããŠããŸãã
http://code.google.com/p/app-inventor-for-android/ã§ææ¡ãæ°ã¥ãããã°ã衚瀺ããã³è¿œå ã§ã
ãŸã ã
ç§ã®æèŠãšçŸæç¹ã§ã®äž»ãªæ¬ ç¹ïŒãã«ãïŒMon Sep 27 17:51:06 2010ïŒ1285635066ïŒ-17446992ïŒïŒ
- è±èªä»¥å€ã®èšèªã¯ãµããŒããããŠããŸããã ããã¯ãAppInventorã€ã³ã¿ãŒãã§ãŒã¹ã ãã«é©çšãããããã§ã¯ãããŸãã...ã¢ããªã±ãŒã·ã§ã³åããã®äžã®ããã¹ããç°ãªãããšã¯ã§ããŸããïŒä¿®æ£ãå¿
èŠã§ãïŒã
- å®æããã¢ããªã±ãŒã·ã§ã³ã¯èšå€§ãªéã®ã¡ã¢ãªãæ¶è²»ããŸãã ããšãã°ããã®ã¢ããªã±ãŒã·ã§ã³ã¯1.2 MBãå æããé»è©±ã®ã¡ã¢ãªã§ã¯ãã¹ãŠ3.8ïŒ ããã¯ãããã°ã©ã ã§äœ¿çšãããŠããªããã¹ãŠã®ïŒïŒïŒã³ã³ããŒãã³ããå®è¡å¯èœãã¡ã€ã«ã«åã蟌ãããã§ãã éçºè
ã¯ãç©äºãä¿®æ£ããçŽæãç¥ã£ãŠããŸãã
- ã³ããŒ/貌ãä»ããã¢ã€ã³ã³ã眮ãæããããšãã§ããªããªã©ãããããçš®é¡ã®ããããªããšã
ãããããã®ãããªæ¬ ç¹ã«ããããããããã®ããŒã«ã«ã¯äœå°ããããšæããŸããSDKã«é£ã³èŸŒãããšãªãããã ããªãããã°ã©ã ãäœæããããšã¯ã§ããªãããã§ãã
ãããã«ãããAndroidããŒã±ããã§å©çšå¯èœãªgovnoprogããã®ä¿è·ã¯ãéçºè
ã®å ŽæãååŸããããã®æéã«ãªããŸãã ãããåã25ãã«ã
ãšããã§ãç§ãã¡ãããã«èªåã®åµé ç©ãçªãåºãæã§ã¯ãããŸãããïŒ..