前の日 / 次の日 / 最新 / 2008-02

MuraTaka 速記メモ / 2008-02-10

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

2008-02-10 Sun

RoR と Adobe AIR を使ったアプリ例を試してみた [Ruby][AIR]

- Think IT 第1回:付箋紙アプリケーションを作ろう! (1/3)
を試してみた。

書かれてある通りに行っていき、実行してみたら、ランタイムエラー。
- [Think IT] 第3回:Adobe AIRで付箋風クライアントを作ろう (3/3)

$ adl Test-app.xml 
invalid application descriptor: descriptor version does not match runtime version

http://ns.adobe.com/air/application/1.0.M4
としていたのを、
http://ns.adobe.com/air/application/1.0.M6
に変更。で、実行。
$ adl Test-app.xml 
invalid application descriptor: application filename must have a non-empty value.
今度は上記エラー。

どうも、Application Descriptor ファイルの書式が変わった模様。
- AIR Beta 3 Migration Tips Kevin Hoyt
以下に書き換えてやっと動いた。。。
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/1.0.M6">
  <id>com.gmail.taro.yamada.test1</id>
  <name>TestAPP</name>
  <version>1.0</version>
  <filename>Example Application</filename>
  <description>Test APP</description>
  <initialWindow>
    <content>test.swf</content>
    <systemChrome>standard</systemChrome>
    <title>Example Application</title>
    <transparent>false</transparent>
    <visible>true</visible>
  </initialWindow>
</application>

- [Think IT] 第4回:AIRでメニューウィンドウ作成! (3/3)
このページで、menu.mxml に create 関数を定義するが、これも
NativeWindow クラスのコンストラクタに変更があった模様で、以下のよ
うに書かないといけない。
<mx:Script>
    <![CDATA[
      public var sticky:NativeWindow;
      public function create():void {
        var initOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
        sticky = new NativeWindow(initOptions);
        sticky.visible = true;
        messages.text += ">> Created new sticky\n"; // @debug
      }
    ]]>
- Developing AIR Applications with Adobe Flex 3
とりあえず今日はここまで。

moccur を使えるようにしておく [Emacs]

- EmacsWiki: color-moccur.el
- EmacsWiki: moccur-edit.el
color-moccur.el と moccur-edit が必要となる。
install-elisp を使ってインストールする。
・color-moccur.el

Compiling file /Users/taka/.emacs.d/color-moccur.el at Sun Feb 10 03:05:20 2008
color-moccur.el:425:6:Warning: `make-local-hook' is an obsolete function (as
    of Emacs 21.1); not necessary any more.

In moccur-set-regexp:
color-moccur.el:1595:51:Warning: reference to free variable `regexp'

In end of data:
color-moccur.el:3641:1:Warning: the following functions are not known to be defined: string>,
    add-local-hook, migemo-get-pattern
・moccur-edit.el
Compiling file /Users/taka/.emacs.d/moccur-edit.el at Sun Feb 10 03:08:56 2008
moccur-edit.el:58:1:Warning: defface for `moccur-edit-face' fails to specify
    containing group
moccur-edit.el:69:1:Warning: defface for `moccur-edit-file-face' fails to
    specify containing group
moccur-edit.el:80:1:Warning: defface for `moccur-edit-done-face' fails to
    specify containing group
moccur-edit.el:91:1:Warning: defface for `moccur-edit-reject-face' fails to
    specify containing group

In moccur-edit-get-info:
moccur-edit.el:195:18:Warning: `string-to-int' is an obsolete function (as of
    Emacs 22.1); use `string-to-number' instead.

In moccur-edit-mode-in:
moccur-edit.el:312:4:Warning: `make-local-hook' is an obsolete function (as of
    Emacs 21.1); not necessary any more.
warning が出ているが、とりあえずほっておく。
.emacs.el に以下を追加。
(require 'color-moccur)
(require 'moccur-edit)

いやぁ、便利なツールだ!
- Emacs で wdired と moccur-edit を使っていない人は(ry - ひげぽん OSとか作っちゃうかMona-
- ウノウラボ Unoh Labs: Emacsでソースコード解析

ActionScript を触ってみる [ActionScript]

- Adobe - Adobe Flex 2: Flex 2 SDK
から SDK をダウンロードする。



この後、Flex 3 が出ていることを知り、Flex 3 を使うことに。
- Adobe Labs - Flex 3 Software Development Kit
Flex 3 SDK を落としておけば、AIR SDk も含んでいるのでそのまま AIR
の開発も行える。



ドキュメントもダウンロードしておく。
- Adobe - Flex: Flexドキュメンテーション

インストールは、ダウンロードした SDK を展開して、パスを通しておく
のみ。
Java の実行環境が必要になる。

/Users/hoge/local/flex2 に展開を行ったので、
/Users/hoge/local/flex2/bin にパスを通しておく。

Emacs を使っているのだが、ActionScript 用のモードは何か提供されて
いないかな?

- 2007-01-28 - flashrod
- EmacsWiki: ecmascript-mode.el
を入れておく。.emacs.el に以下を追加。
;; for ECMAScript
(autoload 'ecmascript-mode "ecmascript-mode" "ECMAScript" t)
(setq auto-mode-alist
      (append '(("\\.as$" . ecmascript-mode))
              auto-mode-alist))

さて、Flex 2 SDK には本体と日本語化パック(flex_sdk_2_ja)もある。
日本語パックのあて方は、本体に被せるだけ。

で、
$ mxmlc -help
とやってみたが、思いっきり出力が文字化けしてます・・・。UTF8 をデ
フォルト使用しているのだが、そりゃそうだよな・・・出力が Shift_JIS
になっているんだもん・・・
なんで今どき Shift_JIS などにしているんだ???

簡単な AS を書いてコンパイルしてみる。
$ mxmlc HelloWorld.as
設定ファイル "/Users/hoge/local/flex2/frameworks/flex-config.xml" をロードしています
/Users/taka/work/action-script/HelloWorld.swf (641 bytes)
この mxmlc はコンパイル速度が結構遅いため、キャッシュを使ったコン
パイラ fcsh (Flex Compiler Shell) を使うとよいらしい。
- [[http://labs.adobe.com/wiki/index.php/Flex_Compiler_Shell]]
しかし、上記ページは今時点、サーバエラーがあって開けない。。

サンプルがいくつか付属しているので、そちらも確認してみる。
/Users/hoge/local/flex2/samples_ja
配下にサンプルがあり、build-samples.sh が用意されているので叩いて
みる。
いやぁ、こんなインターフェイスが使えるとなると、幅が広がるなぁ。

Referrer (Inside): [2008-02-12-2]

2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12

最終更新時間: 2009-10-14 00:22