Archive for June, 2012

Run iPad(Retina) Simulator in Mac OS X Snow Leopard

1. Upgrade Xcode to 4.2 ( most recent by today 2012/06/26 )
If you get failure message right after the installation begins, it is because of the local date is not preferable for the installation. Change the date to some day a year ago, and try to install again, it will succeed this time. Don’t forget to change the local date back to the correct one.

2. Upgrade Titanium SDK to the most recent one too.

3. Download the installation file for Xcode 4.3.3 for Lion from the following site.
you need to be a iOS developer to be able to access this site though.

Open the contents of the installation file, and finish the following steps to copy retina simulator:




Rename /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone to prevent overwriting the file

4. Run the simulator application by clicking


or typing ‘simulator’ in spotlight

Select Hardware -> iPad(Retina)

5. Run app from Titanium Studio and the retina simulator will show up!


callback function was triggered before store finished loading

A javascript error: data store contains undefined data.
It seems that the callback function has been invoked before store data comes back from server. The problem is because when the server has not cached the result for the very first time, it will timeout the request. And the timeout of the connection provided to the HttpProxy was at the default value of 30 seconds, by increasing the value will prevent the error happening.

1. In the store definition:

proxy: new{
  url: 'myurl',
  method: "GET",
  timeout: 90000  // milliseconds

2. Actually for all the ajax timeout value, on the same web page, could be set as the following:
Ext.Ajax.timeout = 90000;

3. Check the result before further manipulation of the returned store data
mystore.load({params: {param_name: param_value},
callback: function(records, options, success)
  if (success && records[0] != undefined)
    // manipulate the data
    var example = records[0].get('item');


Work-wrap in html table


<tablestyle=”table-layout: fixed”>

<tr><td style=”word-wrap: break-word”>





But for my testing, the above code is only good for IE7. Not affect IE8/FF/Chrome.

Safari is looking good without any special code.


Can’t print in Safari browser after the new window shows up


Using Javascript‘….’); script, can’t print in Safari browser after the new window shows up.

The API for is
open (URL, windowName[, windowFeatures])
For safari browser, code as the following:
var win =‘about:blank’, ‘anyname’, ”);

URL: for IE, FF, Chrome, empty string will be OK, but safari has to use ‘about:blank’, otherwise the menubar will not show, i.e. page print will not working after the window show.



iPhone・iPadアプリを修正し、App Storeに再提出する時、色々苦労しました。
試行錯誤ながら、やっと「Waiting For Review」のステータスが表示されました。6時間かかりましたけど。。。

開発環境:iMac, Titanium Studio
エラー①:Titanium Studioでコードを修正しましたら 、下記のエラーが出てきました:[ERROR] [BEROR]Code Sign error: The default keychain doesn’t have an identity matching the profile ‘「アプリの表示名」’ and identity ‘iPhone Distribution: 「省略」’

その原因は「Development Provisioning Profile」を使っていたこと。早速「Distribution Provisioning Profile」をダウンロードして、ようやく赤いエラーメッセージが消えました。

エラー②:TitaniumでコンパイルしてXCodeのオーガナイザに送りました。そしてアーカイブのところに、「Validate」をクリックしたら、下記のエラーが出てきました:No suitable application records were found


エラー③:iPhoneとiPadのアイコンのサイズがそれぞれですから、二つのアイコンファイルを用意しました(57X57, 72X72)。またInfo.plistの中にicon fileの代わりにicon filesという配列を追加しました。


以上、主な問題でした。「Waiting For Review」のメールがもらったとき、 6時間の苦労が報われたなと思いました!




  1. Android SDKのインストール
    • Android SDK から最新のSDKをダウンロードする。
    • 解凍して、できたフォルダを好きなフォルダに入れる。
    • [DIR]/android-sdk-macosx/tools/android ファイルを実行して、Android SDK Managerで必要なSDKをインストールする。
  2. Eclipse IDE for Java Developersをダウンロードして、解凍されたeclipseフォルダを好きなところに入れる。
  3. Eclipseにandroid ADT Pluginをインストール(原文)
    • Start Eclipse, then select Help > Install New Software….
    • Click Add, in the top-right corner.
    • In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:

    • Click OK
      Note: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).
    • In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
    • In the next window, you’ll see a list of the tools to be downloaded. Click Next.
    • Read and accept the license agreements, then click Finish.
      Note: If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.
    • When the installation completes, restart Eclipse.