{"id":122,"date":"2011-10-13T16:16:05","date_gmt":"2011-10-13T07:16:05","guid":{"rendered":"http:\/\/nextstep.onionmixer.net\/wordpress\/?p=122"},"modified":"2011-10-13T19:42:24","modified_gmt":"2011-10-13T10:42:24","slug":"appledata-1433-downloading-postscript-to-windowserver","status":"publish","type":"post","link":"http:\/\/nextstep.onionmixer.net\/wordpress\/?p=122","title":{"rendered":"NeXTanswers :: 1433 :: downloading PostScript to WindowServer"},"content":{"rendered":"<p>Q:  When can I download PostScript code to the Window Server?  Can I use the +initialize methods for factory objects?<br \/>\n<span style=\"color: #3366ff;\">\uc5b8\uc81c PostScript\ucf54\ub4dc\ub97c Windows Server\uc5d0 \ub2e4\uc6b4\ub85c\ub4dc \ud560 \uc218 \uc788\ub098\uc694? Factory\uac1d\uccb4\uc758 +initialize \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud558\uba74 \ub418\ub098\uc694?<\/span><\/p>\n<p>A:  Object class +initialize methods cannot download PostScript code to the Window Server because they are run before the connection to the Server has been established.  Initialize messages for classes always get sent before any other messages are delivered,\u00a0<br \/>\nspecifically before [Application new] has been executed.  But [Application new] is what connects the program to the Server.<br \/>\n<span style=\"color: #3366ff;\">\uac1d\uccb4 \ud074\ub798\uc2a4\uc758 +initialize \uba54\uc18c\ub4dc\ub294 Windows\uc11c\ubc84\uc5d0 PostScript\ucf54\ub4dc\ub97c \ub2e4\uc6b4\ub85c\ub4dc \uc2dc\ud0ac \uc218 \uc5c6\uc2b5\ub2c8\ub2e4 \uc65c\ub0d0\ud558\uba74 (\uba54\uc18c\ub4dc\ub97c) \uc2e4\ud589\ud558\uae30\uc804\uc5d0 \uc11c\ubc84\uc640\uc758 connection\uc774 \ub9fa\uc5b4\uc838 \uc788\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \ud074\ub798\uc2a4\ub97c \uc704\ud55c \ucd08\uae30\ud654 \uba54\uc138\uc9c0\ub294 \ud56d\uc0c1 \ub2e4\ub978 \uba54\uc138\uc9c0\uac00 \ub3c4\ucc29\ud558\uae30\uc804\uc5d0 \ub418\uc5b4\uc57c \uc804\ub2ec\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/span><br \/>\n<span style=\"color: #3366ff;\">\uad6c\uccb4\uc801\uc73c\ub85c \ubcf4\uba74 [Application new]\u00a0\uc774\uc804\uc5d0 \uc2e4\ud589\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4. \ud558\uc9c0\ub9cc [Application new]\u00a0\ub294 \uc5b4\ub5a4 \ud504\ub85c\uadf8\ub7a8 \uc5f0\uacb0\ub3c4 \uc11c\ubc84\ub85c \ubcf4\ub0c5\ub2c8\ub2e4.<\/span><br \/>\nA good time to download code to the server is after [Application new] and loading the nib section, but before the application starts running.  In your main(), after sending the  loadNibSection method, sent a setUp message, like this:<br \/>\n<span style=\"color: #3366ff;\">\uc11c\ubc84\uc5d0 \ucf54\ub4dc\ub97c \ub2e4\uc6b4\ub85c\ub4dc \uc2dc\ud0a4\ub294 \uc88b\uc740 \uc2dc\uc810\uc740 [Application new]\u00a0\uc758 \uc774\ud6c4 nib\ub97c \ub85c\ub529\ud560\ub54c \uc785\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \uc774\uc804\uc5d0 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \uc2e4\ud589\ub41c \uc0c1\ud0dc\uc5ec\uc57c \ud569\ub2c8\ub2e4. \ub2f9\uc2e0\uc758 main()\uc548\uc5d0\uc11c \ub9d0\uc785\ub2c8\ub2e4. loadNibSection \uba54\uc18c\ub4dc\ub97c \ubcf4\ub0b8\ud6c4 setUp\uba54\uc138\uc9c0\ub97c \ubcf4\ub0b4\uc138\uc694. \uc774\ub7f0\uc2dd\uc73c\ub85c \ud558\uba74 \ub429\ub2c8\ub2e4:<\/span><\/p>\n<p>\t[NXApp loadNibSection:&#8221;MyNibFile.nib&#8221; owner:NXApp];<br \/>\n\t[NXGetNamedObject(&#8220;MyObj&#8221;, NXApp) setUp];<\/p>\n<p>setUp is an instance method that downloads PostScript code to the Window Server.<br \/>\n<span style=\"color: #3366ff;\">setUP\uc740 Window Server\uc5d0 PostScript \ucf54\ub4dc\ub97c \ub2e4\uc6b4\ub85c\ub4dc \uc2dc\ud0a4\ub294 \uc778\uc2a4\ud134\uc2a4 \uba54\uc18c\ub4dc \uc785\ub2c8\ub2e4.<\/span><\/p>\n<p>QA29<\/p>\n<p>Valid for 1.0, 2.0, 3.0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q: When can I download PostScript code to the Window Server? Can I use the +initialize methods for factory objects? \uc5b8\uc81c PostScript\ucf54\ub4dc\ub97c Windows Server\uc5d0 \ub2e4\uc6b4\ub85c\ub4dc \ud560 \uc218 \uc788\ub098\uc694? Factory\uac1d\uccb4\uc758 +initialize \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud558\uba74 \ub418\ub098\uc694? A: Object class +initialize methods cannot download PostScript code to the Window Server because they are run before the connection to the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":7,"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":125,"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions\/125"}],"wp:attachment":[{"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nextstep.onionmixer.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}