Multiple Websites using IIS in WindowsXP

0 comments

Posted on 17th June 2010 by Brian Coleman in IIS | Windows

, , ,

In some cases, you just need multiple websites for development, rather then virtual directories.
Windows 7 handles this just fine, but WindowsXP does not, you have to either create another website via script or code.
OR just download this awesome Dutch software http://www.firstserved.net/help/downloads

Don’t worry about the site not being in English, scroll down to the download link, download and install.
It’s a very simple setup and does exactly what you’d expect, you can create or delete websites in WindowsXP.
After you create a website, it will show up in IIS and you can handle the other setup details there.

And remember, you can only run one website at a time, so make sure to stop any others you may be running before starting your new site.

String ReplaceAll with Flex and Actionscript

0 comments

Posted on 14th June 2010 by Brian Coleman in Actionscript | Flex

, , , ,

This is one of those standards you keep coming back to.
Using RegEx is the quickest way to replace all string values, using the /g flag to make the replace work for all instances in the string.
For something simple you’d do this

myString = myString.replace(/text to find/g, “replace text with this”);

but if there’s any special characters, remember to escape them

myString = myString.replace(/\[text to find\]/g, “replace text with this”);

Installed Adobe Flash Player Is Not a Debugger

0 comments

Posted on 4th June 2010 by Brian Coleman in Flex

, , ,

After uninstalled a Stand-alone version of Flex Builder and installing Adobe CS5 Premium which comes bundled with Flash Builder, I was treated to this lovely error message when trying to debug an app that had previously worked fine.

Installed Adobe Flash Player Is Not a Debugger
Flash Builder cannot locate the required debugger version of Adobe Flash Player. You might need to install the debugger version of the Flash Player or reinstall Flash Builder.

Installed Adobe Flash Player Is Not a Debugger

Whoa there Adobe



I like to use IE as my default debugger because I never use it to browse and along with the above error, I got some funky message about IE can’t install it’s lame Active X plugin because you’ve got another version of Adobe Flash Player installed.

Well great. So after searching up a storm and finding nothing concrete, I came across an Adobe tech-note that said run the uninstaller from the command line and use the /clean option.
After trying that (and re-booting, I guess that’s crucial for IE) everything’s back to working. When installing the next version of the Flash Player and related plug-ins nothing will choke because everything’s been wiped out.

If you need the uninstaller link, here’s the always current version – http://download.macromedia.com/pub/flashplayer/current/uninstall_flash_player.exe

Flex – Handy ComboBox function

0 comments

Posted on 27th March 2010 by Brian Coleman in Flex

,

I need to make a ComboBox extension someday that uses this and binds in some way. It seems pretty useful in many situations, but it’s not quite generic enough yet.

The basic functionality is this…. take an existing ComboBox that uses a dataprovider – preferably with objects of some sort, pass in a parameter that exists in the object, such as a primary key name, pass in a value that you want to match to the object parameter and finally, pass in a data object that will be pushed into the ComboBox if no value is found.

This makes sure that something is always set for a ComboBox, even if the object you expect to be set is not found for some reason.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// sets and returns the index in a combo box for a selected field and value
// if value is not found, the data object will be pushed into the combo box
private function setComboBoxIndex(cb:ComboBox, field:String, value:*, data:*):int{				
       var result:int = -1;
        if (value > -1){
	        var idx:int = 0;					
		for (idx=0; idx < cb.dataProvider.length; idx++){
			if (cb.dataProvider[idx][field] == value){
				cb.selectedIndex = idx;
				return idx;
			}
		}
		cb.dataProvider.addItemAt(data,0);
		setComboBoxIndex(cb, field, value, data);
	}	
	return result;
}

Check for installed Linux package

0 comments

Posted on 25th March 2010 by Brian Coleman in Linux

, ,

This probably changes with different distro – I used Ubuntu, so check for package specifics if it doesn’t work.
To check for installed software that has been installed using apt-get or similar command use this

user@computer:$ dpkg -l | grep packagename
Page 1 of 3123