[flexcoders] Re: How to optimise SWC to its minimal size?

2009-08-17 Thread lytvynyuk
I need to do little research, I woul like to know if compiller builds app using 
SWC it will take from there only classes required by the application.

--- In flexcoders@yahoogroups.com, Ian Thomas  wrote:
>
> You can use the 'externs' command-line option to the Flex compiler to
> tell Flex to exclude specific classes - as long as you're sure that
> your code _will_ have access to them at runtime.
> 
> Documentation here:
> 
> http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html
> 
> HTH,
>Ian
> 
> On Fri, May 22, 2009 at 4:13 PM, lytvynyuk  wrote:
> >
> >
> > Any ideas? Hey, Flex gurus I know you are here! :)
> >
> >
>




[flexcoders] Picasa Flex API - Build your own frontend for Google Picasa backend.

2009-08-06 Thread lytvynyuk
I want to show people what I beed dooing from time to time in moment
when I had spare time. I think It can be useful for people who want to
make galleries but not to be care about backend anf for anybody who want
to intergrate their apps with Google Picasa

http://code.google.com/p/picasa-flex-api/


There are couple sample applications illustrating how all that works:

http://picasafx.com 
and http://riahut.com/files/portfolio/index.html
   (this is article ho to
customize portfolio -
http://riahut.com/picasa/picasa-portfolio-freeware-galleryportfolio-anyb\
ody
  )

If anybody thinks this is usefull please tell me, if not hm...
please tell me as well :)



[flexcoders] Who can explain me this:

2009-07-27 Thread lytvynyuk

http://www.adobe.com/2006/mxml"; layout="absolute" 
creationComplete="init()">






Why third trace(...) outputs 1000 not 200!? :)



[flexcoders] Re: How to optimise SWC to its minimal size?

2009-05-22 Thread lytvynyuk
Any ideas? Hey, Flex gurus I know you are here! :)



[flexcoders] How to optimise SWC to its minimal size?

2009-05-19 Thread lytvynyuk
I've created SWC consisting from a single class but class contains a bunch of 
methods and when I built  SWc i found that it is 87Kb. In same time report.xml 
stated that my class is only 3kb, everything else is garbage consisting from 
many Flex frameworks classes used directly or indirectly in my main class.

So question how to build my own SWC without all redundant classes?

What is the reason  to keep all that? As I understand when my SWC will be 
linked in flex Application Flex builder will add only required classes to the 
result SWF ?



[flexcoders] Re: E4x. Strange behavior when modifying XML. Help needed.

2009-05-07 Thread lytvynyuk
Thank you, but it doesn't work!!

But!!!  I think I forgot to mention one thing, my original XML has
defined namespace... and look like that:

var xml:XML = 
   test
   test


I've tried without namespace defined - works. But i need it!! Any ideas?




[flexcoders] E4x. Strange behavior when modifying XML. Help needed.

2009-05-07 Thread lytvynyuk
I have XML instance like that:

var xml:XML = 
   test
   test


I want to edit text in summary and title elements.

I do:

xml.summary = "This is my summary";
xml.title =  "This is new title";

but in resulting XML

is see something like that:


   test
   test
   This is my summary
   This is new title


which is a big problem for me!

What's wrong here?



[flexcoders] Re: crossdomain proxy

2009-04-15 Thread lytvynyuk
You can create simple redirect script that redirects requests from your app to 
requester resource. Drawback - all traffic goes through your host.

--- In flexcoders@yahoogroups.com, Baz  wrote:
>
> Hi,
> 
> Is there a solution out there for proxying public services like amazon's
> webservices (i.e. SimpleDB) that do not provide a crossdomain.xml? I
> understand that service providers purposely leave out crossdomain.xml policy
> files so that developers do not compile their secret keys into their swf's
> (since they can easily be decompiled and compromised) but is there an easier
> solution than spinning up an entire server simply to act as a proxy? Perhaps
> special/cheap proxy hosting, or some other secure solution?
> 
> Cheers,
> Baz
>




[flexcoders] Rotation/Zoom effect applied to the Image looks too aliased! How to fight it?

2009-01-08 Thread lytvynyuk
Is there any library which allow you manipulate images but with better
resulting quality then original effects in Flex?

If you do 5 rotation to an Image it looks really ugly... same with
Zoom and scale.



[flexcoders] How to remove effect applied to image to its original state

2009-01-07 Thread lytvynyuk
Lets say I applied rotation to an image.
I kept that Image object reference.
Then I want to apply other effect to same image object, but previous
effect already altered image.

So question is how to restore original state of the image?
Reloading not seems to be working, I mean image.load()!!!



[flexcoders] Tracking tab changes in TabNavigator ?!

2008-07-28 Thread lytvynyuk
I need to somehow trace that another tab selected to do some action
based on it. Cannot find proper event which can be generated when I
click on tabs or switch tabs.



[flexcoders] Re: #2038: File I/O Error

2008-07-03 Thread lytvynyuk
Absolutely same code. Looks like there is some issue with flash player
version for Firefox/Opera, which doesn't work properly while uploading
via HTTPS. Or may be I'm doing something wrong.

--- In flexcoders@yahoogroups.com, "Sean Clark Hess" <[EMAIL PROTECTED]> wrote:
>
> Do you have different versions running in IE and firefox?
> 
> On Thu, Jul 3, 2008 at 8:56 AM, lytvynyuk <[EMAIL PROTECTED]> wrote:
>



[flexcoders] Re: #2038: File I/O Error

2008-07-03 Thread lytvynyuk
Update:
I works under IE7 doesn't work with Rirefox 2.0.0.15!
Doesn't work with Opera as well! I suspect this is not browser issue,
this is FlashPlayer issue, because Firefox and Opera uses same Flash
Player binaries!


--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> I getting this error, but when I put breakpoint at my server side code
> nothing coming through!! When I created little HTML page with file
> upload filed to same servlet location - IT WORKS!
> 
> I used "Live HTTP headers" to see activity on HTTP requests -
> nothing nothing going through, also I used Wireshark - same effect.
> 
> So what is going on ? any Ideas?
> 
> AS code is extremely simple:
> 
> var request:URLRequest = new URLRequest();
> request.url = UPLOAD_URL;
> fr.upload(request);
> fileNameLabel.text = fr.name;
>




[flexcoders] Re: #2038: File I/O Error

2008-07-03 Thread lytvynyuk
Well, I've picked file by browsing using FileReference's browse()
method, and my file is simple *.png

--- In flexcoders@yahoogroups.com, "Sean Clark Hess" <[EMAIL PROTECTED]> wrote:
>
> The other thing is that the file may be corrupted, or doesn't exist...
> 
> On Wed, Jul 2, 2008 at 1:43 PM, lytvynyuk <[EMAIL PROTECTED]> wrote:
> 
> >   I did. I all cases request can reach server, in my case no. Just an
> > exception, no network activity I'm puzzled.
> >
> >
> > --- In flexcoders@yahoogroups.com ,
"Sean
> > Clark Hess"  wrote:
> > >
> > > You have to do it serverside -- for example, if you're using PHP,
> > you have
> > > to change Apache's maximum upload size for that domain.
> > >
> > > Do a search for error 2038 in these forums though, I thought I saw
> > another
> > > couple of threads about it.
> > >
> > > ~sean
> > >
> >
> >  
> >
>




[flexcoders] Re: #2038: File I/O Error

2008-07-02 Thread lytvynyuk
I did. I all cases request can reach server, in my case no. Just an
exception, no network activity I'm puzzled.

--- In flexcoders@yahoogroups.com, "Sean Clark Hess" <[EMAIL PROTECTED]> wrote:
>
> You have to do it serverside -- for example, if you're using PHP,
you have
> to change Apache's maximum upload size for that domain.
> 
> Do a search for error 2038 in these forums though, I thought I saw
another
> couple of threads about it.
> 
> ~sean
>



[flexcoders] Re: #2038: File I/O Error

2008-07-02 Thread lytvynyuk
How I can increase upload size? There is no such thing in URLRequest
and FileReference...

--- In flexcoders@yahoogroups.com, "Sean Clark Hess" <[EMAIL PROTECTED]> wrote:
>
> We would get that error a lot when the file was too big.  Try increasing
> your upload size.
> 
> On Wed, Jul 2, 2008 at 1:01 PM, lytvynyuk <[EMAIL PROTECTED]> wrote:
> 
> >   I getting this error, but when I put breakpoint at my server
side code
> > nothing coming through!! When I created little HTML page with file
> > upload filed to same servlet location - IT WORKS!
> >
> > I used "Live HTTP headers" to see activity on HTTP requests -
> > nothing nothing going through, also I used Wireshark - same
effect.
> >
> > So what is going on ? any Ideas?
> >
> > AS code is extremely simple:
> >
> > var request:URLRequest = new URLRequest();
> > request.url = UPLOAD_URL;
> > fr.upload(request);
> > fileNameLabel.text = fr.name;
> >
> >  
> >
>




[flexcoders] #2038: File I/O Error

2008-07-02 Thread lytvynyuk
I getting this error, but when I put breakpoint at my server side code
nothing coming through!! When I created little HTML page with file
upload filed to same servlet location - IT WORKS!

I used "Live HTTP headers" to see activity on HTTP requests -
nothing nothing going through, also I used Wireshark - same effect.

So what is going on ? any Ideas?

AS code is extremely simple:

var request:URLRequest = new URLRequest();
request.url = UPLOAD_URL;
fr.upload(request);
fileNameLabel.text = fr.name;



[flexcoders] Uploading binary file and RemoteObject call

2008-06-27 Thread lytvynyuk
I have situation that in addition to my RemoteObject call, which
invokes medthod on my server with object containing some fields, I
need to send content of some file as well. I thought I can some how
load it to the client the make it like one of the fields of RO. But I
don't think I can read local files.

What is the possible solution for this scenario? Thank you.




[flexcoders] Re: How to copy or clone Dictionary?

2008-04-04 Thread lytvynyuk
Yes!!! Thank you, actually u helped me a lot! :)

--- In flexcoders@yahoogroups.com, Scott Melby <[EMAIL PROTECTED]> wrote:
>
> hey... i was close ;)
> 
> Scott
> 
> Scott Melby
> Founder, Fast Lane Software LLC
> http://www.fastlanesw.com
> http://blog.fastlanesw.com
> 
> 
> 
> lytvynyuk wrote:
> > Sorry friend but I think your case will not gonna work ;)
> > what is put methods? Dictionary doesn't have it :)
> >
> > But here is my corrected case, where I do object copy of entries, this
> > case will not gonna work If you entries is Dictionary or Class
> >
> >  static public function
cloneDictionary(oldDictionary:Dictionary,
> > weakKeys:Boolean = false):Dictionary
> >  {
> >  var newDictionary:Dictionary = new Dictionary(weakKeys);
> >  for(var key:Object in oldDictionary) {
> >  newDictionary[key] =
> > ObjectUtil.copy(oldDictionary[key]);
> >  }
> >  return newDictionary;
> >  }
> >
> > http://riahut.com <http://riahut.com>
> >
> > --- In flexcoders@yahoogroups.com, Scott Melby  wrote:
> >   
> >> Fixing a couple of typos :)
> >>
> >> static public funciton cloneDictionary(oldDictionary:Dictionary,
> >> 
> > weakKeys:Boolean = false):Dictionary
> >   
> >> {
> >>var newDictionary:Dictionary = new Dictionary(weakKeys);
> >>
> >>for(var key:Object in oldDictionary)
> >>{
> >>new.put(key, oldDictionary[key]);
> >>}
> >>
> >>return newDictionary;
> >> }
> >>
> >>
> >> Scott
> >>
> >> Scott Melby
> >> Founder, Fast Lane Software LLC
> >> http://www.fastlanesw.com
> >> http://blog.fastlanesw.com
> >> 
> >
> >
> >
>




[flexcoders] Re: How to copy or clone Dictionary?

2008-04-04 Thread lytvynyuk
Sorry friend but I think your case will not gonna work ;)
what is put methods? Dictionary doesn't have it :)

But here is my corrected case, where I do object copy of entries, this
case will not gonna work If you entries is Dictionary or Class

 static public function cloneDictionary(oldDictionary:Dictionary,
weakKeys:Boolean = false):Dictionary
 {
 var newDictionary:Dictionary = new Dictionary(weakKeys);
 for(var key:Object in oldDictionary) {
 newDictionary[key] =
ObjectUtil.copy(oldDictionary[key]);
 }
 return newDictionary;
 }

http://riahut.com 

--- In flexcoders@yahoogroups.com, Scott Melby <[EMAIL PROTECTED]> wrote:
>
> Fixing a couple of typos :)
>
> static public funciton cloneDictionary(oldDictionary:Dictionary,
weakKeys:Boolean = false):Dictionary
> {
>var newDictionary:Dictionary = new Dictionary(weakKeys);
>
>for(var key:Object in oldDictionary)
>{
>new.put(key, oldDictionary[key]);
>}
>
>return newDictionary;
> }
>
>
> Scott
>
> Scott Melby
> Founder, Fast Lane Software LLC
> http://www.fastlanesw.com
> http://blog.fastlanesw.com



[flexcoders] How to copy or clone Dictionary?

2008-04-04 Thread lytvynyuk
Because 

var temp:Dictionary = new Dictionary();
// put something in Dictionary
var new:Dictionary = ObjectUtil.copy(temp) as Dictionary;

doesn't work;



[flexcoders] Re: Posted bug in Adobe with description of the problem

2008-04-02 Thread lytvynyuk
Thank you Rick!  I appreciate you attention and help.
Yes, there are some workarounds I figured, I think it should consider
column width always, not only when creating DataGrid component, similar
story happening with resizing.

--- In flexcoders@yahoogroups.com, "Rick Winscot" <[EMAIL PROTECTED]>
wrote:
>
> Yeah. this is an issue partially related to creation and the fact that
> column width - well that's another story. Here is a quick fix. add the
> listener to each of your grids and copy/paste the function.
>
>
>
> grid.addEventListener( Event.RENDER, handleDataGridRenderEvent );
>
>
>
> private function handleDataGridRenderEvent( event:Event ):void
>
> {
>
>   var dg:DataGrid = DataGrid( event.target );
>
>
>
>   dg.columns[0].width = 100;
>
>   dg.columns[0].minWidth = 100;
>
>   dg.columns[1].width = dg.width - 100 - 100;
>
>
>   dg.columns[2].width = 100;
>
>
> }
>
>
>
> There is an initial blink - as the data grid gets its first render
event and
> sets the columns. Hmm. its 4:05 a.m. - and I'm thinking that this
probably
> isn't the best way to do this. Let me get some sleepy and I'll look at
this
> again.
>
>
>
> Rick Winscot
>
>
>
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of lytvynyuk
> Sent: Tuesday, April 01, 2008 4:22 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Posted bug in Adobe with description of the
problem
>
>
>
> May be I do something wrong, but I will give a change to somebody from
> Adobe tell me what is going on.
>
> http://bugs.adobe.com/jira/browse/SDK-15121
>




[flexcoders] How to deal with this sort of messages: "CSS type selectors...."

2008-04-01 Thread lytvynyuk
"CSS type selectors are not supported in components: 'Alert'"
I getting all over the places in my application and modules, I have
Alert {} style defined in external main.css files. When Flex
compiler build this it always complains (Warnings) but in application
actually all styles in place. HM?




[flexcoders] Posted bug in Adobe with description of the problem

2008-04-01 Thread lytvynyuk
May be I do something wrong, but I will give a change to somebody from
Adobe tell me what is going on.

http://bugs.adobe.com/jira/browse/SDK-15121



[flexcoders] Re: Announcement: Join us in a Flex-Related Focus Group

2008-04-01 Thread lytvynyuk
Jeff I didn't want to turn this into discussion of your website
design, but I think any great idea have nice visual presentation :)
I like to participate to anything which gives me as much knowledge as
possible, I too new to Flex/RIA sphere to know people who are great
here, so cant say anything. and I thing this is great, opinion of
somebody who in completely new...

I agree with some poster here, that Flex developers so overwhelmed now
(at last from my own experience) with work. They go online and here
ONLY when they have big need in to it.

--- In flexcoders@yahoogroups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> 
>   I just wanted to thank Cutter and The Saj for the kind words.  ;)
> 
>   For the record, I don't like the design all that much either.
> 
> Cutter (Flex Related) wrote:



[flexcoders] Re: Announcement: Join us in a Flex-Related Focus Group

2008-03-31 Thread lytvynyuk
Hm, sorry, but I don't like design of http://www.dot-com-it.com


--- In flexcoders@yahoogroups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> Hi Everybody,
> 
>  Some of you may know me, but many probably not.  I'm Jeffry Houser, 
> producer of The Flex Show, a flex related podcast.  I also run a 
> DotComIt ( http://www.dot-com-it.com ), an Adobe Solutions Partner 
> specializing in Flex Development.  DotComIt is working on a line of 
> commercial Flex Components, and we'd like to get some feedback from the 
> developer community. In order to do this, we will be conducting some 
> focus groups over the course of the next few months and want to welcome 
> all Flex developers to participate.
> 
> * What is a focus group?* A focus group is a group of potential 
> customers who are brought together to get their opinions, perceptions, 
> and ideas that will help to shape the design, strategy, and
direction of 
> DotComIt's product development.
> 
> *Why Participate in a DotComIt Flex Component Focus Group?*
> 
>1. Get $50 for your participation (paid via PayPal or iTunes).
>2. An opportunity to provide your input, perspective, and opinion(s)
>   about Flex and the use of components within Flex.
>3. Hear the opinions and perspectives of other developers like
>   yourself, first hand.
>4. Make sure your needs and wants are heard and perhaps help shape
>   DotComIt's component development road map.
> 
>  To be eligible, you'll just have to fill out a short survey at 
> http://www.dot-com-it.com/survey. We want to talk to developer's with 
> all levels of experience, so no matter how much, or how little, you
know 
> about Flex we want to hear from you. The survey will close on Friday 
> April 4th, and we will contact selected participants the following week 
> to discuss specific details.
> **
>   The focus groups are being conducted by a business development
firm on 
> DotComIt's behalf. So, for those that know me, you can participate w/o 
> being fear of conflict of interests or upsetting me.
> 
>  Please feel free to pass this on to anyone who you think may be 
> interested.  Now back to your regularly schedule lists posts. 
> 
> -- 
> Jeffry Houser
> Flex, ColdFusion, AIR
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> Adobe Community Expert

> My Company:  
> My Podcast: 
> My Blog: 
>




[flexcoders] Re: How to manually delete references to objects?

2008-03-31 Thread lytvynyuk
I grabbed that example from the article at adobe website
-http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html

--- In flexcoders@yahoogroups.com, "Ralf Bokelberg"
<[EMAIL PROTECTED]> wrote:
>
> You cannot delete declared variables, set them to null instead.
> a = null;
> 
> Cheers
> Ralf.
> 
> On Mon, Mar 31, 2008 at 5:03 PM, lytvynyuk <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> >
> > I saw some examples like that:
> >
> >  // create a new object, and put a reference to it in a:
> >  var a:Object = {foo:"bar"}
> >  // copy the reference to the object into b:
> >  var b:Object = a;
> >  // delete the reference to the object in a:
> >  delete(a);
> >
> >  But it definitely wont even compile.
> >
> >  Is there any techniques to do so?
> >
> >  
> 
> 
> 
> -- 
> Ralf Bokelberg <[EMAIL PROTECTED]>
> Flex & Flash Consultant based in Cologne/Germany
>




[flexcoders] How to manually delete references to objects?

2008-03-31 Thread lytvynyuk
I saw some examples like that:

// create a new object, and put a reference to it in a:
var a:Object = {foo:"bar"}
// copy the reference to the object into b:
var b:Object = a;
// delete the reference to the object in a:
delete(a);

But it definitely wont even compile.

Is there any techniques to do so?



[flexcoders] Re: Dynamically generated DataGrids having troubles with column width

2008-03-30 Thread lytvynyuk
Sorry friend, I didn't quite understand what do you suggesting.
Example is extremely simple and it suppose to be simply working, but
it is not.
I suspect there are some funky things going on with columns when it DG
tries to draw them.

Question - is it BUG or I'm using it improperly?

--- In flexcoders@yahoogroups.com, "dougco2000" <[EMAIL PROTECTED]> wrote:
>
> I recall having to play around with this when I did this in the past,
> just from memory I would suggest you try setting widths after you set
> grid.columns by doing grid.columns[0].width = 100, etc. I think it
> also would not work exactly if the total widths did not match the
> grid, so you could try leaving the last one's width blank so it
> auto-sets and see if that makes a difference.
> 
> -doug




[flexcoders] Dynamically generated DataGrids having troubles with column width

2008-03-28 Thread lytvynyuk
When DG created by AS and placed into tab navigator, it completely
ignores its width, why?
Here is an example:


http://www.adobe.com/2006/mxml";
layout="absolute"
 creationComplete="init();">
 
 
 
 
 


I expect tabs to be looking identical, what is going on here? Any other
approaches to achieve desirable result?



[flexcoders] Re: Singletone class in Application and Modules !?

2008-03-26 Thread lytvynyuk
Aha, that is the answer for my question! Thank you Manish ;)
Thank you all guys for participating, I still have many things to
learn, so I will be around for a while :)

> >  Is it true if I have singleton class instantiated in main
application and
> > in module, instances will be different?
> [snip]
> 
> If you don't include the class in the main application, each of the
> modules will have their own instance of the class. Class Foo in module
> 1 will be different from class Foo in module 2.
> 
> This is due to how modules are loaded in child application domains.
> Read up on application domains in Flash (the ApplicationDomain class).
> 
> Also:
> 
> http://mannu.livejournal.com/372662.html
> 
> Manish




[flexcoders] Re: Singletone class in Application and Modules !?

2008-03-25 Thread lytvynyuk
This will not change anything, still will be many times instantiated
"singleton" as in my example. Scope control is just to prevent funny
guys doing something like var Vasya = new DataManager();

--- In flexcoders@yahoogroups.com, "Rick Winscot" <[EMAIL PROTECTED]>
wrote:
>
> I just looked at your source. You forgot to control the scope! Your
> implementation should be:
> 
> package
> {
>   public class DataManager
>   {
>   private static var singleton_:DataManager = new
> DataManager();
> 
>   public function DataManager( enforcer:SingletonEnforcer ) {
> }
>   
>   public static function getInstance():DataManager {
> 
>   if ( singleton_ == null )
>   singleton_ = new DataManager( new SingletonEnforcer );
> 
>   return singleton_;
>   }   
>   }
> }
> 
> class SingletonEnforcer{}
> 
> 
> If you do this... it doesn't/won't matter where you instantiate it.
There
> can be only one - MUWUAHAHAHAA.
> 
> 
> Rick Winscot



[flexcoders] Re: Singletone class in Application and Modules !?

2008-03-25 Thread lytvynyuk
I figured out the case. I, actually, made first instance in another
module not in main App.
Conclusion is: if you make instance in your main app - everything works
fine.
If you did it in one of modules, this and all others will get new
instances. Very easy to see when put trace("BLAH") in the constructor.
PS. do not include your class, which suppose to be singleton in you main
application, and then it will fail.

test included  >> testSingleton.zip


>
> I beg to differ.  I had setup my app thinking this to be true.  When I
> did this the module would get it's own, and very different, instance
> of my singleton.  I had to change the way I did things so what I do
> now is upon loading my module, the main app then sets the singleton
> into the module.  I don't have my example code anymore, but it was
> quite easy to produce the results.
>
> Maybe it has to do with the way I compiled my module  I compiled
> my application with "-link-report=c:\app\encoreNG.link.report.xml" and
> my module with "-load-externs=c:\app\encoreNG.link.report.xml".  Not
> sure if that has anything to do with it.  Also, when I had this coded
> I was on Flex 3, Beta 3 and have not retested with Flex 3 GA.
>
> Dale



[flexcoders] Re: Can a Listener return a value

2008-03-25 Thread lytvynyuk
The following code cannot be even compiled, not work What do u meant
there?

> I thought about something like this too.
> So, let's say we have the followig code:
> public function aFunction():XML
> {
>   public var publicParameter:XML = new XML;
>   addEventListener( Event.SomeEvent, responderEventHandler );
>   private function responderEventHandler(event:Event):void
>   {
>   event.target.publicParameter = someXml;
>   }
>   return publicParameter;
> }




[flexcoders] Singletone class in Application and Modules !?

2008-03-25 Thread lytvynyuk
Is it true if I have singleton class instantiated in main application
and in module, instances will be different?

 public class DataManager
 {
 private static const singleton_:DataManager = new DataManager();

 public static function get instance():DataManager {
 return singleton_;
 }

 public function DataManager() {
 if (singleton_ != null) {
 throw new Error("Cannot instantiate singleton
DataManager");
 }
 }
 }

in main application:

   private function init():void {
   this.dataManager = DataManager.instance;
   }

in module

   private function init():void {
   this.dataManager = DataManager.instance;
   }



[flexcoders] Re: FIY - WeakMethodClosure - memory leaking example.

2008-03-24 Thread lytvynyuk
Thank you for attention to this problem. I run it for an hour and
found memory growth.

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Don't have time to run it right now, but I think it doesn't actually
> leak them in the release player.  It will be a pain for running
> endurance testing, but in general it should be ignorable.
>



[flexcoders] FIY - WeakMethodClosure - memory leaking example.

2008-03-22 Thread lytvynyuk
Here i s little example which shows constant grows number of instance of
WeakMethodClousure... with this rate over night hm



http://www.adobe.com/2006/mxml";>
   
   
  
 

 
 

 
  
  
   
   


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> If you try to remove a chart and the profiler shows it is still there,
> it is leaking.
>
> If you reset its dataprovider several times and the number of
renderers
> and other objects it creates keeps increasing, there's a leak there.
>
> You just have to keep digging through with the profiler to find the
root
> cause.  Sometimes, building simple test cases help too.
>



[flexcoders] Re: WeakMethodClosure - what is this ?

2008-03-14 Thread lytvynyuk
How typically you detect if Charts are leaking? Coz I having troubles 
with that, but definitely something going on.

> The doc says setting length it will work, but I've never tried it.
> 
> If you have WMC's referencing Charts, you need to make sure the 
Charts
> aren't leaking, and that when a chart goes way it takes all or 
most of
> its WMCs with it.



[flexcoders] Possible problems with construction like - {name:"Name", value:23}.... ??

2008-03-14 Thread lytvynyuk
One more things - 
Is it possible to have any potential problem with constructiuon like:

arayColl.addItem({name:"Name", value:23}); ?

in favor of following piece of code:

var myObj = new MyObj();
myObj.name = "Name";
myObj.value = 23;
arayColl.addItem(myObj); ?



[flexcoders] WeakMethodClosure - what is this ?

2008-03-14 Thread lytvynyuk
O, thank you! What about array.length = 0;?

Returning to WeakMethodClosure - in 1 hour of running application 
profiller has 5600 instances of this thing, take 90kb of memory. 
Examinig backreference shhows that many of them is adding events 
listener inside components like charts. Are this valid things or just 
something internal what I shoul ignore?

>
> Use array.splice to remove items from an array



[flexcoders] Dynamic ColumnSeries leavine a lot of garbage in memory.... example inside

2008-03-13 Thread lytvynyuk
My gola is to create Column chart with series which can be dynamically
modified (number of series may vary)
I created this piece of code, i works, but pluut memory alot by
ColumnSeries object which are loitering or just hanging.

I spent a lot of time to find a way to destroy them, not
successfuly. Here is the code:

var columnSeriesArr:Array = new Array; // global var

//

var i:Number = 0;

// clean somehow array of series;
var ser:ColumnSeriesEx = columnSeriesArr.pop();
while(ser != null) {
(ser.dataProvider as ArrayCollection).removeAll();
ser.dataProvider = null;
ser.displayName = null;
ser = null; //??
ser = columnSeriesArr.pop();
trace('cleaning')
};

for each (var item:Object in arrayC)
{
columnSeries = new ColumnSeriesEx();
columnSeries.dataProvider = item;
columnSeries.yField = "value";
columnSeries.displayName = item.name;
columnSeries.setStyle("fill",  PublicConstants.FILLS_COLOR[i]);
columnSeriesArr.push(columnSeries);
i++;
}

this.columnchart.series = columnSeriesArr;

//

//Column chart defined somewhere below


Any advises?! Thank you.





[flexcoders] Re: WeakMethodClosure - what is this ?

2008-03-13 Thread lytvynyuk
Thank you Alex, minimizing in my case doesn't help.

Can you suggest a proper way of cleaning up Array.
For example I have dynamic series for the column chart.
And I create new set of series and assign them this way:

var mySeries:Array = new Array();
/* some loop */
columnSeries = new ColumnSeriesEx();
mySeries.push(columnSeries);
/* loop end */

// trying to clean-up array to free all series was assigned before.
this.columnchart.series.length = 0;

this.columnchart.series = mySeries;

Or may be there is another way of proper cleaning up array to free all
references was there before?


>
> That is correct, and the profiler occasionally shows them as leaking
> when they're really not.  I typically examine them to see if they have
> valid backreferences.  If they do, they should be investigated.  If
they
> don't have back references, then I don't worry about them.
>
>
>
> There is an open issue with the Flash Player where several browsers
show
> process memory continually increasing even though System.totalMemory
is
> not.  My observation is that minimizing the browser and restoring it
> frees up that memory.  I haven't proven either way whether the browser
> would have released that memory before running out of memory.
> Generally, I would only be concerned about System.totalMemory,
> especially if the minimize/restore trick frees up the process memory.
>



[flexcoders] WeakMethodClosure - what is this ?

2008-03-11 Thread lytvynyuk
During my research with Flex performance found that instances of
WeakMethodClosure constantly increasing. I do not have knowledge what
is that and how to avoid it. 1859 instances for example can take only
30k of memory... but still

BTW found that Flash player running under Firefox & Opera newer free
memory. Even when profiler shows clear memory dis-allocation.



[flexcoders] Memory allocations problems when intensively using charts and modules

2008-03-06 Thread lytvynyuk
I having really serious troubles with my application when using
charts. My application collects lots of data in pseudo realtime (poll
for data every 5 sec) and display charts and graphs. Everything works
fine but with time memory allocated by Firefox process getting
enormous and Firefox eventually dying. When I used profiler to see
memory allocation, I noticed that I have megabytes of UTextField
objects allocated, also ChartLabels. Definitely all these object
wasn't GCed properly!

Another problem loading and unloading modules. After each load Firefox
allocates another 4-8M of memory and never comes back, even if I do
unload ! But in same time profiles shows 0 instances of modules which
was loaded. Whats is going on there?

Just to be clear:

I always do destroy event listeners, do not use static classes, always
cleaning up arrays via ramoveAll(); I assign modules instances ans
well as arrays to NULL when they not needed.

What else I need to do?



[flexcoders] How to turn off exception messages in release version.

2008-02-22 Thread lytvynyuk
How to turn off exception messages ( e.g. ActionScript errors ) in
release version?



[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-21 Thread lytvynyuk
I see, still I have debug version, which popups exceptions when
something happened.  (BTW, how to distinguish between debug and non
debug, size?)

But another fun started when I deployed everything under Linux (Red
Hat) Application was build and linked using framework_3.0.189825.swz 
under windows, and I works well there. But when I copied same files
under linux right away I got Error #2046. BUT is copied ORIGINAL swz
from Adobe SDK folder.

In trouble shooting guide it sais:

This error indicates that the loaded RSL was not signed properly. In
the case of framework RSLs, the framework's SWZ file that the
application attempted to load at run time was not a properly signed
SWZ file. You must ensure that you deploy an Adobe-signed RSL.

I'm pretty sure I copied original file taken from Flex 3B3
distribution. What is wrong?!

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> My bad. The syntax I sent was incorrect. It was meant to be 
> 
>  path-element="${FLEX_HOME}/frameworks/libs/framework.swc">
> 
> The warning you get is because you have specified the signed version
> of the framework rsl (.swz) in the arguments.  It would go away if you
> either use the unsigned version (.swf) or also add the
> target-player=9.0.60 (signed rsl support is only available from 9.0.60
> onwards)
> 
> As to why you don't see difference in size between in FB and ant
> tasks. I would recommend you to compare all setting once again (look
> in the .actionScriptProperties file), if you don't find any
> differences file a bug (with your test case). 
> 
> Thanks,
> Gaurav



[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread lytvynyuk
with
 

${FLEX_HOME}/frameworks/libs/framework.swc

${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf
 

in my ant build file I getting:

W:\jboss-4.0.5\server\default\deploy\Myapp.war\build.xml:64: Invalid
element: path-element

But:
 
 
 

Actually builds OK, but doesn't affect size of code at all.

 ${FLEX_HOME} = W:/Program Files/Adobe/Flex Builder 3
Plug-in/sdks/3.0.0

I run Flex Builder Plug-in 3, build 3.0.190133 beta 3

Also I'm getting this warning:
 [mxmlc] Warning: A signed RSL was specified for library W:\Program
Files\Adobe\Flex Builder 3
Plug-in\sdks\3.0.0\frameworks\libs\framework.swc without an unsigned RSL
as a failover. To avoid runtime errors, either require player version
9.0.60 in your HTML wrapper or add an unsigned RSL as a failover for the
signed RSL. Use -target-player=9.0.60 if you choose to require player
version 9.0.60.

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> I think you should modify your ant task to following:
>
>  output="${DEPLOY_DIR}/ActiveUpdate.swf"
>   actionscript-file-encoding="UTF-8"
>
> services="${BUILD_SPACE}res/services-config.xml"
>   context-root="ISP"
>   locale="en_US" as3="true"
> optimize="true" static-rsls="false" headless-server="true">
> 
> 
>
${FLEX_HOME}/frameworks/libs/framework.swc
>
${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf
> 
>
> 
> false
> false
>  append="true">
> 
> 
>     
>     
>
> if you are using FB 3, it would use  and
> not .
>
>  was introduced in flex 3 to support
> framework caching.
>
> Thanks,
> Gaurav
>
> --- In flexcoders@yahoogroups.com, "lytvynyuk" lytvynyuk@ wrote:
> >
> > In that case no point to report bug, everything works for me too.
> > Problem for me is different actually it is about RSL.
> >
> > I try to build everytinh with RSL which suppose to decrease size of
my
> > application. WQhich is not happening. AS you see I included RSL into
> > my flex build task but it doesnt really affect anything, with or
> without
> >
> > 
> >
> > it produces same size app, but when I compiled it WITH and run it it
> > demands presence of framework_3.0.189825.swf.
> >
> > With ECLIPSE it actually decreases size of application.
> >
> > What is the syntax of correct usage of RSL in ant?
> >
> > --- In flexcoders@yahoogroups.com, "Gaurav Jain"  wrote:
> > >
> > > These numbers are after only switching debug (true|false) using
flex
> > > tasks.
> > >
> >
>



[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread lytvynyuk
In that case no point to report bug, everything works for me too.
Problem for me is different actually it is about RSL.

I try to build everytinh with RSL which suppose to decrease size of my
application. WQhich is not happening. AS you see I included RSL into
my flex build task but it doesnt really affect anything, with or without 



it produces same size app, but when I compiled it WITH and run it it
demands presence of framework_3.0.189825.swf.

With ECLIPSE it actually decreases size of application.

What is the syntax of correct usage of RSL in ant?

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> These numbers are after only switching debug (true|false) using flex
> tasks.
> 



[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-20 Thread lytvynyuk
Did you get 241kb and 149kb only switching debug option in ant task or
one of results is after FB another after ANT?

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> In my simple test I see size changing from 241kb to 149kb. I would
> suggest you log a bug at http://bugs.adobe.com/flex with your test case
> 
> Thanks,
> Gaurav
> 
> --- In flexcoders@yahoogroups.com, "lytvynyuk"  wrote:
> >
> > Nothing happened, same size. That is mean, It didn't checks that
> > options or I do something wrong. Need to do deeper investigation. All
> > that FlexAntTasks story is so confusing - there is no proper
> > documentation, I figured some options only by analyzing java source
> > files!...g



[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-19 Thread lytvynyuk
Nothing happened, same size. That is mean, It didn't checks that
options or I do something wrong. Need to do deeper investigation. All
that FlexAntTasks story is so confusing - there is no proper
documentation, I figured some options only by analyzing java source
files!...g

--- In flexcoders@yahoogroups.com, "Gaurav Jain" <[EMAIL PROTECTED]> wrote:
>
> What happens when you compile with Ant task using debug="true"? 
> 
> If it generates swf of size more than 190 kb, then probably the
> difference you are seeing is due to some other difference between FB
> and ant task arguments. 
> 
> Look in the .actionScriptProperties file to see what libraries FB is
> linking against and see if you have anything additional?
> 
> Thanks,
> Gaurav
> 
> --- In flexcoders@yahoogroups.com, "lytvynyuk"  wrote:
> >
> > Here is piece of my flex ant file:
> >   > output="${DEPLOY_DIR}/ActiveUpdate.swf"
> >actionscript-file-encoding="UTF-8"
> >   
> > services="${BUILD_SPACE}res/services-config.xml"
> >context-root="ISP"
> >locale="en_US" as3="true"
optimize="true"
> > static-rsls="false" headless-server="true">
> >  
> >  
> > 
> > false
> >  false
> >   > append="true">
> >  
> >  
> >  
> >  
> > 
> > Whatever options I put in here I getting debug version with size
190kb,
> > but when I do export release via eclipse I getting version sized
140!!!
> > WHY?
> >
>




[flexcoders] Re: Implementing Office 2007 menus

2008-02-19 Thread lytvynyuk
What is the point to copy?! What about to create something yourself?

--- In flexcoders@yahoogroups.com, "Fidel Viegas" <[EMAIL PROTECTED]>
wrote:
>
> Hello folks,
> 
> I am trying to implement the Office 2007 menus, and I am trying to
> imagine what sort of Containers to use. So far, I have figured that I
> am going to use TabNavigator for the headings, but what sort of
> container would I use for the groups of buttons? Could it be Panels?
> 
> I found this thing implemented in Mindomo. Does anyone have an idea
> how he created the menus?
> 
> Thanks in advance,
> 
> Fidel.
>




[flexcoders] Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?

2008-02-19 Thread lytvynyuk
Here is piece of my flex ant file:
 
 
 

false
 false
 
 
 
 
 

Whatever options I put in here I getting debug version with size 190kb,
but when I do export release via eclipse I getting version sized 140!!!
WHY?




[flexcoders] Re: Embedded image and static variable problem.....

2008-01-30 Thread lytvynyuk
Ok,I see I did exactly like that :)

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> Yeah, you could do arrays, something like this:
> 
> [Embed('myimage1.png')]
> private var myimage1:Class;
> 
> [Embed('myimage2.png')]
> private var myimage2:Class;
> 
> public var myimages:Array = [myimage1, myimage2];
> 
> In fact, I wrote a PHP script to generate just this kind of stuff once.
> You'd point the PHP script at a folder and it would create an SWF that
> contained all of the assets in that folder embedded and retrievable by
> filename. The PHP script just automated the process above, with the
addition
> of some API that used a dictionary to associate filenames with the asset
> classes.
> 
> I discuss it in more detail on my blog, http://troygilbert.com/.
> 
> Troy.



[flexcoders] Re: Embedded image and static variable problem.....

2008-01-29 Thread lytvynyuk
Thank you Troy for answer, what about arrays of embedded images, It
will be nice to refer via index, what do you think, is it possible?

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> That piece of code should be giving you a warning... I don't think
you can
> bind to static instances because the binding mechanism uses an object as
> it's root, and in the case of a static there is no object.
> 
> This is one situation where a Singleton is a "good thing" and is the
reason
> (I believe) why Cairngorm and other similar MVC architectures use a
> singleton for their ModelLocator instead of statics.
> 
> I got bit with exactly the same issue. Just make your class a
singleton and
> it'll all work out.
> 
> Troy.





[flexcoders] Re: Embedded image and static variable problem.....

2008-01-29 Thread lytvynyuk
Thank you for suggestion, Sherif, but it is not straight-forward
anpproach and looks like work around, no solution. Especially if I
will have 10-15 images like that.

--- In flexcoders@yahoogroups.com, Sherif Abdou <[EMAIL PROTECTED]> wrote:
>
> /**
> * The Static Image that we want to use
> */
> [Bindable]
> [Embed(source='test.jpg')]
> public static var image:Class;
> private function initApp():void{
> /**
> * Create the image class since it is a DisplayObject
> * and add it to wherever u want
> */
> var TempImage:DisplayObject= new image();
> rawChildren.addChild(TempImage);
> }
> 
> 
> 
> - Original Message 
> From: lytvynyuk <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Tuesday, January 29, 2008 11:24:23 AM
> Subject: [flexcoders] Embedded image and static variable problem.
> 
> I have problem to bind image to static var
> 
> my piece of code is:
> [EMAIL PROTECTED]('/images/ image.png' )]
> [Bindable]
> public static var image:Class;
> 
> getting exception:
> TypeError: Error #1009: Cannot access a property or method of a null
object reference.
> at support::PublicCons tants$/get voipguardImage( )[W:\jboss-
4.0.5\server\ default\deploy\ ISP.war\isp_ flex\support\
PublicConstants. as:117]
> at support::PublicCons tants$cinit( )
> at global$init( )[W:\jboss- 4.0.5\server\ default\deploy\
ISP.war\isp_ flex\support\ PublicConstants. as:5]
> at isp_flex/initApplic ation()[W: \jboss-4. 0.5\server\
default\deploy\ ISP.war\isp_ flex\isp_ flex.mxml: 66]
> at isp_flex/___ isp_flex_ Application1_ initialize( )[W:\jboss-
4.0.5\server\ default\deploy\ ISP.war\isp_ flex\isp_ flex.mxml: 6]
> at flash.events: :EventDispatcher /dispatchEventFu nction()
> at flash.events: :EventDispatcher /dispatchEvent( )
> 
> Any ideas why?
> 
> Also how to make something like array of embedded images:
> 
> var images:Array = [ @Embed('/images/ image1.png' ) ,
@Embed('/images/ image2.png' ), @Embed('/images/ image3.png' )]
> 
> 
> 
> 
> 
>  

> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>




[flexcoders] Embedded image and static variable problem.....

2008-01-29 Thread lytvynyuk
I have problem to bind image to static var

my piece of code is:
[EMAIL PROTECTED]('/images/image.png')]
[Bindable]
public static var image:Class;

getting exception:
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
 at support::PublicConstants$/get
voipguardImage()[W:\jboss-4.0.5\server\default\deploy\ISP.war\isp_flex\s\
upport\PublicConstants.as:117]
 at support::PublicConstants$cinit()
 at
global$init()[W:\jboss-4.0.5\server\default\deploy\ISP.war\isp_flex\supp\
ort\PublicConstants.as:5]
 at
isp_flex/initApplication()[W:\jboss-4.0.5\server\default\deploy\ISP.war\\
isp_flex\isp_flex.mxml:66]
 at
isp_flex/___isp_flex_Application1_initialize()[W:\jboss-4.0.5\server\def\
ault\deploy\ISP.war\isp_flex\isp_flex.mxml:6]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()

Any ideas why?

Also how to make something like array of embedded images:

var images:Array = [ @Embed('/images/image1.png') ,
@Embed('/images/image2.png'), @Embed('/images/image3.png')]




[flexcoders] Re: Handling authorization/Authentication info using remoteObject services

2008-01-07 Thread lytvynyuk
I would like to know about this more too. People please share!

--- In flexcoders@yahoogroups.com, "bdealy1" <[EMAIL PROTECTED]> wrote:
>
> Hi, 
> I am implementing a system which makes use of RemoteObject services
> within flex to speak to server side services like database, and other 
> server-side code.  What I am wondering is what are the best practices 
> for securing the remoteObject services from being called either 
> directly, or via a client which might have been altered through 
> reverse-engineering, etc.  
> 
> In the past I would have perhaps done this with HttpSession objects...
> is there a similar mechanism for flex remote objects?  or maybe i am 
> just missing the obvious due to inexperience.
> 
> Any thoughts/advice appreciated.
> regards,
> 
> Brian
>




[flexcoders] Flex 3 Beta 3 Liecnse, was something changed?

2007-12-17 Thread lytvynyuk
I'm owner Flex 2.0.1 License and Charts. Before F2b3 my license for
Flex Builder and Flex Charts works well, but now it said - Invalid key!?

Are licenses incompatible now?




[flexcoders] Help with ant build file for Flex needed.

2007-12-10 Thread lytvynyuk
Here is a piece of my build file. I want application build it using
RSL. I don't have any clear direction what to do. Basically I want to
simulate Library path tab option Framework linkage in Eclipse. How can
I modify existent build script to achieve desired result?

---
 
 
 
 
 
 
 
 
 
 
 
---


static-rsls="false" for  doesn't exist at all



[flexcoders] Re: Resize DataGrid Row on ItemEditor showEvent with variableRowSize=true?

2007-11-09 Thread lytvynyuk
"based on the itemEditors Height not the itemEditors Height." - sound
funny, but I understand what do u mean ;)
Make your Editor and Renderer height same, that is it. But is they are
physically cannot be same height, as I understand your problem, after
edit done row height not coming back to Renderer height?

Can you bring an example here?

--- In flexcoders@yahoogroups.com, "danielspirn" <[EMAIL PROTECTED]>
wrote:
>
> I'm trying to have the Datagrid Row resize based on the itemEditors
> Height not the itemEditors Height.
>
> Thus every time a user selects a cell to edit the selected row will
> grow in size to accommodate the Editor.
>
> With variableRowSize = true, the sizes are set based on the
> itemRender, but since my render and editor are different, I'm unable
> to get the DataGrid to recognize a change in the itemRender and resize
> just the row that has grown.
>
> I can set the rowSize if I switch variableRowSize back to false. And
> se the rowSize at event handler for all the rows at the
> itemEditBeginning and at itemEditBegin, but what I really want is have
> variableRowSize=true and have the DataGrid remeasure its rows at time
> with the Editor dropped In.
>
> Because Editors have be created and held in Memory for re-use the only
> event I can trap-off of might be FlexEvent.DataChanged on the Editor.
>
> Anyone tackled this issue.  Should I punt and try to solve this with
> the AdvancedDataGrid?
>
> Thanks
>
> Daniel
>



[flexcoders] Re: Loading Flex Components at runtime

2007-11-09 Thread lytvynyuk
Modules work only with Flex 2.0.1
RSLs mentioned here only with F3B2!
What kind of version are you running?

Keep in mind you can link SWC anly at compile time, if somebody think
I'm wrong, please correct me. SWFs you may load at run time for sure.
But can you execute code from them - I doubt.

My choice will be modules.

BTW RSL it is a bit different story - RSL servers for share COMMON
code bettween multiple application(modules)

--- In flexcoders@yahoogroups.com, Jehanzeb Musani <[EMAIL PROTECTED]>
wrote:
>
> Hello,
> 
> I want to design a Flex Web Application that would
> load features (flex components) hosted in different
> SWF or SWC files at runtime. The prototype of that
> application can be viewed on the url below.
> 
> http://80.227.133.21/FlexTestInternal/ApplicationLayoutManager.html
> 
> The actual application needs to call a webservice that
> will return an xml. A sample xml is attached herewith.
> The xml contains the layout description and the names
> of feature (flex components) to be loaded. The layout
> and features varies for different users.
> 
> I am thinking about deploying features in separate
> SWF/SWC files so that only the required files will be
> download at runtime. Can you please let me know the
> following in this regard?
> 
> 1. How can I package individual features in separate
> SWF/SWF file using Flex Builder2.
> 
> 2. How can I load the those separate SWF/SWC files at
> runtime from the main SWF file?
> 
> 3. In case of separate SWF/SWC files for features,
> will the Flex library be included in every SWF/SWC
> file?
> 
> I am also attaching the code of the prototype
> application.
> 
> Regards,
> Jehanzeb
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> http://www.adobe.com/2006/mxml";
layout="absolute"
>creationComplete="OnApplicationInitialize()">
>
>
>   
>
>   
> 
wsdl="http://192.168.0.101/AjaxServiceInvoker2/AjaxServiceInvoker.asmx?wsdl";
>   useProxy="false">
>   
>   
>   
>   
>   
> 
> 
> 
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
>   
> 
> 
>   
>   
> 
>   
> 
>   
>   
> 
>   
>   
> 
>   
> 
>   
> 
>   
>   
> 
>   
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
>   
> 
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
>   
> 

[flexcoders] Re: SQLite help Flex 3 Beta 2

2007-11-09 Thread lytvynyuk
If you are not getting any SQL exceptions, check you OrgId, and actual
IDs in table. Then check what do you have in result variable.

--- In flexcoders@yahoogroups.com, "Nick Collins" <[EMAIL PROTECTED]> wrote:
>
> Okay, I'm trying to execute a query on my local SQLite database using
> the following code, but am not having any luck. When I run the same
> SQL code in Cristophe's SQL Admin app, it works fine, returning the
> two records. However, when I run it here with my code, it returns a
> null as the result value. What am I doing wrong?
>
>
> /** CODE BEGIN**/
>
> public function getContributorsList(orgID:int):void
>   {
> stmt.sqlConnection = sqlConnection;
>stmt.text = "SELECT * FROM CONTRIBUTORS WHERE ORGID = :orgID ORDER
> BY LAST_NAME, FIRST_NAME";
>stmt.parameters[":orgID"] = orgID;
>stmt.addEventListener(SQLEvent.RESULT, resultHandler);
>stmt.addEventListener(SQLErrorEvent.ERROR, errorHandler);
>stmt.execute();
>   }
>
> private function resultHandler(event:SQLEvent):void
>   {
>   var result:SQLResult = stmt.getResult();
>   var numResults:int = result.data.length;
>   for (var i:int = 0; i < numResults; i++)
>   {
>   var row:Object = result.data[i];
>   var output:String = "ContribNum: " + row.CONTRIBNUM;
>   output += "; First Name: " + row.FIRST_NAME;
>   output += "; Last Name: " + row.LAST_NAME;
>   trace(output);
>   }
>   }
>



[flexcoders] Re: Flex grid to serve 100K-1mil rows

2007-11-09 Thread lytvynyuk
BTW, according to my personal experience flash player unable to handle
more that 10K records in data grid. Just physically unable - out of
memory error!

--- In flexcoders@yahoogroups.com, "letterpigeon" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>  
> We've built a flex grid that supports mass action on its data right
> now (column-wise search & replace).  But it just doesn't scale right
> now.  It can hold up to around 3K+ rows in the grid, but it's taking a
> good few mins to load that up from the java backend servlet.  The
> requirement is for the grid to be able to support up to 100K+ or even
> 1 million rows (may be not displaying them all at once, but when the
> mass action/search is taken, it should be performed on the complete
> dataset, not just what is being served up on the grid).
>  
> We're just looking for ideas how this could be achieved, i.e.: if
> pagination is needed, what is the best way to do? client side
> pagination v.s. server?  Could this be a good use case for Flex Data
> Service? etc.
>  
> Any pointers/ideas/experience would be greatly appreicated.  Thanks in
> advance.
>  
> Regards,
> Ban
>




[flexcoders] Re: Flex grid to serve 100K-1mil rows

2007-11-09 Thread lytvynyuk
Personally i think it very bad idea, can you imagine sort/search 1M
records at client, how fast it will be ? What if you decided to do
full text search by pattern? your client will die! Can you image how
much memory it will consume at client side?

best way to do is - smart server querying, pagination and dynamic load.

--- In flexcoders@yahoogroups.com, "letterpigeon" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>  
> We've built a flex grid that supports mass action on its data right
> now (column-wise search & replace).  But it just doesn't scale right
> now.  It can hold up to around 3K+ rows in the grid, but it's taking a
> good few mins to load that up from the java backend servlet.  The
> requirement is for the grid to be able to support up to 100K+ or even
> 1 million rows (may be not displaying them all at once, but when the
> mass action/search is taken, it should be performed on the complete
> dataset, not just what is being served up on the grid).
>  
> We're just looking for ideas how this could be achieved, i.e.: if
> pagination is needed, what is the best way to do? client side
> pagination v.s. server?  Could this be a good use case for Flex Data
> Service? etc.
>  
> Any pointers/ideas/experience would be greatly appreicated.  Thanks in
> advance.
>  
> Regards,
> Ban
>




[flexcoders] Help with ant build file for Flex needed.

2007-11-08 Thread lytvynyuk
Here is a piece of my build file. I want application build it using RSL.
I don't have any clear direction what to do. Basically I want to
simulate Library path tab option Framework linkage in Eclipse. How can I
modify existent build script to achieve desired result?

---
 
 
 
 
 
 
 
 
 
 
 
---



[flexcoders] How to send remotely Array of strings and at Java end get String[] array ?

2007-11-01 Thread lytvynyuk
I have difficulties to send array of string over RPC.
At server side I always receiving Object[].

Is any special ways to get at Java end array of certain type?



[flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example.... possibly

2007-11-01 Thread lytvynyuk
Thank you for the link. It works well with player 9 I have installed.
(Can't check exact build, just don't know how ;))
>
> http://blogs.adobe.com/aharui/2007/03/modules.html
> 
>  
> 
> And yes, that will solve your problem as well, but requires the latest
> player that isn't officially released yet.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of lytvynyuk
> Sent: Wednesday, October 31, 2007 7:20 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Type coercion error for ToggleButtonBar in
> very simple example possibly
> 
>  
> 
> Can you give me a link ?
> BTW I fixed problem when changed "Framework Linkage" option to
> "Runtime Shared Library (RSL)"
> BUT I would like to know more about physics of this.
> 
> >
> > Up to you. See my blog on modules in the presentations
> > 



[flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example.... possibly

2007-10-31 Thread lytvynyuk
Can you give me a link ?
BTW I fixed problem when changed "Framework Linkage" option to
"Runtime Shared Library (RSL)"
BUT I would like to know more about physics of this.

>
> Up to you.  See my blog on modules in the presentations
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of lytvynyuk
> Sent: Tuesday, October 30, 2007 6:03 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Type coercion error for ToggleButtonBar in
> very simple example possibly
> 
>  
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Alex Harui"  wrote:
> >
> > Shared code problem. Put all shared classes in the main app or a
> shared
> > code module.
> > 
> >
> 
> Thank you Alex for assistance! But I didn't get what doest it mean!
> Should I physically include all classes used in modules to main app or
> recompile application/modules special way?
>




[flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example.... possibly

2007-10-30 Thread lytvynyuk
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Shared code problem.  Put all shared classes in the main app or a shared
> code module.
> 
>

Thank you Alex for assistance! But I didn't get what doest it mean!
Should I physically include all classes used in modules to main app or
recompile application/modules special way?



[flexcoders] Type coercion error for ToggleButtonBar in very simple example.... possibly bug!

2007-10-30 Thread lytvynyuk
Here is example

Application:


http://www.adobe.com/2006/mxml";
layout="absolute">
 
 
 
 
 
 
 
 


Module1:


http://www.adobe.com/2006/mxml"; layout="absolute"
width="400" height="300" backgroundColor="green">
 
 
 
 
 
 
 
 
 
 
 
 



Module2:



http://www.adobe.com/2006/mxml"; layout="absolute"
width="400" height="300" backgroundColor="red">
 
 
 
 
 
 
 
 
 
 
 
 


Whel click button S1 - module loaded OK,
When Click button S2 - gives error:
TypeError: Error #1034: Type Coercion failed: cannot convert
mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar.
 at
mx.skins.halo::ButtonBarButtonSkin/mx.skins.halo:ButtonBarButtonSkin::up\
dateDisplayList()
 at mx.skins::ProgrammaticSkin/validateDisplayList()
 at mx.managers::LayoutManager/::validateDisplayList()
 at mx.managers::LayoutManager/::doPhasedInstantiation()
 at Function/http://adobe.com/AS3/2006/builtin::apply()
 at mx.core::UIComponent/::callLaterDispatcher2()
 at mx.core::UIComponent/::callLaterDispatcher()
 at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
 at flash.utils::Timer/flash.utils:Timer::tick()

in Debug mode even more fancy thing going on, when click at S1 gives
right away error:

VerifyError: Error #1014: Class mx.collections::IList could not be
found.
 at global$init()
 at ()[E:\!!Project\Flex\PicasaFlex\modules\m2.mxml:0]
 at Function/http://adobe.com/AS3/2006/builtin::call()
 at mx.core::ComponentDescriptor/get
properties()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\C\
omponentDescriptor.as:239]
 at
mx.core::Container/createComponentFromDescriptor()[E:\dev\flex_3_beta2\s\
dk\frameworks\projects\framework\src\mx\core\Container.as:3586]
 at
mx.core::Container/createComponentsFromDescriptors()[E:\dev\flex_3_beta2\
\sdk\frameworks\projects\framework\src\mx\core\Container.as:3522]
 at
mx.core::Container/mx.core:Container::createChildren()[E:\dev\flex_3_bet\
a2\sdk\frameworks\projects\framework\src\mx\core\Container.as:2624]
 at
mx.core::UIComponent/initialize()[E:\dev\flex_3_beta2\sdk\frameworks\pro\
jects\framework\src\mx\core\UIComponent.as:5144]
 at
mx.core::Container/initialize()[E:\dev\flex_3_beta2\sdk\frameworks\proje\
cts\framework\src\mx\core\Container.as:2561]
 at
modules::m2/initialize()[E:\!!Project\Flex\PicasaFlex\modules\m2.mxml:0]
 at
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAd\
ded()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\\
UIComponent.as:5041]
 at
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdde\
d()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\Co\
ntainer.as:3334]
 at
mx.core::Container/addChildAt()[E:\dev\flex_3_beta2\sdk\frameworks\proje\
cts\framework\src\mx\core\Container.as:2258]
 at
mx.core::Container/addChild()[E:\dev\flex_3_beta2\sdk\frameworks\project\
s\framework\src\mx\core\Container.as:2188]
 at
mx.modules::ModuleLoader/mx.modules:ModuleLoader::moduleReadyHandler()[E\
:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\modules\Modu\
leLoader.as:339]
 at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\
tFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at
ModuleManager.as$25::ModuleInfoProxy/ModuleManager.as$25:ModuleInfoProxy\
::moduleEventHandler()[E:\dev\flex_3_beta2\sdk\frameworks\projects\frame\
work\src\mx\modules\ModuleManager.as:1025]
 at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\
tFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at
ModuleManager.as$25::ModuleInfo/readyHandler()[E:\dev\flex_3_beta2\sdk\f\
rameworks\projects\framework\src\mx\modules\ModuleManager.as:704]
 at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\
tFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at
mx.core::FlexModuleFactory/mx.core:FlexModuleFactory::update()[E:\dev\fl\
ex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\FlexModuleFacto\
ry.as:321]
 at
mx.core::FlexModuleFactory/mx.core:FlexModuleFactory::docFrameHandler()[\
E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\FlexMo\
duleFactory.as:406]


Any ideas what is going on? may be I do something wrong?



[flexcoders] Re: Getting unexpected error while loading Images

2007-10-15 Thread lytvynyuk
Thank you Alex! Exactly that I did and it works well now. Also
embedded loader progress into my component as well. 

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Subclass SWFLoader and override the regenerateStyleCache and
> notifyStyleChangeInChildren methods and have them do nothing.  They are
> only needed if you're loading other SWFs



[flexcoders] Re: How to converst an XML to AS Object ?

2007-09-15 Thread lytvynyuk
Thank you Troy, for your suggestions.

I cannot understand one thing, using SimpleXMLDecoder i got Object
from XML BUT I cannot make this ObjectProxy cast to my Album Object.
What is the condition to cast object fields are same, I cant
understand how does it works :( 

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> > Does anybody have good examples how SimpleXMLDecoder works ?
> 
> I've never found a good one. Senocular has a library called
> XMLDefinition (google it). I've not looked at it too much, but it
> superficially appears to do what you're looking for.
> 
> I don't like the idea of passing the XML into the object for it to
> self-populate (or its counterpart spitting out a piece of XML for
> serialization). In my mind, serialization (which is what this is) is a
> related but independent class from the model itself. Of course, that's
> not a weird suggestion... its how Java implements serialization and
> how AS3 does it generically as well. Though frustratingly these
> dynamic languages don't provide general purpose API for doing it with
> strong typing.
> 
> Come on, Adobe, XML is the lingua franca of the web (if not of
> business software) and its a native type in AS3. There should be
> trivial, native serialization of objects with strong types to and from
> XML (in the same way that there is for the, ahem, proprietary AMF
> format).
> 
> Troy.
>




[flexcoders] Re: How to converst an XML to AS Object ?

2007-09-12 Thread lytvynyuk
Does anybody have good examples how SimpleXMLDecoder works ?

--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> Thank you I kinda knew about that way ;)
> but if my object contains30 fields and also has a bunch of another
> objects, this procedure will be painful  ;)
> 
> What about this way:
> 
> public function result(event:ResultEvent):void {
> var xmlS:XML = XML(event.result);
> var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true); 
> var xdoc : XMLDocument =  new XMLDocument();
> xdoc.ignoreWhite = true;  
> xdoc.parseXML(xmlS.toXMLString());   
> var ob:Object = decoder.decodeXML(XMLNode(xdoc.firstChild));
> var feed:Album= Album(ob); // Exception here
> }
> 
> But this doesn't work for me too ;)



[flexcoders] Re: How to converst an XML to AS Object ?

2007-09-09 Thread lytvynyuk
Thank you I kinda knew about that way ;)
but if my object contains30 fields and also has a bunch of another
objects, this procedure will be painful  ;)

What about this way:

public function result(event:ResultEvent):void {
var xmlS:XML = XML(event.result);
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);   
var xdoc : XMLDocument =  new XMLDocument();
xdoc.ignoreWhite = true;
xdoc.parseXML(xmlS.toXMLString());   
var ob:Object = decoder.decodeXML(XMLNode(xdoc.firstChild));
var feed:Album= Album(ob); // Exception here
}

But this doesn't work for me too ;)

--- In flexcoders@yahoogroups.com, "Derrick Grigg" <[EMAIL PROTECTED]> wrote:
>
> You can't automatically convert XML to a strong typed object. You 
> should create a method in your Album class that takes an xml 
> variable, and then populate the Album from there.
> 
> ie 
> var album:Album = new Album();
> album.setData(event.result);
> 
> 
> class Album
> {
>public function setData(data:XML):void 
>{
>   //populate the album
>}
> }
> 
> Derrick
> ----
> Derrick Grigg
> www.dgrigg.com
> 
> --- In flexcoders@yahoogroups.com, "lytvynyuk"  wrote:
> >
> > Situation I have XML like that 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > using HTTPService I'm getting this XML.
> > 
> > I have AS Class:
> > 
> > public class Album {
> > public var name:String;
> > public var images:ArrayCollection;
> > }
> > 
> > straight cast like:
> > 
> > 
> > var album:Album = Album (event.result);
> > 
> > 
> > doesn't work
> > 
> > Is any suggestion around this, what I do wrong, may be there are 
> some
> > other way to do that
> > 
> > Thank you.
> >
>




[flexcoders] How to converst an XML to AS Object ?

2007-09-09 Thread lytvynyuk
Situation I have XML like that 









using HTTPService I'm getting this XML.

I have AS Class:

public class Album {
public var name:String;
public var images:ArrayCollection;
}

straight cast like:


var album:Album = Album (event.result);


doesn't work

Is any suggestion around this, what I do wrong, may be there are some
other way to do that

Thank you.