home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 4f 62 | 6a 43 4d 65 74 68 6f 64 |ts of Ob|jCMethod|
|000000b0| 20 6f 62 6a 65 63 74 73 | 3c 2f 54 49 54 4c 45 3e | objects|</TITLE>|
|000000c0| 0a 0a 3c 4d 45 54 41 20 | 48 54 54 50 2d 45 51 55 |..<META |HTTP-EQU|
|000000d0| 49 56 3d 22 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |IV="Cont|ent-Type|
|000000e0| 22 20 43 4f 4e 54 45 4e | 54 3d 22 74 65 78 74 2f |" CONTEN|T="text/|
|000000f0| 68 74 6d 6c 3b 20 63 68 | 61 72 73 65 74 3d 75 74 |html; ch|arset=ut|
|00000100| 66 2d 38 22 3e 0a 3c 4d | 45 54 41 20 4e 41 4d 45 |f-8">.<M|ETA NAME|
|00000110| 3d 22 76 69 65 77 70 6f | 72 74 22 20 43 4f 4e 54 |="viewpo|rt" CONT|
|00000120| 45 4e 54 3d 22 77 69 64 | 74 68 3d 64 65 76 69 63 |ENT="wid|th=devic|
|00000130| 65 2d 77 69 64 74 68 2c | 20 69 6e 69 74 69 61 6c |e-width,| initial|
|00000140| 2d 73 63 61 6c 65 3d 31 | 2e 30 22 3e 0a 3c 4d 45 |-scale=1|.0">.<ME|
|00000150| 54 41 20 4e 41 4d 45 3d | 22 47 65 6e 65 72 61 74 |TA NAME=|"Generat|
|00000160| 6f 72 22 20 43 4f 4e 54 | 45 4e 54 3d 22 4c 61 54 |or" CONT|ENT="LaT|
|00000170| 65 58 32 48 54 4d 4c 20 | 76 32 30 32 32 22 3e 0a |eX2HTML |v2022">.|
|00000180| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 53 54 59 4c |.<LINK R|EL="STYL|
|00000190| 45 53 48 45 45 54 22 20 | 48 52 45 46 3d 22 6c 69 |ESHEET" |HREF="li|
|000001a0| 62 4f 62 6a 43 2e 63 73 | 73 22 3e 0a 0a 3c 4c 49 |bObjC.cs|s">..<LI|
|000001b0| 4e 4b 20 52 45 4c 3d 22 | 6e 65 78 74 22 20 48 52 |NK REL="|next" HR|
|000001c0| 45 46 3d 22 6e 6f 64 65 | 35 5f 6d 6e 2e 68 74 6d |EF="node|5_mn.htm|
|000001d0| 6c 22 3e 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 70 |l">.<LIN|K REL="p|
|000001e0| 72 65 76 69 6f 75 73 22 | 20 48 52 45 46 3d 22 6e |revious"| HREF="n|
|000001f0| 6f 64 65 33 5f 6d 6e 2e | 68 74 6d 6c 22 3e 0a 3c |ode3_mn.|html">.<|
|00000200| 4c 49 4e 4b 20 52 45 4c | 3d 22 75 70 22 20 48 52 |LINK REL|="up" HR|
|00000210| 45 46 3d 22 6e 6f 64 65 | 31 5f 6d 6e 2e 68 74 6d |EF="node|1_mn.htm|
|00000220| 6c 22 3e 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 6e |l">.<LIN|K REL="n|
|00000230| 65 78 74 22 20 48 52 45 | 46 3d 22 6e 6f 64 65 35 |ext" HRE|F="node5|
|00000240| 5f 6d 6e 2e 68 74 6d 6c | 22 3e 0a 3c 2f 48 45 41 |_mn.html|">.</HEA|
|00000250| 44 3e 0a 20 0a 3c 42 4f | 44 59 20 62 67 63 6f 6c |D>. .<BO|DY bgcol|
|00000260| 6f 72 3d 22 23 66 66 66 | 66 66 66 22 20 74 65 78 |or="#fff|fff" tex|
|00000270| 74 3d 22 23 30 30 30 30 | 30 30 22 20 6c 69 6e 6b |t="#0000|00" link|
|00000280| 3d 22 23 39 39 34 34 45 | 45 22 20 76 6c 69 6e 6b |="#9944E|E" vlink|
|00000290| 3d 22 23 30 30 30 30 66 | 66 22 20 61 6c 69 6e 6b |="#0000f|f" alink|
|000002a0| 3d 22 23 30 30 66 66 30 | 30 22 3e 0a 0a 3c 48 32 |="#00ff0|0">..<H2|
|000002b0| 3e 3c 41 20 49 44 3d 22 | 53 45 43 54 49 4f 4e 30 |><A ID="|SECTION0|
|000002c0| 30 30 31 33 30 30 30 30 | 30 30 30 30 30 30 30 30 |00130000|00000000|
|000002d0| 30 30 30 22 3e 0a 4f 62 | 6a 43 4d 65 74 68 6f 64 |000">.Ob|jCMethod|
|000002e0| 20 6f 62 6a 65 63 74 73 | 3c 2f 41 3e 0a 3c 2f 48 | objects|</A>.</H|
|000002f0| 32 3e 0a 0a 3c 50 3e 0a | 41 6e 20 4f 62 6a 43 4d |2>..<P>.|An ObjCM|
|00000300| 65 74 68 6f 64 20 69 6e | 73 74 61 6e 63 65 20 69 |ethod in|stance i|
|00000310| 73 20 72 65 74 75 72 6e | 65 64 20 77 68 65 6e 20 |s return|ed when |
|00000320| 79 6f 75 20 61 73 6b 20 | 74 6f 20 61 6e 20 4f 62 |you ask |to an Ob|
|00000330| 6a 43 4f 62 6a 65 63 74 | 20 61 0a 70 61 72 74 69 |jCObject| a.parti|
|00000340| 63 75 6c 61 72 20 73 65 | 6c 65 63 74 6f 72 2e 20 |cular se|lector. |
|00000350| 42 79 20 60 60 63 61 6c | 6c 69 6e 67 27 27 20 69 |By ``cal|ling'' i|
|00000360| 74 2c 20 79 6f 75 20 65 | 78 65 63 75 74 65 20 74 |t, you e|xecute t|
|00000370| 68 65 20 61 73 73 6f 63 | 69 61 74 65 64 0a 4f 62 |he assoc|iated.Ob|
|00000380| 6a 65 63 74 69 76 65 2d | 43 20 6d 65 74 68 6f 64 |jective-|C method|
|00000390| 2e 20 49 74 20 6b 6e 6f | 77 73 20 61 62 6f 75 74 |. It kno|ws about|
|000003a0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 61 | the num|ber of a|
|000003b0| 72 67 75 6d 65 6e 74 73 | 20 74 68 65 0a 73 65 6c |rguments| the.sel|
|000003c0| 65 63 74 6f 72 20 61 63 | 63 65 70 74 73 2c 20 61 |ector ac|cepts, a|
|000003d0| 6e 64 20 74 68 65 69 72 | 20 74 79 70 65 2c 20 73 |nd their| type, s|
|000003e0| 6f 20 74 68 61 74 20 69 | 74 27 73 20 61 62 6c 65 |o that i|t's able|
|000003f0| 20 74 6f 20 63 6f 6e 76 | 65 72 74 20 61 0a 50 79 | to conv|ert a.Py|
|00000400| 74 68 6f 6e 20 76 61 6c | 75 65 20 74 6f 20 61 20 |thon val|ue to a |
|00000410| 73 75 69 74 61 62 6c 65 | 20 43 20 76 61 6c 75 65 |suitable| C value|
|00000420| 2c 20 61 6e 64 20 76 69 | 63 65 76 65 72 73 61 2e |, and vi|ceversa.|
|00000430| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 77 68 | For exa|mple, wh|
|00000440| 65 6e 20 61 0a 73 65 6c | 65 63 74 6f 72 20 74 61 |en a.sel|ector ta|
|00000450| 6b 65 73 20 61 20 73 74 | 72 75 63 74 20 76 61 6c |kes a st|ruct val|
|00000460| 75 65 2c 20 79 6f 75 20 | 61 63 74 75 61 6c 6c 79 |ue, you |actually|
|00000470| 20 66 65 65 64 20 69 74 | 20 61 20 50 79 74 68 6f | feed it| a Pytho|
|00000480| 6e 0a 74 75 70 6c 65 20 | 6f 62 6a 65 63 74 2c 20 |n.tuple |object, |
|00000490| 74 68 65 6e 20 74 68 65 | 20 4f 62 6a 43 4d 65 74 |then the| ObjCMet|
|000004a0| 68 6f 64 20 77 69 6c 6c | 20 63 6f 6e 76 65 72 74 |hod will| convert|
|000004b0| 20 74 68 61 74 20 74 75 | 70 6c 65 20 74 6f 20 74 | that tu|ple to t|
|000004c0| 68 65 20 6e 65 65 64 65 | 64 0a 43 20 73 74 72 75 |he neede|d.C stru|
|000004d0| 63 74 20 76 61 6c 75 65 | 3b 20 69 66 20 69 74 20 |ct value|; if it |
|000004e0| 72 65 74 75 72 6e 73 20 | 61 20 63 68 61 72 20 2a |returns |a char *|
|000004f0| 20 76 61 6c 75 65 2c 20 | 79 6f 75 20 61 63 74 75 | value, |you actu|
|00000500| 61 6c 6c 79 0a 72 65 63 | 65 69 76 65 20 61 20 73 |ally.rec|eive a s|
|00000510| 74 61 6e 64 61 72 64 20 | 50 79 74 68 6f 6e 20 73 |tandard |Python s|
|00000520| 74 72 69 6e 67 20 6f 62 | 6a 65 63 74 2e 20 54 68 |tring ob|ject. Th|
|00000530| 65 20 73 61 6d 65 20 74 | 72 61 6e 73 6c 61 74 69 |e same t|ranslati|
|00000540| 6f 6e 20 68 61 70 70 65 | 6e 73 0a 66 6f 72 20 43 |on happe|ns.for C|
|00000550| 20 61 72 72 61 79 73 2e | 20 4f 74 68 65 72 20 74 | arrays.| Other t|
|00000560| 79 70 65 73 20 67 65 74 | 20 74 72 61 6e 73 6c 61 |ypes get| transla|
|00000570| 74 65 64 20 61 73 20 79 | 6f 75 27 64 20 65 78 70 |ted as y|ou'd exp|
|00000580| 65 63 74 2c 20 65 78 63 | 65 70 74 20 66 6f 72 0a |ect, exc|ept for.|
|00000590| 63 68 61 72 20 76 61 6c | 75 65 73 2c 20 74 68 61 |char val|ues, tha|
|000005a0| 74 20 61 72 65 20 63 6f | 6e 76 65 72 74 65 64 20 |t are co|nverted |
|000005b0| 74 6f 20 69 6e 74 65 67 | 65 72 73 3c 41 20 4e 41 |to integ|ers<A NA|
|000005c0| 4d 45 3d 22 74 65 78 32 | 68 74 6d 6c 31 22 20 48 |ME="tex2|html1" H|
|000005d0| 52 45 46 3d 22 66 6f 6f | 74 6e 6f 64 65 5f 6d 6e |REF="foo|tnode_mn|
|000005e0| 2e 68 74 6d 6c 23 66 6f | 6f 74 32 37 31 22 20 54 |.html#fo|ot271" T|
|000005f0| 41 52 47 45 54 3d 22 66 | 6f 6f 74 65 72 22 3e 3c |ARGET="f|ooter"><|
|00000600| 53 55 50 3e 3c 49 4d 47 | 20 20 41 4c 54 3d 22 5b |SUP><IMG| ALT="[|
|00000610| 2a 5d 22 20 53 52 43 3d | 22 66 6f 6f 74 6e 6f 74 |*]" SRC=|"footnot|
|00000620| 65 2e 70 6e 67 22 3e 3c | 2f 53 55 50 3e 3c 2f 41 |e.png"><|/SUP></A|
|00000630| 3e 2c 20 61 6c 74 68 6f | 75 67 68 20 73 69 6e 67 |>, altho|ugh sing|
|00000640| 6c 65 2d 63 68 61 72 20 | 73 74 72 69 6e 67 73 20 |le-char |strings |
|00000650| 61 72 65 20 61 63 63 65 | 70 74 65 64 20 61 73 20 |are acce|pted as |
|00000660| 61 72 67 75 6d 65 6e 74 | 73 2e 20 57 68 65 6e 0a |argument|s. When.|
|00000670| 61 20 73 65 6c 65 63 74 | 6f 72 20 69 73 20 65 78 |a select|or is ex|
|00000680| 70 65 63 74 65 64 2c 20 | 79 6f 75 20 63 61 6e 20 |pected, |you can |
|00000690| 67 69 76 65 20 69 74 20 | 62 6f 74 68 20 61 73 20 |give it |both as |
|000006a0| 69 74 73 20 63 6f 6e 63 | 69 73 65 20 73 74 72 69 |its conc|ise stri|
|000006b0| 6e 67 0a 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |ng.repre|sentatio|
|000006c0| 6e 20 6f 72 20 62 79 20 | 70 61 73 73 69 6e 67 20 |n or by |passing |
|000006d0| 61 6e 20 4f 62 6a 43 4d | 65 74 68 6f 64 20 69 6e |an ObjCM|ethod in|
|000006e0| 73 74 61 6e 63 65 20 6f | 66 20 69 74 2e 0a 0a 3c |stance o|f it...<|
|000006f0| 50 3e 0a 54 6f 20 65 78 | 70 6c 61 69 6e 20 62 65 |P>.To ex|plain be|
|00000700| 74 74 65 72 2c 20 67 69 | 76 65 6e 20 74 68 65 20 |tter, gi|ven the |
|00000710| 4f 62 6a 65 63 74 69 76 | 65 2d 43 20 64 65 63 6c |Objectiv|e-C decl|
|00000720| 61 72 61 74 69 6f 6e 73 | 3a 0a 0a 3c 50 3e 0a 3c |arations|:..<P>.<|
|00000730| 50 52 45 3e 0a 74 79 70 | 65 64 65 66 20 73 74 72 |PRE>.typ|edef str|
|00000740| 75 63 74 20 5f 70 6f 69 | 6e 74 20 7b 20 66 6c 6f |uct _poi|nt { flo|
|00000750| 61 74 20 78 2c 79 20 7d | 20 50 6f 69 6e 74 3b 0a |at x,y }| Point;.|
|00000760| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 5f |typedef |struct _|
|00000770| 73 69 7a 65 20 7b 20 66 | 6c 6f 61 74 20 77 2c 68 |size { f|loat w,h|
|00000780| 20 7d 20 53 69 7a 65 3b | 0a 74 79 70 65 64 65 66 | } Size;|.typedef|
|00000790| 20 73 74 72 75 63 74 20 | 5f 72 65 63 74 20 7b 20 | struct |_rect { |
|000007a0| 50 6f 69 6e 74 20 6f 72 | 69 67 69 6e 3b 20 53 69 |Point or|igin; Si|
|000007b0| 7a 65 20 73 69 7a 65 20 | 7d 20 52 65 63 74 3b 0a |ze size |} Rect;.|
|000007c0| 0a 40 69 6e 74 65 72 66 | 61 63 65 20 53 71 75 61 |.@interf|ace Squa|
|000007d0| 72 65 20 3a 20 4f 62 6a | 65 63 74 0a 7b 0a 20 20 |re : Obj|ect.{. |
|000007e0| 52 65 63 74 20 66 72 61 | 6d 65 3b 0a 7d 0a 0a 2d |Rect fra|me;.}..-|
|000007f0| 20 69 6e 69 74 57 69 74 | 68 46 72 61 6d 65 3a 28 | initWit|hFrame:(|
|00000800| 52 65 63 74 29 20 72 3b | 0a 2d 20 28 76 6f 69 64 |Rect) r;|.- (void|
|00000810| 29 20 67 65 74 46 72 61 | 6d 65 3a 28 52 65 63 74 |) getFra|me:(Rect|
|00000820| 20 2a 29 20 72 3b 0a 2d | 20 28 76 6f 69 64 29 20 | *) r;.-| (void) |
|00000830| 70 65 72 66 6f 72 6d 3a | 28 53 45 4c 29 20 73 65 |perform:|(SEL) se|
|00000840| 6c 3b 0a 2d 20 28 76 6f | 69 64 29 20 73 68 6f 77 |l;.- (vo|id) show|
|00000850| 3b 0a 0a 40 65 6e 64 0a | 3c 2f 50 52 45 3e 0a 0a |;..@end.|</PRE>..|
|00000860| 3c 50 3e 0a 74 6f 20 70 | 61 73 73 20 74 68 65 20 |<P>.to p|ass the |
|00000870| 72 20 61 72 67 75 6d 65 | 6e 74 20 74 6f 20 69 6e |r argume|nt to in|
|00000880| 69 74 57 69 74 68 46 72 | 61 6d 65 3a 20 79 6f 75 |itWithFr|ame: you|
|00000890| 20 6d 75 73 74 20 62 75 | 69 6c 64 20 61 0a 74 75 | must bu|ild a.tu|
|000008a0| 70 6c 65 20 6f 66 20 74 | 77 6f 20 69 74 65 6d 73 |ple of t|wo items|
|000008b0| 2c 20 74 68 65 20 66 69 | 72 73 74 20 74 6f 20 62 |, the fi|rst to b|
|000008c0| 65 20 61 20 74 75 70 6c | 65 20 77 69 74 68 20 74 |e a tupl|e with t|
|000008d0| 77 6f 20 65 6c 65 6d 65 | 6e 74 73 20 66 6f 72 20 |wo eleme|nts for |
|000008e0| 74 68 65 0a 6f 72 69 67 | 69 6e 2c 20 77 69 74 68 |the.orig|in, with|
|000008f0| 20 76 61 6c 75 65 73 20 | 66 6f 72 20 78 20 61 6e | values |for x an|
|00000900| 64 20 79 20 69 6e 20 69 | 74 3b 20 74 68 65 20 73 |d y in i|t; the s|
|00000910| 65 63 6f 6e 64 0a 66 6f | 72 20 74 68 65 20 73 69 |econd.fo|r the si|
|00000920| 7a 65 20 73 6c 6f 74 2c | 20 61 6e 6f 74 68 65 72 |ze slot,| another|
|00000930| 20 74 75 70 6c 65 20 63 | 6f 6e 74 61 69 6e 69 6e | tuple c|ontainin|
|00000940| 67 20 76 61 6c 75 65 73 | 20 66 6f 72 20 77 0a 61 |g values| for w.a|
|00000950| 6e 64 20 68 2e 20 54 68 | 69 73 20 67 69 76 65 73 |nd h. Th|is gives|
|00000960| 3a 0a 0a 3c 50 3e 0a 3c | 50 52 45 3e 0a 26 67 74 |:..<P>.<|PRE>.>|
|00000970| 3b 26 67 74 3b 26 67 74 | 3b 20 69 6d 70 6f 72 74 |;>>|; import|
|00000980| 20 4f 62 6a 43 0a 26 67 | 74 3b 26 67 74 3b 26 67 | ObjC.&g|t;>&g|
|00000990| 74 3b 20 6d 79 72 6f 6f | 6d 20 3d 20 4f 62 6a 43 |t; myroo|m = ObjC|
|000009a0| 2e 72 75 6e 74 69 6d 65 | 2e 53 71 75 61 72 65 2e |.runtime|.Square.|
|000009b0| 61 6c 6c 6f 63 28 29 0a | 26 67 74 3b 26 67 74 3b |alloc().|>>|
|000009c0| 26 67 74 3b 20 6d 79 72 | 6f 6f 6d 2e 69 6e 69 74 |> myr|oom.init|
|000009d0| 57 69 74 68 46 72 61 6d | 65 5f 5f 20 28 20 28 30 |WithFram|e__ ( (0|
|000009e0| 2e 30 2c 20 30 2e 30 29 | 2c 20 28 31 32 2e 33 2c |.0, 0.0)|, (12.3,|
|000009f0| 20 38 2e 31 29 20 29 0a | 26 67 74 3b 26 67 74 3b | 8.1) ).|>>|
|00000a00| 26 67 74 3b 20 2e 2e 2e | 0a 26 67 74 3b 26 67 74 |> ...|.>>|
|00000a10| 3b 26 67 74 3b 20 23 20 | 74 68 65 73 65 20 61 72 |;> # |these ar|
|00000a20| 65 20 65 71 75 69 76 61 | 6c 65 6e 74 0a 26 67 74 |e equiva|lent.>|
|00000a30| 3b 26 67 74 3b 26 67 74 | 3b 20 6d 79 72 6f 6f 6d |;>>|; myroom|
|00000a40| 2e 70 65 72 66 6f 72 6d | 5f 5f 20 28 22 73 68 6f |.perform|__ ("sho|
|00000a50| 77 22 29 0a 26 67 74 3b | 26 67 74 3b 26 67 74 3b |w").>|>>|
|00000a60| 20 6d 79 72 6f 6f 6d 2e | 70 65 72 66 6f 72 6d 5f | myroom.|perform_|
|00000a70| 5f 20 28 6d 79 72 6f 6f | 6d 2e 73 68 6f 77 29 0a |_ (myroo|m.show).|
|00000a80| 3c 2f 50 52 45 3e 0a 0a | 3c 50 3e 0a 41 20 6c 69 |</PRE>..|<P>.A li|
|00000a90| 74 74 6c 65 20 63 6f 6d | 70 6c 69 63 61 74 69 6f |ttle com|plicatio|
|00000aa0| 6e 20 61 72 69 73 65 73 | 20 77 69 74 68 20 6d 65 |n arises| with me|
|00000ab0| 74 68 6f 64 73 20 74 68 | 61 74 20 74 61 6b 65 20 |thods th|at take |
|00000ac0| 61 0a 70 61 73 73 2d 62 | 79 2d 72 65 66 65 72 65 |a.pass-b|y-refere|
|00000ad0| 6e 63 65 20 61 72 67 75 | 6d 65 6e 74 3a 20 75 73 |nce argu|ment: us|
|00000ae0| 75 61 6c 6c 79 20 73 75 | 63 68 20 61 72 67 75 6d |ually su|ch argum|
|00000af0| 65 6e 74 73 20 61 72 65 | 20 75 73 65 64 20 77 68 |ents are| used wh|
|00000b00| 65 6e 0a 74 68 65 20 73 | 65 6c 65 63 74 6f 72 20 |en.the s|elector |
|00000b10| 77 61 6e 74 73 20 74 6f | 20 72 65 74 75 72 6e 20 |wants to| return |
|00000b20| 6d 6f 72 65 20 74 68 61 | 6e 20 6f 6e 65 20 76 61 |more tha|n one va|
|00000b30| 6c 75 65 2c 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 |lue, for| example|
|00000b40| 20 61 20 73 74 61 74 75 | 73 0a 6f 66 20 6f 70 65 | a statu|s.of ope|
|00000b50| 72 61 74 69 6f 6e 20 61 | 6e 64 20 61 6e 20 61 63 |ration a|nd an ac|
|00000b60| 74 75 61 6c 20 72 65 73 | 75 6c 74 20 76 61 6c 75 |tual res|ult valu|
|00000b70| 65 2e 20 49 6e 20 74 68 | 69 73 20 63 61 73 65 20 |e. In th|is case |
|00000b80| 74 68 65 20 6d 65 74 68 | 6f 64 20 6d 61 79 0a 6d |the meth|od may.m|
|00000b90| 6f 64 69 66 79 20 69 74 | 73 20 61 72 67 75 6d 65 |odify it|s argume|
|00000ba0| 6e 74 73 3b 20 73 69 6e | 63 65 20 69 6e 20 50 79 |nts; sin|ce in Py|
|00000bb0| 74 68 6f 6e 20 74 68 65 | 72 65 20 69 73 20 6e 6f |thon the|re is no|
|00000bc0| 20 6e 6f 74 69 6f 6e 20 | 6f 66 0a 70 61 73 73 2d | notion |of.pass-|
|00000bd0| 62 79 2d 72 65 66 65 72 | 65 6e 63 65 20 61 72 67 |by-refer|ence arg|
|00000be0| 75 6d 65 6e 74 20 73 79 | 6e 74 61 78 2c 20 79 6f |ument sy|ntax, yo|
|00000bf0| 75 20 6d 75 73 74 20 75 | 73 65 20 61 20 64 69 66 |u must u|se a dif|
|00000c00| 66 65 72 65 6e 74 20 77 | 61 79 2e 0a 0a 3c 50 3e |ferent w|ay...<P>|
|00000c10| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00000c20| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 32 2e 31 37 |LE="heig|ht: 2.17|
|00000c30| 65 78 3b 20 76 65 72 74 | 69 63 61 6c 2d 61 6c 69 |ex; vert|ical-ali|
|00000c40| 67 6e 3a 20 31 37 36 2e | 35 34 65 78 3b 20 22 20 |gn: 176.|54ex; " |
|00000c50| 53 52 43 3d 22 69 6d 67 | 31 38 2e 70 6e 67 22 0a |SRC="img|18.png".|
|00000c60| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 66 75 6e | ALT="\b|egin{fun|
|00000c70| 63 64 65 73 63 7d 7b 70 | 61 63 6b 5f 61 72 67 75 |cdesc}{p|ack_argu|
|00000c80| 6d 65 6e 74 7d 7b 61 72 | 67 6e 5c 6f 70 74 69 6f |ment}{ar|gn\optio|
|00000c90| 6e 61 6c 7b 2c 20 76 61 | 6c 75 65 7d 7d 0a 54 68 |nal{, va|lue}}.Th|
|00000ca0| 69 73 20 6d 65 74 68 6f | 64 20 62 75 69 6c 64 73 |is metho|d builds|
|00000cb0| 20 61 20 5c 64 66 2e 2e | 2e 0a 2e 2e 2e 74 20 67 | a \df..|.....t g|
|00000cc0| 69 76 65 6e 2c 20 74 68 | 65 20 63 6f 6e 74 65 6e |iven, th|e conten|
|00000cd0| 74 20 6f 66 20 74 68 65 | 20 70 61 63 6b 65 64 0a |t of the| packed.|
|00000ce0| 76 61 6c 75 65 20 77 69 | 6c 6c 20 6e 6f 74 20 62 |value wi|ll not b|
|00000cf0| 65 20 69 6e 69 74 69 61 | 6c 69 7a 65 64 2e 0a 5c |e initia|lized..\|
|00000d00| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 22 3e 0a |end{func|desc}">.|
|00000d10| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|00000d20| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000d30| 67 68 74 3a 20 32 2e 31 | 37 65 78 3b 20 76 65 72 |ght: 2.1|7ex; ver|
|00000d40| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00000d50| 2e 35 35 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.55ex; "| SRC="im|
|00000d60| 67 31 39 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |g19.png"|. ALT="\|
|00000d70| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00000d80| 75 6e 70 61 63 6b 5f 61 | 72 67 75 6d 65 6e 74 7d |unpack_a|rgument}|
|00000d90| 7b 61 72 67 6e 2c 20 70 | 61 63 6b 65 64 56 61 6c |{argn, p|ackedVal|
|00000da0| 75 65 7d 0a 54 68 69 73 | 20 6d 65 74 68 6f 64 20 |ue}.This| method |
|00000db0| 74 61 6b 65 73 20 74 68 | 65 20 70 61 63 6b 65 2e |takes th|e packe.|
|00000dc0| 2e 2e 0a 2e 2e 2e 63 74 | 2c 20 6f 72 20 66 72 6f |......ct|, or fro|
|00000dd0| 6d 20 61 0a 5c 63 6f 64 | 65 7b 2e 70 61 63 6b 5c |m a.\cod|e{.pack\|
|00000de0| 5f 61 72 67 75 6d 65 6e | 74 28 29 7d 2c 20 69 65 |_argumen|t()}, ie|
|00000df0| 20 61 6e 20 4f 62 6a 43 | 50 6f 69 6e 74 65 72 20 | an ObjC|Pointer |
|00000e00| 6f 62 6a 65 63 74 2e 0a | 5c 65 6e 64 7b 66 75 6e |object..|\end{fun|
|00000e10| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000e20| 50 3e 0a 47 69 76 65 6e | 20 74 68 65 20 4f 62 6a |P>.Given| the Obj|
|00000e30| 65 63 74 69 76 65 2d 43 | 20 64 65 63 6c 61 72 61 |ective-C| declara|
|00000e40| 74 69 6f 6e 20 61 62 6f | 76 65 2c 20 74 6f 20 67 |tion abo|ve, to g|
|00000e50| 65 74 20 74 68 65 20 66 | 72 61 6d 65 20 6f 66 20 |et the f|rame of |
|00000e60| 61 0a 53 71 75 61 72 65 | 20 6f 62 6a 65 63 74 20 |a.Square| object |
|00000e70| 79 6f 75 20 73 68 6f 75 | 6c 64 20 75 73 65 0a 0a |you shou|ld use..|
|00000e80| 3c 50 3e 0a 3c 50 52 45 | 3e 0a 26 67 74 3b 26 67 |<P>.<PRE|>.>&g|
|00000e90| 74 3b 26 67 74 3b 20 2e | 2e 2e 0a 26 67 74 3b 26 |t;> .|...>&|
|00000ea0| 67 74 3b 26 67 74 3b 20 | 66 72 61 6d 65 70 20 3d |gt;> |framep =|
|00000eb0| 20 6d 79 72 6f 6f 6d 2e | 67 65 74 46 72 61 6d 65 | myroom.|getFrame|
|00000ec0| 5f 5f 2e 70 61 63 6b 5f | 61 72 67 75 6d 65 6e 74 |__.pack_|argument|
|00000ed0| 20 28 30 29 0a 26 67 74 | 3b 26 67 74 3b 26 67 74 | (0).>|;>>|
|00000ee0| 3b 20 6d 79 72 6f 6f 6d | 2e 67 65 74 46 72 61 6d |; myroom|.getFram|
|00000ef0| 65 5f 5f 20 28 66 72 61 | 6d 65 70 29 0a 26 67 74 |e__ (fra|mep).>|
|00000f00| 3b 26 67 74 3b 26 67 74 | 3b 20 69 74 73 46 72 61 |;>>|; itsFra|
|00000f10| 6d 65 20 3d 20 6d 79 72 | 6f 6f 6d 2e 67 65 74 46 |me = myr|oom.getF|
|00000f20| 72 61 6d 65 5f 5f 2e 75 | 6e 70 61 63 6b 5f 61 72 |rame__.u|npack_ar|
|00000f30| 67 75 6d 65 6e 74 20 28 | 30 2c 20 66 72 61 6d 65 |gument (|0, frame|
|00000f40| 70 29 0a 26 67 74 3b 26 | 67 74 3b 26 67 74 3b 20 |p).>&|gt;> |
|00000f50| 23 20 77 68 69 63 68 20 | 62 79 20 74 68 65 20 77 |# which |by the w|
|00000f60| 61 79 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |ay is th|e same a|
|00000f70| 73 0a 26 67 74 3b 26 67 | 74 3b 26 67 74 3b 20 69 |s.>&g|t;> i|
|00000f80| 74 73 46 72 61 6d 65 20 | 3d 20 66 72 61 6d 65 70 |tsFrame |= framep|
|00000f90| 2e 75 6e 70 61 63 6b 28 | 29 0a 3c 2f 50 52 45 3e |.unpack(|).</PRE>|
|00000fa0| 0a 0a 3c 50 3e 0a 4e 6f | 74 65 20 74 68 61 74 20 |..<P>.No|te that |
|00000fb0| 4f 62 6a 43 4d 65 74 68 | 6f 64 20 77 69 6c 6c 20 |ObjCMeth|od will |
|00000fc0| 73 69 6c 65 6e 74 6c 79 | 20 73 6c 75 72 70 20 74 |silently| slurp t|
|00000fd0| 68 65 20 61 72 67 75 6d | 65 6e 74 20 69 66 20 70 |he argum|ent if p|
|00000fe0| 61 73 73 65 64 20 69 6e | 20 74 68 65 0a 6e 6f 72 |assed in| the.nor|
|00000ff0| 6d 61 6c 20 77 61 79 2c | 20 69 65 20 6e 6f 74 20 |mal way,| ie not |
|00001000| 69 6e 20 70 61 63 6b 65 | 64 20 66 6f 72 6d 2c 20 |in packe|d form, |
|00001010| 62 75 74 20 79 6f 75 20 | 77 6f 6e 27 74 20 62 65 |but you |won't be|
|00001020| 20 61 62 6c 65 20 74 6f | 20 66 65 74 63 68 20 69 | able to| fetch i|
|00001030| 74 73 0a 6d 6f 64 69 66 | 69 65 64 20 76 61 6c 75 |ts.modif|ied valu|
|00001040| 65 2c 20 74 68 61 74 20 | 69 73 0a 0a 3c 50 3e 0a |e, that |is..<P>.|
|00001050| 3c 50 52 45 3e 0a 26 67 | 74 3b 26 67 74 3b 26 67 |<PRE>.&g|t;>&g|
|00001060| 74 3b 20 2e 2e 2e 0a 26 | 67 74 3b 26 67 74 3b 26 |t; ....&|gt;>&|
|00001070| 67 74 3b 20 66 72 61 6d | 65 20 3d 20 28 20 28 30 |gt; fram|e = ( (0|
|00001080| 2e 30 2c 20 30 2e 30 29 | 2c 20 28 30 2e 30 2c 20 |.0, 0.0)|, (0.0, |
|00001090| 30 2e 30 29 20 29 0a 26 | 67 74 3b 26 67 74 3b 26 |0.0) ).&|gt;>&|
|000010a0| 67 74 3b 20 6d 79 72 6f | 6f 6d 2e 67 65 74 46 72 |gt; myro|om.getFr|
|000010b0| 61 6d 65 5f 5f 20 28 66 | 72 61 6d 65 29 0a 26 67 |ame__ (f|rame).&g|
|000010c0| 74 3b 26 67 74 3b 26 67 | 74 3b 20 70 72 69 6e 74 |t;>&g|t; print|
|000010d0| 20 66 72 61 6d 65 0a 26 | 67 74 3b 26 67 74 3b 26 | frame.&|gt;>&|
|000010e0| 67 74 3b 20 28 28 30 2e | 30 2c 30 2e 30 29 2c 28 |gt; ((0.|0,0.0),(|
|000010f0| 30 2e 30 2c 30 2e 30 29 | 29 0a 3c 2f 50 52 45 3e |0.0,0.0)|).</PRE>|
|00001100| 0a 0a 3c 50 3e 0a 41 6e | 20 4f 62 6a 43 4d 65 74 |..<P>.An| ObjCMet|
|00001110| 68 6f 64 20 68 61 73 20 | 74 68 65 73 65 20 64 61 |hod has |these da|
|00001120| 74 61 20 6d 65 6d 62 65 | 72 73 3a 0a 0a 3c 50 3e |ta membe|rs:..<P>|
|00001130| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00001140| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 32 2e 31 30 |LE="heig|ht: 2.10|
|00001150| 65 78 3b 20 76 65 72 74 | 69 63 61 6c 2d 61 6c 69 |ex; vert|ical-ali|
|00001160| 67 6e 3a 20 31 37 36 2e | 35 34 65 78 3b 20 22 20 |gn: 176.|54ex; " |
|00001170| 53 52 43 3d 22 69 6d 67 | 32 30 2e 70 6e 67 22 0a |SRC="img|20.png".|
|00001180| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 64 61 74 | ALT="\b|egin{dat|
|00001190| 61 64 65 73 63 7d 7b 6e | 61 6d 65 7d 0a 54 68 69 |adesc}{n|ame}.Thi|
|000011a0| 73 20 69 73 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |s is the| name of|
|000011b0| 20 74 68 65 20 4f 62 6a | 43 20 73 65 6c 65 63 74 | the Obj|C select|
|000011c0| 6f 72 20 74 68 69 73 20 | 6f 62 6a 65 63 74 20 69 |or this |object i|
|000011d0| 73 20 77 72 61 70 70 69 | 6e 67 2e 0a 5c 65 6e 64 |s wrappi|ng..\end|
|000011e0| 7b 64 61 74 61 64 65 73 | 63 7d 22 3e 0a 3c 42 52 |{datades|c}">.<BR|
|000011f0| 3e 0a 0a 3c 50 3e 0a 3c | 42 52 3e 0a 3c 49 4d 47 |>..<P>.<|BR>.<IMG|
|00001200| 0a 20 20 53 54 59 4c 45 | 3d 22 68 65 69 67 68 74 |. STYLE|="height|
|00001210| 3a 20 31 2e 36 38 65 78 | 3b 20 76 65 72 74 69 63 |: 1.68ex|; vertic|
|00001220| 61 6c 2d 61 6c 69 67 6e | 3a 20 31 37 36 2e 38 30 |al-align|: 176.80|
|00001230| 65 78 3b 20 22 20 53 52 | 43 3d 22 69 6d 67 31 34 |ex; " SR|C="img14|
|00001240| 2e 70 6e 67 22 0a 20 41 | 4c 54 3d 22 5c 62 65 67 |.png". A|LT="\beg|
|00001250| 69 6e 7b 64 61 74 61 64 | 65 73 63 7d 7b 5f 5f 6d |in{datad|esc}{__m|
|00001260| 65 6d 62 65 72 73 5f 5f | 7d 0a 54 68 65 20 6c 69 |embers__|}.The li|
|00001270| 73 74 20 6f 66 20 64 61 | 74 61 20 6d 65 6d 62 65 |st of da|ta membe|
|00001280| 72 73 20 6f 66 20 74 68 | 69 73 20 6f 62 6a 65 63 |rs of th|is objec|
|00001290| 74 2e 0a 5c 65 6e 64 7b | 64 61 74 61 64 65 73 63 |t..\end{|datadesc|
|000012a0| 7d 22 3e 0a 3c 42 52 3e | 0a 0a 3c 50 3e 0a 0a 3c |}">.<BR>|..<P>..<|
|000012b0| 48 52 3e 0a 0a 3c 2f 42 | 4f 44 59 3e 0a 3c 2f 48 |HR>..</B|ODY>.</H|
|000012c0| 54 4d 4c 3e 0a | |TML>. | |
+--------+-------------------------+-------------------------+--------+--------+