Re: [flexcoders] Reduce time to load httpservice result

2012-03-30 Thread Isabelle Loyer Perso













Re: [flexcoders] Why doesn't this work?

2012-03-30 Thread Richard Albrecht
Told you I was a Newbee. Had it in an event handler that never was called. 

- Original Message -

From: hawkcode2 r...@ralbrecht.net 
To: flexcoders@yahoogroups.com 
Sent: Thursday, March 29, 2012 10:18:12 AM 
Subject: [flexcoders] Why doesn't this work? 





Hi, 

I was curious about what the actual DPI was on the phones I'm testing my app 
on. So I created a label and in the creationComplete I have 1 line: 

dpi.text = String(Capabilities.screenDPI); 

Nothing is entered into the label? How can I get this info. 

Thanks 

Rich 


 


Re: [flexcoders] Store HTML Files in Device

2012-03-30 Thread Margo Powell

Hi Rich,
From one noob to another, check out this link on storing files locally:
http://www.cultcreative.com/tutorials/11/13/2011/local-file-access-editing-for-android-and-ios/

I referenced this tutorial to aid me in copying the files to a storage 
directory on a device. Hope this is what you are looking for.


Then to load files in the stagewebview component, this is a simple 
example of how to do local vs remote links:

http://flexcapacitor.googlecode.com/svn/trunk/examples/webview/src/views/URLView.mxml

Regards
Margo



On 3/29/2012 11:03 AM, Richard Albrecht wrote:

Hi,

Surely someone knows the answer to this.

Help a noob:)

Rich

*From: *Richard Albrecht r...@ralbrecht.net
*To: *flexcoders@yahoogroups.com
*Sent: *Tuesday, March 20, 2012 12:39:40 PM
*Subject: *[flexcoders] Store HTML Files in Device

Hi,

Have an engineering app that displays a lot of information in html 
files in the native browser.


I want to store the files in the app so if they don't have internet 
access they can still get to them.


I can display on in the rectangle web view or what ever it's called, 
but then the user can't zoom etc, very limiting.


So I decided to use the internal browser, works fine if the files on 
the web, but I can't figure out what the correct path would be to send 
to the browser,


There must be a way to do this??

Thanks

Rich





--
Margo Powell
Applications Analyst/MS Computer Science
Nutrition in Medicine Project
Nutrition Education for Practicing Physicians Initiative
Department of Nutrition
University of North Carolina at Chapel Hill
800 Eastowne Dr, Suite 100
Chapel Hill, NC 27514
919-408-3320 ext 30
margo_pow...@unc.edu
www.nutritioninmedicine.org

attachment: mmpowell.vcf

Re: [flexcoders] Store HTML Files in Device

2012-03-30 Thread Margo Powell

Rich quick followup,

This link:
http://flexcapacitor.googlecode.com/svn/trunk/examples/webview/src/views/URLView.mxml

really shows how you could read the file on an apple device. Android 
devices can not access the appDirectory files because they are 
apparently still zipped inside the .apk file. I used the following to 
access files copied into the appStorageDirectory on an android device:


var androidUrl:String = file:// + 
File.applicationStorageDirectory.resolvePath(filePath).nativePath;


This was what I used on stageWebView component. Hopefully it will work 
directly in internal browser. Have not tried that approach yet.


Regards


On 3/30/2012 8:41 AM, Margo Powell wrote:


Hi Rich,
From one noob to another, check out this link on storing files locally:
http://www.cultcreative.com/tutorials/11/13/2011/local-file-access-editing-for-android-and-ios/

I referenced this tutorial to aid me in copying the files to a storage 
directory on a device. Hope this is what you are looking for.


Then to load files in the stagewebview component, this is a simple 
example of how to do local vs remote links:

http://flexcapacitor.googlecode.com/svn/trunk/examples/webview/src/views/URLView.mxml

Regards
Margo



On 3/29/2012 11:03 AM, Richard Albrecht wrote:


Hi,

Surely someone knows the answer to this.

Help a noob:)

Rich

*From: *Richard Albrecht r...@ralbrecht.net
*To: *flexcoders@yahoogroups.com
*Sent: *Tuesday, March 20, 2012 12:39:40 PM
*Subject: *[flexcoders] Store HTML Files in Device

Hi,

Have an engineering app that displays a lot of information in html 
files in the native browser.


I want to store the files in the app so if they don't have internet 
access they can still get to them.


I can display on in the rectangle web view or what ever it's called, 
but then the user can't zoom etc, very limiting.


So I decided to use the internal browser, works fine if the files on 
the web, but I can't figure out what the correct path would be to 
send to the browser,


There must be a way to do this??

Thanks

Rich




--
Margo Powell
Applications Analyst/MS Computer Science
Nutrition in Medicine Project
Nutrition Education for Practicing Physicians Initiative
Department of Nutrition
University of North Carolina at Chapel Hill
800 Eastowne Dr, Suite 100
Chapel Hill, NC 27514
919-408-3320 ext 30
margo_pow...@unc.edu
www.nutritioninmedicine.org



--
Margo Powell
Applications Analyst/MS Computer Science
Nutrition in Medicine Project
Nutrition Education for Practicing Physicians Initiative
Department of Nutrition
University of North Carolina at Chapel Hill
800 Eastowne Dr, Suite 100
Chapel Hill, NC 27514
919-408-3320 ext 30
margo_pow...@unc.edu
www.nutritioninmedicine.org

attachment: mmpowell.vcf

[flexcoders] Flashphoner

2012-03-30 Thread Csomák Gábor
Is there anybody who had used Flashphoner before? Please drop me a line!


Re: [flexcoders] Reduce time to load httpservice result

2012-03-30 Thread Alex Harui
A custom collection can help.  What does a record look like, and how many 
columns are displayed?  Is a sort applied right away or is it optional?


On 3/29/12 11:14 PM, Isabelle Loyer Perso isa_lo...@yahoo.fr wrote:






   All record are on datagrid.
 All recordset must be sorting.

 I use sdk 4.6.

 Thanks for helping.

 Le 30/03/12 06:49, James Ong a écrit :



So the whole 60k records or partial records must be visible on the page? You 
have not mention which flex sdk version you are using.

On Mar 29, 2012 11:20 PM, isa_loyer isa_lo...@yahoo.fr wrote:







Hi,

 I do a query to mysql database with httpservice.
 The result contains arround 6 records.
 Time to create xml file is arround 40s, to slow for my customer.

 I try to accelerate the process with different methods, on server side, to 
generate file
 DOMDocument
 XmlWriter
 SimpleXMLElement

 As customer must be able to sort datagrid, I can not use pagging.

 So do you have an idea to load datagrid more speedly.

 Thanks
















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


[flexcoders] Will AIR 3.2 work on Smart TVs and support Flex SDK 4.6?

2012-03-30 Thread Sean
Will AIR 3.2 work on Smart TVs and support Flex SDK 4.6?
Starnge that nothing on Smart TVs was posted from Adobe in over a year...

Anyone?

Regards,
 
 
Sean - MediaSignage.com
 
 



Re: [flexcoders] Reduce time to load httpservice result

2012-03-30 Thread Isabelle Loyer Perso













[flexcoders] Re: Tempermental URLLoader.load()

2012-03-30 Thread nagaofthesea
Howdy Alex-

Fired up Network Monitor.  As I expected: nada!

Too weird because the URLLoader is instantiated and waiting to go.
What in the world could be going on?

Regards,
Naga

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

 Use a network monitor and see what is going on underneath.
 
 
 On 3/25/12 11:49 PM, nagaofthesea nagaofthesea@... 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] Re: Tempermental URLLoader.load()

2012-03-30 Thread nagaofthesea
Howdy Alex and Everyone-

I have _NO_ clue why this worked, but it did.

I, a la Cairngorm technique, made a custom URLLoaderDelegate and corresponding 
IURLLoaderResponder.  Encapsulated all the URLLoader code and its handlers of 
the LoadFeedCommand amd moved it out to the delegate and responder.  Actually 
no more than a cut and paste job with cleanup of imports etc.

Now URLLoader works predictably in every case ...

Truly Weird!!  Because the code is essentially identical...
Oh well.  In the world of deadlines working reliably is good enough for now.

-Naga

--- In flexcoders@yahoogroups.com, nagaofthesea nagaofthesea@... wrote:

 Howdy Alex-
 
 Fired up Network Monitor.  As I expected: nada!
 
 Too weird because the URLLoader is instantiated and waiting to go.
 What in the world could be going on?
 
 Regards,
 Naga
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Use a network monitor and see what is going on underneath.
  
  
  On 3/25/12 11:49 PM, nagaofthesea nagaofthesea@ 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