[flexcoders] Function Execution Time

2009-10-30 Thread kanu kukreja
How can I find/get execution time of particular function data?


[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
This is what I have assuming I use the lib directory structure and not my app 
structure?

[RemoteClass(alias=flare.vis.data.DataList)]
public class DataList extends Proxy implements IEventDispatcher


The actual directory structure is(notice src):
[RemoteClass(alias=src.flare.vis.data.DataList)]
public class DataList extends Proxy implements IEventDispatcher

This didn't work.  I tried going in and creating getters and setters for all 
protected and private properties which got some of the data back, but not all 
of it.

Jason


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

 All sub-objects that are going to get serialized also need to have registered 
 aliases.
 
 Do a simple test with simpler data objects to see if it works for you.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Thursday, October 29, 2009 9:21 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
 
 
 
 I can't seem to get this to work saving to a SQLite3 database. The code works 
 writing (Data object contains 101 objects), but when reading the bytearray 
 the Data object ends up with 0 objects inside it. Its like it just returns a 
 new Data object. FYI, the Data object I am converting to a bytearray is 
 holder for other objects.
 
 Writing code:
 public function shouldPrepareDatasetAsByteArrayAndSaveToDB( data:Data ) : 
 String
 {
 registerClassAlias(flare.vis.data.Data, Data);
 var d:Data = data;
 var byteArray:ByteArray = new ByteArray();
 byteArray.writeObject(d);
 byteArray.position = 0;
 
 var base64Enc:Base64Encoder = new Base64Encoder();
 var str:String = '';
 base64Enc.encodeBytes( byteArray );
 str = base64Enc.toString();
 
 return str;
 }
 
 Reading code:
 private function shouldPrepareDatasUnWindByteArray( str:* ) : Data
 {
 var base64Dec:Base64Decoder = new Base64Decoder();
 base64Dec.decode( str );
 var byteArray:ByteArray = base64Dec.toByteArray();
 byteArray.position = 0;
 registerClassAlias(flare.vis.data.Data, Data);
 var data:Data = byteArray.readObject();
 return data;
 }
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  Did you call registerClassAlias or use [RemoteClass] metadata?
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of flexaustin
  Sent: Wednesday, October 28, 2009 3:40 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] bytearray.readObject doesn't convert my objects back
 
 
 
  So I am using
 
  var myArray:Array = [someObjectOfTypeObject, someOtherObjectOfTypeObject ];
 
  bytearray.writeObject(myArray);
 
  var blah:Array = bytearray.readObject();
 
  Blah comes back with two Objects but not someObjectOfTypeObject they come 
  back with generic Objects and no data inside?
 
  Anyone have a clue on this? someObjectOfTypeObject and 
  someOtherObjectOfTypeObject are of a special type of Class in my app so
  someOtherObjectOfTypeObject:FooClass.
 
  Why doesn't it put them back as the correct type?
 





RE: [flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread Alex Harui
The alias shouldn't really matter since you are writing the stream and reading 
it.  The alias matters when a server is sending data with those types in it.

I think because your class is based on Proxy, you may have to implement 
IExternalizable in order to get this to work.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Thursday, October 29, 2009 11:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back



This is what I have assuming I use the lib directory structure and not my app 
structure?

[RemoteClass(alias=flare.vis.data.DataList)]
public class DataList extends Proxy implements IEventDispatcher

The actual directory structure is(notice src):
[RemoteClass(alias=src.flare.vis.data.DataList)]
public class DataList extends Proxy implements IEventDispatcher

This didn't work. I tried going in and creating getters and setters for all 
protected and private properties which got some of the data back, but not all 
of it.

Jason

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 All sub-objects that are going to get serialized also need to have registered 
 aliases.

 Do a simple test with simpler data objects to see if it works for you.

 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Thursday, October 29, 2009 9:21 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back



 I can't seem to get this to work saving to a SQLite3 database. The code works 
 writing (Data object contains 101 objects), but when reading the bytearray 
 the Data object ends up with 0 objects inside it. Its like it just returns a 
 new Data object. FYI, the Data object I am converting to a bytearray is 
 holder for other objects.

 Writing code:
 public function shouldPrepareDatasetAsByteArrayAndSaveToDB( data:Data ) : 
 String
 {
 registerClassAlias(flare.vis.data.Data, Data);
 var d:Data = data;
 var byteArray:ByteArray = new ByteArray();
 byteArray.writeObject(d);
 byteArray.position = 0;

 var base64Enc:Base64Encoder = new Base64Encoder();
 var str:String = '';
 base64Enc.encodeBytes( byteArray );
 str = base64Enc.toString();

 return str;
 }

 Reading code:
 private function shouldPrepareDatasUnWindByteArray( str:* ) : Data
 {
 var base64Dec:Base64Decoder = new Base64Decoder();
 base64Dec.decode( str );
 var byteArray:ByteArray = base64Dec.toByteArray();
 byteArray.position = 0;
 registerClassAlias(flare.vis.data.Data, Data);
 var data:Data = byteArray.readObject();
 return data;
 }

 --- In 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
  Alex Harui aharui@ wrote:
 
  Did you call registerClassAlias or use [RemoteClass] metadata?
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
   
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
   On Behalf Of flexaustin
  Sent: Wednesday, October 28, 2009 3:40 PM
  To: 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] bytearray.readObject doesn't convert my objects back
 
 
 
  So I am using
 
  var myArray:Array = [someObjectOfTypeObject, someOtherObjectOfTypeObject ];
 
  bytearray.writeObject(myArray);
 
  var blah:Array = bytearray.readObject();
 
  Blah comes back with two Objects but not someObjectOfTypeObject they come 
  back with generic Objects and no data inside?
 
  Anyone have a clue on this? someObjectOfTypeObject and 
  someOtherObjectOfTypeObject are of a special type of Class in my app so
  someOtherObjectOfTypeObject:FooClass.
 
  Why doesn't it put them back as the correct type?
 




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Getting error 
1144: Interface method readExternal in namespace flash.utils:IExternalizable is 
implemented with an incompatible signature


public class Data extends EventDispatcher implements IExternalizable

public function writeExternal(output:IDataOutput) {
output.writeObject(_nodes);
output.writeObject(_edges);
output.writeObject(_span);
output.writeObject(_groups);
output.writeObject(_root);
output.writeObject(_tree);
}
public function readExternal(input:IDataInput) {
_nodes = input.readObject();
_edges = input.readObject();
_span = input.readObject();
_groups = input.readObject();
_root = input.readObject();
_tree = input.readObject();
}




Fw: [flexcoders] Function Execution Time

2009-10-30 Thread Krunal Panchal
It is very simple, add trace just before and after the calling function. Keep 
in mind this is the same function which will you using  for data fetching.
 
Regards,



Krunal Panchal



- Forwarded Message 
From: kanu kukreja kanukukr...@gmail.com
Sent: Fri, 30 October, 2009 11:58:55
Subject: [flexcoders] Function Execution Time

  
How can I find/get execution time of particular function data? 



  

Re: [flexcoders] Keep an object in flash player memory despit swf unloading?

2009-10-30 Thread Flap Flap
That's also the problem...  I didn't manage the code of the container
application...

:P

Benoît Milgram / Flapflap
http://www.kilooctet.net

I'm also a music mashup / bootlegs producer :
http://www.djgaston.net


On Thu, Oct 29, 2009 at 2:45 PM, Battershall, Jeff 
jeff.battersh...@dowjones.com wrote:



  If that’s the case, you wouldn’t be storing the information in the swf
 but in the containing application.  The information can then be passed as
 flashVars to your swf when it is loaded.



 HTH,



 Jeff


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Flap Flap
 *Sent:* Thursday, October 29, 2009 7:06 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Keep an object in flash player memory despit
 swf unloading?





 Hi,

 The case is very special:

 We have a swf file that runs into a specific software.
 This software load and unload the swf file when its required and we need to
 persists some information during the software session (meaning while the
 software is open and runs) but we cannot store those information on disk
 because of security rules...


 Benoît Milgram / Flapflap
 http://www.kilooctet.net

 I'm also a music mashup / bootlegs producer :
 http://www.djgaston.net

  On Wed, Oct 28, 2009 at 5:56 PM, Battershall, Jeff 
 jeff.battersh...@dowjones.com wrote:



 What problem are you trying to solve?  In order to save state you’re going
 to need some kind of persistent scope.  If Shared Object can’t be used,
 something else needs to be a repository for your state information.



 Jeff


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Flap Flap
 *Sent:* Wednesday, October 28, 2009 12:21 PM
 *To:* FlexCoders
 *Subject:* [flexcoders] Keep an object in flash player memory despit swf
 unloading?





 Hi all,

 Is there a way to keep an actionscript object in Flash Player memory even
 when the swf that set up this object is unloaded.
 And no, SharedObject is not an option :)

 I know is nearly impossible but I also know that I don't know everything :D

 Benoît Milgram / Flapflap
 http://www.kilooctet.net

 I'm also a music mashup / bootlegs producer :
 http://www.djgaston.net







[flexcoders] Re: Embedded Jetty6 or 7 server

2009-10-30 Thread jgamacheteam345
Hi Folks,

Sorry to reply to such an old thread, but I need some help!  I downloaded this 
quickstart and am trying to get the Start.java to run IN ECLIPSE.   I seem to 
be hopelessly stuck and would appreciate a step by step (yes, for idiots!) if 
anyone has such running.

I am using jetty 6 as that is what this code base uses.  Basically, what I did 
was to run mvn eclipse:eclipse successfully, then I imported the project into 
eclipse.  I have the Maven plugin installed in eclipse, so I enabled dependency 
management on the project.  I changed the two local references (to Ryan's 
harddrive) to mine.  When I run Start.java from within eclipse I get no errors, 
the page comes up on localhost:8080.  However, I can not get to the java code!

Any help is greatly appreciated - I am now at that very frustrated point!

thanks,

Joe

--- In flexcoders@yahoogroups.com, Ryan Gravener r...@... wrote:

 I wrote a quickstart on combining blazeds, flex, jetty, spring, wicket, and
 hibernate:
 
 http://ryangravener.com/wordpress/?p=21
 
 as for embedded jetty server:
 http://wicket-flex-blazeds.googlecode.com/svn/trunk/myproject-core/src/test/java/org/myproject/Start.java
 
 Hope this helps.
 
 On Tue, Aug 12, 2008 at 10:48 AM, Anatole Tartakovsky 
 anatole.tartakov...@... wrote:
 
Robin,   There are 2 ways this can be done - none is pretty.
  1.You can navigateToFile - based on the mime type OS will open
  appropriate programe (Word for doc, etc and hopefully java for class).
  Needless to say it is error prone and configuration dependent.
  2. You need binary component that would be used in conjunction with AIR.
  Unfortunately, you can not distribute automatically executable binary
  components automatically with AIR, so special program needs to be preloaded
  and invoked on the client machine. We had few C++ implementations on Windows
  that communicate with Flash runtime via LocalConnection, not sure what your
  platforms might be. That component would go into the AIR file and extract
  jetty server/run it. All-in-all,for Windows platform and to follow strict
  rules of security (only signed/trusted AIR files can distribute code)  it is
  probably a 2 weeks project,with probably another week for each subsequent
  platform.
  Sorry,
  Anatole Tartakovsky
 
 
  On Tue, Aug 12, 2008 at 4:53 AM, Josh McDonald dzn...@... wrote:
 
Well, you'd have to figure out a way to have either your Java app or
  your AIR app not appear in the task bar or dock, but besides that I imagine
  you could just use java.lang.System.exec()
 
  That's about all the help I can be with this though, I haven't done it :)
 
  -Josh
 
  On Tue, Aug 12, 2008 at 6:11 PM, robin bakkerus robin.bakke...@...
   wrote:
 
  Hi Josh,
 
  Ok, the other way around, but do you have an example how to that.
  thanks in advance
 
  robin
 
  --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
  
   Air can't listen to sockets, nor can it spawn external programs.
  You'd have
   to have a Java program with embedded Jetty which then loads your AIR
  app.
  
   -Josh
  
   On Tue, Aug 12, 2008 at 3:07 PM, robin bakkerus
  robin.bakkerus@wrote:
  
Hi Anatole,
   
But that is not an embedded server!
What i want is to make an AIR application that can easily communicate
with (existing) Java code (hence BlazeDS), but without the need to
start a server. Well you start a server but automatically 'under
water'. But then i how to start this server?, what is the jetty.xml
looks like?
   
gr Robin
   
--- In flexcoders@yahoogroups.com, Anatole Tartakovsky
anatole.tartakovsky@ wrote:

 Robin,   You just unpack jetty, then unpack BlazeDS into
  webapps/BlazeDS
 subfolder. Then go to the /bin subfolder of jetty and run either
 exe(windows) or ./jetty.sh run on Mac/Linux
 Finally go to the browser and check http://localhost:8080 to see
jetty start
 page.

 HTH,
 Anatole


 On Mon, Aug 11, 2008 at 6:10 AM, robin bakkerus
robin.bakkerus@wrote:

Hi there,
 
  Does anyone has an example of an embedded Jetty6 or Jetty7 server
  including BlazeDs plus example how to start this server?
 
  thank you in advance
 
 
 

   
   
   

   
--
Flexcoders Mailing List
FAQ:
  http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
  Groups
Links
   
   
   
   
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
  Links
 
 
 
 
 
 
  --
  Therefore, 

[flexcoders] Re: UDP via Flex socket

2009-10-30 Thread Mete Atamel
Is this what you're looking for?

http://livedocs.adobe.com/flex/3/langref/flash/net/Socket.html

-Mete



--- In flexcoders@yahoogroups.com, Simon simonjpal...@... wrote:

 simple question... is it possible?  I have a horrible feeling Flex may only 
 support HTTP and RPC but would love to be wrong.
 
 If my suspicions are correct are there any plans to make a more general 
 purpose socket?





Re: [flexcoders] Re: UDP via Flex socket

2009-10-30 Thread ady
This Looks TCP to mein UDP u need to handle out of sequence packets (it
could occur)

only thing UDP in FP10 afaik is stratus but thats not raw... uses RTMFP



On Fri, Oct 30, 2009 at 4:57 PM, Mete Atamel meteata...@yahoo.com wrote:

 Is this what you're looking for?

 http://livedocs.adobe.com/flex/3/langref/flash/net/Socket.html

 -Mete



 --- In flexcoders@yahoogroups.com, Simon simonjpal...@... wrote:
 
  simple question... is it possible?  I have a horrible feeling Flex may
 only support HTTP and RPC but would love to be wrong.
 
  If my suspicions are correct are there any plans to make a more general
 purpose socket?
 




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






RE: [flexcoders] Keep an object in flash player memory despit swf unloading?

2009-10-30 Thread Battershall, Jeff
Then I don't know what to recommend.  You have to have some place to store the 
data.  The swf is compiled so if you're not going to use it's only persistence 
mechanism, and you can't store the data elsewhere, thensounds like a waste 
of time and effort.


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Flap Flap
Sent: Friday, October 30, 2009 4:20 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Keep an object in flash player memory despit swf 
unloading?



That's also the problem...  I didn't manage the code of the container 
application...

:P

Benoît Milgram / Flapflap
http://www.kilooctet.net

I'm also a music mashup / bootlegs producer :
http://www.djgaston.net

On Thu, Oct 29, 2009 at 2:45 PM, Battershall, Jeff 
jeff.battersh...@dowjones.commailto:jeff.battersh...@dowjones.com wrote:

If that's the case, you wouldn't be storing the information in the swf but in 
the containing application.  The information can then be passed as flashVars to 
your swf when it is loaded.

HTH,

Jeff


From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Flap Flap
Sent: Thursday, October 29, 2009 7:06 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Keep an object in flash player memory despit swf 
unloading?



Hi,

The case is very special:

We have a swf file that runs into a specific software.
This software load and unload the swf file when its required and we need to 
persists some information during the software session (meaning while the 
software is open and runs) but we cannot store those information on disk 
because of security rules...


Benoît Milgram / Flapflap
http://www.kilooctet.net

I'm also a music mashup / bootlegs producer :
http://www.djgaston.net
On Wed, Oct 28, 2009 at 5:56 PM, Battershall, Jeff 
jeff.battersh...@dowjones.commailto:jeff.battersh...@dowjones.com wrote:

What problem are you trying to solve?  In order to save state you're going to 
need some kind of persistent scope.  If Shared Object can't be used, something 
else needs to be a repository for your state information.

Jeff


From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Flap Flap
Sent: Wednesday, October 28, 2009 12:21 PM
To: FlexCoders
Subject: [flexcoders] Keep an object in flash player memory despit swf 
unloading?



Hi all,

Is there a way to keep an actionscript object in Flash Player memory even when 
the swf that set up this object is unloaded.
And no, SharedObject is not an option :)

I know is nearly impossible but I also know that I don't know everything :D

Benoît Milgram / Flapflap
http://www.kilooctet.net

I'm also a music mashup / bootlegs producer :
http://www.djgaston.net








[flexcoders] Re: error compiling flex project

2009-10-30 Thread Greg Morphis
Anyone have an idea why this isn't working?

On Thu, Oct 29, 2009 at 3:55 PM, Greg Morphis gmorp...@gmail.com wrote:
 I have an ANT script which compiles a Flex 2 project and it's giving
 me an error:

 compile:
 [java] Loading configuration file C:\Program Files\Adobe\Flex Builder
 2 Plug-in\Flex SDK 2\frameworks\flex-config.xml
 [java] C:\Temp\RetailForms\index.mxml: Error: Unable to locate
 specified base class 'mx.core.Application' for component class
 'index'.

 Here's my ANT script

 target name=compile depends= 
 java jar=${mxmlcjar}
 fork=true
 failonerror=true
 maxmemory=128m
 dir=${flexsdk}\frameworks
    arg value=-local-fonts-snapshot=${flexsdk}\frameworks\winFonts.ser/
    arg value=-load-config=${flexsdk}\frameworks\flex-config.xml/
    arg value=-services=${flexservices}\services-config.xml /
    arg value=-include-libraries=${lib}\cairngorm.swc /
    arg value=-include-libraries+=${lib}\RRTUtilities.swc /
    arg value=-context-root=/ /
    arg value=-output=${bin}\${flex.ouput_file} /
    arg value=-file-specs=${src}\${flex.src_file}/
 /java
 /target

 Can you tell me what's wrong with it? Thanks!



[flexcoders] FLVPlayback component - preview image

2009-10-30 Thread lanekelly5
After getting frustrated with the lack of functionality of the preview property 
of the FLVPlayback component at runtime (apparently you can't assign it a path 
to a PNG and have it work like expected), I was wondering if anyone had 
extended the class to add that feature in.  I'm using the FLVPlayback_2.5.swc 
component that Adobe provides.



[flexcoders] Re: Question?? Best method for plotting a Moving Average

2009-10-30 Thread cjsteury2
I did it with the SQL code instead...  it's a really cool routine that 
calculates Mov Avg and Standard Deviation then the Bollinger Bands and I send 
that to FLEX... if anyone wants the SQL code let me know... cra...@steury.com 
(I don't receive emails from this thread)

--- In flexcoders@yahoogroups.com, jc_bad28 jc_ba...@... wrote:

 I'll vouche for ta-lib as well.  I used it in an excel trading/chart app I 
 made years ago.  
 
 My approach for the ticker data array would be to use a for..loop instead of 
 hard coding.  That way you could adjust a few paramaters.
 
 When it comes to technical indicators, I prefer making the calcs on the 
 server side and then having the data available to be plotted 
 passed/requested/whatever. The reason being I can use that data in whatever 
 client I want versus trying to learn different ways of doing the same thing 
 in different clients.
 
 Another approach you might want to look at is using a charting library that 
 has built in functions for the traditional indicators.  I've used 
 ChartDirector from ASE in multiple clients and multiple platforms.  
 http://www.advsofteng.com/
 
 You could write up your charting section in whatever and then bring it into 
 flex as an image. ChartDirector is also open enough that you can program 
 custom indicators into as well which is something I've done quite a few times 
 and is what really sold me on the product.
 
 --- In flexcoders@yahoogroups.com, Jake Churchill reynacho@ wrote:
 
  We do the same thing.  See this screen shot:
  
  http://www.reynacho.com/wp-content/uploads/2009/05/cse-charting.jpg
  
  There's a lot more than just a moving average and bollinger bands there but
  those are parts of it.  In order to get this data, we first tapped into a
  feed which you have to pay good money for.  I believe we are using NxCore
  which I think is a DTN product.  You might look into that but I know there
  are others as well.
  
  For the data, we pass data into a java library called ta-lib:
  http://ta-lib.org/
  
  It has methods for moving averages, deviations, etc.  We found that the
  calculations for our app were simply too intense to be done on the client.
  But, we have 5-7 years worth of data that we are looking at for calculations
  so you might not run into the same bottleneck we had
  
  -Jake
  
  On Fri, Oct 23, 2009 at 11:49 AM, cjsteury2 craigj@ wrote:
  
  
  
  
  
   answer.net SQL database through Web services call to Flex.../answer...
   would like to create a new Array based on existing Array of Ticker data..
  
   So I need to create a new Array Collection then loop through and add the
   date from the Tickers Array Collection along with the Moving 20 day 
   average
   of the Close Price... THEN ( I have not mentioned this ) What I REALLY 
   want
   is a Standard Deviation Calcuation against the Moving Average to plot 
   Upper
   and Lower Bollinger Bands
  
   Here's my initial guesstimate at building the new 20 Day Moving Average
   Array Collection from the Existing Array_Tickers ArrayCollection
  
   [Bindable] public var Array_BBands:ArrayCollection; (new mov avg Ac)
  
   public function bld_Array_BBands():void
   {
   Array_BBands = new ArrayCollection;
   for (var i:int=0;iArray_Tickers.length;i++) \\ loop through existing
   Array_Tickers
   {
   Array_BBands.addItem(Array_Tickers.getItemat(i).date);
   if (i=20) \\ start at 20th row - as Moving Avg is 20 day
   {
   var mavg_tick:Int = 0; \\ create variable to hold Moving Average
   mvag_tick = Array_Tickers.getItemAt(i).close.valueof(); \\ need to pick up
   the date of the Array_Tickers
   mvag_tick += Array_Tickers.getItemAt(i-1).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-2).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-3).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-4).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-5).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-6).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-7).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-8).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-9).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-10).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-11).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-12).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-13).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-14).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-15).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-16).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-17).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-18).close.valueof();
   mvag_tick += Array_Tickers.getItemAt(i-19).close.valueof();
   var mavg:Int = (mavg_tick/20);
   Array_BBands.addItem(mavg);
   }
   }
  
   }
  
   If that works ( and I have no idea if it will ) then I need to get the
   Standard 

[flexcoders] Re: help with a php call

2009-10-30 Thread valdhor
Because HTTP service is expecting to handle the response. You want the
browser to handle the response so you need to use navigateToURL:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
 mx:Script
 ![CDATA[
 private function onButtonClick():void
 {
 navigateToURL(new
URLRequest(http://creativity-online.com/api/image_watermark.php?workId=\
17593), _top);
 }
 ]]
 /mx:Script
 mx:Button label=Download File click=onButtonClick()/
/mx:Application


HTH



Steve

--- In flexcoders@yahoogroups.com, grimmwerks gr...@... wrote:

 Argh.  Still can't figure this out; seems really simple to call a php
 file which forces download -- why can't I then do the same thing in
 httpService?


 On Oct 29, 2009, at 4:44 PM, grimmwerks wrote:

 
 
  Ok - an app I'm working on needs to have a watermarked image; if you
  click on this in the browser:
 
  http://creativity-online.com/api/image_watermark.php?workId=17593
 
  It works fine.  But I can't figure out how to setup the same thing
  in Flex, preferably using an HttpService..?
 
  I mean I could pop open a new browser window with the constructed ip
  in order to force downloadin -- but am I incorrect that I should be
  able to do it with httpService?
 
 
  Thanks
 
 
 




[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Just realized need return type.


--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 Getting error 
 1144: Interface method readExternal in namespace flash.utils:IExternalizable 
 is implemented with an incompatible signature
 
 
 public class Data extends EventDispatcher implements IExternalizable
 
   public function writeExternal(output:IDataOutput) {
   output.writeObject(_nodes);
   output.writeObject(_edges);
   output.writeObject(_span);
   output.writeObject(_groups);
   output.writeObject(_root);
   output.writeObject(_tree);
   }
   public function readExternal(input:IDataInput) {
   _nodes = input.readObject();
   _edges = input.readObject();
   _span = input.readObject();
   _groups = input.readObject();
   _root = input.readObject();
   _tree = input.readObject();
   }





[flexcoders] addEventListner help

2009-10-30 Thread Darrin Kay
can some explain how these work?

I have a function that calls an event, and on completion of the event I want
another function to kick off.  How do I do this?

thanks,
 D


[flexcoders] Re: Flexbuilder doesn't give compile error when using a undeclared variable, methods

2009-10-30 Thread benjamine_df


Compile time we don't need to check for data, we only need to check 
for declared variable, method class etc. So I am in favour for what 
java is doing. It will help to catch the errors during compile time

I think flex allows this because of associative arrays.
var data:object = new Object();

new data.length means data['length'] 

Is there any way I can tell flex compiler that don't assume objects as 
associative array unless I specifically declare as Array.



[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
What about using the JSONEncoder and JSONDecoder? Will I have the same issue?

Jason



--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 Just realized need return type.
 
 
 --- In flexcoders@yahoogroups.com, flexaustin flexaustin@ wrote:
 
  Getting error 
  1144: Interface method readExternal in namespace 
  flash.utils:IExternalizable is implemented with an incompatible signature
  
  
  public class Data extends EventDispatcher implements IExternalizable
  
  public function writeExternal(output:IDataOutput) {
  output.writeObject(_nodes);
  output.writeObject(_edges);
  output.writeObject(_span);
  output.writeObject(_groups);
  output.writeObject(_root);
  output.writeObject(_tree);
  }
  public function readExternal(input:IDataInput) {
  _nodes = input.readObject();
  _edges = input.readObject();
  _span = input.readObject();
  _groups = input.readObject();
  _root = input.readObject();
  _tree = input.readObject();
  }
 





RE: [flexcoders] Re: addChild doesn't effect for some reason REFdn2065133102

2009-10-30 Thread dennis
For god's sake. it works =) ! The button hasn't (at all) width and height!

 

What is the difference between the 

  addChild(buttonFromMainClass);

and 

  Application(Application.application).addChild(buttonFromMainClass);

In the adding process??? Does any body knows?

 

Thanks Amy anyway!!!

 

dennis

 



Re: [Spam] [flexcoders] addEventListner help

2009-10-30 Thread Nick Middleweek
Hi,

As far as i'm aware the event is fired, which in turn calls a function that
is set using button.addEventListener(MOUSE.CLICK, myClickHandler)


So when the CLICK event fires on the button object it invokes
myClickHandler pasing it an event object.


if you want to call another function at the end of the myClickHandler, I
guess you cuold just call it at the bottom of that function.



Nick





2009/10/30 Darrin Kay dar...@stop-ing.com



 can some explain how these work?

 I have a function that calls an event, and on completion of the event I
 want another function to kick off.  How do I do this?

 thanks,
  D
  



[flexcoders] AIR Ant Build Script

2009-10-30 Thread seanmcmonahan
So I posted a question about Ant build scripts for AIR a few weeks ago and got 
some great answers, so here's another one.

I have an Ant build script that I'm using to build my AIR project.  It builds 
everything and packages the application just fine.  The app runs with no 
noticeable problems until you try to do any serialization with a class we have: 
ElasticDictionary.  This class merely extends flash.utils.Dictionary with some 
convenience methods (like length() -- code is below).  

I have the [RemoteObject] metadata and this works flawlessly when the project 
is run from the Flex Builder debugger.  It also works perfectly when the 
release build is exported via the Flex Builder Export Release Build... dialog.

So my question is: what am I missing in my Ant build script that Flex Builder 
does for me?  The class, ElasticDictionary, is in the project's src folder and 
I'm using the 3.4 SDK.

Relevant (at least what I *think* is relevant) code below.  Thanks in advance 
for your help!

Ant Build Script:

exec
executable=${MXMLC}
failonerror=true

arg value=-debug=false/
arg value=+flexlib=${SDK_HOME}/frameworks/
arg value=+configname=air/
arg value=-file-specs=${MAIN_SOURCE_FILE}/
arg value=-output=${BUILD_DIR}/${APP_ROOT_FILE}/
arg value=-keep-as3-metadata+=RemoteClass/


arg 
value=-library-path+=${SDK_HOME}/frameworks/libs/
arg 
value=-library-path+=${SDK_HOME}/frameworks/libs/air/

arg 
value=-include-libraries=${LIBS_DIR}/applicationupdater.swc/
arg 
value=-include-libraries=${LIBS_DIR}/Degrafa_Beta3.1_Flex3.swc/
arg value=-locale=en_US,fr_FR,de_DE/
arg value=-source-path=${LOC_DIR}/{locale}/
arg value=-source-path=${PROP_DIR}/

/exec

SDK_HOME refers to the location of the Flex 3.4 SDK.  LIBS_DIR points to the 
project's SWC's.  LOC_DIR to localization files; PROP_DIR to properties 
(.properties) files. 

---

The ElasticDictionary class: 

/**
* Used instead of ordinary dictionaries so that their data type can be 
preserved when saving in a serailized format 
*/
package com.project.utils {

import flash.utils.Dictionary;

[Bindable]
[RemoteClass]
public dynamic class ElasticDictionary extends Dictionary {

public function ElasticDictionary(weakKeys:Boolean=false) {
super(weakKeys);
}


public function get length():uint {
return getKeys().length;
}

public function getKeys():Array {
var keys:Array = new Array();
for(var key:Object in this) {
keys.push(key);
}
return keys;
}

public function getValues():Array {
var values:Array = new Array();
for(var key:Object in this) {
values.push(this[key]);
}
return values;
}

}
}



Re: Fw: [flexcoders] Function Execution Time

2009-10-30 Thread Arpit Mathur
There is also Grant Skinner's Actionscript performance harness that Lee
Brimelow put up a video on recently

http://www.gotoandlearn.com/play?id=115

-arpit


On Fri, Oct 30, 2009 at 4:09 AM, Krunal Panchal panchal_...@yahoo.comwrote:



 It is very simple, add trace just before and after the calling function.
 Keep in mind this is the same function which will you using  for data
 fetching.

 *
 Regards,
 --

 Krunal Panchal
 *


 - Forwarded Message 
 *From:* kanu kukreja kanukukr...@gmail.com
 *Sent:* Fri, 30 October, 2009 11:58:55
 *Subject:* [flexcoders] Function Execution Time



 How can I find/get execution time of particular function data?

  




-- 
--
Arpit Mathur
twitter: http://twitter.com/arpit
blog: http://arpitonline.com/blog
---


[flexcoders] Re: SharedObject problem/bug? Cannot store a subclass of ByteArray.

2009-10-30 Thread seanmcmonahan
I'm having a similar problem with a subclass of Dictionary.  Unfortunately I 
haven't has an opportunity to try this fix yet, but maybe you'll find it 
useful: 
http://stackoverflow.com/questions/850466/properly-serializing-flash-utils-dictionary-to-a-sharedobject

--- In flexcoders@yahoogroups.com, Geoffrey geoff...@... wrote:

 
 
 Muzak, thank you for your help. However, I have already tried [RemoteClass] 
 (which I mentioned in the original post). I also looked at the link that you 
 provided and decided to try more combinations, but none worked. I have tried 
 [RemoteClass] with and w/o [Bindable], [RemoteClass(alias=ByteArrayPlus)], 
 and I made sure to use my class beforehand. In all cases I can get a custom 
 class to retain its type, but ByteArrayPlus always gets read as ByteArray 
 from the SharedObject.
 
 I believe this may be a problem peculiar to ByteArray, but I don't know 
 exactly why that would be so. 
 
 Again, the challenge is this: make any class that extends ByteArray, write it 
 to a SharedObject (to the disk), read it from the SharedObject, and have it 
 retain its class. I know it sounds straightforward, but I cannot get it to 
 work.
 
 --Geoff
 
 --- In flexcoders@yahoogroups.com, Muzak p.ginneberge@ wrote:
 
  Add a RemoteClass metadata tag to the custom class:
  
  Example at the bottom of the article
  http://cookbooks.adobe.com/post_How_to_keep_the_type_of_your_objects_when_serializ-8323.html
  
  
  - Original Message - 
  From: Geoffrey geoffhom@
  To: flexcoders@yahoogroups.com
  Sent: Wednesday, October 28, 2009 12:45 PM
  Subject: [flexcoders] SharedObject problem/bug? Cannot store a subclass of 
  ByteArray.
  
  
   Hi,
  
   I have a subclass of ByteArray (let's call it ByteArrayPlus), which I 
   want to write to a SharedObject. I can store it fine, but 
   when I read it back, it says it's of type ByteArray, not ByteArrayPlus. 
   Does anyone have an idea what may be wrong? Has anyone 
   gotten this to work?
  
   FYI, I am already using registerClassAlias(). And it works fine with a 
   custom class, and with a custom class extending another 
   custom class. I also tried implementing IExternalizable, but that did not 
   help. I also tried [RemoteClass] and 
   [RemoteClass(alias=ByteArrayPlus)].
  
   Also, ByteArrayPlus is really simple: I only added a String (name) to it.
  
   This is my first post to FlexCoders.
  
   Any help appreciated.
  
   --Geoff
  
 





[flexcoders] Re: UDP via Flex socket

2009-10-30 Thread Simon
The sample code in the Adobe Docs sends a GET which I think makes it HTTP.  As 
far as I can tell the binary socket doesn't support UDP.  Somewhere in the 
internals it must be presuming TCP or HTTP - or maybe RTMP.  Anyway, it looks 
like my suspicions were right.  I'll ask another question about what protocol 
Flex developers are using to communicate between clients for multi-player games.

--- In flexcoders@yahoogroups.com, ady 100...@... wrote:

 This Looks TCP to mein UDP u need to handle out of sequence packets (it
 could occur)
 
 only thing UDP in FP10 afaik is stratus but thats not raw... uses RTMFP
 
 
 
 On Fri, Oct 30, 2009 at 4:57 PM, Mete Atamel meteata...@... wrote:
 
  Is this what you're looking for?
 
  http://livedocs.adobe.com/flex/3/langref/flash/net/Socket.html
 
  -Mete
 
 
 
  --- In flexcoders@yahoogroups.com, Simon simonjpalmer@ wrote:
  
   simple question... is it possible?  I have a horrible feeling Flex may
  only support HTTP and RPC but would love to be wrong.
  
   If my suspicions are correct are there any plans to make a more general
  purpose socket?
  
 
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location:
  https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
  Links
 
 
 
 





[flexcoders] Is anyone building multi-user apps/games in Flex?

2009-10-30 Thread Simon
...and if yes, what protocol are you using for communication between clients?  

Traditional wisdom for this scenario is UDP, but the Flex socket classes don't 
seem to support it.  



[flexcoders] Re: Flexbuilder doesn't give compile error when using a undeclared variable, methods

2009-10-30 Thread benjamine_df
I wanted to clarify more on my other response.

As Amy referred this does not happen to Dictionary object alone. create an 
instance of any object , then call a non existing method and you won't get 
compile time errors.

Example
var data:Array = new Array()
data.xyz() //xyz method does not exist in Array, but still no compile time 
errors.

Without compile time errors, when things don't work in run time, it wastes lot 
of my time to find the problem.

Any help from Flex gurus are appreciated.

Thanks
Ben

--- In flexcoders@yahoogroups.com, droponrcll amyblankens...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, benjamine_df benjamine_df@ wrote:
 
  Hello,
  
I am new to flex and I make lot of mistakes by calling a method or
   field in an object which does not exist. But flex builder 3 doesn't 
  seem to throw a compile error when I do this. In java it would be a 
  quick compile error. Is there any flex builder setting I can set to 
  give compile errors.
  
  Example
  var data:Dictionary = new Dictionary();
  data.length   //no compile error for this
  data[indexint]  //no compile error
 
 Create your own typed objects if you want type checking:
 
 public clas YourClass {
public var indexInt:int;
public var length:int;
 }
 
 var yourClass:YourClass = newYourClass();
 
 var foo:String = YourClass.foo; //compiler error
 
 
 I'm pretty sure Java wouldn't throw a compiler error if you add or access a 
 previously nonexistent key to a Dictionary, either, since that's pretty much 
 the point of a Dictionary in most languages, isn't it?
 
 -Amy





[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin


Can't even use an JSON encoding

at com.adobe.serialization.json::JSONEncoder/objectToString()

jason

--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 What about using the JSONEncoder and JSONDecoder? Will I have the same issue?
 
 Jason
 
 
 
 --- In flexcoders@yahoogroups.com, flexaustin flexaustin@ wrote:
 
  Just realized need return type.
  
  
  --- In flexcoders@yahoogroups.com, flexaustin flexaustin@ wrote:
  
   Getting error 
   1144: Interface method readExternal in namespace 
   flash.utils:IExternalizable is implemented with an incompatible signature
   
   
   public class Data extends EventDispatcher implements IExternalizable
   
 public function writeExternal(output:IDataOutput) {
 output.writeObject(_nodes);
 output.writeObject(_edges);
 output.writeObject(_span);
 output.writeObject(_groups);
 output.writeObject(_root);
 output.writeObject(_tree);
 }
 public function readExternal(input:IDataInput) {
 _nodes = input.readObject();
 _edges = input.readObject();
 _span = input.readObject();
 _groups = input.readObject();
 _root = input.readObject();
 _tree = input.readObject();
 }
  
 





[flexcoders] get components completely created without displaying them

2009-10-30 Thread thomas
Hello,

How to get flex components completely rendered (create children, get data, lay 
out) without adding them to stage ?
Specificaly, how to get bitmapdata.draw( component ) actually draw component ?

thomas parquier
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net
téléphone portable : +33601 822 056



RE: [flexcoders] get components completely created without displaying them

2009-10-30 Thread reyna...@gmail.com
IncludeInLayout=false might do the trick

-Original Message-
Date: Friday, October 30, 2009 12:06:50 pm
To: flexcoders@yahoogroups.com
From: thomas mailingli...@web-attitude.fr
Subject: [flexcoders] get components completely created without displaying them

Hello,

How to get flex components completely rendered (create children, get data, lay 
out) without adding them to stage ?
Specificaly, how to get bitmapdata.draw( component ) actually draw component ?

thomas parquier
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net
téléphone portable : +33601 822 056





[flexcoders] Strange issue with Flex Builder Trial - Run the flex application only on first day

2009-10-30 Thread Vincent Blanqué
Hi,

I have created Flex proyects with Flex Builder 3 Trial Version for 
generating Google Maps apps. I 'Run the application'. The first day 
everything works well. But later, the same mxml does not run well. 
However, if I create a new project with the same mxml file, everything 
is ok. Is there any protection that limit the duration of a project ? Is 
it a cache issue ? I really does not understand...

Thx,

Vincent




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Flex application vertical size problem

2009-10-30 Thread radu.groza

Hello,

I have a Flex app embedded like this: body tag, then a div tag with
min-height: 600px, min-width: 800px; and overflow: auto; the application tag
from flex: 

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
xmlns:views=com.views.* 
backgroundColor=#00 backgroundAlpha=1 pageTitle=Flex app 
applicationComplete=init()
currentState= http://old.nabble.com/file/p26126480/screenshot.gif
screenshot.gif ageCheckState xmlns:ns1=com.* xmlns:local=*
verticalScrollPolicy=on horizontalScrollPolicy=off 
clipContent=false 
minWidth=800 minHeight=600
Note: I've tried with both horizontalScrollPolicy and verticalScrollPolicy
on and auto and clipContent both true and false
The problem is that if I resize the browser vertically a scrollbar appears
indeed (the one from the div) but a strange thing happens: the content is
sort of clipped to the size of the browser window (attaching screenshot -
you can see it action here: http://www.duboeuf.com/).
Horizontally, everything is ok.
Please help.
Thanks
-- 
View this message in context: 
http://old.nabble.com/Flex-application-vertical-size-problem-tp26126480p26126480.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Function Execution Time

2009-10-30 Thread kumar jothi
put timer before and after the function call

Thanks with regards

--- On Fri, 30/10/09, kanu kukreja kanukukr...@gmail.com wrote:


From: kanu kukreja kanukukr...@gmail.com
Subject: [flexcoders] Function Execution Time
To: 
Date: Friday, 30 October, 2009, 11:58 AM


  



How can I find/get execution time of particular function data? 















  

[flexcoders] Issue in setting flex app in load balanced environment using SSL

2009-10-30 Thread abhgup

I have developed the dashboard in my application using flex 3.0. For this I
have used JSP wrapper around the flex application. My application runs on
JBoss application server. for communication between flex app and my
application i am using LCDS. HTTPService component is being used to receive
data from the server. Channel definitions are given in service-config.xml
for amf and http channels and for both secure secure and not secure mode. In
my proxy-config.xml i have defined Channels and destinations.

 

services-config.xml

...
...

channel-definition id=my-amf class=mx.messaging.channels.AMFChannel
endpoint
url=http://{server.name}:{server.port}/{context.root}/messagebroker/amf;
class=flex.messaging.endpoints.AMFEndpoint/
properties
  polling-enabledfalse/polling-enabled
/properties
/channel-definition

channel-definition id=my-secure-amf
class=mx.messaging.channels.SecureAMFChannel
endpoint
url=https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure;
class=flex.messaging.endpoints.SecureAMFEndpoint/
properties
  add-no-cache-headersfalse/add-no-cache-headers
/properties
/channel-definition

channel-definition id=my-http class=mx.messaging.channels.HTTPChannel
endpoint
url=http://{server.name}:{server.port}/{context.root}/messagebroker/http;
class=flex.messaging.endpoints.HTTPEndpoint/
/channel-definition

channel-definition id=my-secure-http
class=mx.messaging.channels.SecureHTTPChannel
endpoint
url=https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure;
class=flex.messaging.endpoints.SecureHTTPEndpoint/
properties
add-no-cache-headersfalse/add-no-cache-headers
/properties
/channel-definition


...
...

 

proxy-config.xml

 

...
...

default-channels
channel ref=my-http/
channel ref=my-amf/
channel ref=my-secure-http/
channel ref=my-secure-amf/
/default-channels

...
...

destination id=dashboardService
properties
url/kr/servlet/DashboardServlet/url
/properties
/destination

destination id=dashboardJSPService
properties
url/kr/krportal/dashboardJSPService.jsf/url
/properties
/destination

 

...

...

 

In my development environment both secure and non secure mode were working
fine. Now when I have deployed it behind the load balancer(which accepts
secure requests only and if the request is not secure it redirects it to
secure url) there is no response from the message broker servlet. One thing
more I have observed is when the environment is non load balanced there are
request like
'http://{server.name}:{server.port}/{context.root}/messagebroker/http'. and
these requests are post request. But in load balanced environment with ssl
the request is again like
'http://{server.name}:{server.port}/{context.root}/messagebroker/http' which
is a post request and it is redirected to
'https://{server.name}:{server.port}/{context.root}/messagebroker/http'
which is a get request. The content returned by this get request is null.

 

Looking for some comments

 

Thanks

Abhishek Gupta 
-- 
View this message in context: 
http://old.nabble.com/Issue-in-setting-flex-app-in-load-balanced-environment-using-SSL-tp26125851p26125851.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] how can I parse this Srting in Flex

2009-10-30 Thread thomas_13s
Hi All,
Label1|url1|label2Explorer|url2|Label3|url3
 how can I parse this string in flex and get the label1|url1 , label2|url2, 
label3|url3 seperately , Please some sample code to do this.
Thanks
Tom



RE: [flexcoders] Strange issue with Flex Builder Trial - Run the flex application only on first day

2009-10-30 Thread reyna...@gmail.com
Do you have a valid maps key for the domain you are using?  I've seen that kind 
of thing without a valid key


-Original Message-
Date: Friday, October 30, 2009 12:11:24 pm
To: flexcoders@yahoogroups.com
From: Vincent Blanqué tipt...@free.fr
Subject: [flexcoders] Strange issue with Flex Builder Trial - Run the flex 
application only on first day

Hi,

I have created Flex proyects with Flex Builder 3 Trial Version for 
generating Google Maps apps. I 'Run the application'. The first day 
everything works well. But later, the same mxml does not run well. 
However, if I create a new project with the same mxml file, everything 
is ok. Is there any protection that limit the duration of a project ? Is 
it a cache issue ? I really does not understand...

Thx,

Vincent




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links







Fwd: [flexcoders] get components completely created without displaying them

2009-10-30 Thread thomas parquier
Oh yes, thank you, but I didnt mention : how in actionscript only ?

thomas parquier
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/10/30 reyna...@gmail.com reyna...@gmail.com



 IncludeInLayout=false might do the trick


 -Original Message-
 Date: Friday, October 30, 2009 12:06:50 pm
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 From: thomas mailingli...@web-attitude.frmailinglists%40web-attitude.fr
 
 Subject: [flexcoders] get components completely created without displaying
 them

 Hello,

 How to get flex components completely rendered (create children, get data,
 lay out) without adding them to stage ?
 Specificaly, how to get bitmapdata.draw( component ) actually draw
 component ?

 thomas parquier
 ---
 http://www.web-attitude.fr/
 msn : thomas.parqu...@web-attitude.fr thomas.parquier%40web-attitude.fr
 softphone : sip:webattit...@ekiga.net webattitude%40ekiga.net
 téléphone portable : +33601 822 056

  



Re: [flexcoders] how can I parse this Srting in Flex

2009-10-30 Thread thomas parquier
You can use split and access elements in result array with i and i+1, using
a for loop with step of 2.

thomas parquier
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/10/30 thomas_13s thomas_...@yahoo.com



 Hi All,
 Label1|url1|label2Explorer|url2|Label3|url3
 how can I parse this string in flex and get the label1|url1 , label2|url2,
 label3|url3 seperately , Please some sample code to do this.
 Thanks
 Tom

  



[flexcoders] ItemRenderer for HOLC Chart Series Item

2009-10-30 Thread cjsteury2
Okay... i have finally figured out how to write a custom itemrenderer for HOLC 
Chart Series Item... And the secret is posted below (about 99% of the way)... 
can anyone PLEASE tell me how to render the Open and Close Tick marks 
correctly??  Using this code they are a little off...

I have tried to get the DrawRect() function a million diff ways but do not know 
what is throwing it off...

package com.steury.controls.orders   { // empty package.

import flash.display.Graphics;
import mx.charts.series.items.HLOCSeriesItem;
import mx.core.IDataRenderer;
import mx.skins.ProgrammaticSkin;

public class ChartColorRenderer extends mx.skins.ProgrammaticSkin
implements IDataRenderer{

private var color:Number;
private var green:Number = 0x00ff00;
private var red:Number = 0xfe;
private var _hlocItem:HLOCSeriesItem;
private var open:Number;
private var close:Number;

public function ChartColorRenderer() {
// Empty constructor.
}
public function get data():Object {
return _hlocItem;
}

public function set data(value:Object):void {
_hlocItem = value as HLOCSeriesItem
invalidateDisplayList();
open=_hlocItem.openFilter;
close=_hlocItem.closeFilter;
}

override protected function

updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, 
unscaledHeight);
if (open  close) color = red;
if (open  close) color = green;
var g:Graphics = graphics;
g.clear();
g.beginFill(color,1);
g.drawRect(0, 0, unscaledWidth, unscaledHeight);
g.endFill();
g.beginFill(color,1);
g.drawRect(open,0,10,1);
g.endFill();
g.beginFill(color,1);
g.drawRect(0,close,10,1);
g.endFill();
}
} // Close class.
} // Close package.




RE: [flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread Alex Harui
Yeah, I think that's because Proxy is an odd beast.  It is dynamic and can have 
any property and you're responsible for implementing all those methods that 
help iterate the object.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Friday, October 30, 2009 9:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back




Can't even use an JSON encoding

at com.adobe.serialization.json::JSONEncoder/objectToString()

jason

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
flexaustin flexaus...@... wrote:

 What about using the JSONEncoder and JSONDecoder? Will I have the same issue?

 Jason



 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 flexaustin flexaustin@ wrote:
 
  Just realized need return type.
 
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  flexaustin flexaustin@ wrote:
  
   Getting error
   1144: Interface method readExternal in namespace 
   flash.utils:IExternalizable is implemented with an incompatible signature
  
  
   public class Data extends EventDispatcher implements IExternalizable
  
   public function writeExternal(output:IDataOutput) {
   output.writeObject(_nodes);
   output.writeObject(_edges);
   output.writeObject(_span);
   output.writeObject(_groups);
   output.writeObject(_root);
   output.writeObject(_tree);
   }
   public function readExternal(input:IDataInput) {
   _nodes = input.readObject();
   _edges = input.readObject();
   _span = input.readObject();
   _groups = input.readObject();
   _root = input.readObject();
   _tree = input.readObject();
   }
  
 




[flexcoders] [Resolved] Re: AIR Ant Build Script

2009-10-30 Thread seanmcmonahan
Found a few resources on this:

1) http://kb2.adobe.com/cps/404/kb404341.html
2) 
http://74.125.93.132/search?q=cache:w_Jda-ZeRfUJ:www.morearty.com/blog/2009/01/23/how-to-capture-the-compilation-options-used-by-flex-builder/+flex+builder+release+build+optionscd=7hl=enct=clnkgl=usclient=safari

What I ended up doing was dumping the config xml from Flex Builder and from Ant 
and noticed that the difference was that FB targeted Flash Player 9.0.28 while 
Ant targeted 10.  Switching Ant to target 9.0.28 resolved the issue.  Of course 
this raises the issue: why does this work in 9.x but not 10.

--- In flexcoders@yahoogroups.com, seanmcmonahan s...@... wrote:

 So I posted a question about Ant build scripts for AIR a few weeks ago and 
 got some great answers, so here's another one.
 
 I have an Ant build script that I'm using to build my AIR project.  It builds 
 everything and packages the application just fine.  The app runs with no 
 noticeable problems until you try to do any serialization with a class we 
 have: ElasticDictionary.  This class merely extends flash.utils.Dictionary 
 with some convenience methods (like length() -- code is below).  
 
 I have the [RemoteObject] metadata and this works flawlessly when the project 
 is run from the Flex Builder debugger.  It also works perfectly when the 
 release build is exported via the Flex Builder Export Release Build... dialog.
 
 So my question is: what am I missing in my Ant build script that Flex Builder 
 does for me?  The class, ElasticDictionary, is in the project's src folder 
 and I'm using the 3.4 SDK.
 
 Relevant (at least what I *think* is relevant) code below.  Thanks in advance 
 for your help!
 
 Ant Build Script:
 
 exec
   executable=${MXMLC}
   failonerror=true
   
   arg value=-debug=false/
   arg value=+flexlib=${SDK_HOME}/frameworks/
   arg value=+configname=air/
   arg value=-file-specs=${MAIN_SOURCE_FILE}/
   arg value=-output=${BUILD_DIR}/${APP_ROOT_FILE}/
   arg value=-keep-as3-metadata+=RemoteClass/
   
   
   arg 
 value=-library-path+=${SDK_HOME}/frameworks/libs/
   arg 
 value=-library-path+=${SDK_HOME}/frameworks/libs/air/
   
   arg 
 value=-include-libraries=${LIBS_DIR}/applicationupdater.swc/
   arg 
 value=-include-libraries=${LIBS_DIR}/Degrafa_Beta3.1_Flex3.swc/
   arg value=-locale=en_US,fr_FR,de_DE/
   arg value=-source-path=${LOC_DIR}/{locale}/
   arg value=-source-path=${PROP_DIR}/
   
   /exec
 
 SDK_HOME refers to the location of the Flex 3.4 SDK.  LIBS_DIR points to the 
 project's SWC's.  LOC_DIR to localization files; PROP_DIR to properties 
 (.properties) files. 
 
 ---
 
 The ElasticDictionary class: 
 
 /**
 * Used instead of ordinary dictionaries so that their data type can be 
 preserved when saving in a serailized format 
 */
 package com.project.utils {
   
   import flash.utils.Dictionary;
   
   [Bindable]
   [RemoteClass]
   public dynamic class ElasticDictionary extends Dictionary {
   
   public function ElasticDictionary(weakKeys:Boolean=false) {
   super(weakKeys);
   }
   
   
   public function get length():uint {
   return getKeys().length;
 }
 
 public function getKeys():Array {
 var keys:Array = new Array();
 for(var key:Object in this) {
   keys.push(key);
 }
 return keys;
 }
 
 public function getValues():Array {
 var values:Array = new Array();
 for(var key:Object in this) {
   values.push(this[key]);
 }
 return values;
 }
   
   }
 }





[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Alex, what else can I try?  I have tried implementing IExternalizable in every 
class and it doesn't seem to work, I think I might be close as one class is 
causing me issue Datalist. When I implement IExternalizable and flex starts 
decoding the bytearray it throws an error on Datalist constructor. It 
expecting one arguement in the constructor Datalist(name:String) and I guess 
Flex isn't passing it the arguement.

Jason



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

 Yeah, I think that's because Proxy is an odd beast.  It is dynamic and can 
 have any property and you're responsible for implementing all those methods 
 that help iterate the object.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Friday, October 30, 2009 9:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
 
 
 
 
 Can't even use an JSON encoding
 
 at com.adobe.serialization.json::JSONEncoder/objectToString()
 
 jason
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 flexaustin flexaustin@ wrote:
 
  What about using the JSONEncoder and JSONDecoder? Will I have the same 
  issue?
 
  Jason
 
 
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  flexaustin flexaustin@ wrote:
  
   Just realized need return type.
  
  
   --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
   flexaustin flexaustin@ wrote:
   
Getting error
1144: Interface method readExternal in namespace 
flash.utils:IExternalizable is implemented with an incompatible 
signature
   
   
public class Data extends EventDispatcher implements IExternalizable
   
public function writeExternal(output:IDataOutput) {
output.writeObject(_nodes);
output.writeObject(_edges);
output.writeObject(_span);
output.writeObject(_groups);
output.writeObject(_root);
output.writeObject(_tree);
}
public function readExternal(input:IDataInput) {
_nodes = input.readObject();
_edges = input.readObject();
_span = input.readObject();
_groups = input.readObject();
_root = input.readObject();
_tree = input.readObject();
}
   
  
 





[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread seanmcmonahan
Do you think the class being dynamic is causing this issue?  I ask because I 
have a similar problem with a dynamic class that extends Dictionary.  It works 
fine in Flash Player 9.0.28 but not in 10.

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

 Yeah, I think that's because Proxy is an odd beast.  It is dynamic and can 
 have any property and you're responsible for implementing all those methods 
 that help iterate the object.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Friday, October 30, 2009 9:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
 
 
 
 
 Can't even use an JSON encoding
 
 at com.adobe.serialization.json::JSONEncoder/objectToString()
 
 jason
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 flexaustin flexaustin@ wrote:
 
  What about using the JSONEncoder and JSONDecoder? Will I have the same 
  issue?
 
  Jason
 
 
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  flexaustin flexaustin@ wrote:
  
   Just realized need return type.
  
  
   --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
   flexaustin flexaustin@ wrote:
   
Getting error
1144: Interface method readExternal in namespace 
flash.utils:IExternalizable is implemented with an incompatible 
signature
   
   
public class Data extends EventDispatcher implements IExternalizable
   
public function writeExternal(output:IDataOutput) {
output.writeObject(_nodes);
output.writeObject(_edges);
output.writeObject(_span);
output.writeObject(_groups);
output.writeObject(_root);
output.writeObject(_tree);
}
public function readExternal(input:IDataInput) {
_nodes = input.readObject();
_edges = input.readObject();
_span = input.readObject();
_groups = input.readObject();
_root = input.readObject();
_tree = input.readObject();
}
   
  
 





[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
I don't think so. Its just that it isn't just a generic simple Object or Array 
but rather a large Class file which contains other large class files.

So imagine saving something like your entire displaylist, but not the visual 
just the data behind it.

The object I am saving cotains over 100 over objects and these 100 objects 
contains a handful of objects.

Jason




--- In flexcoders@yahoogroups.com, seanmcmonahan s...@... wrote:

 Do you think the class being dynamic is causing this issue?  I ask because I 
 have a similar problem with a dynamic class that extends Dictionary.  It 
 works fine in Flash Player 9.0.28 but not in 10.
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Yeah, I think that's because Proxy is an odd beast.  It is dynamic and can 
  have any property and you're responsible for implementing all those 
  methods that help iterate the object.
  
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
  Behalf Of flexaustin
  Sent: Friday, October 30, 2009 9:40 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
  back
  
  
  
  
  Can't even use an JSON encoding
  
  at com.adobe.serialization.json::JSONEncoder/objectToString()
  
  jason
  
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  flexaustin flexaustin@ wrote:
  
   What about using the JSONEncoder and JSONDecoder? Will I have the same 
   issue?
  
   Jason
  
  
  
   --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
   flexaustin flexaustin@ wrote:
   
Just realized need return type.
   
   
--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
flexaustin flexaustin@ wrote:

 Getting error
 1144: Interface method readExternal in namespace 
 flash.utils:IExternalizable is implemented with an incompatible 
 signature


 public class Data extends EventDispatcher implements IExternalizable

 public function writeExternal(output:IDataOutput) {
 output.writeObject(_nodes);
 output.writeObject(_edges);
 output.writeObject(_span);
 output.writeObject(_groups);
 output.writeObject(_root);
 output.writeObject(_tree);
 }
 public function readExternal(input:IDataInput) {
 _nodes = input.readObject();
 _edges = input.readObject();
 _span = input.readObject();
 _groups = input.readObject();
 _root = input.readObject();
 _tree = input.readObject();
 }

   
  
 





RE: [flexcoders] how can I parse this Srting in Flex

2009-10-30 Thread Gordon Smith
I would use String's split() method to split your string on the | character 
into the Array [ Label1, url1, label2Explorer, url2, Label3, url3 
]. Then you can use a for-loop to walk through this 6-element array and create 
a new 3-element array by combinding elements 0/1, 2/3, and 4/5.

But if the six elements in the string are grouped into three pairs of two, then 
it would obviously be less work if it were stored as

Label1|url1||label2Explorer|url2||label3|url3

You could then simply split it on ||.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of thomas_13s
Sent: Friday, October 30, 2009 9:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how can I parse this Srting in Flex



Hi All,
Label1|url1|label2Explorer|url2|Label3|url3
how can I parse this string in flex and get the label1|url1 , label2|url2, 
label3|url3 seperately , Please some sample code to do this.
Thanks
Tom



[flexcoders] Re: SharedObject problem/bug? Cannot store a subclass of ByteArray.

2009-10-30 Thread Geoffrey


Hi Sean,

Thank you for the link; still no luck. I had tried implementing IExternalizable 
before, but after reading your article I decided to try again. I have figured 
out a little more:

--I can extend, say, a Sprite, and it works fine.
--When I save the SharedObject, if I use the Sprite-based class, there are two 
calls to writeExternal(). But for the ByteArray-based class, there is no call 
to writeExternal().
--When I load the SO, the constructor for the Sprite-based class gets called. 
The constructor for the ByteArray-based class does not get called.

I suspect that Adobe's serialization/deserialization code has something that 
checks for type ByteArray (e.g., if (x is ByteArray)). On the write-side, it 
would then call something like writeBytes(), and only call writeExternal() if 
not a ByteArray. On the read-side, it may do something similar when type 
casting.

At this point, I will probably try a workaround for my situation. (E.g., 
encapsulating the ByteArray) But if anyone gets this to work, I would be 
interested to know.

--Geoff

--- In flexcoders@yahoogroups.com, seanmcmonahan s...@... wrote:

 I'm having a similar problem with a subclass of Dictionary.  Unfortunately I 
 haven't has an opportunity to try this fix yet, but maybe you'll find it 
 useful: 
 http://stackoverflow.com/questions/850466/properly-serializing-flash-utils-dictionary-to-a-sharedobject
 
 --- In flexcoders@yahoogroups.com, Geoffrey geoffhom@ wrote:
 
  
  
  Muzak, thank you for your help. However, I have already tried [RemoteClass] 
  (which I mentioned in the original post). I also looked at the link that 
  you provided and decided to try more combinations, but none worked. I have 
  tried [RemoteClass] with and w/o [Bindable], 
  [RemoteClass(alias=ByteArrayPlus)], and I made sure to use my class 
  beforehand. In all cases I can get a custom class to retain its type, but 
  ByteArrayPlus always gets read as ByteArray from the SharedObject.
  
  I believe this may be a problem peculiar to ByteArray, but I don't know 
  exactly why that would be so. 
  
  Again, the challenge is this: make any class that extends ByteArray, write 
  it to a SharedObject (to the disk), read it from the SharedObject, and have 
  it retain its class. I know it sounds straightforward, but I cannot get it 
  to work.
  
  --Geoff
  
  --- In flexcoders@yahoogroups.com, Muzak p.ginneberge@ wrote:
  
   Add a RemoteClass metadata tag to the custom class:
   
   Example at the bottom of the article
   http://cookbooks.adobe.com/post_How_to_keep_the_type_of_your_objects_when_serializ-8323.html
   
   
   - Original Message - 
   From: Geoffrey geoffhom@
   To: flexcoders@yahoogroups.com
   Sent: Wednesday, October 28, 2009 12:45 PM
   Subject: [flexcoders] SharedObject problem/bug? Cannot store a subclass 
   of ByteArray.
   
   
Hi,
   
I have a subclass of ByteArray (let's call it ByteArrayPlus), which I 
want to write to a SharedObject. I can store it fine, but 
when I read it back, it says it's of type ByteArray, not ByteArrayPlus. 
Does anyone have an idea what may be wrong? Has anyone 
gotten this to work?
   
FYI, I am already using registerClassAlias(). And it works fine with a 
custom class, and with a custom class extending another 
custom class. I also tried implementing IExternalizable, but that did 
not help. I also tried [RemoteClass] and 
[RemoteClass(alias=ByteArrayPlus)].
   
Also, ByteArrayPlus is really simple: I only added a String (name) to 
it.
   
This is my first post to FlexCoders.
   
Any help appreciated.
   
--Geoff
   
  
 





[flexcoders] Allow popup windows

2009-10-30 Thread Christophe
Hello, 

Is it possible to setup the option : allow popup window in the navigator from a 
flex application ? 

Thank you,
Christophe, 



RE: [flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread Alex Harui
Serialization requires that the constructor handle zero parameters.  So just 
try:

public function DataList(name:String = null)


Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Friday, October 30, 2009 11:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back



I don't think so. Its just that it isn't just a generic simple Object or Array 
but rather a large Class file which contains other large class files.

So imagine saving something like your entire displaylist, but not the visual 
just the data behind it.

The object I am saving cotains over 100 over objects and these 100 objects 
contains a handful of objects.

Jason

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
seanmcmonahan s...@... wrote:

 Do you think the class being dynamic is causing this issue? I ask because I 
 have a similar problem with a dynamic class that extends Dictionary. It works 
 fine in Flash Player 9.0.28 but not in 10.

 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  Yeah, I think that's because Proxy is an odd beast. It is dynamic and can 
  have any property and you're responsible for implementing all those 
  methods that help iterate the object.
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of flexaustin
  Sent: Friday, October 30, 2009 9:40 AM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
  back
 
 
 
 
  Can't even use an JSON encoding
 
  at com.adobe.serialization.json::JSONEncoder/objectToString()
 
  jason
 
  --- In 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
   flexaustin flexaustin@ wrote:
  
   What about using the JSONEncoder and JSONDecoder? Will I have the same 
   issue?
  
   Jason
  
  
  
   --- In 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
flexaustin flexaustin@ wrote:
   
Just realized need return type.
   
   
--- In 
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
 flexaustin flexaustin@ wrote:

 Getting error
 1144: Interface method readExternal in namespace 
 flash.utils:IExternalizable is implemented with an incompatible 
 signature


 public class Data extends EventDispatcher implements IExternalizable

 public function writeExternal(output:IDataOutput) {
 output.writeObject(_nodes);
 output.writeObject(_edges);
 output.writeObject(_span);
 output.writeObject(_groups);
 output.writeObject(_root);
 output.writeObject(_tree);
 }
 public function readExternal(input:IDataInput) {
 _nodes = input.readObject();
 _edges = input.readObject();
 _span = input.readObject();
 _groups = input.readObject();
 _root = input.readObject();
 _tree = input.readObject();
 }

   
  
 




RE: [flexcoders] Re: SharedObject problem/bug? Cannot store a subclass of ByteArray.

2009-10-30 Thread Alex Harui
Please file a bug with a small test case.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Geoffrey
Sent: Friday, October 30, 2009 1:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: SharedObject problem/bug? Cannot store a subclass of 
ByteArray.




Hi Sean,

Thank you for the link; still no luck. I had tried implementing IExternalizable 
before, but after reading your article I decided to try again. I have figured 
out a little more:

--I can extend, say, a Sprite, and it works fine.
--When I save the SharedObject, if I use the Sprite-based class, there are two 
calls to writeExternal(). But for the ByteArray-based class, there is no call 
to writeExternal().
--When I load the SO, the constructor for the Sprite-based class gets called. 
The constructor for the ByteArray-based class does not get called.

I suspect that Adobe's serialization/deserialization code has something that 
checks for type ByteArray (e.g., if (x is ByteArray)). On the write-side, it 
would then call something like writeBytes(), and only call writeExternal() if 
not a ByteArray. On the read-side, it may do something similar when type 
casting.

At this point, I will probably try a workaround for my situation. (E.g., 
encapsulating the ByteArray) But if anyone gets this to work, I would be 
interested to know.

--Geoff

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
seanmcmonahan s...@... wrote:

 I'm having a similar problem with a subclass of Dictionary. Unfortunately I 
 haven't has an opportunity to try this fix yet, but maybe you'll find it 
 useful: 
 http://stackoverflow.com/questions/850466/properly-serializing-flash-utils-dictionary-to-a-sharedobject

 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 Geoffrey geoffhom@ wrote:
 
 
 
  Muzak, thank you for your help. However, I have already tried [RemoteClass] 
  (which I mentioned in the original post). I also looked at the link that 
  you provided and decided to try more combinations, but none worked. I have 
  tried [RemoteClass] with and w/o [Bindable], 
  [RemoteClass(alias=ByteArrayPlus)], and I made sure to use my class 
  beforehand. In all cases I can get a custom class to retain its type, but 
  ByteArrayPlus always gets read as ByteArray from the SharedObject.
 
  I believe this may be a problem peculiar to ByteArray, but I don't know 
  exactly why that would be so.
 
  Again, the challenge is this: make any class that extends ByteArray, write 
  it to a SharedObject (to the disk), read it from the SharedObject, and have 
  it retain its class. I know it sounds straightforward, but I cannot get it 
  to work.
 
  --Geoff
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  Muzak p.ginneberge@ wrote:
  
   Add a RemoteClass metadata tag to the custom class:
  
   Example at the bottom of the article
   http://cookbooks.adobe.com/post_How_to_keep_the_type_of_your_objects_when_serializ-8323.html
  
  
   - Original Message -
   From: Geoffrey geoffhom@
   To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
   Sent: Wednesday, October 28, 2009 12:45 PM
   Subject: [flexcoders] SharedObject problem/bug? Cannot store a subclass 
   of ByteArray.
  
  
Hi,
   
I have a subclass of ByteArray (let's call it ByteArrayPlus), which I 
want to write to a SharedObject. I can store it fine, but
when I read it back, it says it's of type ByteArray, not ByteArrayPlus. 
Does anyone have an idea what may be wrong? Has anyone
gotten this to work?
   
FYI, I am already using registerClassAlias(). And it works fine with a 
custom class, and with a custom class extending another
custom class. I also tried implementing IExternalizable, but that did 
not help. I also tried [RemoteClass] and
[RemoteClass(alias=ByteArrayPlus)].
   
Also, ByteArrayPlus is really simple: I only added a String (name) to 
it.
   
This is my first post to FlexCoders.
   
Any help appreciated.
   
--Geoff
   
  
 




[flexcoders] Re: Flex Soap Version Mismatch

2009-10-30 Thread Joshua

I'm still running naked, but am getting a better grip on this stuff.

But here was my break, NOT!!

The company was nice enough to put me on their crossdomain file.  So, I'm 
thinking good, but I was wrong.  I still get a security violation


FaultEvent fault=[RPC Fault faultString=Security error accessing url 
faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
messageId=null type=fault bubbles=true cancelable=true eventPhase=2


What is up with that.  I thought that the cross-domain file would handle that.  
Here is the cross domain file on the root of the wsdl service


?xml version=1.0 encoding=UTF-8?
!-- the purpose of this document is to allow FLASH web applications to access 
the  APIs. --
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
allow-access-from domain=*.shipnotic.com/
/cross-domain-policy


I am at https://www.shipnotic.com and am accessing a wsdl at https:// at well.


anybody know why this is still happening with crossdomain support?


Thns,
--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I would love to know too but after running around naked and sacrificing some 
 chickens I could not get it to work.
 
 All I know is that you will actually save time by doing the hand coding. 
 Maybe some day we'll have an answer but that day is not today.
 
 
 HTH.
 
 
 
 
 Steve
 
 --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
 
  Thanks for the advice Steve.  So to do that I'm gonna need to 'hand-code' 
  all the calls from Flex to php and then do the same with php, creating all 
  the methods by hand from the wsdl?  Isn't there a simpler way to do it 
  using the Flex wsdl wizard and a php proxy that just passes through the 
  soap request?  And either way I do it I still want to know why the way I'm 
  attempting to do it won't work.  Why does going through php change my soap 
  envelop and create a mismatch I guess is the big question??
   
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   I think you may be over thinking this.
   
   I have the same situation as you - a local PHP server and a remote Web 
   Service.
   
   I tried for a long time to get it working by proxying through PHP like 
   what you are trying. I could never get it to work.
   
   Instead, I created a SOAP Client in PHP that could talk to the Web 
   Service. Once this was working I used WebORB to create a service to talk 
   to Flex. Then I merged the code. Now I have Flex sending and receiving 
   objects via WebORB and PHP exchanging data via SOAP. The best of both 
   worlds.
   
   
   HTH
   
   
   
   
   Steve
   
   --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
   
I have a problem with soap and flex 3.  I have created a webservice 
through the import webservice menu in Flex Builder.  If I use the 
service as is I get a security error because the crossdomain policy on 
the remote server doesn't comply.  So, instead I am using a php proxy 
to relay the webservice through my server and out to the webservice 
back to the server back to Flex.  When I try to do this I get a SOAP 
mismatch error coming from the below code.

else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI)
{
throw new Error(SOAP Response Version Mismatch);
}

I went back in and checked the value of envNS.uri and 
SOAPConstants.SOAP_ENVELOPE_URI in both the previously described 
situations (php proxy and straight security riddled call).  In the 
security riddled call the two variables match.  In the proxy call I get 
back differing values of envNS.uri and SOAPConstants.SOAP_ENVELOPE_URI.

Can somebody tell me why the variables are not matching when put 
through the php proxy.  The php is simple, just curl, so I've pasted it 
below.  

///START PHP SNIPPET

$url = $_GET['url'];
$headers = $_GET['headers'];
$mimeType = $_GET['mimeType'];

//Start the Curl session
$session = curl_init();

// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_URL, $url);
curl_setopt($session, CURLOPT_HEADER, ($headers == true) ? true : 
false);
curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);

// Make the call
$response = curl_exec($session);

if ($mimeType != )
{
// The web service returns XML. Set the Content-Type 
appropriately
header(Content-Type: .$mimeType);
}

echo $response;

curl_close($session);

//END PHP SNIPPET

Any help would be great.  Thanks,

Josh
   
  
 





[flexcoders] how may I store values to function's arguments? REFdn7045338143

2009-10-30 Thread dennis
Some times, the one result of a function is not enough, cay we use the
arguments to get back values from them?

 

internal function getXY(x:int,y:int):void{

  x=10;y=20;

}

 

internal function test():void{

  var x:int; var y:int;

  getXY(x,y);

  trace(x: +x.toString()+ y: +y.toString());  // here I get x: 0 y: 0,
I want to get x: 10 y: 20

}

 

For instance, in c the getXY should be like this:

 

internal function getXY(int* x, int* y):void{

  x=10;y=20;

}

 

dennis

 



[flexcoders] Re: context menu event on tree column of advanced data grid ....

2009-10-30 Thread MicC
Solved this - added context menu within AdvancedDataGroupItemRenderer.

--- In flexcoders@yahoogroups.com, MicC chigwel...@... wrote:

 When a context menu on an ADG is clicked and the ADG cell is not a hierarchy 
 node, the ContextMenuEvent.mouseTarget is ADGItemRenderEX and info about the  
 grid cell data clicked on to raise the context menu can be grabbed from 
 ADGItemRendererEX.listData.Item.
 
 But when a node in the hierarchical column of an ADG is clicked to raise the 
 context menu, the context menu ContextMenuEvent.mouseTarget is a 
 AdvancedListBaseContentHolder . and does not seem to hold any info about 
 the grid cell (hierarchy node). 
 
 How do I extract info about the hierarchy node from 
 AdvancedListBaseContentHolder? TIA,
 
 Mic.





[flexcoders] Add icon and text formatting to new ContextMenuItem?

2009-10-30 Thread MicC
is it possible to add an icon and text formatting to a custom item on a context 
menu? TIA,

Mic.



RE: [flexcoders] Allow popup windows

2009-10-30 Thread Alex Harui
Flex does not provide a way to get around popup blockers. But you can put up 
your own Flex popups within the application/browser.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Christophe
Sent: Friday, October 30, 2009 2:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Allow popup windows



Hello,

Is it possible to setup the option : allow popup window in the navigator from a 
flex application ?

Thank you,
Christophe,



[flexcoders] Nobody ever answers any of my posts...

2009-10-30 Thread cjsteury2


--- In flexcoders@yahoogroups.com, cjsteury2 cra...@... wrote:

 Okay... i have finally figured out how to write a custom itemrenderer for 
 HOLC Chart Series Item... And the secret is posted below (about 99% of the 
 way)... can anyone PLEASE tell me how to render the Open and Close Tick marks 
 correctly??  Using this code they are a little off...
 
 I have tried to get the DrawRect() function a million diff ways but do not 
 know what is throwing it off...
 
 package com.steury.controls.orders   { // empty package.
 
   import flash.display.Graphics;
   import mx.charts.series.items.HLOCSeriesItem;
   import mx.core.IDataRenderer;
   import mx.skins.ProgrammaticSkin;
 
   public class ChartColorRenderer extends mx.skins.ProgrammaticSkin
   implements IDataRenderer{
 
   private var color:Number;
   private var green:Number = 0x00ff00;
   private var red:Number = 0xfe;
   private var _hlocItem:HLOCSeriesItem;
   private var open:Number;
   private var close:Number;
 
   public function ChartColorRenderer() {
   // Empty constructor.
   }
   public function get data():Object {
   return _hlocItem;
   }
   
   public function set data(value:Object):void {
   _hlocItem = value as HLOCSeriesItem
   invalidateDisplayList();
   open=_hlocItem.openFilter;
   close=_hlocItem.closeFilter;
   }
 
   override protected function
   
 updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {
   super.updateDisplayList(unscaledWidth, 
 unscaledHeight);
   if (open  close) color = red;
   if (open  close) color = green;
   var g:Graphics = graphics;
   g.clear();
   g.beginFill(color,1);
   g.drawRect(0, 0, unscaledWidth, unscaledHeight);
   g.endFill();
   g.beginFill(color,1);
   g.drawRect(open,0,10,1);
   g.endFill();
   g.beginFill(color,1);
   g.drawRect(0,close,10,1);
   g.endFill();
   }
   } // Close class.
 } // Close package.





[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread flexaustin
Alex, first thanks for spending so much time helping me with this.

How do I handle all the rest?  Flex specific classes? Should I monkey patch? 
See error below my custom object needs to have all this serialized and 
dematerialized as well.:

ArgumentError: Error #1063: Argument count mismatch on flash.geom::Transform(). 
Expected 1, got 0.


Jason



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

 Serialization requires that the constructor handle zero parameters.  So just 
 try:
 
 public function DataList(name:String = null)
 
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Friday, October 30, 2009 11:42 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
 
 
 
 I don't think so. Its just that it isn't just a generic simple Object or 
 Array but rather a large Class file which contains other large class files.
 
 So imagine saving something like your entire displaylist, but not the visual 
 just the data behind it.
 
 The object I am saving cotains over 100 over objects and these 100 objects 
 contains a handful of objects.
 
 Jason
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 seanmcmonahan sean@ wrote:
 
  Do you think the class being dynamic is causing this issue? I ask because I 
  have a similar problem with a dynamic class that extends Dictionary. It 
  works fine in Flash Player 9.0.28 but not in 10.
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  Alex Harui aharui@ wrote:
  
   Yeah, I think that's because Proxy is an odd beast. It is dynamic and can 
   have any property and you're responsible for implementing all those 
   methods that help iterate the object.
  
   Alex Harui
   Flex SDK Developer
   Adobe Systems Inc.http://www.adobe.com/
   Blog: http://blogs.adobe.com/aharui
  
   From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
   [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] 
   On Behalf Of flexaustin
   Sent: Friday, October 30, 2009 9:40 AM
   To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
   Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
   back
  
  
  
  
   Can't even use an JSON encoding
  
   at com.adobe.serialization.json::JSONEncoder/objectToString()
  
   jason
  
   --- In 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
flexaustin flexaustin@ wrote:
   
What about using the JSONEncoder and JSONDecoder? Will I have the same 
issue?
   
Jason
   
   
   
--- In 
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
 flexaustin flexaustin@ wrote:

 Just realized need return type.


 --- In 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
  flexaustin flexaustin@ wrote:
 
  Getting error
  1144: Interface method readExternal in namespace 
  flash.utils:IExternalizable is implemented with an incompatible 
  signature
 
 
  public class Data extends EventDispatcher implements IExternalizable
 
  public function writeExternal(output:IDataOutput) {
  output.writeObject(_nodes);
  output.writeObject(_edges);
  output.writeObject(_span);
  output.writeObject(_groups);
  output.writeObject(_root);
  output.writeObject(_tree);
  }
  public function readExternal(input:IDataInput) {
  _nodes = input.readObject();
  _edges = input.readObject();
  _span = input.readObject();
  _groups = input.readObject();
  _root = input.readObject();
  _tree = input.readObject();
  }
 

   
  
 





RE: [flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-30 Thread Alex Harui
To handle classes like transform, I would come up with a custom encoding for 
the transform (or skip it entirely as the transform can usually be derived from 
other properties like scale, x, y, width, height, rotation).  I didn't know you 
were trying to serialize display objects.  Generally that's not advisable as 
there is a lot of redundancy and circular references in the properties.  It is 
better to save away the data they present and some notion of which class to use 
to present the data.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Friday, October 30, 2009 6:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back



Alex, first thanks for spending so much time helping me with this.

How do I handle all the rest? Flex specific classes? Should I monkey patch? See 
error below my custom object needs to have all this serialized and 
dematerialized as well.:

ArgumentError: Error #1063: Argument count mismatch on flash.geom::Transform(). 
Expected 1, got 0.

Jason

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 Serialization requires that the constructor handle zero parameters. So just 
 try:

 public function DataList(name:String = null)


 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Friday, October 30, 2009 11:42 AM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back



 I don't think so. Its just that it isn't just a generic simple Object or 
 Array but rather a large Class file which contains other large class files.

 So imagine saving something like your entire displaylist, but not the visual 
 just the data behind it.

 The object I am saving cotains over 100 over objects and these 100 objects 
 contains a handful of objects.

 Jason

 --- In 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
  seanmcmonahan sean@ wrote:
 
  Do you think the class being dynamic is causing this issue? I ask because I 
  have a similar problem with a dynamic class that extends Dictionary. It 
  works fine in Flash Player 9.0.28 but not in 10.
 
  --- In 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
   Alex Harui aharui@ wrote:
  
   Yeah, I think that's because Proxy is an odd beast. It is dynamic and can 
   have any property and you're responsible for implementing all those 
   methods that help iterate the object.
  
   Alex Harui
   Flex SDK Developer
   Adobe Systems Inc.http://www.adobe.com/
   Blog: http://blogs.adobe.com/aharui
  
   From: 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com

   [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of flexaustin
   Sent: Friday, October 30, 2009 9:40 AM
   To: 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
   Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
   back
  
  
  
  
   Can't even use an JSON encoding
  
   at com.adobe.serialization.json::JSONEncoder/objectToString()
  
   jason
  
   --- In 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
flexaustin flexaustin@ wrote:
   
What about using the JSONEncoder and JSONDecoder? Will I have the same 
issue?
   
Jason
   
   
   
--- In 
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
 flexaustin flexaustin@ wrote:

 Just realized need return type.


 --- In 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
  flexaustin flexaustin@ wrote:
 
  Getting error
  1144: Interface method readExternal in namespace 
  flash.utils:IExternalizable is implemented with an incompatible 
  signature
 
 
  public class Data extends EventDispatcher implements IExternalizable
 
  public function writeExternal(output:IDataOutput) {
  output.writeObject(_nodes);
  output.writeObject(_edges);
  output.writeObject(_span);
  output.writeObject(_groups);
  output.writeObject(_root);
  output.writeObject(_tree);
  }
  public function 

[flexcoders] Re: SharedObject problem/bug? Cannot store a subclass of ByteArray.

2009-10-30 Thread Geoffrey
Hi Alex,

Fair enough. I submitted it (I think), although I got this message:

You have successfully created the issue (FB-23715), however you do not have 
the permission to view the created issue.

This is probably because you entered a bug report that details a potential 
security vulnerability - or is related to a non-public component in a 
commercial product.

I do not feel experienced enough to know which categories to submit the bug 
under, but I included source code to reproduce the bug.

Alex, thank you for your continual help to the community.

--Geoff

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

 Please file a bug with a small test case.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of Geoffrey
 Sent: Friday, October 30, 2009 1:35 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: SharedObject problem/bug? Cannot store a subclass 
 of ByteArray.
 
 
 
 
 Hi Sean,
 
 Thank you for the link; still no luck. I had tried implementing 
 IExternalizable before, but after reading your article I decided to try 
 again. I have figured out a little more:
 
 --I can extend, say, a Sprite, and it works fine.
 --When I save the SharedObject, if I use the Sprite-based class, there are 
 two calls to writeExternal(). But for the ByteArray-based class, there is no 
 call to writeExternal().
 --When I load the SO, the constructor for the Sprite-based class gets called. 
 The constructor for the ByteArray-based class does not get called.
 
 I suspect that Adobe's serialization/deserialization code has something that 
 checks for type ByteArray (e.g., if (x is ByteArray)). On the write-side, it 
 would then call something like writeBytes(), and only call writeExternal() if 
 not a ByteArray. On the read-side, it may do something similar when type 
 casting.
 
 At this point, I will probably try a workaround for my situation. (E.g., 
 encapsulating the ByteArray) But if anyone gets this to work, I would be 
 interested to know.
 
 --Geoff
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 seanmcmonahan sean@ wrote:
 
  I'm having a similar problem with a subclass of Dictionary. Unfortunately I 
  haven't has an opportunity to try this fix yet, but maybe you'll find it 
  useful: 
  http://stackoverflow.com/questions/850466/properly-serializing-flash-utils-dictionary-to-a-sharedobject
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  Geoffrey geoffhom@ wrote:
  
  
  
   Muzak, thank you for your help. However, I have already tried 
   [RemoteClass] (which I mentioned in the original post). I also looked at 
   the link that you provided and decided to try more combinations, but none 
   worked. I have tried [RemoteClass] with and w/o [Bindable], 
   [RemoteClass(alias=ByteArrayPlus)], and I made sure to use my class 
   beforehand. In all cases I can get a custom class to retain its type, but 
   ByteArrayPlus always gets read as ByteArray from the SharedObject.
  
   I believe this may be a problem peculiar to ByteArray, but I don't know 
   exactly why that would be so.
  
   Again, the challenge is this: make any class that extends ByteArray, 
   write it to a SharedObject (to the disk), read it from the SharedObject, 
   and have it retain its class. I know it sounds straightforward, but I 
   cannot get it to work.
  
   --Geoff
  
   --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
   Muzak p.ginneberge@ wrote:
   
Add a RemoteClass metadata tag to the custom class:
   
Example at the bottom of the article
http://cookbooks.adobe.com/post_How_to_keep_the_type_of_your_objects_when_serializ-8323.html
   
   
- Original Message -
From: Geoffrey geoffhom@
To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
Sent: Wednesday, October 28, 2009 12:45 PM
Subject: [flexcoders] SharedObject problem/bug? Cannot store a subclass 
of ByteArray.
   
   
 Hi,

 I have a subclass of ByteArray (let's call it ByteArrayPlus), which I 
 want to write to a SharedObject. I can store it fine, but
 when I read it back, it says it's of type ByteArray, not 
 ByteArrayPlus. Does anyone have an idea what may be wrong? Has anyone
 gotten this to work?

 FYI, I am already using registerClassAlias(). And it works fine with 
 a custom class, and with a custom class extending another
 custom class. I also tried implementing IExternalizable, but that did 
 not help. I also tried [RemoteClass] and
 [RemoteClass(alias=ByteArrayPlus)].

 Also, ByteArrayPlus is really simple: I only added a String (name) to 
 it.

 This is my first post to FlexCoders.

 Any help appreciated.

 --Geoff