[flexcoders] Re: Tempermental URLLoader.load()

2012-03-26 Thread nagaofthesea
Howdy Alex-

Yes, everything works as expected when it does work including all the calls 
with the listeners.

In the projects it does NOT work all fails silently!!

What the heck could THAT be?

-Naga

--- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote:

 Maybe you are adding listeners to the wrong thing?  Because you should get 
 those events when it does work.
 
 
 On 3/24/12 4:00 PM, nagaofthesea nagaofthesea@... wrote:
 
 
 
 
 
 
 Howdy All-
 
 PROBLEM:
 Strange URLLoader.load() behavior: sometimes it works; sometimes it doesn't.  
 Can't step through airglobal.swc to see what's wrong.
 
 DETAILS:
 I am using the latest SDK in several versions of an AIR project.  The core 
 code is identical across versions of the project.  Most changes are just in 
 the presentation of the data.
 
 I am a Cairngorm nut and I have extended it to suit my coding style.  I have 
 a master AbstractCommand that addresses everything including listener 
 add/remove, SQLite management, remote services, and File reading/writing.  I 
 just override certain functions as needed.
 
 In this project I read RSS beginning with the following:
 
 override public function execute(event:CairngormEvent):void
 {
  trace(LoadFeedCommand.execute() called);
 
  var rsso:RSSObject = LoadFeedEvent(event).feedObject;
  var urlRequest:URLRequest = new URLRequest(rsso.url);
 
  loader = new URLLoader();
  addListeners(loader);
 
  try
  {
  loader.load(urlRequest);
  trace(loader.load() called);
  }
  catch(error:Error)
  {
  trace(problem with loader.load());
  }
 
  tModelLocator.displayModel.selectedRSSObject = rsso;
 }
 
 In some of the projects URLLoader.load() works as expected.  In others with 
 IDENTICAL code it does not. URLLoader.load() fails into nothingness.  The 
 catch clause does not throw an Error.
 
 I have added the following listneres in overrided .addListeners() and nothing 
 gets called!
 
 override public function addListeners(target:Object):void
 {
  target.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
  target.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, onHTTPStatus, 
 false,0, true);
  target.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
  target.addEventListener(Event.OPEN, onOpen, false, 0, true);
  target.addEventListener(ProgressEvent.PROGRESS, onProgress, false, 0, true);
  target.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError, 
 false, 0, true);
 }
 
 Any insight on this would be wonderful.
 
 Thanks,
 -Naga
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui





Re: [flexcoders] external debugger

2012-03-26 Thread Wouter Schreuders
great! thanks this is a super handy class

On 23 March 2012 16:50, dorkie dork from dorktown 
dorkiedorkfromdorkt...@gmail.com wrote:

 **


 You can use MiniInspector to get that type of information.

 http://code.google.com/p/flexcapacitor/source/browse/trunk/library/src/com/flexcapacitor/utils/MiniInspector.as


 On Thu, Feb 9, 2012 at 5:22 AM, Wouter Schreuders 
 wschreud...@gmail.comwrote:

 **


 well the kind of functionality I'm looking for is really for the back end
 programmers, occasionally they need to dip into the flex side of things and
 they have a lot of difficulty figuring out which class they need to work
 on(for instance you have your application, then a module, then a component
 which contains an itemrenderer which contains another itemrenderer and on
 of those has some custom component inside).

 If they can just hover their mouse over that element and it tells them
 what class it is it would help them alot.


 On 9 February 2012 07:17, Alex Harui aha...@adobe.com wrote:

 **


 FDB comes with the SDK.  It is command-line, but I use it 99% of the
 time as it is way faster than the GUI debugger in FlashBuilder for most
 problems I have to solve.



 On 2/7/12 11:06 PM, Wouter Schreuders wschreud...@gmail.com wrote:






 Hi All

 Can anyone recommend a debugger for flex that allows you to inspect and
 changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
 but I'm looking for something that is not obsolete.

 Any recommendations?

 Thanks

 Wouter





 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui



  



Re: [flexcoders] external debugger

2012-03-26 Thread Wouter Schreuders
Is there any way to exlude this code being compiled into the release
version?

On 26 March 2012 11:20, Wouter Schreuders wschreud...@gmail.com wrote:

 great! thanks this is a super handy class


 On 23 March 2012 16:50, dorkie dork from dorktown 
 dorkiedorkfromdorkt...@gmail.com wrote:

 **


 You can use MiniInspector to get that type of information.

 http://code.google.com/p/flexcapacitor/source/browse/trunk/library/src/com/flexcapacitor/utils/MiniInspector.as


 On Thu, Feb 9, 2012 at 5:22 AM, Wouter Schreuders 
 wschreud...@gmail.comwrote:

 **


 well the kind of functionality I'm looking for is really for the back
 end programmers, occasionally they need to dip into the flex side of things
 and they have a lot of difficulty figuring out which class they need to
 work on(for instance you have your application, then a module, then a
 component which contains an itemrenderer which contains another
 itemrenderer and on of those has some custom component inside).

 If they can just hover their mouse over that element and it tells them
 what class it is it would help them alot.


 On 9 February 2012 07:17, Alex Harui aha...@adobe.com wrote:

 **


 FDB comes with the SDK.  It is command-line, but I use it 99% of the
 time as it is way faster than the GUI debugger in FlashBuilder for most
 problems I have to solve.



 On 2/7/12 11:06 PM, Wouter Schreuders wschreud...@gmail.com wrote:






 Hi All

 Can anyone recommend a debugger for flex that allows you to inspect and
 changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
 but I'm looking for something that is not obsolete.

 Any recommendations?

 Thanks

 Wouter





 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui



  





Re: [flexcoders] Re: Tempermental URLLoader.load()

2012-03-26 Thread Alex Harui
Use a network monitor and see what is going on underneath.


On 3/25/12 11:49 PM, nagaofthesea nagaofthe...@yahoo.com wrote:






Howdy Alex-

Yes, everything works as expected when it does work including all the calls 
with the listeners.

In the projects it does NOT work all fails silently!!

What the heck could THAT be?

-Naga

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui aharui@... wrote:

 Maybe you are adding listeners to the wrong thing?  Because you should get 
 those events when it does work.


 On 3/24/12 4:00 PM, nagaofthesea nagaofthesea@... wrote:






 Howdy All-

 PROBLEM:
 Strange URLLoader.load() behavior: sometimes it works; sometimes it doesn't.  
 Can't step through airglobal.swc to see what's wrong.

 DETAILS:
 I am using the latest SDK in several versions of an AIR project.  The core 
 code is identical across versions of the project.  Most changes are just in 
 the presentation of the data.

 I am a Cairngorm nut and I have extended it to suit my coding style.  I have 
 a master AbstractCommand that addresses everything including listener 
 add/remove, SQLite management, remote services, and File reading/writing.  I 
 just override certain functions as needed.

 In this project I read RSS beginning with the following:

 override public function execute(event:CairngormEvent):void
 {
  trace(LoadFeedCommand.execute() called);

  var rsso:RSSObject = LoadFeedEvent(event).feedObject;
  var urlRequest:URLRequest = new URLRequest(rsso.url);

  loader = new URLLoader();
  addListeners(loader);

  try
  {
  loader.load(urlRequest);
  trace(loader.load() called);
  }
  catch(error:Error)
  {
  trace(problem with loader.load());
  }

  tModelLocator.displayModel.selectedRSSObject = rsso;
 }

 In some of the projects URLLoader.load() works as expected.  In others with 
 IDENTICAL code it does not. URLLoader.load() fails into nothingness.  The 
 catch clause does not throw an Error.

 I have added the following listneres in overrided .addListeners() and nothing 
 gets called!

 override public function addListeners(target:Object):void
 {
  target.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
  target.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, onHTTPStatus, 
 false,0, true);
  target.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
  target.addEventListener(Event.OPEN, onOpen, false, 0, true);
  target.addEventListener(ProgressEvent.PROGRESS, onProgress, false, 0, true);
  target.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError, 
 false, 0, true);
 }

 Any insight on this would be wonderful.

 Thanks,
 -Naga






 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


[flexcoders] XML append child in flex 4.6 sdk

2012-03-26 Thread rid_b80
Hi, Im just wondering how do you append child to XML in flex 4.6.

It seems that when I create a project using the flex 4.6 the append child 
method no longer appear in the code hinting list.

But when I use flex 4.5 sdk it does appear.

Is there a bug in flex 4.6 to not include this functions?