1 Million Items to Trash!
I tried emptying my trash can the other day only to find that i had over One and a half million items in there! after leaving it for the weekend i still had more than a million to delete so i had to resort to the Terminal. And gained myself an extra 10 gig in the process!

So i thought i would write a quick reminder to myself how to quickly empty the trash can instead of using the Finder tool which takes ages!
>> cd ~/.Trash
>> sudo rm -r *
Default Skin for custom FlashBuilder components.
In a recent post on Custom FlashBuilder Component Views I showed how to create a swc file with your custom component.
This raised a question by one of the commenters on how to create default custom skins for your components so that when you ship them a user can use your default skins without having to explicitly set them.
Normally you have to do something like this
<clock:BinaryClock
skinClass="co.uk.betadesigns.binaryclock.BinaryClockSkin"
/>
Setting up my custom component with my custom skin, however if a user of my component doesn't know that they have to set this style they will get a runtime error something like this
Error: Skin for TestProject.ApplicationSkin2._ApplicationSkin_Group1. contentGroup.BinaryClock5 cannot be found.
The way to get around this is to tell the library.swc file that you want to set a default style for your components in case one is not set. This allows you to provide one as well as allowing it to be overridden by anyone that wants to.
All you have to do is create a defaults.css file
/* CSS file */ @namespace "co.uk.betadesigns.components.binaryclock.*"; BinaryCounter { skinClass : ClassReference( "co.uk.betadesigns.components.binaryclock.BinaryCounterSkin" ); } BinaryClock { skinClass : ClassReference( "co.uk.betadesigns.components.binaryclock.BinaryClockSkin" ); }
You need to create this in the top level package of your swc file under ( default package for FlashBuilder or src for Flex3 ).
The First element
@namespace is the namespace to the component you want to reference ( you can include multiple namespaces for multiple components in different packages ).
From this you can see that my BinaryClock is in the package co.uk.betadesigns.components.binaryclock.*
You then setup selectors for all the SkinnableComponents you want to give default skins for.
Next you simply need to include the defaults.css file in the compiler arguments.Properties>Flex Library Build Path>Assets>
Then in the Flex Library Compiler>Additional Compiler Arguments set -defaults-css-url defaults.css This will set the defaults.css file as the default css for all components in the swc
All Done.
Example Project files here. ( Right click save as )
Custom FlashBuilder Component Views
I recently discovered that you can create custom components that can appear under your own company/personal folder inside Flash/Flexbuilder design view. Normally any custom component you create will appear under the Custom folder in the Components View and well thats not very good for branding now is it. In addition you also get an actual size representation of your component in Design view rather than just an empty box outline. For example the first image is the default and the second the custom.



