dango_generator 0.4.8 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,28 +7,36 @@
7
7
 
8
8
  <mx:Script>
9
9
  <![CDATA[
10
- import org.rubyforge.dango.*;
10
+ import org.rubyforge.dango.*; // dangoライブラリを読み込み
11
11
 
12
12
  private var dango_client:DangoClientFramework;
13
13
 
14
+ // コンストラクタの中で接続とイベントリスナの設定を行います
14
15
  public function app_complete():void{
15
- var config:DangoConfig = new DangoConfig();
16
- dango_client = new DangoClientFramework(config);
16
+ // localhostの15000番ポートに接続します。
17
+ dango_client = new DangoClientFramework({"server_host":"localhost", "server_port":15000});
18
+
19
+ // 接続完了時のイベントリスナ定義
17
20
  dango_client.addEventListener("dango__connect", dango__connect);
21
+
22
+ // notice_messageを受け取った時のイベントリスナ定義
18
23
  dango_client.addEventListener("dango_notice_message", dango_notice_message);
19
24
  }
20
25
 
21
- public function click():void{
22
- dango_client.send_action("send_message", {"message": input.text});
23
- }
24
-
26
+ // 接続完了時に、テキストエリアに「接続完了」と表示します。
25
27
  private function dango__connect(evt:DangoReceiveEvent):void{
26
28
  log.text += "接続完了\n"
27
29
  }
28
30
 
31
+ // メッセージを受け取った時に、テキストエリアに受け取ったメッセージを表示します。
29
32
  public function dango_notice_message(evt:DangoReceiveEvent):void{
30
33
  log.text += evt.receive_data["message"] + "\n"
31
34
  }
35
+
36
+ // ボタンをクリックした時にサーバーにsend_messageアクションを送信します
37
+ public function click():void{
38
+ dango_client.send_action("send_message", {"message": input.text});
39
+ }
32
40
  ]]>
33
41
  </mx:Script>
34
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dango_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keisuke Minami
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-08 00:00:00 +09:00
12
+ date: 2008-11-05 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.7.0
23
+ version: 1.8.2
24
24
  version:
25
25
  description: dango_generator
26
26
  email: keisuke@rccn.com
@@ -52,12 +52,18 @@ files:
52
52
  - templates/sample_as3mode/dango/client_swf/bin-debug/sample_as3mode.swf
53
53
  - templates/sample_as3mode/dango/client_swf/bin-debug/AC_OETags.js
54
54
  - templates/sample_as3mode/dango/client_swf/bin-debug/playerProductInstall.swf
55
+ - templates/sample_as3mode/dango/client_swf/bin-debug/history/history.css
56
+ - templates/sample_as3mode/dango/client_swf/bin-debug/history/history.js
57
+ - templates/sample_as3mode/dango/client_swf/bin-debug/history/historyFrame.html
55
58
  - templates/sample_as3mode/dango/client_swf/src/sample_as3mode.mxml
56
59
  - templates/sample_as3mode/dango/server/99_dango_server.rb
57
60
  - templates/sample_servermode_chat/dango/client_swf/bin-debug/sample_servermode_chat.html
58
61
  - templates/sample_servermode_chat/dango/client_swf/bin-debug/sample_servermode_chat.swf
59
62
  - templates/sample_servermode_chat/dango/client_swf/bin-debug/AC_OETags.js
60
63
  - templates/sample_servermode_chat/dango/client_swf/bin-debug/playerProductInstall.swf
64
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/history/history.css
65
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/history/history.js
66
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/history/historyFrame.html
61
67
  - templates/sample_servermode_chat/dango/client_swf/src/sample_servermode_chat.mxml
62
68
  - templates/sample_servermode_chat/dango/server/99_dango_server.rb
63
69
  - templates/as3corelib-readme.txt