{"id":2706,"date":"2015-05-26T12:39:01","date_gmt":"2015-05-26T03:39:01","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=2706"},"modified":"2015-05-26T12:39:01","modified_gmt":"2015-05-26T03:39:01","slug":"%e3%81%af%e3%81%98%e3%82%81%e3%81%a6%e3%81%aemorphic%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%ef%bc%88%e7%ac%ac%ef%bc%99%e5%9b%9e%ef%bc%89%e3%80%8c%e3%83%9e%e3%82%a6%e3%82%b9","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/2706","title":{"rendered":"\u306f\u3058\u3081\u3066\u306eMorphic\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\uff08\u7b2c\uff19\u56de\uff09\u300c\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u300d"},"content":{"rendered":"<p>\u30e2\u30fc\u30d5\u306f\u305d\u308c\u305e\u308c\u304c\u500b\u5225\u306b\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u7b2c\uff17\u56de\u307e\u3067\u3067\u7d39\u4ecb\u3057\u305fMyMorph\u3067\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3076\u3002<br \/>\n\u53d7\u3051\u53d6\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3042\u308b\u3002<\/p>\n<ul>\n<li>\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f<\/li>\n<li>\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u96e2\u3057\u305f<\/li>\n<li>\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u307e\u307e\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u3092\u52d5\u304b\u3057\u305f<\/li>\n<li>\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u307e\u307e\u3067\u3042\u308b<\/li>\n<li>\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u9818\u57df\u306b\u5165\u3063\u3066\u304d\u305f<\/li>\n<li>\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u9818\u57df\u304b\u3089\u51fa\u305f<\/li>\n<\/ul>\n<p>\u307e\u305a\u3001\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\uff0f\u96e2\u3057\u305f\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002\u3053\u306e\uff12\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f\u3001\u5c11\u306a\u304f\u3068\u3082\uff12\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<pre>handlesMouseDown: anEvent\n    ^ true<\/pre>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306b\u3001handlesMouseDown:\u30e1\u30bd\u30c3\u30c9\u3092MyMorph\u306b\u52a0\u3048\u3066true\u3092\u8fd4\u3059\u3088\u3046\u306b\u3059\u308b\u3068\u3001MyMorph\u306e\u4e0a\u3067\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u6642\u306bmouseDown:\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u3001\u96e2\u3057\u305f\u6642\u306bmouseUp:\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u305d\u308c\u305e\u308c\u9001\u3089\u308c\u3066\u304f\u308b\u3002<br \/>\n\u3068\u3053\u308d\u3067\u3001true\/false\u306f\u771f\u7406\u5024\u3068\u547c\u3070\u308cYes\/No\u306e\u3088\u3046\u306a\u72b6\u614b\u3092\u8868\u3059\u3002\u3082\u3057\u3001\u4e0a\u306e\u30e1\u30bd\u30c3\u30c9\u3067true\u3092false\u3067\u7f6e\u304d\u63db\u3048\u305f\u3089mouseDown:\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u9001\u3089\u308c\u3066\u3053\u306a\u304f\u306a\u308b\u3002<br \/>\n\u8a66\u3057\u306b\u3001mouseDown:\u3068mouseUp:\u3092\u305d\u308c\u305e\u308c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u3066\u307f\u3088\u3046\u3002<\/p>\n<pre>mouseDown: anEvent\n    self extent: self extent + (10@10)<\/pre>\n<pre>mouseUp: anEvent\n    self extent: self extent - (10@10)<\/pre>\n<p>\u3044\u3064\u3082\u306e\u3088\u3046\u306bPlayground\u304b\u3089\u3001MyMorph new openInWorld\u3067MyMorph\u3092\u751f\u6210\u3059\u308b\u3068\u8272\u3092\u5909\u3048\u306a\u304c\u3089\u79fb\u52d5\u3059\u308bMyMorph\u304c\u73fe\u308c\u308b\u3002\u30e2\u30fc\u30d5\u306b\u30de\u30a6\u30b9\u3092\u4f1a\u308f\u305b\u3066\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u62bc\u3057\u3066\u3044\u308b\u9593\u3060\u3051\u5927\u304d\u304f\u306a\u308a\u96e2\u3059\u3068\u5c0f\u3055\u304f\u306a\u308b\u3002<br \/>\n\u6b21\u306b\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u7d9a\u3051\u305f\u6642\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3001\u30c9\u30e9\u30c3\u30b0\u52d5\u4f5c\u3067\u3042\u308c\u3070\u4ee5\u4e0b\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3059\u308c\u3070\u3088\u3044\u3002<\/p>\n<pre>mouseMove: anEvent\n    self center: anEvent cursorPoint<\/pre>\n<p>\u4e0a\u306e\u4f8b\u306a\u3089\u3070\u3001MyMorph\u3092\u63b4\u3093\u3067\u52d5\u304b\u3059\u3068\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u306b\u3042\u308f\u305b\u3066MyMorph\u3082\u79fb\u52d5\u3059\u308b\u3088\u3046\u306b\u306a\u308b\u3002<br \/>\n\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3063\u3071\u306a\u3057\u306b\u3057\u305f\u6642\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f\u3001handlesMouseStillDown:\u30e1\u30bd\u30c3\u30c9\u3068mouseStillDown:\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u3002<\/p>\n<pre>handlesMouseStillDown: anEvent\n    ^ true<\/pre>\n<p>handlesMouseStillDown:\u306fhandlesMouseDown:\u3068\u540c\u69d8\u3067\u3042\u308b\u3002true\u306e\u524d\u306b\u30cf\u30c3\u30c8\uff08\uff3e\uff09\u304c\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u306f\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9001\u308a\u4e3b\u306b\u5bfe\u3057\u3066\u3001\u305d\u306e\u5f8c\u306b\u7d9a\u304f\u5024\uff08\u3053\u306e\u5834\u5408\u306ftrue\uff09\u3092\u8fd4\u3059\u3053\u3068\u3092\u8868\u3057\u3066\u3044\u308b\u3002\u5b9f\u969b\u306b\u306f\u3069\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3082\u5024\u3092\u8fd4\u3057\u3066\u304a\u308a\u3001\u660e\u793a\u3057\u306a\u3044\u5834\u5408\u306f\u9001\u308a\u5148\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u81ea\u8eab\uff08\u3053\u306e\u5834\u5408\u306fMyMorph\uff09\u304c\u8fd4\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<pre>mouseStillDown: evt\n    self delete<\/pre>\n<p>\u4ee5\u524d\u306b\u3082\u8ff0\u3079\u305f\u3088\u3046\u306b\u3001delete\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308c\u3070\u4efb\u610f\u306e\u30e2\u30fc\u30d5\u3092\u6d88\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u5f53\u7136\u3001\u81ea\u5206\u81ea\u8eab\u306bdelete\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308c\u3070\u3001\u81ea\u5206\u3092\u6d88\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n\u9577\u62bc\u3057\u306e\u6642\u9593\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001mouseStillDownThreshold\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3057\u3066\u3001\u30df\u30ea\u79d2\u5358\u4f4d\u306e\u6570\u5024\u3092\u8fd4\u3059\u3002<\/p>\n<pre>mouseStillDownThreshold\n    ^ 1000<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u9577\u62bc\u3057\u3067\u30e2\u30fc\u30d5\u304c\u524a\u9664\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u3002<br \/>\n\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u30e2\u30fc\u30d5\u306e\u9818\u57df\u5185\u306b\u5165\u3063\u305f\uff0f\u51fa\u305f\u5834\u5408\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f\u3001handlesMouseOver:\u30e1\u30bd\u30c3\u30c9\u3068mouseEnter:\u30e1\u30bd\u30c3\u30c9\u3001mouseLeave:\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u3002<\/p>\n<pre>handlesMouseOver: anEvent\n    ^ true<\/pre>\n<p>handlesMouseDown:\u3084handlesMouseStillDown:\u30e1\u30bd\u30c3\u30c9\u3068\u540c\u69d8\u306b\u3001true\u3092\u8fd4\u3059\u3053\u3068\u3067\u30a4\u30d9\u30f3\u30c8\u304c\u9001\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<pre>mouseEnter: anEvent\n    self borderColor: Color black.\n    self borderWidth: 1<\/pre>\n<p>\u30de\u30a6\u30b9\u304c\u30e2\u30fc\u30d5\u306e\u9818\u57df\u5185\u306b\u5165\u308b\u3068\u9ed2\u3044\u67a0\u7dda\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<pre>mouseLeave: anEvent\n    self borderWidth: 0<\/pre>\n<p>\u30de\u30a6\u30b9\u304c\u9818\u57df\u5916\u306b\u51fa\u308b\u3068\u67a0\u7dda\u304c\u6d88\u3055\u308c\u308b\u3002<br \/>\n\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5f62\u3067\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u308a\u6271\u3046\u3002<br \/>\n\uff08\u7b2c\uff19\u56de\u304a\u308f\u308a\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e2\u30fc\u30d5\u306f\u305d\u308c\u305e\u308c\u304c\u500b\u5225\u306b\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u4eca\u56de\u306f\u3001\u7b2c\uff17\u56de\u307e\u3067\u3067\u7d39\u4ecb\u3057\u305fMyMorph\u3067\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3076\u3002 \u53d7\u3051\u53d6\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u30de\u30a6\u30b9\u30a4\u30d9\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,19],"tags":[],"class_list":["post-2706","post","type-post","status-publish","format-standard","hentry","category-pharo","category-tutorials"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=2706"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2706\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=2706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=2706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=2706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}