query: tag:AIR

For somewhat reason, I had to salvage data of AIR app, but
the data was found at place that is very difficult to be found.
So I leave a memo for me of in the future ;-)

諸般の事情でAIRアプリのデータをサルベージする必要が発生したのですが、
場所が分かりにくかったのでメモしておきます(MacOSXの場合)

pre>>
~/Library/Preferences/{アプリID}/Local Store/
<<--

The place I found it is as mentioned above.

こんな感じの場所にありました。

posted by takiuchi takiuchi on Wed 20 May 2009 at 03:19 with 0 comments

今までtraceでデバッグしてきましたが、一度は使ってみようと思い使ってみました。便利ではありませんが、処理の流れを確かめたいというときはよいと思います。

###デバッグの準備:デバッグ用AIRの準備
1つ目のコマンドプロンプト開き、デバッグ用flashを生成します。
shell>>
C:\test_app>amxmlc -debug=true app.mxml
<<--

###デバッグの準備:fdbコマンドラインデバッガ
2つ目のコマンドプロンプト開きます
shell>>
C:\flex_sdk_3\bin>fdb
(fdb) run
Player が接続するのを待っています
<<--

###デバッガーの開始
1つ目のプロンプトで、AIRアプリを実行します
shell>>
C:\test_app>adl app.xml
<<--

2つ目のプロンプトでAIRアプリが接続した旨が表示されます
shell>>
(fdb) run
Player が接続するのを待っています
Player が接続されました。セッションを開始しています。
[SWF] app.swf - 1,177,344 バイト (解凍後)
<<--

###ブレークポイントを設定する
ファイル:app.mxmlの62行目に追加する場合
shell>>
(fdb) b app.mxml:62
(fdb) continue
SWF ファイルまたはフレームから追加の ActionScript コードがロードされました。
現在ロードされているすべてのファイルを表示するには、「info files」と入力してくだ
さい。
ブレークポイント 7 が app.mxml:62 の onAppComplete() に解決されました
<<--

###ブレークポイントの確認
shell>>
(fdb) info breakpoints
Num Type Disp Enb Address What
7 breakpoint keep y 0x00000000 の場所にある onAppComplete() 内 app.mxml:62
<<--

###ブレークポイントの削除
continueを発行してブレークポイントが設定できなかった場合など、下記のように削除します
shell>>
(fdb) delete 2
(fdb) delte 3 6
(fdb) continue
<<--

###スタックトレースの表示
ブレークポイントで停止した際に下記のコマンドでスタックトレースが表示されます
shell>>
(fdb) bt
#0 this = [Object 35225761, class='memoApp'].app/onAppComplete(e=[Object 3
7504001, class='mx.events::AIREvent']) 場所 : app.mxml:62
#1 EventDispatcher/dispatchEventFunction() 場所 : app.mxml:0
#2 this = [Object 35225761, class='memoApp'].EventDispatcher/dispatchEvent(_ar
g1=[Object 37504001, class='mx.events::AIREvent']) 場所 : app.mxml:0
#3 this = [Object 35225761, class='memoApp'].UIComponent/dispatchEvent(event=[
Object 37504001, class='mx.events::AIREvent']) 場所 : UIComponent.as:9051
#4 this = [Object 35225761, class='memoApp'].WindowedApplication/enterFrameHan
dler(e=[Object 37504289, class='flash.events::Event']) 場所 : WindowedApplicati
on.as:2522
<<--

###Refs
http://livedocs.adobe.com/flex/3_jp/html/help.html?content=CommandLineTools_4.html
http://livedocs.adobe.com/flex/3_jp/html/help.html?content=debugging_03.html#240390
http://livedocs.adobe.com/flex/3_jp/html/help.html?content=debugging_02.html#240284
http://www.adamrocker.com/blog/151/actionscript30_flex_debugger_fdb.html

posted by satoko satoko on Mon 2 Jun 2008 at 11:51 with 0 comments

http://livedocs.adobe.com/air/1/devappshtml/help.html?content=SQL_20.html#1085042

自分用で訳してみたのですが、よく知られたプラクティスが多かったように思います。

  • Pre-create database connection
    アプリ立ち上げ時に open()/openAsync()しておく

  • Reuse database connection
    作成したconnectionはアプリ全体で使いまわす

  • Favor asynchronous execution mode
    同期と非同期をうまく使いこなそう。データを1行追加するようなINSERTはsynchronousでやればいいが(ほとんど時間がかからないので)、複雑なSELECTの場合asynchronousのほうがいいかもしれない(でないとユーザはレスポンスが帰るまでユーザはなにもできない)。

  • Use separate SQL statements and don't change the SQLStatement's text property.
    4つのSQL処理があったら、4つのSQLStatementを作ろう。

  • Use statement parameters
    Statement文字列に入力データを入れないで、必ずパラメータを使ってすること。

  • Use constants for column and paramter names
    スペルエラーを防ぐため、カラム名を持つ文字列定数を作成する。パラメータ名を持つ同様のものも作ってもよい。

posted by satoko satoko on Mon 7 Apr 2008 at 00:12 with 0 comments

DBでDATETIME型で保存していたのですが、1.0で動かそうとしたらupdated_at(flash側ではDate)がInvalidDateと表示されてしまう。MYSQLクライアントでSELECTしたら特に問題なさそう。??と思ったのですが動いたのでメモ。

###修正したところ

  • DB側はDATETIMEではなくてDATE
    下にあるように親和性が高いカラムのほうが楽だと判断しDATE型にしました。DATEといっても日付と時間も格納してくれます。
  • parameterで渡すのはDateのインスタンス
    getTime()だとNumberが帰ってしまうので、INSERTはOKなんだけど、SELECTしてblog.updated_atとすると”Invalid Date”といわれてしまう。

java>>
stmt.parameter[":updated_at"] = new Date(); //OK
stmt.parameter[":updated_at"] = new Date().getTime(); //NG:beta3までは動いてた
<<--

###サポートされるSQLの仕様:local database
http://livedocs.adobe.com/air/1/jslr/localDatabaseSQLSupport.html

###サポートされる型で特に親和性が高いもの

The affinity of a column is the recommended type for data stored in that column. When a value is stored in a column (through an INSERT or UPDATE statement), the runtime attempts to convert that value from its data type to the specified affinity
http://livedocs.adobe.com/air/1/jslr/localDatabaseSQLSupport.html#columnAffinit

下記のカラムとは親和性があり、実行時にデータ型を変換してくれるそうです。

  • TEXT (or STRING)
  • NUMERIC
  • INTEGER
  • REAL (or NUMBER)
  • BOOLEAN
  • DATE
  • XML
  • XMLLIST
  • OBJECT
  • NONE

###DATEの親和性

A column with DATE affinity stores date and time values. A DATE column is designed to accept values that are ActionScript or JavaScript Date instances. If an attempt is made to store a String value in a DATE column, the runtime attempts to convert it to a Julian date. If the conversion fails an error occurs. If code attempts to store a Number, int, or uint value, no attempt is made to validate the data and it is assumed to be a valid Julian date value. A DATE value that's retrieved using a SELECT statement is automatically converted to a Date instance. DATE values are stored as Julian date values using the REAL storage class, so sorting and comparing operations work as you would expect them to.

NOTE:太字は私が強調をつけたところです。

posted by satoko satoko on Wed 26 Mar 2008 at 10:24 with 0 comments
Contents rssrss
Leading Smart TV App Development Companies | USA | 4 Way Technologies
Apple TV Developer | TVOS Development | USA | 4 Way Technologies
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Value Transformer
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Tags
AIR
Comments rssrss
https://sbornye-gruzy-kitay.ru/ https://sbornye-gruzy-kitay.ru/: Реально ли привезти косметику? Там же нужны особые... 04/08 03:06
https://proffseo.ru/prodvizhenie-sajtov-po-moskve https://proffseo.ru/prodvizhenie-sajtov-po-moskve: Цена: 48 800 ? Чаще всего, по статистике, у комп... 04/07 15:23
https://dez-spasatel.ru/articles/dezinfektsiya/osobennosti-obrabotki-borshchevika-vblizi-vodoemov-i-naselennykh-punktov/ https://dez-spasatel.ru/articles/dezinfektsiya/osobennosti-obrabotki-borshchevika-vblizi-vodoemov-i-naselennykh-punktov/: Подробнее о СЭС ЗАО https://dez-spasatel.ru/dezins... 04/07 11:58
https://socdental.ru/protezirovanie/koronki-na-zuby/metallicheskie/ https://socdental.ru/protezirovanie/koronki-na-zuby/metallicheskie/: В ее основе лежит технология компьютерного сканиро... 04/07 09:33
https://redmetsplav.ru/ https://redmetsplav.ru/: РедМетСплав предоставляет обширный выбор первоклас... 04/06 19:56
https://skyprofi.ru/stati/natyazhnoj-potolok-na-balkone/ https://skyprofi.ru/stati/natyazhnoj-potolok-na-balkone/: Эксклюзивный https://skyprofi.ru/tenevye-natyazhny... 04/06 19:38
瀧内元気 瀧内元気: テスト 04/06 10:43
https://stosastudio.ru/catalog/kuhni-lounge/ https://stosastudio.ru/catalog/kuhni-lounge/: Фабрика Tessarolo https://stosastudio.ru/vybiraem-... 04/06 08:14