Googolflex!!
  • Home
  • About
  • Contracting

Recent Posts

  • Sprint’s new “Simply ‘Almost’ Everything®” Plans
  • CSS Changes in Flex 4
  • Dotted Underline LinkButton (Flex)

About The Author : jwd

This is John Dusbabek's tech blog. John is a software engineer and Flex developer in Provo, UT, where he lives with his lovely wife and four sons.

Recent Comments

  • Nikos on Flex: Binding to an Interface
  • Iain Hosking on Apache mod_proxy_balancer: No Protocol handler was valid

Archive for February, 2008

Feb
29

OS Update: Windows Server 2003 64-bit

Posted by: jwd | Comments (0)

Windows Server 2003 Enterprise (32-bit) was an excellent platform for web and software development, one that I have been using since I purchased my laptop in 2005. I could never find adequate video drivers for it, but that was fine as I do most of my gaming on one of my Windows XP machines. Other than that small complaint, I didn’t have any problems that weren’t solved by a quick Google search and maybe a file download. I often felt slightly dismayed that I was running a 32-bit OS on a 64-bit processor, and I finally decided to remedy this in January by installing Windows Server 2003 Enterprise 64-bit edition.

I haven’t been nearly as pleased with it, and after almost 2 months I’m preparing to go back to the 32-bit edition. I thought the driver situation for x64 would be comparable to x32, boy was I wrong. I found a 64 bit video driver that doesn’t work properly for my system, I still haven’t gotten sound to work, and to be honest I haven’t really noticed any difference when running my 64 bit applications (in performance or responsiveness). There are a number of applications that I used to use regularly that A) don’t work correctly, B) won’t install, and/or C) Have no 64-bit version.

I’m not sure exactly what I was expecting, but I was expecting it to be better than this. I normally wipe my system and do a fresh install every year to 18 months, but the idea of going even another month like this is out of the question.

Categories : OS's, Windows Server 2003
Comments (0)
Feb
29

Error Iterating Through HTTPService Results

Posted by: jwd | Comments (0)

I was recently up at arms because of an error I was getting while iterating through the results of an HTTPService in my Flex application. The error would only present itself if there was exactly one result returned (the service was returning plaintext XML) but not when there were 0 or more than one. Stepping through the code revealed that the result was indeed there, but rather than iterating through a collection of results with only one member, it was iterating through the properties of that one result. This resulted in the message:
ReferenceError: Error #1069: Property id not found on int and there is no default value.
after the program crashed).

I really thought this was a bug in the Actionscript implementation, so I tried using the Flex 3 SDK to compile, but the error was still manifest. So I checked Adobe’s issue tracking site, figuring someone else had to be having the same problem I was, and sure enough I was able to find two tickets describing the same problem (tickets SDK-14567, and SDK-13699 if you’re interested). To my astonishment they were both marked as ‘resolved, not a bug’.

Here’s the scoop: If there’s only one result then it is returned as an ObjectProxy; if there are more than one it’s returned as an ArrayCollection of ObjectProxys. I thought this was pretty stupid at first, until I realized that if I was only expecting one result back it’d be a hassle to have to treat it like an ArrayCollection.

So anyway, on one of the tickets, they suggested doing something like:
var response : ArrayCollection = new ArrayCollection( ArrayUtil.toArray(event.result.blahs.blah) );
which I presume would have turned a single result into an ArrayCollection so it could be iterated using the for..each..in construct. It didn’t work for me. I ended up having to do a test and then processing each type separately.

I tested using:
( if event.result.blahs.blah is ObjectProxy )
and two helper functions; one that iterated over the results, and one that handled them directly.

Note: Initially I solved the problem by handling the special processing in the catch of a try..catch block. That was a third-degree hack. What I’m using now isn’t that much better, in my opinion, the real value is that I understand a little better what’s going on. I thought I could force the service to return as an Array but that didn’t work for me either (possibly because I was still processing it like XML).

Categories : Actionscript, Flex 2, Flex 3, PHP, Scalability
Comments (0)
Feb
03

Maven: Rebuilds Everything!

Posted by: jwd | Comments (0)

I use Maven as my primary build & deploy utility for the Flex/Java development that I do. It may be a configuration error on my part that I’ll eventually need to look into, but every time I build my project, Maven builds the entire thing. This is especially annoying in two circumstances… first, when the Java development is pretty much finished and generally does not change from build to build; second, when the project starts getting longer (I have some that take 0:45-1:30 minutes to build, and some of my colleagues have projects that take longer).

This is going to seem trivial, but I’ve started using Flex Builder to do most of my incremental builds, while leaving JBoss (hosting my Java backend) running. The only change I’ve had to make is in my Services.mxml. Since Flex Builder deploys to http://localhost, and JBoss has my services running on http://localhost:8080, I’ve just had to change the RemoteObject endpoint from messagebroker/amf to the full URL, http://localhost:8080/project-name/messagebroker/amf. And now my builds take about 10 seconds.

Whenever I make a change to the Java, or want to deploy a full EAR, I just change it back and run Maven. To facilitate changing back and forth, I’ve declared a constant with my two endpoints, and bound the endpoint property of the RemoteObject to the constant. Then I just comment out which constant I don’t want to use.

Simple, somewhat obvious… but a huge time saver.

Categories : Actionscript, Flex 2, JBoss, Maven
Comments (0)

Search

Feedburner

Subscribe to

Get the latest updates delivered via email

Calendar

February 2008
M T W T F S S
« Jan   Mar »
 123
45678910
11121314151617
18192021222324
2526272829  

Archives

  • July 2010 (1)
  • June 2010 (2)
  • May 2010 (1)
  • February 2010 (11)
  • January 2010 (3)
  • December 2009 (5)
  • November 2009 (1)
  • August 2009 (8)
  • July 2009 (8)
  • May 2009 (4)
  • April 2009 (1)
  • March 2009 (6)
  • January 2009 (1)
  • November 2008 (4)
  • October 2008 (5)
  • September 2008 (1)
  • August 2008 (5)
  • July 2008 (1)
  • June 2008 (2)
  • May 2008 (8)
  • April 2008 (5)
  • March 2008 (2)
  • February 2008 (3)
  • January 2008 (1)
  • December 2007 (6)
  • November 2007 (9)
  • October 2007 (1)
  • September 2007 (2)

Categories

Tag Cloud

adobe apache Architecture book review C++ centos client server architecture Custom Components database Design error message fedora flash catalyst flex Flex 3 Flex 4 fms iis 6 Interaction Design load balancing master-master master-slave mod_proxy_balancer Monkey Patching MySQL no protocol p2p peer to peer Perl PHP Red5 regex replication self registration selinux Shell Scripting shortcut manager skins socket policy file sockets states stored procedures stratus tools workflow

Coworkers

  • Casey Jackman
  • Sean Murphy

Family

  • Emily & CJ
  • Family Blog
  • Gary Dusbabek

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

RSS FlexExamples

  • Styling the text selection format on a Spark TextArea control in Flex 4
  • Setting the scale mode on a Spark Image control in Flex Hero
  • Setting the fill mode on a Spark Image control in Flex Hero
  • Setting a bitmap image fill on a Spark Form container in Flex Hero
  • Setting a bitmap image fill on a Spark FormHeading control in Flex Hero

Spam Blocked

847 spam comments
blocked by
Akismet

Sponsored Links

JUICE Chat

BYU Adobe Users Group


Copyright © 2010 All Rights Reserved
Flexx Theme by iThemes
Powered by WordPress