Archive for the ‘css’ Category

Yahoo! Flex Skin

Tuesday, July 15th, 2008

Yahoo!作了一套Flex的skin組,下載之後,解壓縮到專案的src下,
引用之:
<mx:Style source="yflexskin.css"/>
即可,效果如下:

他還有給ai檔,讓你做更多的修改喔!

Clone an (Array)Collection

Monday, November 12th, 2007

更新:2008.4.2
用ObjectUtil.copy() 複製物件的byteArray:
var myCloneArrayCollection:ArrayCollection = ObjectUtil.copy( myArrayCollection ) as ArrayCollection;
或者:
var myCloneAC:ArrayCollection = new ArrayCollection( myArrayCollection.list.toArray() );
也可以, 原因是 IList::toArray(); 其實用了 Array#concat();
而concat()方法做了:
Concatenates the elements specified in the parameters with the elements in an array and creates a new array. If the parameters specify an array, the elements of that array are concatenated.
但是但是!如果用了toArray(), Array裡面的item並沒有被複製!

又到了要複製一份ArrayCollection的時間了, 以往都是用很笨很直觀的手法:

//dummy solution( well, it works )
var bar:ArrayCollection = new ArrayCollection();
for each ( var i:Object in ac ){
bar.addItem( i );
}

如今,有位不願具名的神人說了更美妙優雅的作法!!
// fantastic ! //
var bar:ListCollectionView = new ListCollectionView( ListCollectionView( ac ).list );

一行勝千言, 威力可見一斑, 不要再乖乖地走訪array了~

UTF-8 or BIG5 ? That is a question.

Sunday, August 19th, 2007

Well, I hate being bothered by these encoding issues!
I develop a ror website with my TextMate. And the problem is always client’s favorite encoding characters: Big-5. Yes, I love Chinese characters. However, TextMate encode rhtml file with UTF-8. Though I could type well Chinese words on the file.
After browser’s gestures, those letters are broken all the time! So, I must code with Textmate AND write rhtml with Dreamweaver. It make me confused sometimes. @@

Not only database collation is big-5 but also the file database.yml has to add line:
encoding:Big5

CSS排版

Sunday, August 5th, 2007

[引用自:http://www.glish.com/css/ ]
用css排版,常用的版型:
超常用!置中三欄版型
經典三欄版型

更多…