Copyrighted Material
Total Page:16
File Type:pdf, Size:1020Kb
Index Index alloc_root function, 571–572 A alloc function, 572 abstract classes, 119–120 alternation, regular expressions, 220 abstract methods, 119–120 anchors, regular expressions, 217–218 abstract value types, 35–36 AND (&), bitwise operator, 56, 62 dynamic type, 35–36 AND (&&), logical comparison operator, 59 garbage collection, 572–573 animation, Neko Media Engine (NME), 549 Neko and C/C++, 563–565 anonymous keyword, 28 null type, 35 anonymous objects, 126–127 void type, 35 declaring, syntax for, 126 accessor methods, with dynamic typedef, use with, 128–130 keyword, 113 Apache web server Action Message Format (AMF) installing on Linux Ubuntu, 233–234 server, 426 installing on Windows, 232–233 Flash-to-AMF server connection, 434 application programming interface (API) ActionScript Flash API classes, 359–361 and Flash, 316 Flash drawing API, 337–342 compared to haXe. See ActionScript/haXe haXe API, 206–208 comparison reflection API, 464–469 Screen Weaver HX extensions, 523–524 Remoting API communication methods, synchronous communication in, 523–524 427–428 version 3 and Flex 2, 344 serialization API, 473–474 ActionScript/haXe comparison arctic project, 146 classes, 357–359 arithmetic operators. See binary constant values/special values, 346–347 operators data types, 344–346 array(s), 40–45 functions, top-level, 347–352 adding/removing items from, 42–43 keywords, 354–358 array access operator, 352 operators, 352–353 array fields/descriptions, 41–42 properties, 356 concatenating, 45 statements, 354–358 converted to strings, 68 structures, 354–358 converting string to, 67 trace, 181 copying, 44–45 ActionScript Virtual Machine 2, 316 data type, changing, 41 ActionStep library, 369 functions of, 41 add hash tables, 48–50 lists, 47 COPYRIGHTEDinitializing MATERIAL with literal values, 41 strings, 71–72 instantiating, 41 addChar, 71–72 iterator, creating, 98 addition (+), binary operator, 55 lambda class for modifying, 96–98 addSub, 71 lists, 46–48 Adobe Flash CS3, benefits to use, 363 multidimensional, 45–46 Adobe Flex library, 369 Neko and C/C++, 567–568 AIR, 510 sort method, 96 AJAX, 228, 414–422 typing rules for, 40 auto-complete control, building, 417–422 values, conversion methods, 43–44 functions of, 414 array method, lambda class, 98 HTML panel content, updating, 416–417 Array string, 66 bbindex.inddindex.indd 660303 112/27/072/27/07 112:16:012:16:01 PPMM aspell project aspell project, 146 buttons assignment operators Flash user interface, 376, 377 types of, 56 nGui, 488–489 uses of, 59–60 byte(s) asterisk, block commenting, 37 bytecode, Neko, 156–157 AsWing library, 369 extracting from stream, 306 asynchronous communications, 426 readBytes method, 306 AsyncAdapter, 437 writeBytes method, 308–309 AsyncConnection, 432–434, 440 AsyncDebugConnection, 437 AsyncProxy, 438 Flash-Neko communication, 518–520 C attr expressions, Templo, 262 attributes, HTML, 589–601 CalcProxy class, 438 attribute descriptions, 590–599 calculation expressions, 253 attribute groups, 589 callback attribute value types, 600–601 macros in templates, 256–257 attributes, XML nGui List control, 491–492 accessing, 457–458 callStack function, 191–193, 196–199 checking, 461–462 carriage return, escaped characters, 34 Author class, SPOD system, 287–288, case keyword, and switch statements, 77 296–297, 299 casting, 38–40 AuthorManager class, SPOD system, 300–301 cast function, operation of, 38–39 auto-complete control, building, AJAX conversion methods, types of, 39–40 technique, 417–422 type of value, comparing, 40 unsafe cast, 38–39 catchall block, for exceptions, 189 caurinaTweener project, 146 B C/C++, with Neko. See Neko and C/C++ ceil, float to int conversion, 66 back-references, regular expressions, 214, 220 Chapter class, SPOD system, 296–297, 299–300 backward slash, escaped characters, 33–34 ChapterManager class, SPOD system, 300–301 baseEncode, 69 character(s) bfailure function, 574 patterns, regular expressions, 214–215 BinaryNode class, 123 readChar method, 305–306 binary operators, 56–58 serialization, 473–474 increment/decrement, 57–58 writeChar method, 308 modulo operator, 57 character classes order of precedence, 56–57 non-alphanumeric characters, 217 Bit Block Transfer, 540 range of values, 216 bitwise mathematics, utility of, 60 regular expressions, 215–217 bitwise operators, 60–63 syntax for, 216 filtering bits, 62–63 character sets, regular expressions, 217 shifting bits, 61–62 charAT, 66–67 block commenting, 37 charCodeAt, 66–67 blog entry, constructors, use of, 108–110 Check class, XML, 458 bool child controls, Flash user interface, 376–381 standard data type, 28 chr, type data conversion, 39 type data conversion, 39 class(es), 102–103, 122–126 Boolean(s) abstract classes, 119–120 functions of, 33 ActionScript/haXe comparison, 357–359 restrictions in haXe, 33 advanced, 122 boot classes, magic, 475 exception class, 194–199 break, with loops, 84–85 extensions, use of, 133–134 bseDecode, 69 extern classes, 150, 160 buffers, display buffer, flipping, 535–536 functions, 102–103 builtins, Neko, 477 functions of, 102 604 bbindex.inddindex.indd 660404 112/27/072/27/07 112:16:022:16:02 PPMM division ( /) Index implementing, 123 continue, with loops, 84–85 name, elements of, 102 Control class, nGui, 485–487 public and private, 102 controls syntax for, 102 auto-complete control, AJAX technique, 414–422 template class, 252 Flash user interface, 375–376 type parameters, 123–126 HTML, 585–586 variables, 102–103 nGui library, 482 class blocks, HaXe program structure, 23 copying, arrays, 41, 44–45 class functions, 85–90 createDirectory method, Neko, 303 functions of, 85 createdOn, 112, 122 structure of, 85–86 crytpographic hashes, 224 class keyword, 28 clear, lists, 47 clear function, trace, 184 code D documenting, 166–170 libraries, 145–162 databases, Neko. See Neko database support packages, 139–145 data converstion, casting, 38–40 resources, 163–166 data types, ActionScript/haXe comparison, unit testing, 170–177 344–346 collection(s) date/time, 50–54 functions in, 94–96 components of, retrieving, 52–53 items, accessing directly, 83 date method/descriptions, 50–51 looping over, 81–82 date objects, creating, 51–52 collisions, detecting, Neko Media Engine (NME), 543–545 delta( ) function, 53 color key, Neko Media Engine, 540 format( ) function, 53–54 commenting getMonthDays( ), 54 block commenting, 37 tokens/descriptions, 54 HTML, 588 dbName method, 281 line commenting, 37 dcxml project, 146 regular expressions, 220–221 debugging, 179–199 comparison expressions, templates, 253 exception class, 194–198 comparison operators, logical comparison operator, exceptions, 185–194 58–59 trace, 179–185 compiler directives, functions of, 6 declarations, variables, 29–30 concatenation, arrays, 41, 45 decrement (--), binary operator, 55, 57–58 conditional(s), regular expressions, 220–221 default conditional statements, 74–79 haXe standard library, 145 if statement, 74–77 variable value modifier, 111 switch statement, 77–78 default case, 135 values, returning from, 78–79 default keword, and switch statements, 78 config project, 148 delayed actions, timer, 223 configStr, 68 DelayedConnection, 437 confirm message box, SysTools, 530 deleteDirectory method, Neko, 303 Connection class, Neko database support, 277–278 deleteFile method, Neko, 303 constant values, ActionScript/haXe comparison, 346–347 delimiters, string(s), 67 constant variables, 31 delta function, dates, 53 constraint parameters, 125–126 dialogs, SysTools, 529–530 constructor(s), 108–110 directory management constructor arguments, 136–138 create/delete directory, 303 enum arguments, 136–138 Neko, 303–304 of instance variables, 108–110 reading from directory, 303–304 overriding in inheritance, 118 display buffer, flipping, 535–536 syntax for, 108 division (/) containers binary operator, 55 Flash user interface, 376–377 divide by zero issue, 64–65 nGui, 487–488 modulo operator, 55, 57 605 bbindex.inddindex.indd 660505 112/27/072/27/07 112:16:032:16:03 PPMM DNS (Domain Name Server) DNS (Domain Name Server), 227 catchall block, 189 documentation of code, 166–170 catching exceptions, 187–189 offline, 167–169 complex, dealing with, 189–190 online, 169–170 elements of, 185–186 document definition elements, HTML, 577–578 exception class, 194–199 Document Object Model (DOM), 392–396 exceptionStack function, 193–194, 196 definitions in file, 393 manifestation of, 186–187 typedef declarations, 394–396 throwing exceptions, 188 Document Type Definition (DTD), 229–230 unexpected, catching, 191 Dojo toolkit, 399 exception class, 194–199 dot expressions, 253–254 code for, 197–199 double quotes, escaped characters, 34 creating, 194–195 dowhile loop, 80–81 debug functionality, 195–197 drag events, 515 generic output function, 197 drawing excerpt variable, 112 to display, Neko Media Engine (NME), 538–540 execute method, Web development, 242 Flash API, 337–342 exists method, 303 dynamic hash method, 49 functions, 87–88 explicit import, 142–143 keyword, accessor methods with, 113 expressions, regular. See regular expressions links, Flash, 154–156 extensions, 133–134 standard data type, 28 with classes, 133–134 variable value modifier, 111 with typedef, 134 dynamic type, 127–133 external libraries, 150–162 parameters, 127–128 extern classes, 150, 160 typedef, 128–131 Flash, 151–156 using, 35–36 JavaScript, 159–162 dynamic typing, variables, 29 Neko, 156–158 Ext library, 400 E F element Flash user interface, 374–375 failure function, 573–574 HTML, 226–227 fash package project, 146 else keyword, and if statement, 75–76 Fast