home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / OOP_Course / Labs / DrawSquare / DrawSquare.wn < prev    next >
Unknown  |  1993-06-20  |  4.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Wanton Packer Module (music/wantonPacker) ext Supported
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 04 00 12 db 04 00 12 ef |........|........|
|00000010| 04 00 02 14 04 00 02 0c | 04 00 02 16 00 04 be c8 |........|........|
|00000020| 00 04 be cc 00 04 be d0 | 00 04 be e8 00 04 be e4 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 04 00 00 00 00 00 00 |........|........|
|00000040| 09 00 00 00 00 00 00 ff | ff 00 00 ff 00 00 00 00 |........|........|
|00000050| 00 43 02 d5 02 f2 00 00 | 00 00 00 4d 00 00 00 00 |.C......|...M....|
|00000060| 00 00 00 00 00 4d 00 00 | 00 00 ff 00 00 00 00 00 |.....M..|........|
|00000070| 00 00 00 00 00 00 01 01 | 03 18 00 00 00 48 00 48 |........|.....H.H|
|00000080| 00 01 00 18 02 64 03 18 | 00 00 00 00 02 64 03 18 |.....d..|.....d..|
|00000090| 00 64 00 04 00 00 04 00 | 0e 85 03 4c 03 3e 01 ec |.d......|...L.>..|
|000000a0| 00 0f 04 00 0e 85 03 65 | 03 3e 02 3b 00 0f 00 9f |.......e|.>.;....|
|000000b0| 00 00 05 ac 00 00 00 00 | ff 00 00 00 00 00 00 00 |........|........|
|000000c0| 12 fd 00 00 12 fd 00 00 | 12 fd 00 00 4f 7a 00 00 |........|....Oz..|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 04 00 0a c1 | 04 00 02 90 04 00 02 14 |........|........|
|00000110| 04 00 02 0c 04 00 02 16 | 00 04 50 ac 00 04 50 a4 |........|..P...P.|
|00000120| 00 04 50 bc 00 04 50 a0 | 00 04 50 b4 00 00 00 00 |..P...P.|..P.....|
|00000130| 00 00 00 00 00 04 00 00 | 00 00 00 00 09 00 00 00 |........|........|
|00000140| 00 00 00 ff 00 00 00 00 | 00 00 00 00 00 43 02 d5 |........|.....C..|
|00000150| 02 f2 00 00 00 00 00 39 | 00 00 00 00 00 00 00 00 |.......9|........|
|00000160| 00 39 00 00 00 00 ff 00 | 00 00 00 00 00 00 00 00 |.9......|........|
|00000170| 00 00 01 01 03 18 00 00 | 00 48 00 48 00 01 00 18 |........|.H.H....|
|00000180| 02 64 03 18 00 00 00 00 | 02 64 03 18 00 64 00 04 |.d......|.d...d..|
|00000190| 00 00 04 00 02 9e 00 08 | 00 51 01 6d 00 0f 04 00 |........|.Q.m....|
|000001a0| 02 9e 00 08 00 51 01 6d | 00 0f 00 77 00 00 00 00 |.....Q.m|...w....|
|000001b0| 00 00 00 00 00 ff 00 00 | 00 00 00 00 0a d5 00 00 |........|........|
|000001c0| 0a d5 00 00 0a d5 00 00 | 4f 7a 00 00 00 00 00 00 |........|Oz......|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 00 04 0d 0d 0d 0d 00 04 | 0d 0d 0d 0d 00 06 00 08 |........|........|
|00000210| 00 00 00 00 00 00 00 78 | 00 03 00 00 00 48 00 48 |.......x|.....H.H|
|00000220| 00 00 00 00 02 64 03 18 | 00 00 00 00 02 64 03 18 |.....d..|.....d..|
|00000230| 01 5b 05 28 03 fc 00 02 | 00 00 00 48 00 48 00 00 |.[.(....|...H.H..|
|00000240| 00 00 03 18 02 64 00 01 | 00 00 00 64 00 00 00 01 |.....d..|...d....|
|00000250| 00 01 01 01 00 00 00 01 | 27 0f 00 01 00 01 00 00 |........|'.......|
|00000260| 00 00 00 00 00 00 00 00 | 00 00 00 02 00 19 01 90 |........|........|
|00000270| 00 00 00 00 00 40 00 00 | 00 00 00 00 00 00 00 00 |.....@..|........|
|00000280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000290| 00 0c 04 00 02 00 00 38 | 04 00 02 06 00 38 02 97 |.......8|.....8..|
|000002a0| fc 00 74 02 a4 00 74 02 | 0e 02 f0 08 04 20 05 48 |..t...t.|..... .H|
|000002b0| 06 70 07 94 08 bc 09 e4 | f7 ff 00 15 0c 03 f7 4f |.p......|.......O|
|000002c0| 4f 50 20 43 6c 61 73 73 | 0d 44 72 61 77 53 71 75 |OP Class|.DrawSqu|
|000002d0| 61 72 65 0d fc 00 74 02 | a4 00 74 00 0e 02 f0 08 |are...t.|..t.....|
|000002e0| 04 20 05 48 06 70 07 94 | 08 bc 09 e4 f7 ff 00 15 |. .H.p..|........|
|000002f0| 0c 02 f7 0d ff 00 15 0c | 00 f7 0d ff 00 15 0c 01 |........|........|
|00000300| f7 50 75 72 70 6f 73 65 | ff 00 15 0c 00 f7 3a 20 |.Purpose|......: |
|00000310| 20 49 6e 20 74 68 69 73 | 20 65 78 65 72 63 69 73 | In this| exercis|
|00000320| 65 20 79 6f 75 20 77 69 | 6c 6c 20 75 73 65 20 74 |e you wi|ll use t|
|00000330| 68 65 20 50 6f 73 74 53 | 63 72 69 70 74 20 73 69 |he PostS|cript si|
|00000340| 6e 67 6c 65 2d 6f 70 65 | 72 61 74 6f 72 20 66 75 |ngle-ope|rator fu|
|00000350| 6e 63 74 69 6f 6e 73 20 | 74 6f 20 64 72 61 77 20 |nctions |to draw |
|00000360| 69 6e 20 61 20 76 69 65 | 77 2e 20 20 59 6f 75 20 |in a vie|w. You |
|00000370| 77 69 6c 6c 20 62 65 63 | 6f 6d 65 20 66 61 6d 69 |will bec|ome fami|
|00000380| 6c 69 61 72 20 77 69 74 | 68 20 74 68 65 20 ff 00 |liar wit|h the ..|
|00000390| 15 0c 01 f7 66 72 61 6d | 65 ff 00 15 0c 00 f7 20 |....fram|e...... |
|000003a0| 61 6e 64 20 ff 00 15 0c | 01 f7 62 6f 75 6e 64 73 |and ....|..bounds|
|000003b0| ff 00 15 0c 00 f7 20 63 | 6f 6e 63 65 70 74 73 20 |...... c|oncepts |
|000003c0| 6f 66 20 74 68 65 20 56 | 69 65 77 20 63 6c 61 73 |of the V|iew clas|
|000003d0| 73 20 61 6e 64 20 74 68 | 65 20 ff 00 15 0c 01 f7 |s and th|e ......|
|000003e0| 64 72 61 77 53 65 6c 66 | 3a 3a ff 00 15 0c 00 f7 |drawSelf|::......|
|000003f0| 20 6d 65 74 68 6f 64 2e | 0d 0d ff 00 15 0c 02 f7 | method.|........|
|00000400| 0d ff 00 15 0c 01 f7 31 | ff 00 15 0c 00 f7 2e 20 |.......1|....... |
|00000410| 20 46 69 72 73 74 2c 20 | 74 6f 20 67 65 74 20 61 | First, |to get a|
|00000420| 6e 20 69 64 65 61 20 6f | 66 20 74 68 65 20 6b 69 |n idea o|f the ki|
|00000430| 6e 64 20 6f 66 20 61 70 | 70 6c 69 63 61 74 69 6f |nd of ap|plicatio|
|00000440| 6e 20 79 6f 75 20 77 69 | 6c 6c 20 62 75 69 6c 64 |n you wi|ll build|
|00000450| 2c 20 72 75 6e 20 ff 00 | 15 0c 01 f7 4c 69 6e 65 |, run ..|....Line|
|00000460| 2e 61 70 70 ff 00 15 0c | 01 f7 20 ff 00 15 0c 00 |.app....|.. .....|
|00000470| f7 69 6e 20 74 68 65 ff | 00 15 0c 01 f7 20 45 78 |.in the.|..... Ex|
|00000480| 61 6d 70 6c 65 73 20 ff | 00 15 0c 00 f7 64 69 72 |amples .|.....dir|
|00000490| 65 63 74 6f 72 79 2e 20 | 20 53 74 75 64 79 20 74 |ectory. | Study t|
|000004a0| 68 65 20 77 61 79 20 69 | 74 20 77 6f 72 6b 73 20 |he way i|t works |
|000004b0| 61 6e 64 20 73 74 75 64 | 79 20 74 68 65 20 63 6f |and stud|y the co|
|000004c0| 64 65 20 69 6e 20 74 68 | 65 20 4c 69 6e 65 56 69 |de in th|e LineVi|
|000004d0| 65 77 20 63 6c 61 73 73 | 20 64 65 66 69 6e 69 74 |ew class| definit|
|000004e0| 69 6f 6e 2e 20 20 28 54 | 68 65 20 66 69 6c 65 73 |ion. (T|he files|
|000004f0| 20 77 65 72 65 20 64 65 | 72 69 76 65 64 20 66 72 | were de|rived fr|
|00000500| 6f 6d 20 61 6e 20 65 78 | 61 6d 70 6c 65 20 61 74 |om an ex|ample at|
|00000510| 20 74 68 65 20 4e 65 58 | 54 20 44 65 76 65 6c 6f | the NeX|T Develo|
|00000520| 70 65 72 20 43 61 6d 70 | 20 69 6e 20 74 68 65 20 |per Camp| in the |
|00000530| 70 61 73 74 2e 29 0d 02 | 20 0d ff 00 15 0c 01 f7 |past.)..| .......|
|00000540| 35 ff 00 15 0c 00 f7 2e | 20 20 4f 70 65 6e 20 ff |5.......| Open .|
|00000550| 00 15 0c 02 f7 44 72 61 | 77 53 71 75 61 72 65 2e |.....Dra|wSquare.|
|00000560| 6e 69 62 ff 00 15 0c 00 | f7 20 69 6e 20 49 42 2e |nib.....|. in IB.|
|00000570| 20 20 50 75 74 20 61 20 | 73 6c 69 64 65 72 20 61 | Put a |slider a|
|00000580| 6c 6f 6e 67 20 74 68 65 | 20 62 6f 74 74 6f 6d 20 |long the| bottom |
|00000590| 6f 66 20 74 68 65 20 77 | 69 6e 64 6f 77 20 61 6e |of the w|indow an|
|000005a0| 64 20 61 20 43 75 73 74 | 6f 6d 56 69 65 77 20 66 |d a Cust|omView f|
|000005b0| 69 6c 6c 69 6e 67 20 74 | 68 65 20 72 65 73 74 20 |illing t|he rest |
|000005c0| 6f 66 20 74 68 65 20 77 | 69 6e 64 6f 77 20 73 6f |of the w|indow so|
|000005d0| 20 74 68 61 74 20 69 74 | 20 6c 6f 6f 6b 73 20 74 | that it| looks t|
|000005e0| 68 65 20 73 61 6d 65 20 | 61 73 20 69 74 20 64 69 |he same |as it di|
|000005f0| 64 20 69 6e 20 ff 00 15 | 0c 01 f7 4c 69 6e 65 2e |d in ...|...Line.|
|00000600| 61 70 70 ff 00 15 0c 00 | f7 2e 0d 0d ff 00 15 0c |app.....|........|
|00000610| 01 f7 36 ff 00 15 0c 00 | f7 2e 20 20 4e 6f 77 20 |..6.....|.. Now |
|00000620| ff 00 15 0c 01 f7 50 61 | 72 73 65 ff 00 15 0c 00 |......Pa|rse.....|
|00000630| f7 20 74 68 65 20 53 71 | 75 61 72 65 56 69 65 77 |. the Sq|uareView|
|00000640| 20 63 6c 61 73 73 20 73 | 6f 20 74 68 61 74 20 49 | class s|o that I|
|00000650| 42 20 6b 6e 6f 77 73 20 | 61 62 6f 75 74 20 69 74 |B knows |about it|
|00000660| 2e 20 20 53 65 6c 65 63 | 74 20 74 68 65 20 43 75 |. Selec|t the Cu|
|00000670| 73 74 6f 6d 56 69 65 77 | 20 61 6e 64 20 6d 61 6b |stomView| and mak|
|00000680| 65 20 69 74 20 61 20 53 | 71 75 61 72 65 56 69 65 |e it a S|quareVie|
|00000690| 77 20 62 79 20 63 68 6f | 6f 73 69 6e 67 20 53 71 |w by cho|osing Sq|
|000006a0| 75 61 72 65 56 69 65 77 | 20 69 6e 20 74 68 65 20 |uareView| in the |
|000006b0| 43 75 73 74 6f 6d 56 69 | 65 77 20 69 6e 73 70 65 |CustomVi|ew inspe|
|000006c0| 63 74 6f 72 2e 0d 0d ff | 00 15 0c 01 f7 37 ff 00 |ctor....|.....7..|
|000006d0| 15 0c 00 f7 2e 20 20 43 | 6f 6e 6e 65 63 74 20 74 |..... C|onnect t|
|000006e0| 68 65 20 73 6c 69 64 65 | 72 20 74 6f 20 74 68 65 |he slide|r to the|
|000006f0| 20 53 71 75 61 72 65 56 | 69 65 77 2e 0d 0d ff 00 | SquareV|iew.....|
|00000700| 15 0c 01 f7 38 ff 00 15 | 0c 00 f7 2e 20 20 53 61 |....8...|.... Sa|
|00000710| 76 65 20 74 68 65 20 6e | 69 62 20 66 69 6c 65 2e |ve the n|ib file.|
|00000720| 20 20 52 65 74 75 72 6e | 20 74 6f 20 50 42 2c 20 | Return| to PB, |
|00000730| 62 75 69 6c 64 20 61 6e | 64 20 72 75 6e 20 74 68 |build an|d run th|
|00000740| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2e 0d ff |e applic|ation...|
|00000750| 00 15 0c 00 f7 f9 00 f7 | 0d 03 66 0d ff 00 15 0c |........|..f.....|
|00000760| 01 f7 32 ff 00 15 0c 00 | f7 2e 20 20 53 74 61 72 |..2.....|.. Star|
|00000770| 74 20 61 20 6e 65 77 20 | 70 72 6f 6a 65 63 74 20 |t a new |project |
|00000780| 63 61 6c 6c 65 64 20 ff | 00 15 0c 01 f7 44 72 61 |called .|.....Dra|
|00000790| 77 53 71 75 61 72 65 ff | 00 15 0c 00 f7 20 69 6e |wSquare.|..... in|
|000007a0| 20 74 68 65 20 ff 00 15 | 0c 01 f7 44 72 61 77 53 | the ...|...DrawS|
|000007b0| 71 75 61 72 65 ff 00 15 | 0c 00 f7 20 64 69 72 65 |quare...|... dire|
|000007c0| 63 74 6f 72 79 2e 0d 0d | ff 00 15 0c 01 f7 33 ff |ctory...|......3.|
|000007d0| 00 15 0c 00 f7 2e 20 20 | 43 72 65 61 74 65 20 74 |...... |Create t|
|000007e0| 68 65 20 ff 00 15 0c 01 | f7 53 71 75 61 72 65 56 |he .....|.SquareV|
|000007f0| 69 65 77 ff 00 15 0c 00 | f7 20 63 6c 61 73 73 2e |iew.....|. class.|
|00000800| 20 20 54 6f 20 6d 61 6b | 65 20 74 68 69 6e 67 73 | To mak|e things|
|00000810| 20 65 61 73 79 2c 20 63 | 6f 70 79 20 ff 00 15 0c | easy, c|opy ....|
|00000820| 02 f7 4c 69 6e 65 56 69 | 65 77 2e 68 ff 00 15 0c |..LineVi|ew.h....|
|00000830| 00 f7 20 61 6e 64 20 ff | 00 15 0c 02 f7 4c 69 6e |.. and .|.....Lin|
|00000840| 65 56 69 65 77 2e 6d ff | 00 15 0c 00 f7 20 69 6e |eView.m.|..... in|
|00000850| 74 6f 20 74 68 65 20 6e | 65 77 20 70 72 6f 6a 65 |to the n|ew proje|
|00000860| 63 74 20 64 69 72 65 63 | 74 6f 72 79 2e 20 20 43 |ct direc|tory. C|
|00000870| 68 61 6e 67 65 20 74 68 | 65 69 72 20 6e 61 6d 65 |hange th|eir name|
|00000880| 73 20 74 6f 20 ff 00 15 | 0c 02 f7 53 71 75 61 72 |s to ...|...Squar|
|00000890| 65 56 69 65 77 2e 28 68 | 6d 29 ff 00 15 0c 00 f7 |eView.(h|m)......|
|000008a0| 2e 20 20 28 42 6f 74 68 | 20 74 68 65 20 66 69 6c |. (Both| the fil|
|000008b0| 65 20 6e 61 6d 65 73 20 | 61 6e 64 20 74 68 65 20 |e names |and the |
|000008c0| 63 6c 61 73 73 20 6e 61 | 6d 65 73 20 69 6e 20 74 |class na|mes in t|
|000008d0| 68 65 20 66 69 6c 65 73 | 2e 20 29 20 20 4e 6f 77 |he files|. ) Now|
|000008e0| 20 61 64 64 20 74 68 65 | 6d 20 74 6f 20 74 68 65 | add the|m to the|
|000008f0| 20 70 72 6f 6a 65 63 74 | 20 62 79 20 73 65 6c 65 | project| by sele|
|00000900| 63 74 69 6e 67 20 ff 00 | 15 0c 01 f7 43 6c 61 73 |cting ..|....Clas|
|00000910| 73 65 73 ff 00 15 0c 00 | f7 20 69 6e 20 74 68 65 |ses.....|. in the|
|00000920| 20 50 42 20 66 69 6c 65 | 20 77 69 6e 64 6f 77 2c | PB file| window,|
|00000930| 20 64 6f 75 62 6c 65 2d | 63 6c 69 63 6b 69 6e 67 | double-|clicking|
|00000940| 20 74 68 65 20 73 75 69 | 74 63 61 73 65 2c 20 61 | the sui|tcase, a|
|00000950| 6e 64 20 63 68 6f 6f 73 | 69 6e 67 20 ff 00 15 0c |nd choos|ing ....|
|00000960| 02 f7 53 71 75 61 72 65 | 56 69 65 77 2e 6d ff 00 |..Square|View.m..|
|00000970| 15 0c 00 f7 2e 20 20 53 | 61 76 65 20 74 68 65 20 |..... S|ave the |
|00000980| 70 72 6f 6a 65 63 74 2e | 0d 0d ff 00 15 0c 01 f7 |project.|........|
|00000990| 34 ff 00 15 0c 00 f7 2e | 20 20 4d 6f 64 69 66 79 |4.......| Modify|
|000009a0| 20 74 68 65 20 ff 00 15 | 0c 01 f7 64 72 61 77 53 | the ...|...drawS|
|000009b0| 65 6c 66 3a 3a ff 00 15 | 0c 00 f7 20 6d 65 74 68 |elf::...|... meth|
|000009c0| 6f 64 20 73 75 63 68 20 | 74 68 61 74 20 61 20 73 |od such |that a s|
|000009d0| 71 75 61 72 65 20 69 73 | 20 64 72 61 77 6e 20 69 |quare is| drawn i|
|000009e0| 6e 20 74 68 65 20 6d 69 | 64 64 6c 65 20 6f 66 20 |n the mi|ddle of |
|000009f0| 74 68 65 20 76 69 65 77 | 2c 20 61 6e 64 20 74 68 |the view|, and th|
|00000a00| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 73 71 |e size o|f the sq|
|00000a10| 75 61 72 65 20 76 61 72 | 69 65 73 20 77 69 74 68 |uare var|ies with|
|00000a20| 20 74 68 65 20 70 6f 73 | 69 74 69 6f 6e 20 6f 66 | the pos|ition of|
|00000a30| 20 74 68 65 20 73 6c 69 | 64 65 72 20 6f 6e 20 74 | the sli|der on t|
|00000a40| 68 65 20 69 6e 74 65 72 | 66 61 63 65 2e 20 20 54 |he inter|face. T|
|00000a50| 68 65 20 73 69 7a 65 20 | 6f 66 20 74 68 65 20 73 |he size |of the s|
|00000a60| 71 75 61 72 65 20 73 68 | 6f 75 6c 64 20 76 61 72 |quare sh|ould var|
|00000a70| 79 20 66 72 6f 6d 20 61 | 20 73 6d 61 6c 6c 20 64 |y from a| small d|
|00000a80| 6f 74 20 74 6f 20 74 68 | 65 20 66 75 6c 6c 20 73 |ot to th|e full s|
|00000a90| 69 7a 65 20 6f 66 20 74 | 68 65 20 76 69 65 77 2e |ize of t|he view.|
|00000aa0| 20 20 44 72 61 77 20 77 | 69 74 68 20 61 20 6c 69 | Draw w|ith a li|
|00000ab0| 6e 65 20 77 69 64 74 68 | 20 6f 66 20 35 2e 30 2e |ne width| of 5.0.|
|00000ac0| 0d 00 12 64 00 02 9e 00 | 9f 24 00 07 59 00 9e 24 |...d....|.$..Y..$|
|00000ad0| 00 05 37 00 9f 03 ae 0d | ff 00 15 0c 01 f7 32 ff |..7.....|......2.|
|00000ae0| 00 15 0c 00 f7 2e 20 20 | 53 74 61 72 74 20 61 20 |...... |Start a |
|00000af0| 6e 65 77 20 70 72 6f 6a | 65 63 74 20 63 61 6c 6c |new proj|ect call|
|00000b00| 65 64 20 ff 00 15 0c 01 | f7 44 72 61 77 53 71 75 |ed .....|.DrawSqu|
|00000b10| 61 72 65 ff 00 15 0c 00 | f7 20 69 6e 20 74 68 65 |are.....|. in the|
|00000b20| 20 ff 00 15 0c 01 f7 44 | 72 61 77 53 71 75 61 72 | ......D|rawSquar|
|00000b30| 65 ff 00 15 0c 00 f7 20 | 64 69 72 65 63 74 6f 72 |e...... |director|
|00000b40| 79 2e 0d 0d ff 00 15 0c | 01 f7 33 ff 00 15 0c 00 |y.......|..3.....|
|00000b50| f7 2e 20 20 43 72 65 61 | 74 65 20 74 68 65 20 ff |.. Crea|te the .|
|00000b60| 00 15 0c 01 f7 53 71 75 | 61 72 65 56 69 65 77 ff |.....Squ|areView.|
|00000b70| 00 15 0c 00 f7 20 63 6c | 61 73 73 2e 20 20 54 6f |..... cl|ass. To|
|00000b80| 20 6d 61 6b 65 20 74 68 | 69 6e 67 73 20 65 61 73 | make th|ings eas|
|00000b90| 79 2c 20 63 6f 70 79 20 | ff 00 15 0c 02 f7 4c 69 |y, copy |......Li|
|00000ba0| 6e 65 56 69 65 77 2e 68 | ff 00 15 0c 00 f7 20 61 |neView.h|...... a|
|00000bb0| 6e 64 20 ff 00 15 0c 02 | f7 4c 69 6e 65 56 69 65 |nd .....|.LineVie|
|00000bc0| 77 2e 6d ff 00 15 0c 00 | f7 20 69 6e 74 6f 20 74 |w.m.....|. into t|
|00000bd0| 68 65 20 6e 65 77 20 70 | 72 6f 6a 65 63 74 20 64 |he new p|roject d|
|00000be0| 69 72 65 63 74 6f 72 79 | 2e 20 20 43 68 61 6e 67 |irectory|. Chang|
|00000bf0| 65 20 74 68 65 69 72 20 | 6e 61 6d 65 73 20 74 6f |e their |names to|
|00000c00| 20 ff 00 15 0c 02 f7 53 | 71 75 61 72 65 56 69 65 | ......S|quareVie|
|00000c10| 77 2e 28 68 6d 29 ff 00 | 15 0c 00 f7 2e 20 20 28 |w.(hm)..|..... (|
|00000c20| 42 6f 74 68 20 74 68 65 | 20 66 69 6c 65 20 6e 61 |Both the| file na|
|00000c30| 6d 65 73 20 61 6e 64 20 | 74 68 65 20 63 6c 61 73 |mes and |the clas|
|00000c40| 73 20 6e 61 6d 65 73 20 | 69 6e 20 74 68 65 20 66 |s names |in the f|
|00000c50| 69 6c 65 73 2e 20 29 20 | 20 4e 6f 77 20 61 64 64 |iles. ) | Now add|
|00000c60| 20 74 68 65 6d 20 74 6f | 20 74 68 65 20 70 72 6f | them to| the pro|
|00000c70| 6a 65 63 74 20 62 79 20 | 73 65 6c 65 63 74 69 6e |ject by |selectin|
|00000c80| 67 20 ff 00 15 0c 01 f7 | 43 6c 61 73 73 65 73 ff |g ......|Classes.|
|00000c90| 00 15 0c 00 f7 20 69 6e | 20 74 68 65 20 50 42 20 |..... in| the PB |
|00000ca0| 66 69 6c 65 20 77 69 6e | 64 6f 77 2c 20 64 6f 75 |file win|dow, dou|
|00000cb0| 62 6c 65 2d 63 6c 69 63 | 6b 69 6e 67 20 74 68 65 |ble-clic|king the|
|00000cc0| 20 73 75 69 74 63 61 73 | 65 2c 20 61 6e 64 20 63 | suitcas|e, and c|
|00000cd0| 68 6f 6f 73 69 6e 67 20 | ff 00 15 0c 02 f7 53 71 |hoosing |......Sq|
|00000ce0| 75 61 72 65 56 69 65 77 | 2e 6d ff 00 15 0c 00 f7 |uareView|.m......|
|00000cf0| 2e 20 20 53 61 76 65 20 | 74 68 65 20 70 72 6f 6a |. Save |the proj|
|00000d00| 65 63 74 2e 0d 0d ff 00 | 15 0c 01 f7 34 ff 00 15 |ect.....|....4...|
|00000d10| 0c 00 f7 2e 20 20 4d 6f | 64 69 66 79 20 74 68 65 |.... Mo|dify the|
|00000d20| 20 ff 00 15 0c 01 f7 64 | 72 61 77 53 65 6c 66 3a | ......d|rawSelf:|
|00000d30| 3a ff 00 15 0c 00 f7 20 | 6d 65 74 68 6f 64 20 73 |:...... |method s|
|00000d40| 75 63 68 20 74 68 61 74 | 20 61 20 73 71 75 61 72 |uch that| a squar|
|00000d50| 65 20 69 73 20 64 72 61 | 77 6e 20 69 6e 20 74 68 |e is dra|wn in th|
|00000d60| 65 20 6d 69 64 64 6c 65 | 20 6f 66 20 74 68 65 20 |e middle| of the |
|00000d70| 76 69 65 77 2c 20 61 6e | 64 20 74 68 65 20 73 69 |view, an|d the si|
|00000d80| 7a 65 20 6f 66 20 74 68 | 65 20 73 71 75 61 72 65 |ze of th|e square|
|00000d90| 20 76 61 72 69 65 73 20 | 77 69 74 68 20 74 68 65 | varies |with the|
|00000da0| 20 70 6f 73 69 74 69 6f | 6e 20 6f 66 20 74 68 65 | positio|n of the|
|00000db0| 20 73 6c 69 64 65 72 20 | 6f 6e 20 74 68 65 20 69 | slider |on the i|
|00000dc0| 6e 74 65 72 66 61 63 65 | 2e 20 20 54 68 65 20 73 |nterface|. The s|
|00000dd0| 69 7a 65 20 6f 66 20 74 | 68 65 20 73 71 75 61 72 |ize of t|he squar|
|00000de0| 65 20 73 68 6f 75 6c 64 | 20 76 61 72 79 20 66 72 |e should| vary fr|
|00000df0| 6f 6d 20 61 20 73 6d 61 | 6c 6c 20 64 6f 74 20 74 |om a sma|ll dot t|
|00000e00| 6f 20 74 68 65 20 66 75 | 6c 6c 20 73 69 7a 65 20 |o the fu|ll size |
|00000e10| 6f 66 20 74 68 65 20 76 | 69 65 77 2e 20 20 55 73 |of the v|iew. Us|
|00000e20| 65 20 74 68 65 20 ff 00 | 15 0c 01 f7 62 6f 75 6e |e the ..|....boun|
|00000e30| 64 73 ff 00 15 0c 00 f7 | 20 69 6e 73 74 61 6e 63 |ds......| instanc|
|00000e40| 65 20 76 61 72 69 61 62 | 6c 65 20 74 6f 20 63 6f |e variab|le to co|
|00000e50| 6d 70 75 74 65 20 77 68 | 65 72 65 20 74 6f 20 64 |mpute wh|ere to d|
|00000e60| 72 61 77 2e 20 20 44 72 | 61 77 20 77 69 74 68 20 |raw. Dr|aw with |
|00000e70| 61 20 6c 69 6e 65 20 77 | 69 64 74 68 20 6f 66 20 |a line w|idth of |
|00000e80| 35 2e 30 2e 0d 04 54 0d | ff 00 15 0c 01 f7 35 ff |5.0...T.|......5.|
|00000e90| 00 15 0c 00 f7 2e 20 20 | 4f 70 65 6e 20 ff 00 15 |...... |Open ...|
|00000ea0| 0c 02 f7 44 72 61 77 53 | 71 75 61 72 65 2e 6e 69 |...DrawS|quare.ni|
|00000eb0| 62 ff 00 15 0c 00 f7 20 | 69 6e 20 49 42 2e 20 20 |b...... |in IB. |
|00000ec0| 50 75 74 20 61 20 73 6c | 69 64 65 72 20 61 6c 6f |Put a sl|ider alo|
|00000ed0| 6e 67 20 74 68 65 20 62 | 6f 74 74 6f 6d 20 6f 66 |ng the b|ottom of|
|00000ee0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 61 6e 64 20 | the win|dow and |
|00000ef0| 61 20 43 75 73 74 6f 6d | 56 69 65 77 20 66 69 6c |a Custom|View fil|
|00000f00| 6c 69 6e 67 20 74 68 65 | 20 72 65 73 74 20 6f 66 |ling the| rest of|
|00000f10| 20 74 68 65 20 77 69 6e | 64 6f 77 20 73 6f 20 74 | the win|dow so t|
|00000f20| 68 61 74 20 69 74 20 6c | 6f 6f 6b 73 20 74 68 65 |hat it l|ooks the|
|00000f30| 20 73 61 6d 65 20 61 73 | 20 69 74 20 64 69 64 20 | same as| it did |
|00000f40| 69 6e 20 ff 00 15 0c 01 | f7 4c 69 6e 65 2e 61 70 |in .....|.Line.ap|
|00000f50| 70 ff 00 15 0c 00 f7 2e | 0d 0d ff 00 15 0c 01 f7 |p.......|........|
|00000f60| 36 ff 00 15 0c 00 f7 2e | 20 20 4e 6f 77 20 ff 00 |6.......| Now ..|
|00000f70| 15 0c 01 f7 50 61 72 73 | 65 ff 00 15 0c 00 f7 20 |....Pars|e...... |
|00000f80| 74 68 65 20 53 71 75 61 | 72 65 56 69 65 77 20 63 |the Squa|reView c|
|00000f90| 6c 61 73 73 20 73 6f 20 | 74 68 61 74 20 49 42 20 |lass so |that IB |
|00000fa0| 6b 6e 6f 77 73 20 61 62 | 6f 75 74 20 69 74 2e 20 |knows ab|out it. |
|00000fb0| 20 53 65 6c 65 63 74 20 | 74 68 65 20 43 75 73 74 | Select |the Cust|
|00000fc0| 6f 6d 56 69 65 77 20 61 | 6e 64 20 6d 61 6b 65 20 |omView a|nd make |
|00000fd0| 69 74 20 61 20 53 71 75 | 61 72 65 56 69 65 77 20 |it a Squ|areView |
|00000fe0| 62 79 20 63 68 6f 6f 73 | 69 6e 67 20 53 71 75 61 |by choos|ing Squa|
|00000ff0| 72 65 56 69 65 77 20 69 | 6e 20 74 68 65 20 43 75 |reView i|n the Cu|
|00001000| 73 74 6f 6d 56 69 65 77 | 20 69 6e 73 70 65 63 74 |stomView| inspect|
|00001010| 6f 72 2e 0d 0d ff 00 15 | 0c 01 f7 37 ff 00 15 0c |or......|...7....|
|00001020| 00 f7 2e 20 20 43 6f 6e | 6e 65 63 74 20 74 68 65 |... Con|nect the|
|00001030| 20 73 6c 69 64 65 72 20 | 74 6f 20 74 68 65 20 53 | slider |to the S|
|00001040| 71 75 61 72 65 56 69 65 | 77 2e 0d 0d ff 00 15 0c |quareVie|w.......|
|00001050| 01 f7 38 ff 00 15 0c 00 | f7 2e 20 20 53 61 76 65 |..8.....|.. Save|
|00001060| 20 74 68 65 20 6e 69 62 | 20 66 69 6c 65 2e 20 20 | the nib| file. |
|00001070| 52 65 74 75 72 6e 20 74 | 6f 20 50 42 2c 20 62 75 |Return t|o PB, bu|
|00001080| 69 6c 64 20 61 6e 64 20 | 72 75 6e 20 74 68 65 20 |ild and |run the |
|00001090| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2e 0d ff 00 15 |applicat|ion.....|
|000010a0| 0c 00 f7 f9 00 f7 0d 0d | ff 00 15 0c 01 f7 45 78 |........|......Ex|
|000010b0| 74 65 6e 73 69 6f 6e 3a | ff 00 15 0c 00 f7 20 20 |tension:|...... |
|000010c0| 54 68 65 20 74 65 63 68 | 6e 69 71 75 65 20 79 6f |The tech|nique yo|
|000010d0| 75 20 75 73 65 64 20 61 | 62 6f 76 65 20 77 61 73 |u used a|bove was|
|000010e0| 20 74 6f 20 64 72 61 77 | 20 74 68 65 20 73 71 75 | to draw| the squ|
|000010f0| 61 72 65 20 64 69 72 65 | 63 74 6c 79 20 75 73 69 |are dire|ctly usi|
|00001100| 6e 67 20 74 68 65 20 62 | 6f 75 6e 64 73 20 69 6e |ng the b|ounds in|
|00001110| 73 74 61 6e 63 65 20 76 | 61 72 69 61 62 6c 65 2e |stance v|ariable.|
|00001120| 20 20 41 6e 6f 74 68 65 | 72 20 77 61 79 20 69 73 | Anothe|r way is|
|00001130| 20 74 6f 20 74 72 61 6e | 73 6c 61 74 65 20 61 6e | to tran|slate an|
|00001140| 64 20 73 63 61 6c 65 20 | 74 68 65 20 76 69 65 77 |d scale |the view|
|00001150| 20 73 6f 20 74 68 61 74 | 20 79 6f 75 20 64 72 61 | so that| you dra|
|00001160| 77 20 69 6e 20 61 20 6d | 6f 72 65 20 6e 61 74 75 |w in a m|ore natu|
|00001170| 72 61 6c 20 73 65 74 20 | 6f 66 20 63 6f 6f 72 64 |ral set |of coord|
|00001180| 69 6e 61 74 65 73 2e 20 | 20 4d 6f 64 69 66 79 20 |inates. | Modify |
|00001190| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 20 74 6f 20 |your pro|gram to |
|000011a0| 75 73 65 20 56 69 65 77 | 27 73 20 ff 00 15 0c 01 |use View|'s .....|
|000011b0| f7 73 65 74 44 72 61 77 | 4f 72 69 67 69 6e 3a 3a |.setDraw|Origin::|
|000011c0| ff 00 15 0c 00 f7 20 61 | 6e 64 20 ff 00 15 0c 01 |...... a|nd .....|
|000011d0| f7 73 65 74 44 72 61 77 | 53 69 7a 65 3a 3a ff 00 |.setDraw|Size::..|
|000011e0| 15 0c 00 f7 20 6d 65 74 | 68 6f 64 73 20 73 6f 20 |.... met|hods so |
|000011f0| 74 68 61 74 20 74 68 65 | 20 76 69 65 77 20 6e 6f |that the| view no|
|00001200| 77 20 68 61 73 20 69 74 | 73 20 28 30 2c 30 29 20 |w has it|s (0,0) |
|00001210| 70 6f 69 6e 74 20 61 74 | 20 74 68 65 20 63 65 6e |point at| the cen|
|00001220| 74 65 72 2c 20 61 6e 64 | 20 74 68 65 20 77 69 64 |ter, and| the wid|
|00001230| 74 68 20 61 6e 64 20 68 | 65 69 67 68 74 20 6f 66 |th and h|eight of|
|00001240| 20 74 68 65 20 76 69 65 | 77 20 61 72 65 20 62 6f | the vie|w are bo|
|00001250| 74 68 20 73 63 61 6c 65 | 64 20 74 6f 20 31 2e 30 |th scale|d to 1.0|
|00001260| 2e 20 20 53 69 6e 63 65 | 20 74 68 65 20 76 69 65 |. Since| the vie|
|00001270| 77 20 69 73 20 6e 6f 74 | 20 72 65 61 6c 6c 79 20 |w is not| really |
|00001280| 73 71 75 61 72 65 20 6f | 6e 20 74 68 65 20 73 63 |square o|n the sc|
|00001290| 72 65 65 6e 2c 20 79 6f | 75 20 77 69 6c 6c 20 64 |reen, yo|u will d|
|000012a0| 69 73 74 6f 72 74 20 74 | 68 65 20 64 72 61 77 69 |istort t|he drawi|
|000012b0| 6e 67 20 61 6e 64 20 74 | 68 65 20 73 71 75 61 72 |ng and t|he squar|
|000012c0| 65 20 77 69 6c 6c 20 62 | 65 63 6f 6d 65 20 61 20 |e will b|ecome a |
|000012d0| 72 65 63 74 61 6e 67 6c | 65 21 0d 00 12 64 00 02 |rectangl|e!...d..|
|000012e0| 9e 00 9f 24 00 0a d5 00 | ad 24 00 0e 85 01 03 00 |...$....|.$......|
|000012f0| 0c 04 00 02 00 00 4c 04 | 00 02 06 00 4c |......L.|....L |
+--------+-------------------------+-------------------------+--------+--------+