タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

Flex3とActionScriptに関するtmftakeのブックマーク (1)

  • シングルトンの書き方 - Flex Coder

    ActionScript3.0では、privateなコンストラクタを書けない制約があり、Singletonパターンを実装したクラスが定義できませんでした。んで、解決策が出ています。他のクラスから参照できないブロッククラスを用いる方法です。 Singleton.as package { public class Singleton { public function Singleton(blocker:SingletonBlocker) { if (blocker == null) throw new Error("Public construction not allowed. Use getInstance()"); } public static function getInstance() : Singleton { return instance; } private static

    シングルトンの書き方 - Flex Coder
    tmftake
    tmftake 2009/11/27
    コンストラクタをprivateに出来なくて焦った。
  • 1