Friday, February 27, 2009
VerifyError: Error #1025: An invalid register 3 was accessed
Friday, February 27, 2009
0 Comments
Today I encountered a strange build error which had me scratching my head for a little while.
Details from the output window (class names and packages xxx out for now):
verify com.xxx.xxx::xxx/fetchInfo()
- stack:
- scope: [global Object$ flash.events::EventDispatcher$ com.xxx.xxx::xxx$]
- locals: com.xxx.xxx::xxx
0:getlocal0
- stack: com.xxx.xxx::xxx
- scope: [global Object$ flash.events::EventDispatcher$ com.xxx.xxx::xxx$]
- locals: com.xxx.xxx::xxx
1:pushscope
- stack:
- scope: [global Object$ flash.events::EventDispatcher$ com.xxx.xxx::xxx$] com.xxx.xxx::xxx
- locals: com.xxx.xxx::xxx
2:getlocal3
VerifyError: Error #1025: An invalid register 3 was accessed.
at com.xxx.xxx::xxx/fetchInfo()
at Test_fla::MainTimeline/frame1()
Hmm. Now I was declaring a namespace for the XML I was loading remotely. When I commented out this line:
default xml namespace = myXML.namespace();
I didn't get the strange error anymore. However, if I need that line, what I'd have to do is after I am done with the XML:
default xml namespace = new Namespace("");
With that in place, you won't get that crazy error. Do I know what the error actually is? Not really.
Thursday, February 26, 2009
MobileMe Improvements
Thursday, February 26, 2009
0 Comments
I am a long-time .Mac (and thus now MobileMe) user. Prior to yesterday, some things about the service were pretty nice, but in general I was a paying member only because it was a little something extra to keep some data in sync. But it always had it's problems and always left me wanting more.
One of the reasons that I never stopped re-subscribing is because of the easy photo syncing that members of my family are subscribed to using iPhoto. Because they aren't necessarily tech-savvy, it makes the "just works" aspect very important. I only had to use iChat, control their Mac, and add the feed & they are done. No family tech support required.
Anyway, since yesterday I can honestly say that MobileMe is wonderful. The online interface is a whole lot snappier and it works. The mounted iDisk drive is a lot snappier too, and works. The restored MobileMe push is nearly instant, as I was playing around in my calendar and things were ping-ponging with quick ease.
Things that would never sync before (for whatever unknown reason) now work. I really love MobileMe whereas before I just liked it.
Now all Apple needs to do is to upgrade TimeCapsule in the next OS X update (because my wife's Macbook has never been able to complete an initial backup to it even over Ethernet). Yes, and we're on our second TimeCapsule. Keeping it just for the 802.11g and the hopes that the laptop will eventually be able to do the TC thing I enjoy on other machines.
Adobe AIR Marketplace URL
0 Comments
The Adobe AIR Marketplace is a great destination, and you can get there by visiting the subdomain like so:
which actually redirects you to:
Here is a question though. Why the redirect?
Perhaps there is some kind of CF/database dependancy going on to have it deployed where it is, but it would feel ultimately a lot more approachable and succinct to keep it at the airmarketplace subdomain, all wrapped up in a nice tidy bow.
It's probably considered a nit, but I think that Adobe might want to move the guts to that subdomain if possible. The redirect does indeed work, and we all have bookmarking, but at the end of the day a more succinct URL destination might prove to be a little tidier.
Wednesday, February 18, 2009
Gridiron Flow is pretty nice
Wednesday, February 18, 2009
0 Comments

It will find the document class without any problem, but I'd like it to show stubs for the imported classes too. I haven't seen that happen (yet). Overall though it's a really sweet tool.
I'll actually read up on some documentation for this thing to make sure I'm using it properly. The idea behind this is quite remarkable.
Flex progress cursor centering
0 Comments

It's a pretty minor nit, but it seems off by about a pixel.
When you talk twips, perhaps they could have moved it over one so it rendered like it was actually centered. You never see these things for very long, but when one is up for any length of time, I noticed it.
Tuesday, February 17, 2009
Beanstalk just upgraded free accounts
Tuesday, February 17, 2009
0 Comments
I just received a welcome email.
This is an update for all Beanstalk account owners who are currently on the FREE plan. Today we upgraded storage on all free accounts from 20mb to 100mb.That's super sweet. I like this SVN service quite a bit, if you haven't tried it I suggest you do. Beanstalk Twitter.
Diana Krall: Live In Paris
0 Comments
I am no big fan of jazz, but evidently it has it's place here in the house. Being laid up a bit with a pulled muscle in my back, I discovered Diana Krall's Live In Paris album on Apple TV (iTunes). So calming and nice... I should think about coding to this sometime. Anyway, with a fire in the fireplace and some Krall coming through in some 5.1 is a really nice thing when the sun is sinking low.
Labels: Coding Jazz, Krall, Music
Friday, February 13, 2009
Namespaces are a pain
Friday, February 13, 2009
1 Comments
var myLoader:URLLoader = new URLLoader();I mean, come on, that's just weird. Why couldn't I set the namespace once somehow and just use regular dot notation from then on out? (Unless I can and I am missing something). I pulled the code above out of my backside and lo' and behold it worked.
myLoader.addEventListener( Event.COMPLETE, onLoadXML );
myLoader.load( new URLRequest( "http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL" ));
function onLoadXML( e:Event ):void
{
var ns:Namespace = new Namespace("http://www.xignite.com/services/");
var myXML:XML = new XML( e.target.data );
trace( "Name " + myXML.ns::Name );
trace( "Last " + myXML.ns::Quote.ns::Last );
trace( "Price Earnings " + myXML.ns::Statistics.ns::Price_Earnings );
trace( myXML.ns::News.ns::StockNews.ns::Headline[0] );
var len:Number = myXML.ns::News.ns::StockNews.ns::Headline.length();
trace( myXML.ns::News.ns::StockNews.ns::Headline[len-1]);
}
Namespaces are something I need to properly wrap my head around, as it seems it's coming up more and more. I wasn't even quite sure that my original parsing problem was namespace related or not. In the above XML returned, do they really need to define namespaces?
Here is something better (this is all still a bit of a pain):
var myLoader:URLLoader = new URLLoader();
myLoader.addEventListener( Event.COMPLETE, onLoadXML );
myLoader.load( new URLRequest("http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL" ));
myLoader.dataFormat = "XML";
function onLoadXML( e:Event ):void {
var myXML:XML = new XML(e.target.data);
if( myXML.namespace() != null)
default xml namespace = myXML.namespace();
trace("Outcome: ", myXML.Outcome);
trace("Delay: ", myXML.Delay);
}
Labels: AS3, Code, Namespaces
Monday, February 9, 2009
Navigating Yahoo! weather nodes
Monday, February 9, 2009
1 Comments
I took a straight XML approach to loading weather data from Yahoo! by simply using a URLLoader and using the address http://weather.yahooapis.com/forecastrss?p=01701. It returns an XML blob full of current and forecast data, which is great & it's very fast. Previously I was using a different service and it worked well for the 10% of the uptime the service provided (ugh). So a service on stronger footing was required, hence Yahoo!
Accessing the nodes by hand isn't exactly straight-forward though. One of the nodes I am most interested in looks like this in the resulting XML: <yweather:condition text="Mostly Cloudy" code="26" temp="57" ></yweather:condition> - perfectly understandable. But if you try to access it like so:
private function loadedXML(e:Event):voidyou'll get a compiler barf about that ":" in the node name. So you CAN access it like so:
{
var myXML:XML = new XML(e.target.data);
trace(myXML.channel.item.yweather:condition);
}
private function loadedXML(e:Event):voidHowever that leaves an incredibly bad taste in my mouth as if the order of the tags ever change, this code breaks. I did throw a question to the FlashCoders list about this too. There has got to be a superior solution to this. I did quickly try to use the Yahoo! webapis classes to get this job done, but I was getting strange WeatherResultEvent errors and decided to quickly roll my own up.
{
var myXML:XML = new XML(e.target.data);
trace(myXML.channel.item.children()[5]);
}
UPDATE:
Thanks to FC, I looked to Namespaces. It took a bit to get it going, but here we are:
A major part of the problem was the online specifications from Yahoo! were wrong, and the namespace URI was incorrect. That didn't help much. Once I dug into the returned XML myself, I saw the problem right away.private function loadedXML(e:Event):void
{
var myXML:XML = new XML(e.target.data);
var foo:Namespace = new Namespace("http://xml.weather.yahoo.com/ns/rss/1.0");
trace( myXML.foo::condition.@text );
}
UPDATE 2:
Here is something I wasn't aware that I could do. Now, there are several yweather:forecast nodes, one node per day reported. Well, you could grab the node attribute, which runs all the node values for each into one big, useless string that you can't substring because you don't know the length of each individual one, or you can do this:
var txt:String = myXML.channel.item.foo::forecast.@text[0];Works like a charm and you don't need to approach any hacks getting that data out of there. I tried it on a whim & it worked, albeit I am not completely up to snuff with XML as I was with AS2. AS3 is SO much better as I find out nearly daily. I don't think they need AS4 ever... just add some things to 3.
var txt2:String = myXML.channel.item.foo::forecast.@text[1];
