ActionScript 3.0

A fun way to open a native window in AIR with MATE

Sometimes when coding it happens that you stumble on something which just strikes you as funny (sometimes for apparently no reason whatsoever).
One such experience happened today when I was coding an AIR client with MATE and I had to open a new NativeWindow.
It should be noted that I for this implementation am experimenting with ridding myself of using Managers (no other motivation than curiosity about will come out in terms of code design and architecture).

Well, the thing that amused me was to use a PropertySetter. This is due to the fact that you have to set the “visible” property in order to actually show the window. However, you also have to pass an object of the type “NativeWindowInitOptions” to the constructor.

The code eventually can be written like this…


<s>

	<s />

	
		
	

</s>



	

		
			
		

	



Advertisements

One thought on “A fun way to open a native window in AIR with MATE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s