Thursday 17 May 2012

Checking for empty xml nodes in as3

Something thats puzzled me for a bit is how to check for empty xml nodes.

so something like....

<aidanmack></aidanmack>


ok so this script isn't all there but I reckon you should get the idea.
 I would of thought doing something like this....

if(aidanmack == null){
trace("its empty")
}


or

if(aidanmack == undefined){
trace("its empty")
}

or

if(aidanmack ==""){
trace("its empty")
}

... WOULD have worked but noooo. doesn't bite at all!

Instead I've found you have to check the length!

so..

if(aidanmack.length > 0){
trace("has something in it");
}else{
trace("its empty");
}



Saturday 5 May 2012

corona scrollview masking issues now fixed!

Unfortunately I have not been able to get my app googly face on to the amazon market.
When I submitted the app I received an email to tell me that my app submission had been unsuccessful due an issue where the screen would go black if the app lost focus. For example if you took a phone call and then came back to the app it would now be black.

This proofed difficult to home down as it was only occurring on device, I could not reproduce the problem within the corona simulator.  

Finally after hours of commenting bits of code out I homed it down to an issue with masking on the scrollers for picking googly parts.

Then after many hours of trying to fix it I realised the issue wasn't my code.. It was in fact an issue with corona.

I submitted this as a bug about two weeks ago... Its now finally been fixed today! Hats off to corona though. They do listen to there community and I had allot of support from staff members on the forums.

If you are not a subscriber you will not be able to install the version that supports it. Corona release fixes for subscribers. None subscribers can only get there hands on the stable version.

So next stop resubmission to the amazon market!

https://play.google.com/store/apps/details?id=com.googleeyes