Jack's Technical Blog
DispatchTimer
I'm not sure why Silverlight 2 doesn't have the normal Timer class. Perhaps it's to keep people from using it instead of Timelines and Storyboards. But, as it turns out, it does have a timer, it's called DispatchTimer and it's in the System.Windows.Threading namespace.
- jack Herrington's blog
- Login to post comments
Thermo
You should have a look at the Thermo demo from MAX. It looks really good.
- jack Herrington's blog
- Login to post comments
Advanced States
Looks like states will be getting more attention in the next release of Flex. Thank goodness. I think states are one of the defining features of Flex, and yet are the most uncovered. We spend so much time talking about the control set that we don't spend enough time covering the entire body of the UI and it's interaction modes with the customer. And that's where states really come in handy.
Book update: The title is now officially 'Getting Started With Flex 3'.
- jack Herrington's blog
- Login to post comments
Introduction To Degrafa
Juan Sanchez has a great Introduction to Degrafa up on InsideRIA. Degrafa is well worth the look. It makes building custom graphics in Flex applications a snap. Plus it fits nicely into the framework so that you can do things like use Degrafa for control skinning.
- jack Herrington's blog
- Login to post comments
XBox and XNA
I bought an XBox this weekend and built a project in XNA. XNA is Microsoft's game development system for both Windows and XBox. Since it's easier to build on the Windows box I spent most of my time writing the application there, with full access to the .NET stack. I then went to move it over to the XBox to find that the XBox only supports a very small subset of the .NET stack, excluding, most particularly any direct access to networking. This is probably a security measure to avoid viruses on the box. While that is appreciated, it severely limits what legitimate application developers can do.
Don't get me wrong, you can do game-style networking. Very easily, in fact. In fact, I found the whole application building process quite pleasant. Which is remarkable given that I have no previous experience in gaming style graphics APIs, which are vastly different from enterprise UI APIs.
What I find annoying about this, and almost all of device development is how strictly licensed it is. I was looking around for some help with the networking API and found a person who had written a text chat example for XNA. Only to have someone post in the comments that the application violated the EULA for the box. Ugh.
Why is it that I can write any application I want for your desktop or laptop, but when it comes to writing for your video game console or cell phone it's restrictive beyond belief. I still haven't gotten my iPhone development key from Apple, which means that I can write iPhone apps, but I can't actually put them on the phone.
I think that's why I find the Open Screen initiative so appealing. One UI toolkit, available across all the platforms. Hopefully there will be enough popular outcry to get it out there.
For the time being I think I'm going to port my daughter's 'stamper' game to the XBox. It's a kids paint program that I wrote in Flex. She can take characters and place them on the screen, then move them around, type in text blocks, draw with crayons and so on. Well, first I'll check the marketplace to make sure someone hasn't done it already. Then I'll do it.
- jack Herrington's blog
- Login to post comments
First Flex book
- jack Herrington's blog
- Login to post comments
Open Screen
- jack Herrington's blog
- Login to post comments
Degrafa Graph
Here is an example bouncy graph that I built using Degrafa. It was a pretty fun little experiment
The code for the Degrafa graph is shown below:
<?xml version="1.0" encoding="utf-8"?> <dg:Surface xmlns:dg="com.degrafa.*" xmlns:geometry="com.degrafa.geometry.*" xmlns:paint="com.degrafa.paint.*" xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="updateData();"> <mx:Script> <![CDATA[ import mx.effects.Effect; [Bindable] public var dataChangeEffect:Effect = null; private var _data:Array = []; private var _scale:Number = 1; public function get scale() : Number { return _scale; } public function set scale( newScale:Number ) : void { _scale = newScale; updateData(); } public function get data() : Array { return _data; } public function set data( newData:Array ) : void { _data = newData; if ( initialized ) updateData(); if ( dataChangeEffect != null ) dataChangeEffect.play([this]); } private function updateData() : void { var min:Number = Number.MAX_VALUE var max:Number = Number.MIN_VALUE; for each ( var dp1:Number in _data ) { min = Math.min( dp1, min ); max = Math.max( dp1, max ); } var ybase:Number = min - ( ( max - min ) * 0.2 ); var yrange:Number = ( max - min ) * 1.4; var yscale:Number = height / yrange; var xscale:Number = width / ( _data.length - 1 ); var points:Array = []; points.push( new Point( 0, height ) ); var curx:Number = 0; for each ( var dp2:Number in _data ) { points.push( new Point( curx, height - ( ( ( dp2 - ybase ) * yscale ) * _scale ) ) ); curx += xscale; } points.push( new Point( width, height ) ); points.push( new Point( 0, height ) ); chartPoly.points = points; } ]]> </mx:Script> <dg:fills> <paint:LinearGradientFill id="backfill" angle="90"> <paint:GradientStop color="#000066" /> <paint:GradientStop color="black" /> </paint:LinearGradientFill> <paint:SolidFill id="solidblack" color="black" /> </dg:fills> <dg:strokes> <paint:SolidStroke id="axis" color="#cccccc" weight="2" /> <paint:SolidStroke id="chartstroke" color="#666666" weight="2" /> </dg:strokes> <dg:graphicsData> <dg:GeometryGroup> <geometry:RegularRectangle width="400" height="300" fill="{solidblack}" /> <geometry:Polygon id="chartPoly" fill="{backfill}" stroke="{chartstroke}" /> <geometry:VerticalLine y="0" y1="{height}" stroke="{axis}" /> <geometry:HorizontalLine y="{height}" x="0" x1="{width}" stroke="{axis}" /> </dg:GeometryGroup> </dg:graphicsData> </dg:Surface>
- jack Herrington's blog
- Login to post comments
Welcome to my new site
This is my new home site. It's where I'll be posting anything about technology. It's the kind of thing a guy like me is supposed to have, but I haven't had it, until today. So, here I am. Jack at Jack Herrington Dot Com.
- jack Herrington's blog
- Login to post comments