Loads of tutorials online provide means to control the look and feel of Flex GUI components. Majority of them use MXML to achieve this.
So what if you wanted to control the style in Action Script?
well call the "setStyle" method on the object.
Look at the API for a listing of MXML properties, e,g
mx:Label
Properties
condenseWhite="true|false"
data="null"
htmlText=""
listData="null"
selectable="true|false"
text=""
truncateToFit="true|false"
- example
then call {object}.setStyle("data","null")
Sunday, November 30, 2008
Monday, November 24, 2008
2 letter country code select box
Ever had a need to get 2 letter country codes in a nice prepackaged select box?
Here's the link: SelectBox
However if you copy-paste it into a text editor, you get line numbers that appear on the left. Here's the workaround.
1. Open a Spreadsheet application (OpenOffice Calc e.g)
2. Copy-paste from the website into the spreadsheet.
3. Select the cells and then paste them into the text editor.
voila!
Here's the link: SelectBox
However if you copy-paste it into a text editor, you get line numbers that appear on the left. Here's the workaround.
1. Open a Spreadsheet application (OpenOffice Calc e.g)
2. Copy-paste from the website into the spreadsheet.
3. Select the cells and then paste them into the text editor.
voila!
Tuesday, November 18, 2008
Netbeans Illogical hot keys
Why does Netbeans use crappy hot keys?
I'm using the UML editor and to switch to Pan navigation, I need to hit Ctrl+Shift+Alt+P.
That's 4 keys and the 'P' is way over the Atlantic end of the keyboard.
IMHO, any set of hot keys that involve more than 3 keys should be scrapped.
I'm using the UML editor and to switch to Pan navigation, I need to hit Ctrl+Shift+Alt+P.
That's 4 keys and the 'P' is way over the Atlantic end of the keyboard.
IMHO, any set of hot keys that involve more than 3 keys should be scrapped.
Monday, November 17, 2008
Mondrian Dimension with Table JOIN
If anyone out there ever has a need to join 2 tables in a single dimension, use this:
Table Join in dimension
Table Join in dimension
Mondrian Schema Guide
If you ever need a Mondrian schema reference, here's where to point the browser
Mondrian Schema
Don't bother if you think I'm talking about art
Mondrian Schema
Don't bother if you think I'm talking about art
Sunday, November 16, 2008
Apache secure MUST-DOs
1. Disable directory browsing
edit the virtual hosting file and add this
Options -Indexes
edit the virtual hosting file and add this
Options -Indexes
If you ever need to deny access from a country to your site
Why am I doing this? I have a website in PHP Nuke that I haven't patched (yet!). There are some Indonesian script kiddies that keep taking it out using SQL Injection.
Solution:
Block a country
Solution:
Block a country
Friday, November 14, 2008
Change font size on Netbeans
Netbeans on Ubuntu has fonts that is a size too larger IMHO.
Here's a link on how you can change the font size.
http://blog.igorminar.com/2006/10/changing-font-size-in-netbeans.html
from the link:
"
....
For now, I found out that you can control the font size with a command line parameter
.."
Here's a link on how you can change the font size.
http://blog.igorminar.com/2006/10/changing-font-size-in-netbeans.html
from the link:
"
....
For now, I found out that you can control the font size with a command line parameter
--fontsize . Or even better you can put this in the netbeans.conf file that can be found in /Applications/NetBeans.app/Contents/Resources/NetBeans/etc/ directory. I prefer to use font size 11 (the default is 13). To set this you need to append the setting to the net so the netbeans_default_options variable..."
MySQL recovery
If your MyISAM tables ever get screwed, use this procedure
1. stop mysql
2. go to mysql data folder (typically /var/lib/mysql)
3. run "myisamchk -r -f -s -u *.MYI"
4. restart mysql
1. stop mysql
2. go to mysql data folder (typically /var/lib/mysql)
3. run "myisamchk -r -f -s -u *.MYI"
4. restart mysql
Wednesday, November 12, 2008
Transferring Virtual Machine
If anyone out there ever intends to transfer VMWare VMs from Linux to Windows (for example), then you might have issues with how VMWare handles ext3 and ntfs filesystems.
Check the logs and you will probably see a line mentioning that VMWare is unable to create RAM.
Just add this line to your .vmx file (using a text editor)
mainmem.UseNamedFile="FALSE"
Use that line exactly as it looks.
I forgot where I got this information from. But thanks VMWare guy!
Check the logs and you will probably see a line mentioning that VMWare is unable to create RAM.
Just add this line to your .vmx file (using a text editor)
mainmem.UseNamedFile="FALSE"
Use that line exactly as it looks.
I forgot where I got this information from. But thanks VMWare guy!
Subscribe to:
Posts (Atom)