RE: [flexcoders] Test-driven development in Flex

2008-12-16 Thread Gregor Kiddie
I keep saying I will, but then I would have to justify posting on a
regular basis, and I don't know if I've got enough to say for that!

Plus, most of what I do is for the company I work for (not freelance)
and I've yet to annoy them sufficiently to let me release what could be
considered competitive advantage (though I'm working on it... just
slowly)

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Josh McDonald
Sent: 16 December 2008 00:49
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Test-driven development in Flex

 

Hi Gregor,

I've recently started to implement FlexUnit myself (not tweaked yet, but
it will be) - I'd like to hear about your experiences with FlexCover
when you've played with it a bit, as I'm interested in adding it to my
workflow but the documentation is a little lacking I think. Any chance
you have a blog where you'll be posting about it?

Cheers,





[flexcoders] Re: Should I be able to load a .fxg file as XML?

2008-12-16 Thread Mic
Hi Alex - stupid error on my part - works perfectly :-)

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

 What error did you get?
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Mic
 Sent: Monday, December 15, 2008 12:31 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Should I be able to load a .fxg file as XML?
 
 
 public var myXML:XML = new XML();
 public var XML_URL:String = ../xml/FlowerPower4.fxg;
 public var myXMLURL:URLRequest = new URLRequest(XML_URL);
 public var myLoader:URLLoader = new URLLoader(myXMLURL);
 
 myLoader.addEventListener(complete, xmlLoaded);
 
 private function xmlLoaded(event:Event):void
 {
 myXML = XML(myLoader.data);
 trace(Data loaded.);
 }
 
 Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
 XML file? TIA,
 
 Mic.





Re: [flexcoders] Test-driven development in Flex

2008-12-16 Thread Jules Suggate
Having good results with FlexUnit here, using Parsley IoC instead of
Cairngorm or what-have-you because of the advantages to
mocking/testing with IoC/Dependency Injection (when will the community
settle on a name for that pattern so I can stop using both! :)

We have a structure like:

/trunk/common
/trunk/web
/trunk/test

For shared, web-client and test code respectively. Web and test both
pull in the common SWC. Still very skeletal at this point so there
could be hurdles further down the road we're not aware of yet, but all
going smoothly for now. I can even step through my unit tests in Flex
Builder -- something I wasn't sure I'd be able to do as there's no
FlexUnit plugin for Eclipse that I could find...

Oh, last thing is we are using Antennae common tasks and targets for
our Ant builds, just because it's the first thing we stumbled across
and seems to have fairly good structure for multi-project solutions.

On Tue, Dec 16, 2008 at 05:49, Errol Thompson kiw...@acm.org wrote:
 I am fairly new to Flex but have a reasonable amount of experience with
 test-driven development in Java and .NET.

 I have been told that test-driving Flex development is not possible. I am
 not convinced as I have been told similar things on other projects in the
 past and then proven that they are possible.

 I am wondering:

 1) How many people actually use a testing framework (FlexUnit, Fluint,
 FUnit, AsUnit) when doing Flex development?

 2) Does using a testing framework change the way that you structure your
 Flex applications?

 3) How many use test-driven development with the Cairngorm framework?

 -
 Errol Thompson
 Kiwi-ET Computing Education Research
 Wellington, New Zealand
 Phone: +64 21 210 1662
 E-Mail: kiwiet (at) acm.org
 kiwiet (at) computer.org
 Web: www.thompsonz.net
 -

 



-- 
Cheers,
Jules
--
Jules Suggate
Owner and Technical Lead
Uphill Sprint Limited

+64-21-157-8562


Re: [flexcoders] Test-driven development in Flex

2008-12-16 Thread Jules Suggate
Oh sorry, to answer the original question, why should TDD in Flex be
impossible? There were some challenges in the past with getting
Continuous Integration happening (harvesting and reporting on test
results was the stumbling block) but that's long since solved... and
anyway, is not a precursor for TDD AFAIK.

Hope this helps :)

On Tue, Dec 16, 2008 at 21:23, Jules Suggate julian.sugg...@gmail.com wrote:
 Having good results with FlexUnit here, using Parsley IoC instead of
 Cairngorm or what-have-you because of the advantages to
 mocking/testing with IoC/Dependency Injection (when will the community
 settle on a name for that pattern so I can stop using both! :)

 We have a structure like:

 /trunk/common
 /trunk/web
 /trunk/test

 For shared, web-client and test code respectively. Web and test both
 pull in the common SWC. Still very skeletal at this point so there
 could be hurdles further down the road we're not aware of yet, but all
 going smoothly for now. I can even step through my unit tests in Flex
 Builder -- something I wasn't sure I'd be able to do as there's no
 FlexUnit plugin for Eclipse that I could find...

 Oh, last thing is we are using Antennae common tasks and targets for
 our Ant builds, just because it's the first thing we stumbled across
 and seems to have fairly good structure for multi-project solutions.

 On Tue, Dec 16, 2008 at 05:49, Errol Thompson kiw...@acm.org wrote:
 I am fairly new to Flex but have a reasonable amount of experience with
 test-driven development in Java and .NET.

 I have been told that test-driving Flex development is not possible. I am
 not convinced as I have been told similar things on other projects in the
 past and then proven that they are possible.

 I am wondering:

 1) How many people actually use a testing framework (FlexUnit, Fluint,
 FUnit, AsUnit) when doing Flex development?

 2) Does using a testing framework change the way that you structure your
 Flex applications?

 3) How many use test-driven development with the Cairngorm framework?

 -
 Errol Thompson
 Kiwi-ET Computing Education Research
 Wellington, New Zealand
 Phone: +64 21 210 1662
 E-Mail: kiwiet (at) acm.org
 kiwiet (at) computer.org
 Web: www.thompsonz.net
 -

 



 --
 Cheers,
 Jules
 --
 Jules Suggate
 Owner and Technical Lead
 Uphill Sprint Limited

 +64-21-157-8562




-- 
Cheers,
Jules
--
Jules Suggate
Owner and Technical Lead
Uphill Sprint Limited

+64-21-157-8562


[flexcoders] Fireworks .fxg to Gumbo - all Group ids=undefined problem

2008-12-16 Thread Mic
Exporting Fireworks .fxg creates every Group with an id = undefined.
This will not load into Gumbo because obviously the ids must be
unique. Is this something that Fireworks can automatically fix, or do
I need to write a text parser in Flex that can go out and write unique
ids to all the groups in the .fxg file before it can be used in
FxApplication? As always TIA,

Mic.



Re: [flexcoders] When the heck are states ready?

2008-12-16 Thread Flex Noob
ok answering my own questions again but anyone who liked to follow along. .  .

so yeah. on creationComplete DOES return after skins loaded. But because I was 
converting the skin to a MovieClip it would return null instead of yelling at 
me for wrong type etc (nice).

SO, then i convert to DisplayObject container and got a rad hack rocking:

var d:DisplayObjectContainer = this.getChildAt(0) as DisplayObjectContainer;
var mc:MovieClip = d[myMovieClip] as MovieClip;

I can see this work by setting some prop:

mc.alpha = .5

BUT, I can't add any events to it. . . ??

I've tried setting enabled, mouseEnabled, etc to true but still doesn't 
propogate mouse events.

Anyone?





From: Flex Noob fl3xn...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Monday, December 15, 2008 11:46:19 PM
Subject: [flexcoders] When the heck are states ready?


I'm setting button states using embed swfs.

on click I know my button has 4 children:

upState
overState
downState
label

when checking for these children on creation complete: nadda.

I've tried listening for different events but nothing seems to fire.

As a hack I know i can set enterFrame event to check BUUUTTT. . . . 
REALLY I mean come on flex.






  

RE: [flexcoders] Test-driven development in Flex

2008-12-16 Thread Gregor Kiddie
Yeah, that was our biggest take away as well, a good project structure
and having good ant scripts are key.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jules Suggate
Sent: 16 December 2008 08:24
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Test-driven development in Flex

 

Having good results with FlexUnit here, using Parsley IoC instead of
Cairngorm or what-have-you because of the advantages to
mocking/testing with IoC/Dependency Injection (when will the community
settle on a name for that pattern so I can stop using both! :)

We have a structure like:

/trunk/common
/trunk/web
/trunk/test

For shared, web-client and test code respectively. Web and test both
pull in the common SWC. Still very skeletal at this point so there
could be hurdles further down the road we're not aware of yet, but all
going smoothly for now. I can even step through my unit tests in Flex
Builder -- something I wasn't sure I'd be able to do as there's no
FlexUnit plugin for Eclipse that I could find...

Oh, last thing is we are using Antennae common tasks and targets for
our Ant builds, just because it's the first thing we stumbled across
and seems to have fairly good structure for multi-project solutions.

On Tue, Dec 16, 2008 at 05:49, Errol Thompson kiw...@acm.org
mailto:kiwiet%40acm.org  wrote:
 I am fairly new to Flex but have a reasonable amount of experience
with
 test-driven development in Java and .NET.

 I have been told that test-driving Flex development is not possible. I
am
 not convinced as I have been told similar things on other projects in
the
 past and then proven that they are possible.

 I am wondering:

 1) How many people actually use a testing framework (FlexUnit, Fluint,
 FUnit, AsUnit) when doing Flex development?

 2) Does using a testing framework change the way that you structure
your
 Flex applications?

 3) How many use test-driven development with the Cairngorm framework?

 -
 Errol Thompson
 Kiwi-ET Computing Education Research
 Wellington, New Zealand
 Phone: +64 21 210 1662
 E-Mail: kiwiet (at) acm.org
 kiwiet (at) computer.org
 Web: www.thompsonz.net
 -

 

-- 
Cheers,
Jules
--
Jules Suggate
Owner and Technical Lead
Uphill Sprint Limited

+64-21-157-8562

 



[flexcoders] Re: navigateToURL request.data connection problem

2008-12-16 Thread assaia
Hi Steve,
I checked it again without the two lines you noticed last time but
I still did not get rid of %5F... Did it worked for you?

Thanks for the help,
Alex.

--- In flexcoders@yahoogroups.com, valdhor steved...@... wrote:

 You're welcome. Glad I could shed some light on it for you.
 
 --- In flexcoders@yahoogroups.com, assaia assaia@ wrote:
 
  Thank you a lot Steve, that's great!
  It still is not working, but a least now I know that the error is
 not in the code anymore...
  I think the error is the domain name trying to access the Perl script.
  So I'll transfer it to the correct server and then try again. Thanks
 a lot!
  
  --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
  
   These two lines:
   
   var array:Array = new Array(new URLRequestHeader(Content-Type,
   text/html));
   request.contentType = array.toString();
   
   send a very strange request to the server:
   
   
Second%5FPhone%5FNumber=0Account=00Password=password
   
   Removing the two lines send a proper POST request.
   
   There is nothing wrong with your Flex code. The Internal Server
   Error response is coming from the Perl script due to the strange
 request.
   
   BTW. I figured this out using Charles (http://www.charlesproxy.com).
   
   
   --- In flexcoders@yahoogroups.com, assaia assaia@ wrote:
   
Hello and thank you a lot for your time.
The function runs when a button is clicked.
When the new webpage loads I get a Internal Server Error and
The server encountered an internal error or misconfiguration and
   was unable to complete 
your request.
I've tried a lot of different configurations but none seems to work
   till now...

private function onClick():void{
var url:String = https://someplace/cgi/web/sth.pl;;
var request:URLRequest = new URLRequest(url);
var variables:URLVariables = new URLVariables();
variables.Account = 00;
variables.Password = password;
variables.Second_Phone_Number = 0;
request.data = variables;
request.method = URLRequestMethod.POST;
var array:Array = new Array(new URLRequestHeader(Content-Type,
   text/html));
request.contentType = array.toString();
navigateToURL(request, _self);
}

the previous code is a tranformation of a fla file where there was a
   layer with this code:

Account = 00;
Password = password;
Second_Phone_Number = 0;
stop();

and this code

on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables();

getURL(https://someplace/cgi/web/sth.pl;, _self, POST);
gotoAndStop(2);
}

Any help would be highly appreciated...
   
  
 






[flexcoders] Re: Button label and keyboard shortcuts

2008-12-16 Thread kalle.blorin
Thanks for that tip, Tim. Worked beautifully!

My application, however, also have a number of Canvases in a
TabNavigator. I am trying to modify your example to also allow me to
underline one letter of the Canvas label property, so that the user
can see what shortcut key will access each tab as easily as the buttons.

The problem is that the textField property does not exist, and I do
not know how to work around this.

Thanks for any help!


--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Cool.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Sefi Ninio sefi.ninio@ wrote:
 
  Hmm... I swear I tried it before, did the same thing and it didn't
 work...
  Donno what I did differently...
 
  Heck, it works now :)
 
  Thanks man!
 
  On Fri, Nov 28, 2008 at 11:58 PM, Tim Hoff TimHoff@ wrote:
 
  
   Works for me. Create a simple test application and copy in
 application
   and component code that I posted. It probably doesn't matter, but
 are
   you using Flex3?
  
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Sefi
   Ninio sefi.ninio@ wrote:
   
Hi Tim,
   
Thanks for your reply.
Unfortunately, it doesn't work... :(
The button displays uO/upen... in plain text...
   
On Thu, Nov 27, 2008 at 8:48 PM, Tim Hoff TimHoff@ wrote:
   
 One caveat: since Button will measure the additional html
   characters,
 you might want to set the button's width explicitly.

 -TH


 --- In flexcoders@yahoogroups.com
 flexcoders%40yahoogroups.com, Tim
   Hoff TimHoff@ wrote:
 
 
  Hi Sefi,
 
  Here's a way that you can do that by extending Button:
 
  // AS
   --
 
  package controls
  {
  import mx.controls.Button;
 
 
 
  public class HTMLButton extends Button
  {
  public function HTMLButton()
  {
  super();
  }
 
  override protected function
 
 updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
  {
  super.updateDisplayList(unscaledWidth, unscaledHeight);
 
  textField.htmlText = label;
  }
  }
  }
 
  // MXML
 
   --
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  xmlns:controls=controls.*
  creationComplete=onCreationComplete()
 
 
 
  mx:Script
  ![CDATA[
  private function onCreationComplete():void
  {
  var myButtonHTMLText:String = uO/upen;
  myButton.label = myButtonHTMLText;
  }
  ]]
  /mx:Script
 
 
 
  controls:HTMLButton id=myButton/
 
 
 
  /mx:Application
 
  // --
 
  -TH
 
  --- In flexcoders@yahoogroups.com
 flexcoders%40yahoogroups.com,
   Sefi Ninio sefi.ninio@ wrote:
  
   Hey,
  
   I have set up a keyboard shortcut to call the onButtonClick
   handler.
   Now, I'd like the button label to hint that the shortcut is
   present.
  
   For example, say the button label is 'Open' and the keyboard
   shortcut
  is
   Ctrl-O, I'd like the button label to be *O*pen, with
 underline
   only
  under
   the O.
  
   I've searched the API as well as google to no avail.
   I'm thinking of extending Button to enable this, but it
 probably
   won't
  be
   trivial and I'd like to know if there's a simpler option
 before
   going
  that
   path...
  
   Thanks,
   Sefi
  
 


   
  
  
  
 





[flexcoders] Re: Cannot Tab to MovieClips from Flash SWF Loaded with SWFLoader

2008-12-16 Thread aut0poietic
I found a different solution through trial and error after looking at
the IFocus* classes.  I'm cautiously optimistic that I have this
working...

I had to roll my own FocusManager and replace the Application's
FocusManager with my own and activate it. I also had to roll my own
UIMovieClip classe and set my UIMovieClip as the base class for all
MovieClips in the Flash SWF with a bit of JSFL -- this much I can make
the Designers do (use a command when they publish). 

I basically altered FocusManager.addFocusables so that I could add
MC's manually and ensure that the UIMovieClips could receive focus,
and altered the UIMovieClip subclass to add the MC to it's own list of
focusableObjects list. 

Now the SWFLoader adds the MC's in the SWF to the main application's
FocusManager's list of items to tab through on load, and removes them
on unload. 

This was a major PITA, but the focus appears to be working correctly
now. Thanks for the point in the right direction! I seriously owe you one!

Jer

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

 No examples of your situation, but DataGrid uses keyFocusChange and
my blog's DG editor with two editable fields post also shows how to
grab keyFocusChange and basically shutdown Flex's focus handling so
you can run your own.
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of aut0poietic
 Sent: Tuesday, December 09, 2008 5:23 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Cannot Tab to MovieClips from Flash SWF
Loaded with SWFLoader
 
 
 My designers build the content, but it's rapid dev by non-technicals.
 I can do limited content prep, if I can automate it for them.
 
 I'll look into using implementing a SWFLoader that implements
 IFocusManagerComponent. Difficulty isn't that big of a concern -- it's
 either make this work or dump a months worth of work.
 
 Been googling for examples of this technique to see if it'll do what I
 need. You know of any existing implementations or articles on the topic?
 
 IT really seems like I can get either the flex content tab order
 working, or the loaded swf content working, but not both.
 
 Thanks for the help so far.
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex
Harui aharui@ wrote:
 
  If you don't own the content, the FCK won't help you. You'll need
 to wrap the content and implement your own tabbing scheme. Difficulty
 Rating 8 out of 10.
 
  You'd need a SWFLoader subclass that implements
 IFocusManagerComponent. It would need a keyFocusChange handler that
 calls preventDefault().
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of aut0poietic
  Sent: Tuesday, December 09, 2008 1:34 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: Cannot Tab to MovieClips from Flash SWF
 Loaded with SWFLoader
 
 
  Thanks for the tip Alex. I'm googling now, but I'm curious how this
  could be of benefit to me for a MovieClip on stage.
 
  Content designers build the SWF's that my application loads in, which
  consists of simple MovieClips, images, vector graphics and some
  interactions (like drag/drops or a multiple choice question).
 
  It sounds like I'd have to specify a base class for every movieclip on
  stage that implemented IFocusManagerComponent.
 
  Am I far off, or is there some secret sauce in the kit?
 
  --- In

flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
Alex
 Harui aharui@ wrote:
  
   The CS3 entities need to implement IFocusManagerComponent. You
  might be able to use the Flash Component Kit to do that
  
   From:

flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
  On Behalf Of aut0poietic
   Sent: Tuesday, December 09, 2008 7:47 AM
   To:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
   Subject: [flexcoders] Cannot Tab to MovieClips from Flash SWF Loaded
  with SWFLoader
  
  
   Title pretty much says it all:
  
   I have a Flex 3 application which can basically be summed up as
a SWF
   player which loads SWF's created in Flash CS3.
  
   When the SWF's are loaded, I can interact with them using the mouse
   (click/mouseover, etc). However, these items cannot be tabbed to.
  
   I've been hacking around on this all morning, without much luck.
I've
   ensured that every item in the application either has a tabIndex and
   is .tabEnabled or has tabEnabled=false and tabChildren=true.
  
   I've even resorted to enumerating over the child MovieClips in
the swf
   (using swfLoaderInstance.content.getChildAt()) and setting
tabEnabled
   and focusRect are both true, and confirming that the tabIndex on
these
   mc's was 

Re: [flexcoders] Re: ComboBox SelectedItem Problem with resultFormat e4x - Very Urgent

2008-12-16 Thread samson kiran
Thank you so much. It worked :). You saved my life, thank you.

On Thu, Dec 11, 2008 at 3:32 PM, valdhor valdhorli...@embarqmail.comwrote:

   Try combobox.selectedit...@data

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 samsonkiran samsonkir...@... wrote:
 
 
  Hi
 
  I have an Flex file (.mxml) in which i am making the HTTPService
 call to one
  JSP. This JSP returns me an XML data. I need to populate the
 comboBox in the
  FLEX with the data coming from the JSP in XML format. This is the
 sample
  code.
 
  test.mxml
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100%
  height=100% backgroundColor=#FF creationComplete=srv.send()
  layout=absolute
  mx:HTTPService id=srv url=../test/test.jsp resultFormat=e4x
 result =
  resultHandler(event) fault=faultHandler(event) method=POST
  /mx:HTTPService
  mx:ComboBox id=comboBox width=200 labelField=@label
  dataProvider={srv.lastResult.company} change=changed()/
  /mx:Application
  mx:Script
  ![CDATA[
  import mx.controls.Alert;
  private function resultHandler(event:Event):void{
  Alert.show(In Result);
 
  private function faultHandler(event:Event):void{
  Alert.show(event.toString());

  }
  }
 
  private function changed():void{
  Alert.show(comboBox.selectedItem.data);
  }
  ]]
  /mx:Script
 
  XML Input from JSP:
  ?xml version=1.0 encoding=utf-8?
  response
  company data=c1 label=company1/
  company data=c2 label=company2/
  /response
 
  I am able to populate the comboBox with the data coming from the
 JSP. But
  the problem is comboBox.selectedItem.data is not giving me any value. It
  should give me c1 if the company1 and c2 if company2 is
 selected.
  But it does not give me any value.
 
  comboBox.selectedItem.label works fine. But i need
  comboBox.selectedItem.data for my requirement. Any idea why is this not
  working.
 
  At the same if i remove the resultFormat e4x attribute (i.e
 working with
  default resultFormat of Object), i am able to retrieved the selected
 value
  using comboBox.selectedItem.data. Ofcourse the code is modified as below
  since the format of response data is different.
 
 
  mx:HTTPService id=srv url=../test/test.jsp result =
  resultHandler(event) fault=faultHandler(event) method=POST
  /mx:HTTPService
  mx:ComboBox id=comboBox width=200 labelField=label
  dataProvider={srv.lastResult.response.company} change=changed()/
 
  Please let me know why this selectedItem.data is failing when i use e4x
  resultFormat. Am i missing out anything? This is very urgent.
 
  Thanks in advance
  --
  View this message in context:

 http://www.nabble.com/ComboBox-SelectedItem-Problem-with-resultFormat-e4x---Very-Urgent-tp20964177p20964177.html
  Sent from the FlexCoders mailing list archive at Nabble.com.
 

 



[flexcoders] Directory selection in FLEX

2008-12-16 Thread shruti shety
Hi,

 I need a way in my FLEX application which allows the user to create/select the 
directory from the file system. 
File reference class doesn't help me this.
I can do this in ADOBE AIR, but i want to know i can integrate this into my 
Flex web application.

Please suggest is there any other way to achieve this functionality.

Thanks,
Shruti 
 

















  

[flexcoders] Re: Create Flex Ajax Bridge menu option - Crashes FlexBuilder

2008-12-16 Thread valdhor
I can confirm this somewhat.

Using Flex Builder 3 standalone. Right click my project and select
'Create Ajax Bridge'. Then click cancel on the dialog box that pops
up. You get a funky looking cursor that swaps between a pointer and an
hourglass really fast and the dialog box just stays there.

It doesn't crash Flex Builder as such - if you leave it alone for
about ten minutes, the dialog box goes away and Flex Builder comes
back OK.


--- In flexcoders@yahoogroups.com, polestar11 polesta...@... wrote:

 FlexBuilder 3
 
 --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@
 wrote:
 
  On Friday 05 Dec 2008, polestar11 wrote:
   So often I have accidentally clicked the 'Create Ajax Bridge' menu
   option which is located just above the SVN 'Team' menu option.
   I then click cancel and ... wallah ... Flex Builder has crashed.
  
  Builder standalone or plugin ?
  
  -- 
  Tom Chiverton
  Helping to authoritatively benchmark visionary sexy action-items





[flexcoders] Re: Padding/spacing before the first line in a TextArea

2008-12-16 Thread bjorn
Any ideas on where I might find more info about this? .. or people who might
know more ...


2008/12/2 bjorn itrashm...@gmail.com

 There is some padding before the first line in a TextArea. Have a look at
 this image to see what I mean:

 http://i34.tinypic.com/4uz8s0.jpg

 I need to remove this, and the first solution that comes to mind is to find
 that value and position the TextArea.y = TextArea.y - [that value]. The
 padding before the first line seems to be equal (in most cases) to the
 font's descent, which I can get from getTextLineMetrics().descent.

 However, this is not true in all cases. In some cases, the padding is more.

 Anyone have suggestions?

 Bjørn
 --
 
 http://www.juicability.com - flex blog
 http://www.nospoiler.com - link to youtube videos without the spoilers




-- 

http://www.juicability.com - flex blog
http://www.nospoiler.com - link to youtube videos without the spoilers


[flexcoders] Re: How do I get on adobe feeds? I'm having problems...

2008-12-16 Thread Amy
--- In flexcoders@yahoogroups.com, Nate Pearson napearso...@... 
wrote:

 I'm trying to get my blog on adobe feeds.  
 
 I've submitted my blog to the feed (19nates.com) and received an e-
mail from adobe that 
 says Your site has been added to Adobe Feeds: 
http://feeds.adobe.com;.
 
 I click on my ping link and I get flerror 0 message Thanks for 
pinging MXNA!.
 
 When I try to ping my link over at adobe feeds it says my blog 
hasn't been added.
 
 I've e-mailed the help link twice but haven't got a response in 
about 2 weeks.  
 
 HELP! :)  Any ideas?  Any adobe people here that can help me out?  
I just want to share my 
 flexness with the world.

Look around on the Flex Documentation Team site to see if there's 
anything they're saying that you want to link to.  If they start 
seeing traffic coming from your links, they are likely to add you.

HTH;

Amy



[flexcoders] Channel documentation errors?

2008-12-16 Thread Michael Slinn
The documentation for Channel.applySettings() says:
Subclasses should override this method to apply any settings that may
be necessary for an individual channel. Make sure to call
super.applySettings() to apply common settings for the channel.

Parameters
settings:XML — XML fragment of the services-config.xml file for this
channel. The following fragement includes the channel tag with all
of its configuration settings:

channel id=my-amf type=mx.messaging.channels.AMFChannel
endpoint uri=/dev/messagebroker/amf
type=flex.messaging.endpoints.AmfEndpoint/
properties
  polling-enabledfalse/polling-enabled
/properties
  /channel

Ignoring the spelling error (fragement), the documentation appears
to be quite incorrect, if I read the source code correctly.
I'm looking at
flex_sdk_3.0.0.477\frameworks\projects\rpc\src\mx\messaging\Channel.as, and
I see code that references the following properties:
connect-timeout-seconds
record-message-times
record-message-sizes
serialization
enable-small-messages

The polling-enabled property is not mentioned in the Channel code.

PollingChannel extends Channel, and it references the following config
file properties:
polling-enabled
polling-interval-millis
polling-interval-seconds
piggybacking-enabled
login-after-disconnect

None of the above properties are mentioned in the PollingChannel docs.
 The polling-enabled property mentioned in the Channel docs is
actually handled by the PollingChannel subclass.

NetConnection extends PollingChannel, and does not reference any new
properties.

AMFChannel extends NetConnection.  The AMFChannel docs say that the
config file's property called polling-interval-seconds is read into
the AMFChannel.pollingInterval property.
Also, the docs say that the polling-enabled property in the config
file sets the AMFChannel.pollingEnabled property.  As I discovered,
PollingChannel handles these properties, not AMFChannel.

Should I log a bug?



[flexcoders] Re: Adobe AIR Installer has encountered a problem

2008-12-16 Thread michael_corbridge
Here is the solution:

Check your mm.cfg file for the entry:

PreloadSwf=C:/Documents and
Settings/Administrator/workspace/.metadata/.plugins/com.adobe.flash.pr
ofiler/ProfilerAgent.swf?host=localhostport=

And remove it!

Leave everything else intact, and check to see if you can now install 
AIR.  Oliver Goldman at Adobe is investigating further ...

Does it have something to do with the debug version of FlashPlayer 10,  
or the Profiler in Flex Builder?  More to come ...

--- In flexcoders@yahoogroups.com, farid wl fari...@... wrote:

 hi
 yes, I have this problem too and searched and couldnt find good 
solution,
 everyone knows the solution pls help us out
 --- On Fri, 12/12/08, michael_corbridge mdcor...@... wrote:
 
 From: michael_corbridge mdcor...@...
 Subject: [flexcoders] Adobe AIR Installer has encountered a problem
 To: flexcoders@yahoogroups.com
 Date: Friday, December 12, 2008, 4:21 AM
 
 
 
 
 
 
 Has anyone come across this problem. I had successfully installed 
AIR 
 1.5 previously when suddenly some of my AIR apps stopped running 
with 
 this error:
 
 Adobe AIR Installer has encountered a problem and needs to close. We 
 are sorry for the inconvenience.
 
 I note that I can still run my AIR apps through Flex Builder. A 
 google search on this error has not been fruitful.
 
 Adobe, or anyone's help would be appreciated.






Re: [flexcoders] Re: Padding/spacing before the first line in a TextArea

2008-12-16 Thread Jon Bradley
You can't manually remove that padding from the field. It's built  
into the field as the ascent of the font + 4 pixels for the natural  
field border (which also cannot be 'removed').


There are only two ways to shift up a field in Flash:

Method 1:
a. Bitmap snapshot of the text field
b. getColorRectBounds on the bitmap in question to retrieve a  
bounding rectangle of the non-alpha pixels.
c. Capture the top position from the Rectangle returned from that  
call and subtract that value from the y-position of the field.


Pros:
Will work every time

Cons:
Additional memory overhead. Tricky to do with the Flex component  
architecture - especially TextArea


Method 2:
a. Capture font metrics from the text field
b. Subtract (metrics.ascent + 4) from the text field y position. It  
is the ascent measurement, not descent.


Pros:
Less memory and less code to deal with.

Cons:
Will not work every time. Ascent and descent measurements from the  
font metrics within Flash are not accurate measurements and are only  
correct at very, very specific font sizes (8, 12, 17, 28, 36, 44 ...  
etc.).


Almost all point sizes of text return incorrect ascent and descent  
values in Flash. They usually return values less than they really are  
(7,8,9 point type will return the same ascent value for most fonts,  
for example).


Additionally, you'll still need to extend TextArea to handle the  
functionality.


Does not function well at all with advanced antialiasing ... also a  
known bug in the Flash text rendering. Saffron antialiasing causes a  
jump in the leading and position values of lines in a field, so don't  
use it.


--

This has been a long standing bug that I've been complaining to Adobe  
about. I've worked on applications for some big greeting card  
companies (take a couple guesses) creating a rendering system in  
Flash that will match Photoshop and Illustrator text rendering.  
Illustrator, btw, is the only Adobe application that let's you set  
the first baseline position of a text field using a variety of measures.


Good luck.

- jon


On Dec 16, 2008, at 8:53 AM, bjorn wrote:

Any ideas on where I might find more info about this? .. or people  
who might know more ...



2008/12/2 bjorn itrashm...@gmail.com
There is some padding before the first line in a TextArea. Have a  
look at this image to see what I mean:


http://i34.tinypic.com/4uz8s0.jpg

I need to remove this, and the first solution that comes to mind is  
to find that value and position the TextArea.y = TextArea.y - [that  
value]. The padding before the first line seems to be equal (in  
most cases) to the font's descent, which I can get from  
getTextLineMetrics().descent.


However, this is not true in all cases. In some cases, the padding  
is more.


Anyone have suggestions?





[flexcoders] Re: Programmatically managing BlazeDS ServerConfig

2008-12-16 Thread cornelcreanga
Try with
ServerConfig.serverConfigData.channels.elements(channel)@[id]

instead of

ServerConfig.serverConfigData.channels.elements(channel-definition)@[id]



[flexcoders] Re: navigateToURL request.data connection problem

2008-12-16 Thread valdhor
Yes - it worked for me.

Have you checked the actual data sent with something like
Charles(http://www.charlesproxy.com)? What is being sent?

BTW. I think Charles is the best. I use it almost every day to track
down network problems that I have. It is the only debugging proxy that
has both AMF support and works cross platform. Best $50 I ever spent.


--- In flexcoders@yahoogroups.com, assaia ass...@... wrote:

 Hi Steve,
 I checked it again without the two lines you noticed last time but
 I still did not get rid of %5F... Did it worked for you?
 
 Thanks for the help,
 Alex.
 
 --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
 
  You're welcome. Glad I could shed some light on it for you.
  
  --- In flexcoders@yahoogroups.com, assaia assaia@ wrote:
  
   Thank you a lot Steve, that's great!
   It still is not working, but a least now I know that the error is
  not in the code anymore...
   I think the error is the domain name trying to access the Perl
script.
   So I'll transfer it to the correct server and then try again. Thanks
  a lot!
   
   --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
   
These two lines:

var array:Array = new Array(new URLRequestHeader(Content-Type,
text/html));
request.contentType = array.toString();

send a very strange request to the server:


 Second%5FPhone%5FNumber=0Account=00Password=password

Removing the two lines send a proper POST request.

There is nothing wrong with your Flex code. The Internal Server
Error response is coming from the Perl script due to the strange
  request.

BTW. I figured this out using Charles
(http://www.charlesproxy.com).


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

 Hello and thank you a lot for your time.
 The function runs when a button is clicked.
 When the new webpage loads I get a Internal Server Error and
 The server encountered an internal error or
misconfiguration and
was unable to complete 
 your request.
 I've tried a lot of different configurations but none seems
to work
till now...
 
 private function onClick():void{
 var url:String = https://someplace/cgi/web/sth.pl;;
 var request:URLRequest = new URLRequest(url);
 var variables:URLVariables = new URLVariables();
 variables.Account = 00;
 variables.Password = password;
 variables.Second_Phone_Number = 0;
 request.data = variables;
 request.method = URLRequestMethod.POST;
 var array:Array = new Array(new URLRequestHeader(Content-Type,
text/html));
 request.contentType = array.toString();
 navigateToURL(request, _self);
 }
 
 the previous code is a tranformation of a fla file where
there was a
layer with this code:
 
 Account = 00;
 Password = password;
 Second_Phone_Number = 0;
 stop();
 
 and this code
 
 on (release) {
 // send variables in form movieclip (the textfields)
 // to email PHP page which will send the mail
 form.loadVariables();
 
 getURL(https://someplace/cgi/web/sth.pl;, _self, POST);
 gotoAndStop(2);
 }
 
 Any help would be highly appreciated...

   
  
 





[flexcoders] Re: Best Practices: ArrayCollection of custom objects?

2008-12-16 Thread florian.salihovic
Regaring the modelling of a domain, you should wrap your collection (Array, 
ListCollectionView, ArrayCollection, XMLListCollection...) in your own 
collection type.

That will make your collection typesafe. When you need access to the underlying 
collection, 
you could make it accessible by implementing a get 
collection():ICollectionView.

That's also recommended in Fowler's Reafctoring book.

--- In flexcoders@yahoogroups.com, burttram br...@... wrote:

 Thank you both for your time and replies.






[flexcoders] Overlapping interfaces

2008-12-16 Thread jimmy5804
I have a custom class that wants to expose IList and ICollectionView.
Both interfaces define the length parameter and I get an ambiguous
renference to length error when I try to access length. I believe
this is essentially a namespace issue, but I don't know how to solve
it. Suggestions?



Re: [flexcoders] Re: Padding/spacing before the first line in a TextArea

2008-12-16 Thread bjorn
Yepp, thanks .. but that doesn't affect this. It's space inside the TextArea
(which is decided by the font in some way)..
Bjørn



2008/12/16 Cato Paus ca...@brannsikring.no

   Have you try this

 paddingTop: 0;
 paddingBottom: 0;
 paddingRight: 0;
 paddingLeft: 0;

 on TextArea?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, bjorn
 itrashm...@... wrote:
 
  Any ideas on where I might find more info about this? .. or people
 who might
  know more ...
 
 
  2008/12/2 bjorn itrashm...@...
 
   There is some padding before the first line in a TextArea. Have a
 look at
   this image to see what I mean:
  
   http://i34.tinypic.com/4uz8s0.jpg
  
   I need to remove this, and the first solution that comes to mind
 is to find
   that value and position the TextArea.y = TextArea.y - [that
 value]. The
   padding before the first line seems to be equal (in most cases)
 to the
   font's descent, which I can get from getTextLineMetrics().descent.
  
   However, this is not true in all cases. In some cases, the
 padding is more.
  
   Anyone have suggestions?
  
   Bjørn
   --
   
   http://www.juicability.com - flex blog
   http://www.nospoiler.com - link to youtube videos without the
 spoilers
  
 
 
 
  --
  
  http://www.juicability.com - flex blog
  http://www.nospoiler.com - link to youtube videos without the
 spoilers
 

  




-- 

http://www.juicability.com - flex blog
http://www.nospoiler.com - link to youtube videos without the spoilers


Re: [flexcoders] Re: Flex nested tree get data from mysql and php

2008-12-16 Thread Barry Gee
Hi.

First of all my apoligise if this really isnt what your looking for, as 
I have deleted the previous posts so havent read the whole discusion. 
Hopefully this may help though. I have created a tree component that 
loads in  an xml structure, the xml structure can change i.e. new levesl 
edded / removed and this is reflected in the tree.  I think this is what 
your looking for but like i say i may be totally wrong.  I have attached 
some code below.

?xml version=1.0 encoding=utf-8?
mx:WindowedApplication
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
width=360
height=500
showFlexChrome=false
applicationComplete=init()
creationComplete=categoriesXML.send()

mx:HTTPService id=categoriesXML url=data/categories1.xml 
resultFormat=e4x /

mx:Script
![CDATA[

  private var selectedItem:String;

public function treeChangeEvent(event:Event):void
{
if (event.currenttarget.selectedit...@label)
{
   selectedItem =  Selected Item  + 
event.currenttarget.selectedit...@label;
   trace(selectedItem);
}
 }


]]
/mx:Script

mx:Canvas id=categoriesListCanvas 
   height=333
   width=338
   x=10
   y=112
  
mx:Tree id=categoriesTree
 change=treeChangeEvent(event);
 dataProvider={categoriesXML.lastResult.category}
 labelField=@label
 x=0
 y=0
 width=338
 height=333
 backgroundColor=#11
 backgroundAlpha=0.9
 borderColor=#00
 color=#FF
 

/mx:Tree
   
/mx:Canvas

/mx:WindowedApplication

// categories1.xml
--

?xml version=1.0 encoding=utf-8?

categories
category category=Adobe AIR/
category category=Adobe Flex
category category=1
category category=1a/
category category=1b/
category category=1c/
category category=1d/
category category=1e/
category category=1f/
/category
category category=2/
category category=3/
category category=4/
category category=5
category category=5a/
category category=5b/
category category=5c/
category category=5d/
category category=5e/
category category=5f/
/category
category category=6/
/category
category category=AS3/
category category=PHP/
category category=FlashLite
category category=FlashLitea/
category category=FlashLiteb/
category category=FlashLitec/
category category=FlashLited/
category category=FlashLitee/
category category=FlashLitef/
/category
category category=Other/
/categories


Barry.


Amy wrote:

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, timgerr tgallag...@... wrote:
 
  Amy, as always, you rock, that url was a good read. My problem is I
  am not sure how many children I will have or what the structure will
  look like. I am doing a tree so I can have n number of nodes or
  children, and I am not sure how to build the return object/array.

 Your app will probably perform better if you don't try to build the
 whole tree at once.

 But you might want to google on recursion. Essentially, the
 principle is to use a function that works on an object in such a way
 that if the object has children, the function will call itself again
 for each child. That's not as difficult as it sounds, once you get
 your head around it--you just have to trust the recursion to do its
 thing and not force it. Probably someone has even posted some
 recursive PHP examples.

 Another way to approach it is to use the composite pattern and just
 populate the first level of objects, then once each object is
 instantiated it will start pulling down its own children and so on.
 This is sort of how I handle it, but I didn't make it where that
 always happens automatically so that if those resources are needed
 for something else the process can be interrupted.

 Oh, and one last thing...if your database technology isn't set in
 stone, you might want to consider using SQL Server, because Shape
 queries are made for this. AFAIK, other databases don't have
 anything that does this quite so nicely.

 HTH;

 Amy

  




[flexcoders] Re: Padding/spacing before the first line in a TextArea

2008-12-16 Thread Cato Paus
Have you try this 

paddingTop: 0;
paddingBottom: 0;
paddingRight: 0;
paddingLeft: 0;

on TextArea?


--- In flexcoders@yahoogroups.com, bjorn itrashm...@... wrote:

 Any ideas on where I might find more info about this? .. or people 
who might
 know more ...
 
 
 2008/12/2 bjorn itrashm...@...
 
  There is some padding before the first line in a TextArea. Have a 
look at
  this image to see what I mean:
 
  http://i34.tinypic.com/4uz8s0.jpg
 
  I need to remove this, and the first solution that comes to mind 
is to find
  that value and position the TextArea.y = TextArea.y - [that 
value]. The
  padding before the first line seems to be equal (in most cases) 
to the
  font's descent, which I can get from getTextLineMetrics().descent.
 
  However, this is not true in all cases. In some cases, the 
padding is more.
 
  Anyone have suggestions?
 
  Bjørn
  --
  
  http://www.juicability.com - flex blog
  http://www.nospoiler.com - link to youtube videos without the 
spoilers
 
 
 
 
 -- 
 
 http://www.juicability.com - flex blog
 http://www.nospoiler.com - link to youtube videos without the 
spoilers





[flexcoders] Re: How does Flex Builder validate a BlazeDS/LCDS J2EE project?

2008-12-16 Thread cornelcreanga
The code does the following things:

1)Check if the server root exists
2)Check if services.xml or flex-config.xml exists
3)Creates a temporary file and checks for it with a GET command on the
server port.




[flexcoders] Dynamic variable for embed image classes?

2008-12-16 Thread Berkay Unal
Hi,

I am trying to get the icons that are embeded with a dynamic variable.

For ex: ikon(usd);

But cannot make it work. Any ideas?

//SRC

[Embed(images/eur.png)]
private var icon_EUR:Class;

[Embed(images/usd.png)]
private var icon_usd:Class;

[Embed(images/chf.png)]
private var icon_CHF:Class;

public function ikon(value:String):Class {
var t:String = icon_+value;
var classRef:Class = getDefinitionByName(t) as Class;
return new classRef();
}

Best,

Berkay UNAL
berkayu...@gmail.com


Re: [flexcoders] Directory selection in FLEX

2008-12-16 Thread Ashish Verma
I don't think so that you can do the same from FLEX application since
Browser security sandbox won't allow you for the same. but same you could
using AIR with javascript.

Best,
Ashish

On Tue, Dec 16, 2008 at 3:29 PM, shruti shety shruti.she...@yahoo.comwrote:

 Hi,

  I need a way in my FLEX application which allows the user to create/select
 the directory from the file system.
 File reference class doesn't help me this.
 I can do this in ADOBE AIR, but i want to know i can integrate this into my
 Flex web application.
 Please suggest is there any other way to achieve this functionality.

 Thanks,
 Shruti

 



[flexcoders] Re: How would I Overwrite contents of External XML File

2008-12-16 Thread valdhor
You may like to look at AS3Crypto (http://code.google.com/p/as3crypto/)


--- In flexcoders@yahoogroups.com, anuj sharma anuj...@... wrote:

 HI Brendon
 Sounds good to me, And my teamate is working on the encryption part, he
 thinks that encryption of the password needs to be done through
Javascript
 and if thats the case I need to see how my Flex code needs to talk to
 JavaScript, i guess using exteralInterface might help me, So do you
think
 JavaScript is good option for taking care of encryption (on the
wire) for
 the password or we should try some other technology. I am doubtful
that if
 Flex can take care of encryption of the password.
 Any feedback regardign how to encrypt migh help too,
 Thanks Brendon for your help
 Anuj
 
 On Mon, Dec 15, 2008 at 5:22 PM, Wildbore, Brendon 
 b.j.wildb...@... wrote:
 
 Hi Anuj,
 
 
 
  All the investigation I have done points to it not being possible
in flex
  (non-air flex). So amfPHP is a logical option for you, especially
if you
  have already had experience with it.
 
 
 
  Cheers
 
  Brendon
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] *On
  Behalf Of *anuj sharma
  *Sent:* Tuesday, 16 December 2008 2:01 p.m.
  *To:* flexcoders@yahoogroups.com
  *Subject:* Re: [flexcoders] How would I Overwrite contents of
External XML
  File
 
 
 
  Hi Brendon
  We are working on the encryption part but do you think it is not
possible
  to overwrite stuff on server with Flex. If thats the case i  have used
  amfPHP for tarnsferring data to server, then do you think amfPHP
is the only
  option i left with I guess right.
  Any other guidance will be apprecited too , Also if you have better
  links/info about encryption of password on the server that will be
helpful
  too
  Thanks
  Anuj
 
  On Mon, Dec 15, 2008 at 4:52 PM, Wildbore, Brendon 
  b.j.wildb...@... wrote:
 
  Im not 100% sure, but I don't believe flex can write to the server
  directly. You will most likely have to employ a server side http
service to
  achieve this.
 
 
 
  Also if you are going to be storing sensitive info in an xml file, you
  should encrypt the passwords and security answers
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] *On
  Behalf Of *anuj181
  *Sent:* Tuesday, 16 December 2008 1:37 p.m.
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] How would I Overwrite contents of External XML
  File
 
 
 
  Hi All
  I am working on change password option for the user, I am reading
  password content from external XML Files and then depending upon the
  added value I need to overwrite the external XML's files passsword
  entry. I am using following code for changing it but it is not
  working, My XML file is in the external folder but withtin the same
  project and this is one of the component which i am calling on click
  of some button. I need to overwrite data in Login.xml which is stored
  in Private folder as the separate folder in my project, Reading from
  thh xml file is no problem but writing back is an issue,
  Does anyone know where I am screwing things up?
 
  Many Many Thanks for your help
  Anuj
  //My XML
  ?xml version=1.0 encoding=utf-8?
  Users
  user
  id1/id
  userNameasasasd/userName
  passwordasasd123/password
  securityQuestionTest Security Question/securityQuestion
  answerSecurityQuestion/answerSecurityQuestion
  /user
  /Users
 
  /CODE***/
 
  mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
  creationComplete=init();
  horizontalScrollPolicy=off verticalScrollPolicy=off
  public function init():void
  {
  var getPassword:URLRequest=new URLRequest(Private/Login.xml);
  passwordLoader = new URLLoader();
 
  try
  {
  passwordLoader.load(getPassword);
  }
  catch (error:SecurityError)
  {
  trace(SecurityError has occurred while loading password);
  }
 
  passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword);
  }
 
  //ChangePassword
 
  public function changePassword(evt:MouseEvent):void
  {
  if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)||
  (txt_Security_Question.text==)||(txt_Security_Answer.text==))
  {
  Alert.show(Please Check the values entered. They cannot be
  null);
  }
  else if(txt_Enter_Password.text!=txt_ReEnter_Password.text)
  {
  Alert.show(Passwords do not match);
  }
  else
  {
  externalXMLPassword.user.password=txt_Enter_Password.text;
 
  externalXMLPassword.user.securityQuestion=txt_Security_Question.text;
 
 
externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text;
 
  }
  }
 
  mx:Button x=630 y=402 label=Save
click=changePassword(event);/
 
 
 
   
 





[flexcoders] Re: Can the Loading message be localized?

2008-12-16 Thread Tracy Spratt
I don't know for certain that it is the only way, but you could solve 
this by creating a custom preloader comnponent.

I have not done it but have seen examples.

Tracy
--- In flexcoders@yahoogroups.com, twcrone70 twcron...@... wrote:

 I am currently passing the 'localeChain' into a SWF as a flash var and
 using it to explicitly set the locale on the resourceManager.  This is
 working for the application but is there anyway to the Initializing
 message in the beginning openning swf to be localized?
 
 Thanks,
 
 - Todd





Re: [flexcoders] Directory selection in FLEX

2008-12-16 Thread shruti shety
Yeah looks like, but was just hoping against hope to see if there is any other 
way of doing it from FLEX apps.



--- On Tue, 12/16/08, Ashish Verma verma.lu...@gmail.com wrote:
From: Ashish Verma verma.lu...@gmail.com
Subject: Re: [flexcoders] Directory selection in FLEX
To: flexcoders@yahoogroups.com
Date: Tuesday, December 16, 2008, 4:31 PM











I don't think so that you can do the same from FLEX application 
since Browser security sandbox won't allow you for the same. but same you could 
using AIR with javascript.
 
Best,
Ashish


On Tue, Dec 16, 2008 at 3:29 PM, shruti shety shruti.sheety@ yahoo.com wrote:










Hi,

 I need a way in my FLEX application which allows the user to create/select the 
directory from the file system. 
File reference class doesn't help me this.
I can do this in ADOBE AIR, but i want to know i can integrate this into my 
Flex web application.

Please suggest is there any other way to achieve this functionality.

Thanks,
Shruti 
  
 


  




 

















  

[flexcoders] Re: Test-driven development in Flex

2008-12-16 Thread dev.apostiglioni
Where I work we have also come to the conclution that Cairngorm brings
lot of problems in testing. So we decided to turn to Aconcagua
(http://code.google.com/p/aconcagua-flex/).

You may want to have a look.

--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 1. We use FlexUnit for our development (well, a tweaked version of
 FlexUnit) and I'm in the process of adding FlexCover to that. We use
 test first as a guiding principle when writing code.
 
 2. Our general architecture and therefore designs are geared to helping
 us test the business logic that is written.
 
 3. We've pulled way back from Cairngorm and rolled our own, one of the
 contributing decisions for this was the problems in testing Cairngorm
 apps.
 
  
 
 Gk.
 
 Gregor Kiddie
 Senior Developer
 INPS
 
 Tel:   01382 564343
 
 Registered address: The Bread Factory, 1a Broughton Street, London SW8
 3QJ
 
 Registered Number: 1788577
 
 Registered in the UK
 
 Visit our Internet Web site at www.inps.co.uk
 blocked::http://www.inps.co.uk/ 
 
 The information in this internet email is confidential and is intended
 solely for the addressee. Access, copying or re-use of information in it
 by anyone else is not authorised. Any views or opinions presented are
 solely those of the author and do not necessarily represent those of
 INPS or any of its affiliates. If you are not the intended recipient
 please contact is.helpd...@...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Errol Thompson
 Sent: 15 December 2008 16:49
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Test-driven development in Flex
 
  
 
 I am fairly new to Flex but have a reasonable amount of experience with
 test-driven development in Java and .NET.
 
  
 
 I have been told that test-driving Flex development is not possible. I
 am not convinced as I have been told similar things on other projects in
 the past and then proven that they are possible.
 
  
 
 I am wondering:
 
  
 
 1) How many people actually use a testing framework (FlexUnit, Fluint,
 FUnit, AsUnit) when doing Flex development?
 
  
 
 2) Does using a testing framework change the way that you structure your
 Flex applications?
 
  
 
 3) How many use test-driven development with the Cairngorm framework?
 
  
 
 -
 Errol Thompson
 Kiwi-ET Computing Education Research
 Wellington, New Zealand
 Phone: +64 21 210 1662
 E-Mail: kiwiet (at) acm.org
 kiwiet (at) computer.org
 Web: www.thompsonz.net http://www.thompsonz.net 
 -





Re: [flexcoders] Directory selection in FLEX

2008-12-16 Thread Ashish Verma
As per my information there is only one way to that which is you could
create directory using Javascript API but within Temp Internet folder
by using External Interface  or the FA Bridge.

Best,
Ashish

On Tue, Dec 16, 2008 at 4:35 PM, shruti shety shruti.she...@yahoo.comwrote:

 Yeah looks like, but was just hoping against hope to see if there is
 any other way of doing it from FLEX apps.



 --- On *Tue, 12/16/08, Ashish Verma verma.lu...@gmail.com* wrote:

 From: Ashish Verma verma.lu...@gmail.com
 Subject: Re: [flexcoders] Directory selection in FLEX
 To: flexcoders@yahoogroups.com
 Date: Tuesday, December 16, 2008, 4:31 PM

   I don't think so that you can do the same from FLEX application since
 Browser security sandbox won't allow you for the same. but same you could
 using AIR with javascript.

 Best,
 Ashish

 On Tue, Dec 16, 2008 at 3:29 PM, shruti shety shruti.sheety@ 
 yahoo.comshruti.she...@yahoo.com
  wrote:

 Hi,

  I need a way in my FLEX application which allows the user to
 create/select the directory from the file system.
 File reference class doesn't help me this.
 I can do this in ADOBE AIR, but i want to know i can integrate this into
 my Flex web application.
 Please suggest is there any other way to achieve this functionality.

 Thanks,
 Shruti



 



[flexcoders] Re: Best Practices: ArrayCollection of custom objects?

2008-12-16 Thread burttram
Thank you both for your time and replies.



[flexcoders] How to configure J2ee web application with flex(LCDS with Tomcat)

2008-12-16 Thread jayapalkasarla
Plz Give me wht are jar files are required ..


configuration setting also



[flexcoders] Re: Custom event--please help me

2008-12-16 Thread Amy
--- In flexcoders@yahoogroups.com, Josh McDonald dzn...@... wrote:

 Don't call new EventDispatcher(), it won't be any real use. The main
 reason you would want to create an instance of EventDispatcher itself 
is
 when you're building a class that is an IEventDispatcher, but 
inherits from
 a base class that is not an IEventDispatcher, because we don't have 
multiple
 inheritance in AS3. When you do that, you need to use something like:
 
 private var myEventDispatcher : IEventDispatcher  = new
 EventDispatcher(this);

My experience with this is that occasionally that will run before the 
constructor and you'll get an error--it seems to be safer to put the 
assignment statement inside the constructor, even though it makes it a 
PIA to have boilerplate IEventDispatcher code that you copy in when you 
want to add event dispatching.



[flexcoders] Re: How does Flex Builder validate a BlazeDS/LCDS J2EE project?

2008-12-16 Thread Michael Slinn
Cornel,

Thanks for confirming my suspicions.  I realized I was checking the
wrong directory for disk activity.  Flex Builder does not probe the
Root Folder that Flex Builder presents in Project Properties / Flex
Server, it probes the deployment folder, which resides in the workspace.

My test setup is:
Root folder:
C:\sites\slinnbooks.com\www\production\webapps\ROOT\books\serverSide\examples\blazeDS\echoTest\echoServer\WebContent
Root URL: http://localhost:8080/echoServer/  (this works ... serves up
content properly)
Context Root: /echoServer

The server project folder is of course:
C:\sites\slinnbooks.com\www\production\webapps\ROOT\books\serverSide\examples\blazeDS\echoTest\echoServer
The BlazeDS client folder is
C:\sites\slinnbooks.com\www\production\webapps\ROOT\books\serverSide\examples\blazeDS\echoTest\echoClient
The Eclipse workspace is: C:\work\eclipseWorkspaces\Europa2
This directory is the deployment folder, and has the necessary Flex
xml files in it:
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex

Pressing the Validate Location button generates this error message:
Cannot access the web server. The server may not be running, or the
web root folder or root URL may be invalid.

FileMon shows a hundreds of disk accesses after I click on Validate
Location.  Here is some of the activity:
10:02:39 AMexplorer.exe:3864OPEN   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA
   NOT FOUNDOptions: Open  Access: Read   
10:02:39 AMexplorer.exe:3864OPEN   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\:SummaryInformation:$DATA
   NOT FOUNDOptions: Open  Access: Read   
10:02:46 AMexplorer.exe:3864DIRECTORY   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\
   SUCCESSFileBothDirectoryInformation: services-config.xml   
10:02:46 AMexplorer.exe:3864OPEN   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\services-config.xml
   SUCCESSOptions: Open  Access: Read   
10:02:46 AMexplorer.exe:3864OPEN   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\services-config.xml:Raec25ph4sudbf0hAaq5ehw3Nf:$DATA
   NOT FOUNDOptions: Open  Access: Read   
10:02:46 AMexplorer.exe:3864OPEN   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\services-config.xml\:Docf_SummaryInformation:$DATA
   NOT FOUNDOptions: Open  Access: Read   
10:02:47 AMexplorer.exe:3864QUERY INFORMATION   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\services-config.xml
   SUCCESSAttributes: A   
10:02:47 AMexplorer.exe:3864CLOSE  
10:02:46 AMexplorer.exe:3864OPEN   
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\services-config.xml\:Docf_SummaryInformation:$DATA
   NOT FOUNDOptions: Open  Access: Read
C:\work\eclipseWorkspaces\Europa2\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\echoServer\WEB-INF\flex\services-config.xml
   SUCCESS   

The attempts to write random data to the $DATA forks all fail, yet the
necessary files are all there.  I'm running Windows XP SP3.  Is this a
bug?  I can reproduce this problem on several Windows systems.

Mike



Re: [flexcoders] Does Flex builder 3.0.2 eclipse plug-in work in Eclipse 3.4?

2008-12-16 Thread Dave Kong
Thanks guys.

I can't find the 3.0.2 plugin download. Seems like the only way is to update
from 3.0.1, is that correct?

On Fri, Dec 12, 2008 at 4:40 PM, Andriy Panas a.pa...@gmail.com wrote:

   Hi Dave,

 I aslo Flex Builder 3.0.2 as Flex Builder Plug-in with Eclipse 3.4 on
 Windows XP - no problems noticed.

 --
 Med venlig hilsen / Best regards
 Andriy Panas
 a.pa...@gmail.com a.panas%40gmail.com
  



[flexcoders] Nested ADG height/scroll question

2008-12-16 Thread Ken Dunnington
I'm building an app which utilizes nested ADGs to provide a drill down
interface to my data. It works great in concept, but the problem I'm up
against is trying to size the datagrids so they display all their rows,
forcing any rows below them to move down (without creating any unnecessary
space.) Basically, I just want to avoid scrollbars, except on the parent
ADG. I'm just not quite sure where to start looking - is this a style thing,
or should I be overriding measure/updateDisplaylist to handle this?


[flexcoders] Re: Create Flex Ajax Bridge menu option - Crashes FlexBuilder

2008-12-16 Thread polestar11
FlexBuilder 3

--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@...
wrote:

 On Friday 05 Dec 2008, polestar11 wrote:
  So often I have accidentally clicked the 'Create Ajax Bridge' menu
  option which is located just above the SVN 'Team' menu option.
  I then click cancel and ... wallah ... Flex Builder has crashed.
 
 Builder standalone or plugin ?
 
 -- 
 Tom Chiverton
 Helping to authoritatively benchmark visionary sexy action-items




RE: [flexcoders] Re: Can the Loading message be localized?

2008-12-16 Thread Alex Harui
The default DownloadProgressBar is not localizable.  Create your own and set 
preloader=YourLocalizableDownloadProgressBar

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Tracy Spratt
Sent: Tuesday, December 16, 2008 9:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Can the Loading message be localized?


I don't know for certain that it is the only way, but you could solve
this by creating a custom preloader comnponent.

I have not done it but have seen examples.

Tracy
--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
twcrone70 twcron...@... wrote:

 I am currently passing the 'localeChain' into a SWF as a flash var and
 using it to explicitly set the locale on the resourceManager. This is
 working for the application but is there anyway to the Initializing
 message in the beginning openning swf to be localized?

 Thanks,

 - Todd




RE: [flexcoders] Dynamic variable for embed image classes?

2008-12-16 Thread Alex Harui
Icon_usd is not the name of the class, it is a variable referencing the class 
(what would be returned from getDefinition)

You can try:

var classRef:Class = this[“icon_” + value]

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Berkay Unal
Sent: Tuesday, December 16, 2008 9:23 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic variable for embed image classes?


Hi,

I am trying to get the icons that are embeded with a dynamic variable.

For ex: ikon(usd);

But cannot make it work. Any ideas?

//SRC

[Embed(images/eur.png)]
private var icon_EUR:Class;

[Embed(images/usd.png)]
private var icon_usd:Class;

[Embed(images/chf.png)]
private var icon_CHF:Class;

public function ikon(value:String):Class {
var t:String = icon_+value;
var classRef:Class = getDefinitionByName(t) as Class;
return new classRef();
}

Best,

Berkay UNAL
berkayu...@gmail.commailto:berkayunal%40gmail.com



RE: [flexcoders] Overlapping interfaces

2008-12-16 Thread Alex Harui
Our code (ListCollectionView.as) gets away with this.  Comment out various 
sections of code to see if you can isolate the problem.  Maybe you have a 
private length as well?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of jimmy5804
Sent: Tuesday, December 16, 2008 8:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Overlapping interfaces


I have a custom class that wants to expose IList and ICollectionView.
Both interfaces define the length parameter and I get an ambiguous
renference to length error when I try to access length. I believe
this is essentially a namespace issue, but I don't know how to solve
it. Suggestions?



RE: [flexcoders] Re: Padding/spacing before the first line in a TextArea

2008-12-16 Thread Alex Harui
Subclass and reposition the internal textfield.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of bjorn
Sent: Tuesday, December 16, 2008 6:18 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Padding/spacing before the first line in a 
TextArea


Yepp, thanks .. but that doesn't affect this. It's space inside the TextArea 
(which is decided by the font in some way)..

Bjørn


2008/12/16 Cato Paus ca...@brannsikring.nomailto:ca...@brannsikring.no

Have you try this

paddingTop: 0;
paddingBottom: 0;
paddingRight: 0;
paddingLeft: 0;

on TextArea?


--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, bjorn 
itrashm...@... wrote:

 Any ideas on where I might find more info about this? .. or people
who might
 know more ...


 2008/12/2 bjorn itrashm...@...


  There is some padding before the first line in a TextArea. Have a
look at
  this image to see what I mean:
 
  http://i34.tinypic.com/4uz8s0.jpg
 
  I need to remove this, and the first solution that comes to mind
is to find
  that value and position the TextArea.y = TextArea.y - [that
value]. The
  padding before the first line seems to be equal (in most cases)
to the
  font's descent, which I can get from getTextLineMetrics().descent.
 
  However, this is not true in all cases. In some cases, the
padding is more.
 
  Anyone have suggestions?
 
  Bjørn
  --
  
  http://www.juicability.com - flex blog
  http://www.nospoiler.com - link to youtube videos without the
spoilers
 



 --
 
 http://www.juicability.com - flex blog
 http://www.nospoiler.com - link to youtube videos without the
spoilers




--

http://www.juicability.com - flex blog
http://www.nospoiler.com - link to youtube videos without the spoilers



[flexcoders] Re: Create Flex Ajax Bridge menu option - Crashes FlexBuilder

2008-12-16 Thread cornelcreanga
Yes, the code on Cancel is trying to do some expensive operations (and
this time depends on the number of files from the project), it looks
as a bug. Feel free to create one on JIRA




Re: [flexcoders] application structure

2008-12-16 Thread Barry Gee
Hi Tom.

I am in exactly the same situation as yourself. I am farely new to flex 
and have now found myself at a stage where I want to begin developing 
larger apps that can scale. From the reading I have done around the 
topic and from what I have heard others saying then Pure MVC is a good 
option to take. My understanding is that Cairgorm is very flex specific 
where as Pure MVC is not ( please correct me if im wrong ) it woudl 
sound sensible to then go for the Cairgorm option. However I believe 
Cairgrom is much more difficult to get your head around so decided not 
to try and go straight for Pure MVC.

Just another option for ya.

Hope that helps.

Barry.



Jules Suggate wrote:

 Hi Tom,

 You've hit on one of the classic anti-patterns of Flex programming:
 Application.application.blah type stuff.

 While this is regrettably somewhat 'normal', that doesn't mean it's ok
 :) As you probably have guessed, it leads to code that is really hard
 to change later on as it is all tangled up with itself.

 The solution is to use one of the application patterns that have been
 studied by the GUI programming community in general (not just Flex
 programmers) ... such as MVC (Model-View-Controller).

 Martin Fowler is one of the canonical sources on this stuff:
 http://martinfowler.com/eaaDev/uiArchs.html 
 http://martinfowler.com/eaaDev/uiArchs.html

 Mate, Parsley or Cairngorm are open-source Flex frameworks that
 implement the shell of one or more GUI patterns to save us all
 re-inventing the wheel. Realistically, most people learn the patterns
 by using one of these frameworks or their cousins (there are more, I'm
 just giving a few that are currently flavour of the month).

 Cairngorm has been getting a bad rap lately due to testability of the
 resulting application (or lack thereof), but it's deeply embedded in
 the Flash community (for better or worse).

 Martin Fowler et al will give you an academic understanding, introduce
 you to some code (Martin Fowler uses C# WinForms), explain the finer
 points and describe several variations that you may or may not find
 interesting.

 You've bitten off quite a large topic with that innocuous question ;-)

 Jules

 On Tue, Dec 2, 2008 at 23:56, tom s tcs2...@gmail.com 
 mailto:tcs2201%40gmail.com wrote:
  Hi,
 
  I'm writing my first flex app.
  So far it all works, but I'm getting to the point where I need to start
  structuring it, for ease of further development.
  Right now I simply have many functions defined within the script tag
  within the application.
  I'm now thinking through my options for structuring this better. I'm not
  asking for *specific* structuring recomendations, as I know that 
 would be
  imposisble w/o you knowing the specifics of what I'm doing.
 
  What I'm looking for is a good place to read about the different 
 options, so
  I can learn about them.
  Preferable free online, or in Safari Books Online.
 
  To be clear: when I say structural options I mean things like:
  a) having all the code in the script
  b) putting the code in a seperate .as and point script source= 
 at it (I
  know this is very similar to (a) )
  c) using static methods in a 'static' class
  d) creating classes to fully OOize the code
  e) something else I dont yet know about...
 
  I'm reading 'Advanced Action Script 3 with Design Patterns', which I 
 hope
  will help, but I would like to have some flex specific knowledge 
 also, so
  that I can see examples of how to allow objects outside the 
 application to
  access those defined by mxml within the application (like buttons). I'm
  concerned that will end up with a lot of Application.application.foo 
 type
  code - is that 'normal'?
 
  I'm hoping this makes enough sense...
 
  thanks
 
  tom
 
 

  




[flexcoders] Pattern for capturing multi-key/click actions?

2008-12-16 Thread mookie298347
I would like to add multi-key/click functionality to my Flex app.
There are a couple of slightly different examples of what I mean:

1. Detect when a user is holding down the 'r' key while clicking a button.

2. Detect when a certain component has focus and the user types the
letters 'd' 's' in succession within a few seconds of each other.

I noticed there are properties in the MouseEvent class to detect
things like shift,ctrl and alt keys but I need to detect more than
just those. Additionally those properties don't exist in other event
classes like ItemClickEvent.

What I have done so far is simply create a state object at the
application level that captures all keyboard/mouse events and sets the
state of itself based on the events. Individual components can check
the current state at any time to determine which keys/mouse actions
are currently active. 

I don't particularly like this implementation for many reasons and was
hoping someone knew of a pattern to use considering many applications
support such functionality (Eclipse comes to mind).

Thanks!



RE: [flexcoders] Pattern for capturing multi-key/click actions?

2008-12-16 Thread Kevin Benz
Two and three key sequences

 

  private var _escIsDown:Boolean=false;

  private var _f1IsDown:Boolean=false;

  private var _f2IsDown:Boolean=false;

  private var _f4IsDown:Boolean=false;

 

  private function
onKeyStrokeEvent(event:KeyboardEvent):void {

if(event.keyCode==Keyboard.ESCAPE) {

  this._escIsDown = (event.type ==
KeyboardEvent.KEY_DOWN);

}

if(event.keyCode==Keyboard.F1) {

  this._f1IsDown = (event.type ==
KeyboardEvent.KEY_DOWN);

}

if(event.keyCode==Keyboard.F2) {

  this._f2IsDown = (event.type ==
KeyboardEvent.KEY_DOWN);

}

if(event.keyCode==Keyboard.F4) {

  this._f4IsDown = (event.type ==
KeyboardEvent.KEY_DOWN);

}

if(this._escIsDown  this._f1IsDown 
this._f4IsDown ){

  this.panicFunction();

}

if(this._escIsDown  this._f2IsDown ){

  this.callHome();

}

  }

  

  /**

   *  place code in this function to be executed by
client when instructed by support.

   * */

  private function callHome():void {

DoSomething();

trace(CALL HOME FUNCTION CALLED: );

  }

 

  /**

   *  place code in this function to be executed by
client when instructed by support.

   * */

  private function panicFunction():void {

DoSomethingElse();

trace(PANIC FUNCTION CALLED: );

  }

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of mookie298347
Sent: Tuesday, December 16, 2008 10:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Pattern for capturing multi-key/click actions?

 

I would like to add multi-key/click functionality to my Flex app.
There are a couple of slightly different examples of what I mean:

1. Detect when a user is holding down the 'r' key while clicking a
button.

2. Detect when a certain component has focus and the user types the
letters 'd' 's' in succession within a few seconds of each other.

I noticed there are properties in the MouseEvent class to detect
things like shift,ctrl and alt keys but I need to detect more than
just those. Additionally those properties don't exist in other event
classes like ItemClickEvent.

What I have done so far is simply create a state object at the
application level that captures all keyboard/mouse events and sets the
state of itself based on the events. Individual components can check
the current state at any time to determine which keys/mouse actions
are currently active. 

I don't particularly like this implementation for many reasons and was
hoping someone knew of a pattern to use considering many applications
support such functionality (Eclipse comes to mind).

Thanks!

 

image001.jpgimage002.jpg

[flexcoders] Re: Programmatically managing BlazeDS ServerConfig

2008-12-16 Thread Michael Slinn
That produces a null result, as it should.  The problem seems to be
with the call to ServerConfig.getChannel(channelName).  As I trace
through the call, I see a call to ServerConfig.createChannel('my-amf').

It evaluates xml.channels.channel.(@id == channelId); which of course
returns nothing because the appropriate E4X expression for the
supplied data should be
xml.channels.elements(channel-definition).(@id == channelId).

The only way I could imagine this working is if the XML were
rewritten, converting all 'channel-definition' elements to 'channel'
elements - or perhaps something along the call chain discards the
remainder of the element name when it encounters a dash.

I tested this out by renaming the channel-definition elements to
channel, and modifying the E4X expression to suit, but createChannel()
fails due to an empty string returned from the call to
channelConfig.attribute(CLASS_ATTR).toString().  CLASS_ATTR is defined
as type, and an attribute with that name is optional.

What's the secret?



RE: [flexcoders] Channel documentation errors?

2008-12-16 Thread Stephen Gilson
Please log a bug for that issue.

Thanks,

Stephen

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Michael Slinn
Sent: Tuesday, December 16, 2008 10:14 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Channel documentation errors?


The documentation for Channel.applySettings() says:
Subclasses should override this method to apply any settings that may
be necessary for an individual channel. Make sure to call
super.applySettings() to apply common settings for the channel.

Parameters
settings:XML - XML fragment of the services-config.xml file for this
channel. The following fragement includes the channel tag with all
of its configuration settings:

channel id=my-amf type=mx.messaging.channels.AMFChannel
endpoint uri=/dev/messagebroker/amf
type=flex.messaging.endpoints.AmfEndpoint/
properties
polling-enabledfalse/polling-enabled
/properties
/channel

Ignoring the spelling error (fragement), the documentation appears
to be quite incorrect, if I read the source code correctly.
I'm looking at
flex_sdk_3.0.0.477\frameworks\projects\rpc\src\mx\messaging\Channel.as, and
I see code that references the following properties:
connect-timeout-seconds
record-message-times
record-message-sizes
serialization
enable-small-messages

The polling-enabled property is not mentioned in the Channel code.

PollingChannel extends Channel, and it references the following config
file properties:
polling-enabled
polling-interval-millis
polling-interval-seconds
piggybacking-enabled
login-after-disconnect

None of the above properties are mentioned in the PollingChannel docs.
The polling-enabled property mentioned in the Channel docs is
actually handled by the PollingChannel subclass.

NetConnection extends PollingChannel, and does not reference any new
properties.

AMFChannel extends NetConnection. The AMFChannel docs say that the
config file's property called polling-interval-seconds is read into
the AMFChannel.pollingInterval property.
Also, the docs say that the polling-enabled property in the config
file sets the AMFChannel.pollingEnabled property. As I discovered,
PollingChannel handles these properties, not AMFChannel.

Should I log a bug?

inline: image001.jpginline: image002.jpg

Re: [flexcoders] Dynamic variable for embed image classes?

2008-12-16 Thread Berkay Unal
Ahh right ;)
Thanks for the info.

Best,

Berkay UNAL
berkayu...@gmail.com



On Tue, Dec 16, 2008 at 20:36, Alex Harui aha...@adobe.com wrote:
 Icon_usd is not the name of the class, it is a variable referencing the
 class (what would be returned from getDefinition)



 You can try:



 var classRef:Class = this[icon_ + value]



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Berkay Unal
 Sent: Tuesday, December 16, 2008 9:23 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Dynamic variable for embed image classes?



 Hi,

 I am trying to get the icons that are embeded with a dynamic variable.

 For ex: ikon(usd);

 But cannot make it work. Any ideas?

 //SRC

 [Embed(images/eur.png)]
 private var icon_EUR:Class;

 [Embed(images/usd.png)]
 private var icon_usd:Class;

 [Embed(images/chf.png)]
 private var icon_CHF:Class;

 public function ikon(value:String):Class {
 var t:String = icon_+value;
 var classRef:Class = getDefinitionByName(t) as Class;
 return new classRef();
 }

 Best,

 Berkay UNAL
 berkayu...@gmail.com

 


[flexcoders] Set a default year for editable DateField when using keyboard entry?

2008-12-16 Thread rjblakeleyphx
Hi all.  I've done some googling and searching through the archives,
but I haven't found a solution for my issue.  Specifically, with an
editable DateField control, I'd like the user to be able to enter just
the month and date and have the control set the year to the current
year (although, ideally, it would be nice to have the control set the
year to the earliest year that would result in a date in the present
or future, rather than a past date).  I'm in a schedule crunch right
now, so I need to decide if this should be deferred (if I need to
write a custom control) or if I can get it in for my upcoming release.
 All help is appreciated...thanks!



RE: [flexcoders] Set a default year for editable DateField when using keyboard entry?

2008-12-16 Thread Alex Harui
Replace the parseFunction

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of rjblakeleyphx
Sent: Tuesday, December 16, 2008 10:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Set a default year for editable DateField when using 
keyboard entry?


Hi all. I've done some googling and searching through the archives,
but I haven't found a solution for my issue. Specifically, with an
editable DateField control, I'd like the user to be able to enter just
the month and date and have the control set the year to the current
year (although, ideally, it would be nice to have the control set the
year to the earliest year that would result in a date in the present
or future, rather than a past date). I'm in a schedule crunch right
now, so I need to decide if this should be deferred (if I need to
write a custom control) or if I can get it in for my upcoming release.
All help is appreciated...thanks!



RE: [flexcoders] Directory selection in FLEX

2008-12-16 Thread Wildbore, Brendon
Or you could use remote objects or httpservices to create the directories


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Ashish Verma
Sent: Wednesday, 17 December 2008 1:09 a.m.
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Directory selection in FLEX

As per my information there is only one way to that which is you could create 
directory using Javascript API but within Temp Internet folder by using 
External Interface  or the FA Bridge.

Best,
Ashish
On Tue, Dec 16, 2008 at 4:35 PM, shruti shety 
shruti.she...@yahoo.commailto:shruti.she...@yahoo.com wrote:
Yeah looks like, but was just hoping against hope to see if there is any other 
way of doing it from FLEX apps.



--- On Tue, 12/16/08, Ashish Verma 
verma.lu...@gmail.commailto:verma.lu...@gmail.com wrote:
From: Ashish Verma verma.lu...@gmail.commailto:verma.lu...@gmail.com
Subject: Re: [flexcoders] Directory selection in FLEX
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, December 16, 2008, 4:31 PM

I don't think so that you can do the same from FLEX application since Browser 
security sandbox won't allow you for the same. but same you could using AIR 
with javascript.

Best,
Ashish
On Tue, Dec 16, 2008 at 3:29 PM, shruti shety shruti.sheety@ 
yahoo.commailto:shruti.she...@yahoo.com wrote:
Hi,

 I need a way in my FLEX application which allows the user to create/select the 
directory from the file system.
File reference class doesn't help me this.
I can do this in ADOBE AIR, but i want to know i can integrate this into my 
Flex web application.
Please suggest is there any other way to achieve this functionality.

Thanks,
Shruti












[flexcoders] Re: OLAP

2008-12-16 Thread frielingts
--- In flexcoders@yahoogroups.com, Dominic Pazula domp...@... wrote:

 Has anyone seen or done an integration of with a MDX compliant OLAP 
 server?  If so, would you be willing to share your experience?
 
 Thanks
 Dom


We have been working with Flex OLAP for a while. Any specific
questions? By now you probably have answered all of them. Sorry for
the lateness.



[flexcoders] OLAPDataGrid Modify The headers

2008-12-16 Thread frielingts
Hi,
 I need to add buttons to the column headers of an olapdatagrid so
that i can implement sorting (which is ORDER in MDX). My problem is
that I cannot figure out how to do it for the right headers.  
 In the OLAP grid there is a header for the level/dimension then a
another series of column headers for members.  I know how to
manipulate the first, top-most headers:
 public class PivotOLAPGrid extends OLAPDataGrid
{   
public function PivotOLAPGrid():void
{
super();
//super.headerRenderer=new 
ClassFactory(com.ignite.olap.grid.CheckboxHeaderRenderer);
}
But i cannot figure out how do the same for the second level column
headers.  Any clues or insight?



Re: [flexcoders] Flex dates and time zones.

2008-12-16 Thread Ricky Bacon
Dale Fraser wrote:
 That whole milliseconds past 1970 is a Java thing and has bitten me 
 before, one of many reasons we ditched Java.

It's actually a Unix thing: http://en.wikipedia.org/wiki/Unix_time

The standard has been around for almost 40 years.

-Ricky


[flexcoders] Re: Overlapping interfaces

2008-12-16 Thread jimmy5804
Yeah, I know. First thing I did was to check out the
ListCollectionView code, but didn't see anything obviously special. I
made a test interface stripped down to basics that was just IList,
ICollectionView and one other random property and I still get the
error. I'm not really sure what's up. I'll keep at it and post if I
figure it out.

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

 Our code (ListCollectionView.as) gets away with this.  Comment out
various sections of code to see if you can isolate the problem.  Maybe
you have a private length as well?
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of jimmy5804
 Sent: Tuesday, December 16, 2008 8:25 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Overlapping interfaces
 
 
 I have a custom class that wants to expose IList and ICollectionView.
 Both interfaces define the length parameter and I get an ambiguous
 renference to length error when I try to access length. I believe
 this is essentially a namespace issue, but I don't know how to solve
 it. Suggestions?





[flexcoders] Re: Overlapping interfaces

2008-12-16 Thread jimmy5804
Ok, reduced to bare bones and it's still there:

package {
   public interface ITest extends IList, ICollectionView {
   function get blah():int;
   }
}

in bare WindowedApplication
// tied to initialization event

private function init():void {
  // obvious runtime error, but exposes the compiler issue
  var x:ITestMe;
  var y:int = x.length;
}

--- In flexcoders@yahoogroups.com, jimmy5804 jimmy5...@... wrote:

 Yeah, I know. First thing I did was to check out the
 ListCollectionView code, but didn't see anything obviously special. I
 made a test interface stripped down to basics that was just IList,
 ICollectionView and one other random property and I still get the
 error. I'm not really sure what's up. I'll keep at it and post if I
 figure it out.
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Our code (ListCollectionView.as) gets away with this.  Comment out
 various sections of code to see if you can isolate the problem.  Maybe
 you have a private length as well?
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
 On Behalf Of jimmy5804
  Sent: Tuesday, December 16, 2008 8:25 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Overlapping interfaces
  
  
  I have a custom class that wants to expose IList and ICollectionView.
  Both interfaces define the length parameter and I get an ambiguous
  renference to length error when I try to access length. I believe
  this is essentially a namespace issue, but I don't know how to solve
  it. Suggestions?
 





[flexcoders] Weborb to return XML data

2008-12-16 Thread timgerr
I have been working with weborb and I think it is great.  I am working
on a graph that needs XML data that I have generated via php and
mysql.  I was wondering of Weborb can return XML and if you have any
examples of this.

Thanks for the,
timgerr



[flexcoders] Get data from a cell in a data grid

2008-12-16 Thread danielrkrueger
If I know the RowIndex and the Column number how can I get the data
from the data grid? It seems simple, but I can't seem to find it.



[flexcoders] getting refs to items in Group.mxmlContent?

2008-12-16 Thread Mic
(OK to ask Gumbo questions?)When an .fxg file is loaded into 
FxApplication and added to a Group, and that Group is then added to 
FxApplication, array mxmlContent[0] contains the .fxg Graphic object, 
whose child Groups can be accessed directly by name:

displayGroup.mxmlContent[0].myGroup1

However I cannot access mxmlContent[0] with getChildAt() etc, nor can 
I work out how to extract out references to mxmlContent[0] into 
another array etc so a list can be displayed where a Group object 
might be selected. Can find no info on mxmlContent :-(

code:
  testFXG.fxg contains group id=myGroup1, group id=myGroup2 etc

  private var displayGroup:Group;  
  displayGroup = new Group();
  var source: testFXG= new testFXG();
  displayGroup.addItem(source);
  addItem(displayGroup);

breakpoint shows:

displayGroup
  [inherited]
  mxmlContent
[0]
  myGroup1
  myGroup2
  etc

code:
  private var testGroup:Group;
  testGroup = displayGroup.mxmlContent[0].myGroup1;

 - this is a good reference and can be used to change myGroup1.x, 
myGroup1.y etc. However as stated above I cannot get a reference to 
e.g. the 3rd child etc. As always, TIA,

Mic.



[flexcoders] How many classes are there in flex 3 framework?

2008-12-16 Thread devenhariyani
Its kinda a random question, but anyone know approx. how many classes 
there are in the entire flex framework?

I'm trying to optimizing the size of my SWF filesize and I ran a link-
report.  I'm not sure exactly how to interpret it, but I did notice 
that I have external-defs on about 45 different classes.  Which I don't 
think is very much, but I want to put it into some sort of context by 
knowing how many total classes there are in the flex framework.

Thanks.

--Deven



Re: [flexcoders] Re: Custom event--please help me

2008-12-16 Thread Josh McDonald
Well yeah, I don't actually instantiate it like that (as it will always run
before the constructor), I was just showing an example. I have the whole lot
in a .inc file and include it:

http://pastie.textmate.org/340790

-Josh

On Wed, Dec 17, 2008 at 12:17 AM, Amy amyblankens...@bellsouth.net wrote:

 --- In flexcoders@yahoogroups.com, Josh McDonald dzn...@... wrote:
 
  Don't call new EventDispatcher(), it won't be any real use. The main
  reason you would want to create an instance of EventDispatcher itself
 is
  when you're building a class that is an IEventDispatcher, but
 inherits from
  a base class that is not an IEventDispatcher, because we don't have
 multiple
  inheritance in AS3. When you do that, you need to use something like:
 
  private var myEventDispatcher : IEventDispatcher  = new
  EventDispatcher(this);

 My experience with this is that occasionally that will run before the
 constructor and you'll get an error--it seems to be safer to put the
 assignment statement inside the constructor, even though it makes it a
 PIA to have boilerplate IEventDispatcher code that you copy in when you
 want to add event dispatching.


 

 --
 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






-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] Get data from a cell in a data grid

2008-12-16 Thread Marco Catunda
Daniel,

Generally, components in Flex works with dataprovider.

The question is how can you get data from dataprovider?
Depends on the type of dataprovider is.

How do you set up dataprovider for this grid?

Look at 
http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_1.html


Cheers
--
Marco Catunda



On Tue, Dec 16, 2008 at 7:18 PM, danielrkrueger
danielrkrue...@yahoo.com wrote:
 If I know the RowIndex and the Column number how can I get the data
 from the data grid? It seems simple, but I can't seem to find it.

 


[flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Mic
I read somewhere about 900 as compared to Java's over 15,000 :-)


--- In flexcoders@yahoogroups.com, devenhariyani devenhariy...@...
wrote:

 Its kinda a random question, but anyone know approx. how many classes 
 there are in the entire flex framework?
 
 I'm trying to optimizing the size of my SWF filesize and I ran a link-
 report.  I'm not sure exactly how to interpret it, but I did notice 
 that I have external-defs on about 45 different classes.  Which I don't 
 think is very much, but I want to put it into some sort of context by 
 knowing how many total classes there are in the flex framework.
 
 Thanks.
 
 --Deven





[flexcoders] Re: Command Proxy

2008-12-16 Thread flexaustin
Yes, it answers my question. I was hoping this OS level access would
be available in AIR 1.5.  

@Mike, we need a solution to allow our AIR app to use command proxies.
This app will be installed on half a million users pc's. With that in
mind, and having read your post on the security issue, what would your
decision be? Use this project you started or find another route?

Thanks, J



--- In flexcoders@yahoogroups.com, Mike Chambers mcham...@... wrote:

 You can still use a command proxy architecture with Adobe AIR 1.5 in  
 the same way you could use it with previous versions of Adobe AIR.
 
 It is just a proof of concept, so I havent really done any additional  
 work on it (besisde, c# / .net development is not much fun on Mac).
 
 You can grab the source from here:
 
 http://code.google.com/p/commandproxy/
 
 and find more info here:
 

http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integration-proof-of-concept/
 
 Does that answer your question?
 
 mike chambers
 
 m...@...
 
 On Dec 15, 2008, at 7:38 AM, flexaustin wrote:
 
  I asked this in an earlier post, but hoping Alex can ask Mike Chambers
  about the status of the Apollo + Command Proxy project he started.
  Does anyone know if Command Proxy access is available in Adobe AIR?
 
  When Mike created his project he said that he had hopes for command
  proxy access, when AIR 1.5 came out. Do we have this access yet?
 





Re: [flexcoders] Re: Command Proxy

2008-12-16 Thread Josh McDonald
My .02: If it has to be .net, I'd go with the above link. If it's
cross-platform, I'd go with Merapi. It's officially Alpha, but it seems
pretty stable, and has a good community.

-Josh

On Wed, Dec 17, 2008 at 7:49 AM, flexaustin flexaus...@yahoo.com wrote:

 Yes, it answers my question. I was hoping this OS level access would
 be available in AIR 1.5.

 @Mike, we need a solution to allow our AIR app to use command proxies.
 This app will be installed on half a million users pc's. With that in
 mind, and having read your post on the security issue, what would your
 decision be? Use this project you started or find another route?

 Thanks, J




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Vivian Richard
Please google search flex framework poster and you can download
and view the poster with the class diagrams. Here is a link where you
can see the posters on one of the fellow dev's wall:

http://x-geom.net/blog/wp-content/uploads/2008/04/imag69.jpg

By the way once you download and finish counting the classes
please let me know the number :-). I will also love to know the exact
number of classes.

Best regards





On Tue, Dec 16, 2008 at 1:45 PM, Mic chigwel...@yahoo.com wrote:
 I read somewhere about 900 as compared to Java's over 15,000 :-)

 --- In flexcoders@yahoogroups.com, devenhariyani devenhariy...@...
 wrote:


 Its kinda a random question, but anyone know approx. how many classes
 there are in the entire flex framework?

 I'm trying to optimizing the size of my SWF filesize and I ran a link-
 report. I'm not sure exactly how to interpret it, but I did notice
 that I have external-defs on about 45 different classes. Which I don't
 think is very much, but I want to put it into some sort of context by
 knowing how many total classes there are in the flex framework.

 Thanks.

 --Deven


 


Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Maciek Sakrejda
Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
got some basic tools on our platform and don't have to resort to boorish
counting ;)

find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
\*.as | wc -l
669

If I include projects/* instead (including air, rpc, automation), it's
999.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Vivian Richard kanps...@gmail.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: How many classes are there in flex 3
framework?
Date: Tue, 16 Dec 2008 14:42:49 -0800

Please google search flex framework poster and you can download
and view the poster with the class diagrams. Here is a link where you
can see the posters on one of the fellow dev's wall:

http://x-geom.net/blog/wp-content/uploads/2008/04/imag69.jpg

By the way once you download and finish counting the classes
please let me know the number :-). I will also love to know the exact
number of classes.

Best regards

On Tue, Dec 16, 2008 at 1:45 PM, Mic chigwel...@yahoo.com wrote:
 I read somewhere about 900 as compared to Java's over 15,000 :-)

 --- In flexcoders@yahoogroups.com, devenhariyani devenhariy...@...
 wrote:


 Its kinda a random question, but anyone know approx. how many classes
 there are in the entire flex framework?

 I'm trying to optimizing the size of my SWF filesize and I ran a
link-
 report. I'm not sure exactly how to interpret it, but I did notice
 that I have external-defs on about 45 different classes. Which I
don't
 think is very much, but I want to put it into some sort of context by
 knowing how many total classes there are in the flex framework.

 Thanks.

 --Deven


 



 




RE: [flexcoders] Re: Padding/spacing before the first line in a TextArea

2008-12-16 Thread Gordon Smith
 This has been a long standing bug that I've been complaining to Adobe about.

The new Text Layout Framework that Gumbo components use gives you control over 
the vertical placement of the first line.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Jon Bradley
Sent: Tuesday, December 16, 2008 7:46 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Padding/spacing before the first line in a 
TextArea


You can't manually remove that padding from the field. It's built into the 
field as the ascent of the font + 4 pixels for the natural field border (which 
also cannot be 'removed').

There are only two ways to shift up a field in Flash:

Method 1:
a. Bitmap snapshot of the text field
b. getColorRectBounds on the bitmap in question to retrieve a bounding 
rectangle of the non-alpha pixels.
c. Capture the top position from the Rectangle returned from that call and 
subtract that value from the y-position of the field.

Pros:
Will work every time

Cons:
Additional memory overhead. Tricky to do with the Flex component architecture - 
especially TextArea

Method 2:
a. Capture font metrics from the text field
b. Subtract (metrics.ascent + 4) from the text field y position. It is the 
ascent measurement, not descent.

Pros:
Less memory and less code to deal with.

Cons:
Will not work every time. Ascent and descent measurements from the font metrics 
within Flash are not accurate measurements and are only correct at very, very 
specific font sizes (8, 12, 17, 28, 36, 44 ... etc.).

Almost all point sizes of text return incorrect ascent and descent values in 
Flash. They usually return values less than they really are (7,8,9 point type 
will return the same ascent value for most fonts, for example).

Additionally, you'll still need to extend TextArea to handle the functionality.

Does not function well at all with advanced antialiasing ... also a known bug 
in the Flash text rendering. Saffron antialiasing causes a jump in the leading 
and position values of lines in a field, so don't use it.

--

This has been a long standing bug that I've been complaining to Adobe about. 
I've worked on applications for some big greeting card companies (take a couple 
guesses) creating a rendering system in Flash that will match Photoshop and 
Illustrator text rendering. Illustrator, btw, is the only Adobe application 
that let's you set the first baseline position of a text field using a variety 
of measures.

Good luck.

- jon


On Dec 16, 2008, at 8:53 AM, bjorn wrote:


Any ideas on where I might find more info about this? .. or people who might 
know more ...


2008/12/2 bjorn itrashm...@gmail.commailto:itrashm...@gmail.com
There is some padding before the first line in a TextArea. Have a look at this 
image to see what I mean:

http://i34.tinypic.com/4uz8s0.jpg

I need to remove this, and the first solution that comes to mind is to find 
that value and position the TextArea.y = TextArea.y - [that value]. The padding 
before the first line seems to be equal (in most cases) to the font's descent, 
which I can get from getTextLineMetrics().descent.

However, this is not true in all cases. In some cases, the padding is more.

Anyone have suggestions?





[flexcoders] odd error in the mx.controls::AdvancedDataGridBaseEx

2008-12-16 Thread btroop202
I have a app that has been working fine for over a month, and now all 
of a sudden I get this.  If you know please let me know.

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at 
mx.controls::AdvancedDataGridBaseEx/http://www.adobe.com/2006/flex/mx/
internal::getHeaderInfo()[C:\work\flex\dmv_automation\projects\datavis
ualisation\src\mx\controls\AdvancedDataGridBaseEx.as:2366]
at 
mx.controls::AdvancedDataGrid/http://www.adobe.com/2006/flex/mx/intern
al::getHeaderInfo()[C:\work\flex\dmv_automation\projects\datavisualisa
tion\src\mx\controls\AdvancedDataGrid.as:2147]
at 
mx.controls::AdvancedDataGrid/getFieldSortInfo()[C:\work\flex\dmv_auto
mation\projects\datavisualisation\src\mx\controls\AdvancedDataGrid.as:
6840]
at 
mx.controls.advancedDataGridClasses::AdvancedDataGridHeaderRenderer/ge
tFieldSortInfo()[C:\work\flex\dmv_automation\projects\datavisualisatio
n\src\mx\controls\advancedDataGridClasses\AdvancedDataGridHeaderRender
er.as:757]
at 
mx.controls.advancedDataGridClasses::AdvancedDataGridHeaderRenderer/me
asure()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\
controls\advancedDataGridClasses\AdvancedDataGridHeaderRenderer.as:481
]
at 
mx.core::UIComponent/measureSizes()[C:\autobuild\3.2.0\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:5956]
at 
mx.core::UIComponent/validateSize()[C:\autobuild\3.2.0\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:5902]
at 
mx.managers::LayoutManager/validateSize()[C:\autobuild\3.2.0\framework
s\projects\framework\src\mx\managers\LayoutManager.as:579]
at 
mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\
frameworks\projects\framework\src\mx\managers\LayoutManager.as:692]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at 
mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\framewo
rks\projects\framework\src\mx\core\UIComponent.as:8628]
at 
mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\framewor
ks\projects\framework\src\mx\core\UIComponent.as:8568]




Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Nate Beck
I had the same idea... except using ruby:
require 'find'

dirs =
[/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]

dirs.each do |dir|
  count = 0
Find.find(dir) do |path|
if (path =~ /(\.as|\.mxml)/)
  if(path =~ /\.svn-base/)
#ignore
  else
count += 1
  end
end
end
  puts In #{dir} there are #{count} files that match the filter.
end

OUTPUT:
[/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696 matches
[/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches



On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda msakre...@truviso.comwrote:

   Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
 got some basic tools on our platform and don't have to resort to boorish
 counting ;)

 find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
 \*.as | wc -l
 669

 If I include projects/* instead (including air, rpc, automation), it's
 999.
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com


-- 

Cheers,
Nate

http://blog.natebeck.net


Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Nate Beck
Yours is probably more accurate. :D

On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck n...@tldstudio.com wrote:

 I had the same idea... except using ruby:
 require 'find'

 dirs =
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]

 dirs.each do |dir|
   count = 0
 Find.find(dir) do |path|
 if (path =~ /(\.as|\.mxml)/)
   if(path =~ /\.svn-base/)
 #ignore
   else
 count += 1
   end
 end
 end
   puts In #{dir} there are #{count} files that match the filter.
 end

 OUTPUT:
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696 matches
 [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches



 On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda msakre...@truviso.comwrote:

   Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
 got some basic tools on our platform and don't have to resort to boorish
 counting ;)

 find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
 \*.as | wc -l
 669

 If I include projects/* instead (including air, rpc, automation), it's
 999.
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com


 --

 Cheers,
 Nate
 
 http://blog.natebeck.net





-- 

Cheers,
Nate

http://blog.natebeck.net


Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Vivian Richard
By the way this counting does not include charting, adv data grids.
Am I right?




On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck n...@tldstudio.com wrote:
 Yours is probably more accurate. :D

 On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck n...@tldstudio.com wrote:

 I had the same idea... except using ruby:
 require 'find'
 dirs =
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
 dirs.each do |dir|
   count = 0
 Find.find(dir) do |path|
 if (path =~ /(\.as|\.mxml)/)
   if(path =~ /\.svn-base/)
 #ignore
   else
 count += 1
   end
 end
 end
   puts In #{dir} there are #{count} files that match the filter.
 end
 OUTPUT:
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696 matches
 [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches


 On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda msakre...@truviso.com
 wrote:

 Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
 got some basic tools on our platform and don't have to resort to boorish
 counting ;)

 find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
 \*.as | wc -l
 669

 If I include projects/* instead (including air, rpc, automation), it's
 999.
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com

 --

 Cheers,
 Nate
 
 http://blog.natebeck.net





 --

 Cheers,
 Nate
 
 http://blog.natebeck.net


 


[flexcoders] BitmapData unscaled bounds?

2008-12-16 Thread flexaustin
Is it possible to take a screen shot of a flex app if the apps
components are extended off the stage, say the app is a screen and a
half wide?

When I try to grab a bitmap of Application.application or
Application.application.stage or my main Canvas that holds my app it
all comes back the size of the stage.

TIA



[flexcoders] Re: Bring Alert in front of DownloadProgressBar

2008-12-16 Thread ilikeflex
Thanks for the suggestion. Actually i find a solution, in the override
public function set preloader(preloader:Sprite):void {
   
this.customPreloader = preloader
   
preloader.addEventListener(FlexEvent.INIT_COMPLETE,myHandleInitEnd);
preloader.addEventListener(FlexEvent.INIT_PROGRESS,
myHandleInitProgress); 
} 
I am using the customPreloader.visible = false to hide the progressbar.

Thanks
ilikeflex
 --- In flexcoders@yahoogroups.com,
Haykel BEN JEMIA hayke...@... wrote:

 To hide the progress bar you should override the progress handler
with an
 empty function (or add your own code to show the progress).
 
 Haykel Ben Jemia
 
 Allmas
 Web  RIA Development
 http://www.allmas-tn.com
 
 
 
 
 On Wed, Dec 10, 2008 at 9:23 AM, ilikeflex ilikef...@... wrote:
 
Hi
 
  I am using the preloader in my application. I have override the below
  method.
 
  // Define the event listeners for the preloader events.
  override public function set preloader(preloader:Sprite):void
  {
  preloader.addEventListener
  (FlexEvent.INIT_COMPLETE,myHandleInitEnd);
 
  }
 
  // Event listeners for the FlexEvent.INIT_COMPLETE event.
  private function myHandleInitEnd(event:Event):void {
  Alert.show(Yahooo);
  }
 
  I want this Alert should come in front of DownloadProgressBar. If i
  run above code then Alert is hidden behind the DownloadProgressBar.
  Secondly if we can hide the DownloadProgressBar that will be awesome.
 
  Any pointers will be highly appeciated. I tried using visible=false
  but it does not work.
 
  Thanks
  ilikelfex
 
   
 





RE: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Alex Harui
Not every .as file is a class.  If I had time, I would rename the .swc to .zip, 
pull  the catalog.xml and find a cheap way to count scripts.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Vivian Richard
Sent: Tuesday, December 16, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: How many classes are there in flex 3 framework?


By the way this counting does not include charting, adv data grids.
Am I right?

On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck 
n...@tldstudio.commailto:nate%40tldstudio.com wrote:
 Yours is probably more accurate. :D

 On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck 
 n...@tldstudio.commailto:nate%40tldstudio.com wrote:

 I had the same idea... except using ruby:
 require 'find'
 dirs =
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
 dirs.each do |dir|
 count = 0
 Find.find(dir) do |path|
 if (path =~ /(\.as|\.mxml)/)
 if(path =~ /\.svn-base/)
 #ignore
 else
 count += 1
 end
 end
 end
 puts In #{dir} there are #{count} files that match the filter.
 end
 OUTPUT:
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696 matches
 [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches


 On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda 
 msakre...@truviso.commailto:msakrejda%40truviso.com
 wrote:

 Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
 got some basic tools on our platform and don't have to resort to boorish
 counting ;)

 find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
 \*.as | wc -l
 669

 If I include projects/* instead (including air, rpc, automation), it's
 999.
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com

 --

 Cheers,
 Nate
 
 http://blog.natebeck.net





 --

 Cheers,
 Nate
 
 http://blog.natebeck.net






[flexcoders] Does setting PlayheadupdateInterval time affect videoEvents?

2008-12-16 Thread luvfotography
For the VideoDisplay, 
does setting the 
playheadUpdateInterval=500

cause any bad effects?

When a video finishes, sometimes I'm not getting the
VideoEvent.COMPLETE event.
I have:
myPlayer.addEventListener( VideoEvent.COMPLETE, flexPlayerComplete);

Could this be because the interval is too slow??? and misses it?

Instead, I'm getting a seek event and the video repeats itself, and
then I get the Complete event???

thanks,



RE: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Gordon Smith
And .mxmlc files like RichTextEditor.mxml ARE classes. But does anybody really 
care about an accurate count?

- Gordon

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Tuesday, December 16, 2008 3:46 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: How many classes are there in flex 3 framework?

Not every .as file is a class.  If I had time, I would rename the .swc to .zip, 
pull  the catalog.xml and find a cheap way to count scripts.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Vivian Richard
Sent: Tuesday, December 16, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: How many classes are there in flex 3 framework?


By the way this counting does not include charting, adv data grids.
Am I right?

On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck 
n...@tldstudio.commailto:nate%40tldstudio.com wrote:
 Yours is probably more accurate. :D

 On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck 
 n...@tldstudio.commailto:nate%40tldstudio.com wrote:

 I had the same idea... except using ruby:
 require 'find'
 dirs =
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
 dirs.each do |dir|
 count = 0
 Find.find(dir) do |path|
 if (path =~ /(\.as|\.mxml)/)
 if(path =~ /\.svn-base/)
 #ignore
 else
 count += 1
 end
 end
 end
 puts In #{dir} there are #{count} files that match the filter.
 end
 OUTPUT:
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696 matches
 [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches


 On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda 
 msakre...@truviso.commailto:msakrejda%40truviso.com
 wrote:

 Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
 got some basic tools on our platform and don't have to resort to boorish
 counting ;)

 find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
 \*.as | wc -l
 669

 If I include projects/* instead (including air, rpc, automation), it's
 999.
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com

 --

 Cheers,
 Nate
 
 http://blog.natebeck.net





 --

 Cheers,
 Nate
 
 http://blog.natebeck.net






Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Josh McDonald
A quick copy-n-paste from All Classes in the ASDoc into textmate gives us
1180 public classes in the API.

-Josh

On Wed, Dec 17, 2008 at 10:10 AM, Gordon Smith gosm...@adobe.com wrote:

  And .mxmlc files like RichTextEditor.mxml ARE classes. But does anybody
 really care about an accurate count?



 - Gordon



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Alex Harui
 *Sent:* Tuesday, December 16, 2008 3:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Re: How many classes are there in flex 3
 framework?



 Not every .as file is a class.  If I had time, I would rename the .swc to
 .zip, pull  the catalog.xml and find a cheap way to count scripts.



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Vivian Richard
 *Sent:* Tuesday, December 16, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: How many classes are there in flex 3
 framework?



 By the way this counting does not include charting, adv data grids.
 Am I right?

 On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck 
 n...@tldstudio.comnate%40tldstudio.com
 wrote:
  Yours is probably more accurate. :D
 
  On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck 
  n...@tldstudio.comnate%40tldstudio.com
 wrote:
 
  I had the same idea... except using ruby:
  require 'find'
  dirs =
 
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
  dirs.each do |dir|
  count = 0
  Find.find(dir) do |path|
  if (path =~ /(\.as|\.mxml)/)
  if(path =~ /\.svn-base/)
  #ignore
  else
  count += 1
  end
  end
  end
  puts In #{dir} there are #{count} files that match the filter.
  end
  OUTPUT:
  [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696
 matches
  [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches
 
 
  On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda 
  msakre...@truviso.commsakrejda%40truviso.com
 
  wrote:
 
  Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
  got some basic tools on our platform and don't have to resort to
 boorish
  counting ;)
 
  find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o
 -name
  \*.as | wc -l
  669
 
  If I include projects/* instead (including air, rpc, automation), it's
  999.
  --
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso.com
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 
 
 
 
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 
 
 

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] Flex dates and time zones.

2008-12-16 Thread Paul Hastings
Ricky Bacon wrote:
 It's actually a Unix thing: http://en.wikipedia.org/wiki/Unix_time

no dale's right, java is *milliseconds* since epoch start, unix is *seconds*.


[flexcoders] Re: BitmapData unscaled bounds?

2008-12-16 Thread flexaustin
Getbounds and matrix.translate does the trick.


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

 Is it possible to take a screen shot of a flex app if the apps
 components are extended off the stage, say the app is a screen and a
 half wide?
 
 When I try to grab a bitmap of Application.application or
 Application.application.stage or my main Canvas that holds my app it
 all comes back the size of the stage.
 
 TIA





[flexcoders] Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread devenhariyani
Hey guys,

I recently posted a thread on a popular widget platform site to get 
developer feedback.  Basically, I've created a widget using Flex 
technology, and since I cannot get the SWF file size down to a size  
100KB I'm wondering if Flex was the wrong technology for my project.  
I'm not very familiar with Flash, so I don't know how small I could 
get the file size for a comparable solution in Flash.  Below is the 
original thread.

---

I've created a widget using Adobe's Flex technology which has a SWF 
file size of approx. 350KB.  I've optimized the widget using all the 
techniques I could find such as: compiler flags, not embedding assets 
into the SWF, dynamic loading of modules, etc.

Assuming 350KB is the smallest I can get my SWF file, is this still 
too big to distribute as a widget?  

Here are two distribution strategies we are looking at:

1.) Put the widget on a majority of the pages on our website so when 
users come to our website they will see the widget and download it.  
This will be great for distribution, but currently, our website gets 
a good deal of traffic (Alexa top 10,000 ranking website). And, all 
of the pages on our website are around 60-150KB, and there is a lot 
of worry that a 350KB widget will weigh down the page too much and 
make it very slow when loading.  There is also concern that adding an 
additional 350KB will greatly impact our bandwidth costs since many 
users will hit these pages.

2.) Create a widget gallery on our website where our users can go 
to grab the widget and put it on their MySpace, Facebook, etc.  This 
will keep the rest of the pages on our website light and fast, but 
the distribution of the widget will get severely impacted.

I want to know what other developers are doing in similar situations.

Is Flex the wrong technology for creating widgets?  What are some avg 
size SWF files that other widget developers are creating?  If a 150KB 
page has an additional 350KB flex widget, is it going to greatly 
impact the loading time?

Thanks in advance for your advice!



RE: [flexcoders] Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Jim Hayes
 (so I don't know) how small I could get the file size for a comparable
solution in Flash.
 
Is that the question that you really wanted the answer to?
 
The answer to that will depend on what your widget actually is/does.
Without knowing that, I don't see how anyone can really offer an opinion
on the likely fize size savings.
 
If you could post a url for what you have then it would probably help
you get a more useful answer.
 
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of devenhariyani
Sent: 17 December 2008 01:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Is Flex the wrong technology for widgets? SWF file
sizes are too big...
 
Hey guys,

I recently posted a thread on a popular widget platform site to get 
developer feedback. Basically, I've created a widget using Flex 
technology, and since I cannot get the SWF file size down to a size  
100KB I'm wondering if Flex was the wrong technology for my project. 
I'm not very familiar with Flash, so I don't know how small I could 
get the file size for a comparable solution in Flash. Below is the 
original thread.

---

I've created a widget using Adobe's Flex technology which has a SWF 
file size of approx. 350KB. I've optimized the widget using all the 
techniques I could find such as: compiler flags, not embedding assets 
into the SWF, dynamic loading of modules, etc.

Assuming 350KB is the smallest I can get my SWF file, is this still 
too big to distribute as a widget? 

Here are two distribution strategies we are looking at:

1.) Put the widget on a majority of the pages on our website so when 
users come to our website they will see the widget and download it. 
This will be great for distribution, but currently, our website gets 
a good deal of traffic (Alexa top 10,000 ranking website). And, all 
of the pages on our website are around 60-150KB, and there is a lot 
of worry that a 350KB widget will weigh down the page too much and 
make it very slow when loading. There is also concern that adding an 
additional 350KB will greatly impact our bandwidth costs since many 
users will hit these pages.

2.) Create a widget gallery on our website where our users can go 
to grab the widget and put it on their MySpace, Facebook, etc. This 
will keep the rest of the pages on our website light and fast, but 
the distribution of the widget will get severely impacted.

I want to know what other developers are doing in similar situations.

Is Flex the wrong technology for creating widgets? What are some avg 
size SWF files that other widget developers are creating? If a 150KB 
page has an additional 350KB flex widget, is it going to greatly 
impact the loading time?

Thanks in advance for your advice!
 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

Re: [flexcoders] Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Jamie S
It would be pretty hard to get a Flex app down under 100k. The
Framework itself is larger than that. You could try framework caching.

But if you really want a small file size, you might have to use Flash.

On Tue, Dec 16, 2008 at 5:10 PM, devenhariyani devenhariy...@yahoo.com wrote:
 Hey guys,

 I recently posted a thread on a popular widget platform site to get
 developer feedback. Basically, I've created a widget using Flex
 technology, and since I cannot get the SWF file size down to a size 
 100KB I'm wondering if Flex was the wrong technology for my project.
 I'm not very familiar with Flash, so I don't know how small I could
 get the file size for a comparable solution in Flash. Below is the
 original thread.

 ---

 I've created a widget using Adobe's Flex technology which has a SWF
 file size of approx. 350KB. I've optimized the widget using all the
 techniques I could find such as: compiler flags, not embedding assets
 into the SWF, dynamic loading of modules, etc.

 Assuming 350KB is the smallest I can get my SWF file, is this still
 too big to distribute as a widget?

 Here are two distribution strategies we are looking at:

 1.) Put the widget on a majority of the pages on our website so when
 users come to our website they will see the widget and download it.
 This will be great for distribution, but currently, our website gets
 a good deal of traffic (Alexa top 10,000 ranking website). And, all
 of the pages on our website are around 60-150KB, and there is a lot
 of worry that a 350KB widget will weigh down the page too much and
 make it very slow when loading. There is also concern that adding an
 additional 350KB will greatly impact our bandwidth costs since many
 users will hit these pages.

 2.) Create a widget gallery on our website where our users can go
 to grab the widget and put it on their MySpace, Facebook, etc. This
 will keep the rest of the pages on our website light and fast, but
 the distribution of the widget will get severely impacted.

 I want to know what other developers are doing in similar situations.

 Is Flex the wrong technology for creating widgets? What are some avg
 size SWF files that other widget developers are creating? If a 150KB
 page has an additional 350KB flex widget, is it going to greatly
 impact the loading time?

 Thanks in advance for your advice!

 


Re: [flexcoders] Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Josh McDonald
Depending on what parts of the framework you use, you could probably cut it
right down by not using an Application as the root, and instead using a
custom UIComponent that implements IContainer (some methods might be stubs,
etc). Container has a *lot* of stuff in it. You should be able to lookup how
to do this with google, and (IIRC) there's a lot of comments that will help
in the source for ISystemManager and the implementing classes.

-Josh

On Wed, Dec 17, 2008 at 11:31 AM, Jamie S jsjph...@gmail.com wrote:

 It would be pretty hard to get a Flex app down under 100k. The
 Framework itself is larger than that. You could try framework caching.

 But if you really want a small file size, you might have to use Flash.

 On Tue, Dec 16, 2008 at 5:10 PM, devenhariyani devenhariy...@yahoo.com
 wrote:
  Hey guys,
 
  I recently posted a thread on a popular widget platform site to get
  developer feedback. Basically, I've created a widget using Flex
  technology, and since I cannot get the SWF file size down to a size 
  100KB I'm wondering if Flex was the wrong technology for my project.
  I'm not very familiar with Flash, so I don't know how small I could
  get the file size for a comparable solution in Flash. Below is the
  original thread.
 
  ---
 
  I've created a widget using Adobe's Flex technology which has a SWF
  file size of approx. 350KB. I've optimized the widget using all the
  techniques I could find such as: compiler flags, not embedding assets
  into the SWF, dynamic loading of modules, etc.
 
  Assuming 350KB is the smallest I can get my SWF file, is this still
  too big to distribute as a widget?
 
  Here are two distribution strategies we are looking at:
 
  1.) Put the widget on a majority of the pages on our website so when
  users come to our website they will see the widget and download it.
  This will be great for distribution, but currently, our website gets
  a good deal of traffic (Alexa top 10,000 ranking website). And, all
  of the pages on our website are around 60-150KB, and there is a lot
  of worry that a 350KB widget will weigh down the page too much and
  make it very slow when loading. There is also concern that adding an
  additional 350KB will greatly impact our bandwidth costs since many
  users will hit these pages.
 
  2.) Create a widget gallery on our website where our users can go
  to grab the widget and put it on their MySpace, Facebook, etc. This
  will keep the rest of the pages on our website light and fast, but
  the distribution of the widget will get severely impacted.
 
  I want to know what other developers are doing in similar situations.
 
  Is Flex the wrong technology for creating widgets? What are some avg
  size SWF files that other widget developers are creating? If a 150KB
  page has an additional 350KB flex widget, is it going to greatly
  impact the loading time?
 
  Thanks in advance for your advice!
 
 

 

 --
 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






-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


[flexcoders] Architecture options for holding current model objects related to view

2008-12-16 Thread Aaron Hardy
Hey everyone,

Let me set up a situation for you.  Let's say you have an application 
with a component called Widget1 that's buried deep within the display 
list.  Widget1 displays 50 knobs.  Now, let's say you move to another 
part of the application and click a button that instantiates Widget3 
which shows certain pieces of information about the knob selected on 
Widget1.  Within the display list tree, Widget1 and Widget3 are far from 
each other and nested deep within other views.

In my experience, developers will usually create a property on the 
application's model (ModelLocator in the case of Cairngorm) that's 
called something like currentKnob.  That way when Widget3 is 
instantiated it can know which widget was previously selected in Widget1.

What are the best practices you've seen regarding this type of 
interaction within your applications?  One alternative I can think of is 
if Widget1 dispatches an event off Application that the *creator* of 
Widget3 is watching for.  Then when the creator of Widget3 actually 
creates the Widget3 instance, it can hand off the selected knob to the 
instance.  Thanks!

Aaron


[flexcoders] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread devenhariyani
Thanks for the advice so far.  If I follow the advice not to use the 
Application tag, *and* if I also remove all the MXML and re-write 
the app to use only ActionScript do you think I can get the size down 
to under 200KB?  I think Flex is a great technology, but if its not 
the right tool for the job I will sadly have to go to Flash.

Here's a description:
My widget is not very complicated, it basically does an HttpService 
request to pull some data, then it puts that data into an 
ArrayCollection.  Then there is a timer object that fires every 
second, and when the timer fires it takes one element from the array 
collection, creates a Label and moves it across the canvas screen.

Here's a url for the demo:

http://pine.experienceproject.com/platform_test/widgets/live_cs_widget
.html

BR,
deven


--- In flexcoders@yahoogroups.com, Josh McDonald dzn...@... wrote:

 Depending on what parts of the framework you use, you could 
probably cut it
 right down by not using an Application as the root, and instead 
using a
 custom UIComponent that implements IContainer (some methods might 
be stubs,
 etc). Container has a *lot* of stuff in it. You should be able to 
lookup how
 to do this with google, and (IIRC) there's a lot of comments that 
will help
 in the source for ISystemManager and the implementing classes.
 
 -Josh
 
 On Wed, Dec 17, 2008 at 11:31 AM, Jamie S jsjph...@... wrote:
 
  It would be pretty hard to get a Flex app down under 100k. The
  Framework itself is larger than that. You could try framework 
caching.
 
  But if you really want a small file size, you might have to use 
Flash.
 
  On Tue, Dec 16, 2008 at 5:10 PM, devenhariyani devenhariy...@...
  wrote:
   Hey guys,
  
   I recently posted a thread on a popular widget platform site to 
get
   developer feedback. Basically, I've created a widget using Flex
   technology, and since I cannot get the SWF file size down to a 
size 
   100KB I'm wondering if Flex was the wrong technology for my 
project.
   I'm not very familiar with Flash, so I don't know how small I 
could
   get the file size for a comparable solution in Flash. Below is 
the
   original thread.
  
   ---
  
   I've created a widget using Adobe's Flex technology which has a 
SWF
   file size of approx. 350KB. I've optimized the widget using all 
the
   techniques I could find such as: compiler flags, not embedding 
assets
   into the SWF, dynamic loading of modules, etc.
  
   Assuming 350KB is the smallest I can get my SWF file, is this 
still
   too big to distribute as a widget?
  
   Here are two distribution strategies we are looking at:
  
   1.) Put the widget on a majority of the pages on our website so 
when
   users come to our website they will see the widget and download 
it.
   This will be great for distribution, but currently, our website 
gets
   a good deal of traffic (Alexa top 10,000 ranking website). And, 
all
   of the pages on our website are around 60-150KB, and there is a 
lot
   of worry that a 350KB widget will weigh down the page too much 
and
   make it very slow when loading. There is also concern that 
adding an
   additional 350KB will greatly impact our bandwidth costs since 
many
   users will hit these pages.
  
   2.) Create a widget gallery on our website where our users 
can go
   to grab the widget and put it on their MySpace, Facebook, etc. 
This
   will keep the rest of the pages on our website light and fast, 
but
   the distribution of the widget will get severely impacted.
  
   I want to know what other developers are doing in similar 
situations.
  
   Is Flex the wrong technology for creating widgets? What are 
some avg
   size SWF files that other widget developers are creating? If a 
150KB
   page has an additional 350KB flex widget, is it going to greatly
   impact the loading time?
  
   Thanks in advance for your advice!
  
  
 
  
 
  --
  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
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 Like the cut of my jib? Check out my Flex blog!
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@...
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk





Re: [flexcoders] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Josh McDonald
To be honest with a widget that simple, if you're worried about size just
build it in ActionScript.

-Josh

On Wed, Dec 17, 2008 at 12:36 PM, devenhariyani devenhariy...@yahoo.comwrote:

 Thanks for the advice so far.  If I follow the advice not to use the
 Application tag, *and* if I also remove all the MXML and re-write
 the app to use only ActionScript do you think I can get the size down
 to under 200KB?  I think Flex is a great technology, but if its not
 the right tool for the job I will sadly have to go to Flash.

 Here's a description:
 My widget is not very complicated, it basically does an HttpService
 request to pull some data, then it puts that data into an
 ArrayCollection.  Then there is a timer object that fires every
 second, and when the timer fires it takes one element from the array
 collection, creates a Label and moves it across the canvas screen.

 Here's a url for the demo:

 http://pine.experienceproject.com/platform_test/widgets/live_cs_widget
 .htmlhttp://pine.experienceproject.com/platform_test/widgets/live_cs_widget.html

 BR,
 deven


 --- In flexcoders@yahoogroups.com, Josh McDonald dzn...@... wrote:
 
  Depending on what parts of the framework you use, you could
 probably cut it
  right down by not using an Application as the root, and instead
 using a
  custom UIComponent that implements IContainer (some methods might
 be stubs,
  etc). Container has a *lot* of stuff in it. You should be able to
 lookup how
  to do this with google, and (IIRC) there's a lot of comments that
 will help
  in the source for ISystemManager and the implementing classes.
 
  -Josh
 
  On Wed, Dec 17, 2008 at 11:31 AM, Jamie S jsjph...@... wrote:
 
   It would be pretty hard to get a Flex app down under 100k. The
   Framework itself is larger than that. You could try framework
 caching.
  
   But if you really want a small file size, you might have to use
 Flash.
  
   On Tue, Dec 16, 2008 at 5:10 PM, devenhariyani devenhariy...@...
   wrote:
Hey guys,
   
I recently posted a thread on a popular widget platform site to
 get
developer feedback. Basically, I've created a widget using Flex
technology, and since I cannot get the SWF file size down to a
 size 
100KB I'm wondering if Flex was the wrong technology for my
 project.
I'm not very familiar with Flash, so I don't know how small I
 could
get the file size for a comparable solution in Flash. Below is
 the
original thread.
   
---
   
I've created a widget using Adobe's Flex technology which has a
 SWF
file size of approx. 350KB. I've optimized the widget using all
 the
techniques I could find such as: compiler flags, not embedding
 assets
into the SWF, dynamic loading of modules, etc.
   
Assuming 350KB is the smallest I can get my SWF file, is this
 still
too big to distribute as a widget?
   
Here are two distribution strategies we are looking at:
   
1.) Put the widget on a majority of the pages on our website so
 when
users come to our website they will see the widget and download
 it.
This will be great for distribution, but currently, our website
 gets
a good deal of traffic (Alexa top 10,000 ranking website). And,
 all
of the pages on our website are around 60-150KB, and there is a
 lot
of worry that a 350KB widget will weigh down the page too much
 and
make it very slow when loading. There is also concern that
 adding an
additional 350KB will greatly impact our bandwidth costs since
 many
users will hit these pages.
   
2.) Create a widget gallery on our website where our users
 can go
to grab the widget and put it on their MySpace, Facebook, etc.
 This
will keep the rest of the pages on our website light and fast,
 but
the distribution of the widget will get severely impacted.
   
I want to know what other developers are doing in similar
 situations.
   
Is Flex the wrong technology for creating widgets? What are
 some avg
size SWF files that other widget developers are creating? If a
 150KB
page has an additional 350KB flex widget, is it going to greatly
impact the loading time?
   
Thanks in advance for your advice!
   
   
  
   
  
   --
   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-1e62079f6847https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
   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.
 
  Like the cut of my jib? Check out my Flex blog!
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: j...@...
  :: http://flex.joshmcdonald.info/
  :: http://twitter.com/sophistifunk
 



 

Re: [flexcoders] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Alan
I wouldn't call this 'simple' but I do think your doubts are well  
founded.  Looking at this example, I don't see any real use of Flex.   
You have what looks like some animated state changes and a few  
navigation components -  skipping Flex in this case might be easier.


I do small and large scale Flash dev, sometimes widgets, sometimes  
database crunching translation tools.  I only use Flex when I am  
manipulating lots of data records.


BTW gang, don't forget, t's all ActionScript ;)

Alan


On Dec 16, 2008, at 9:36 PM, devenhariyani wrote:


Thanks for the advice so far. If I follow the advice not to use the
Application tag, *and* if I also remove all the MXML and re-write
the app to use only ActionScript do you think I can get the size down
to under 200KB? I think Flex is a great technology, but if its not
the right tool for the job I will sadly have to go to Flash.




[flexcoders] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread devenhariyani
Does anyone know where I can find some good examples of flex apps 
written completely in ActionScript 3?  I did some quick searches on 
Google, but didn't find much.

I would rather try to re-write the app in AS3 to see if it makes the 
file size manageable, rather than abandon flex completely.

Thanks again, all of you have been very helpful.

--Deven

--- In flexcoders@yahoogroups.com, Alan ultr...@... wrote:

 I wouldn't call this 'simple' but I do think your doubts are well  
 founded.  Looking at this example, I don't see any real use of 
Flex.   
 You have what looks like some animated state changes and a few  
 navigation components -  skipping Flex in this case might be easier.
 
 I do small and large scale Flash dev, sometimes widgets, sometimes  
 database crunching translation tools.  I only use Flex when I am  
 manipulating lots of data records.
 
 BTW gang, don't forget, t's all ActionScript ;)
 
 Alan
 
 
 On Dec 16, 2008, at 9:36 PM, devenhariyani wrote:
 
  Thanks for the advice so far. If I follow the advice not to use 
the
  Application tag, *and* if I also remove all the MXML and re-
write
  the app to use only ActionScript do you think I can get the size 
down
  to under 200KB? I think Flex is a great technology, but if its not
  the right tool for the job I will sadly have to go to Flash.





Re: [flexcoders] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Josh McDonald
What I meant is that you don't seem to be using any Flex functionality
beside ArrayCollection, and you'd do fine using Array or Vector.

On Wed, Dec 17, 2008 at 1:56 PM, devenhariyani devenhariy...@yahoo.comwrote:

 Does anyone know where I can find some good examples of flex apps
 written completely in ActionScript 3?  I did some quick searches on
 Google, but didn't find much.

 I would rather try to re-write the app in AS3 to see if it makes the
 file size manageable, rather than abandon flex completely.

 Thanks again, all of you have been very helpful.

 --Deven

 --- In flexcoders@yahoogroups.com, Alan ultr...@... wrote:
 
  I wouldn't call this 'simple' but I do think your doubts are well
  founded.  Looking at this example, I don't see any real use of
 Flex.
  You have what looks like some animated state changes and a few
  navigation components -  skipping Flex in this case might be easier.
 
  I do small and large scale Flash dev, sometimes widgets, sometimes
  database crunching translation tools.  I only use Flex when I am
  manipulating lots of data records.
 
  BTW gang, don't forget, t's all ActionScript ;)
 
  Alan
 
 
  On Dec 16, 2008, at 9:36 PM, devenhariyani wrote:
 
   Thanks for the advice so far. If I follow the advice not to use
 the
   Application tag, *and* if I also remove all the MXML and re-
 write
   the app to use only ActionScript do you think I can get the size
 down
   to under 200KB? I think Flex is a great technology, but if its not
   the right tool for the job I will sadly have to go to Flash.
 



 

 --
 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






-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


RE: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Alex Harui
Did that include flash.*.* classes?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Josh McDonald
Sent: Tuesday, December 16, 2008 4:23 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: How many classes are there in flex 3 framework?


A quick copy-n-paste from All Classes in the ASDoc into textmate gives us 
1180 public classes in the API.

-Josh
On Wed, Dec 17, 2008 at 10:10 AM, Gordon Smith 
gosm...@adobe.commailto:gosm...@adobe.com wrote:

And .mxmlc files like RichTextEditor.mxml ARE classes. But does anybody really 
care about an accurate count?



- Gordon



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Alex Harui
Sent: Tuesday, December 16, 2008 3:46 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: How many classes are there in flex 3 framework?



Not every .as file is a class.  If I had time, I would rename the .swc to .zip, 
pull  the catalog.xml and find a cheap way to count scripts.



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Vivian Richard
Sent: Tuesday, December 16, 2008 3:17 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: How many classes are there in flex 3 framework?



By the way this counting does not include charting, adv data grids.
Am I right?

On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck 
n...@tldstudio.commailto:nate%40tldstudio.com wrote:
 Yours is probably more accurate. :D

 On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck 
 n...@tldstudio.commailto:nate%40tldstudio.com wrote:

 I had the same idea... except using ruby:
 require 'find'
 dirs =
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
 dirs.each do |dir|
 count = 0
 Find.find(dir) do |path|
 if (path =~ /(\.as|\.mxml)/)
 if(path =~ /\.svn-base/)
 #ignore
 else
 count += 1
 end
 end
 end
 puts In #{dir} there are #{count} files that match the filter.
 end
 OUTPUT:
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696 matches
 [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches


 On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda 
 msakre...@truviso.commailto:msakrejda%40truviso.com
 wrote:

 Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
 got some basic tools on our platform and don't have to resort to boorish
 counting ;)

 find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o -name
 \*.as | wc -l
 669

 If I include projects/* instead (including air, rpc, automation), it's
 999.
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com

 --

 Cheers,
 Nate
 
 http://blog.natebeck.net





 --

 Cheers,
 Nate
 
 http://blog.natebeck.net






--
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.commailto:j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk



RE: [flexcoders] Architecture options for holding current model objects related to view

2008-12-16 Thread Alex Harui
The theoretical advantage of model-view is that there is better abstraction and 
encapsulation so that one view can be modified and not require coding in the 
other view.

Another advantage of central model may come when you try to hook up to browser 
manager.  It might be easier to reflect some of your UI state in a central 
place and drive the app that way.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Aaron Hardy
Sent: Tuesday, December 16, 2008 6:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Architecture options for holding current model objects 
related to view


Hey everyone,

Let me set up a situation for you. Let's say you have an application
with a component called Widget1 that's buried deep within the display
list. Widget1 displays 50 knobs. Now, let's say you move to another
part of the application and click a button that instantiates Widget3
which shows certain pieces of information about the knob selected on
Widget1. Within the display list tree, Widget1 and Widget3 are far from
each other and nested deep within other views.

In my experience, developers will usually create a property on the
application's model (ModelLocator in the case of Cairngorm) that's
called something like currentKnob. That way when Widget3 is
instantiated it can know which widget was previously selected in Widget1.

What are the best practices you've seen regarding this type of
interaction within your applications? One alternative I can think of is
if Widget1 dispatches an event off Application that the *creator* of
Widget3 is watching for. Then when the creator of Widget3 actually
creates the Widget3 instance, it can hand off the selected knob to the
instance. Thanks!

Aaron



RE: [flexcoders] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-16 Thread Alex Harui
Under the covers, MXML is converted to actionscript.  The only way to get 
smaller is to start removing features from the framework.  If you need 
collections or HTTPService or styles or resources or any of that infrastructure 
someday you'll end up with a sizable app even if you do it in AS.  So, 
consider what you can live without not just for today, but going forward.  Can 
you live with just Array because you don't need data update notifications?  Do 
you really need HTTPService or can you just use URLLoader?

Using the framework cache will drop the size of your swf considerably.  I think 
helloworld is about 45K when using the framework cache.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of devenhariyani
Sent: Tuesday, December 16, 2008 7:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Is Flex the wrong technology for widgets? SWF file 
sizes are too big...


Does anyone know where I can find some good examples of flex apps
written completely in ActionScript 3? I did some quick searches on
Google, but didn't find much.

I would rather try to re-write the app in AS3 to see if it makes the
file size manageable, rather than abandon flex completely.

Thanks again, all of you have been very helpful.

--Deven

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alan 
ultr...@... wrote:

 I wouldn't call this 'simple' but I do think your doubts are well
 founded. Looking at this example, I don't see any real use of
Flex.
 You have what looks like some animated state changes and a few
 navigation components - skipping Flex in this case might be easier.

 I do small and large scale Flash dev, sometimes widgets, sometimes
 database crunching translation tools. I only use Flex when I am
 manipulating lots of data records.

 BTW gang, don't forget, t's all ActionScript ;)

 Alan


 On Dec 16, 2008, at 9:36 PM, devenhariyani wrote:

  Thanks for the advice so far. If I follow the advice not to use
the
  Application tag, *and* if I also remove all the MXML and re-
write
  the app to use only ActionScript do you think I can get the size
down
  to under 200KB? I think Flex is a great technology, but if its not
  the right tool for the job I will sadly have to go to Flash.




Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Josh McDonald
Yeah, all public interfaces as well.

On Wed, Dec 17, 2008 at 2:44 PM, Alex Harui aha...@adobe.com wrote:

  Did that include flash.*.* classes?



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Josh McDonald
 *Sent:* Tuesday, December 16, 2008 4:23 PM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: How many classes are there in flex 3
 framework?



 A quick copy-n-paste from All Classes in the ASDoc into textmate gives us
 1180 public classes in the API.

 -Josh

 On Wed, Dec 17, 2008 at 10:10 AM, Gordon Smith gosm...@adobe.com wrote:

 And .mxmlc files like RichTextEditor.mxml ARE classes. But does anybody
 really care about an accurate count?



 - Gordon



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Alex Harui
 *Sent:* Tuesday, December 16, 2008 3:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Re: How many classes are there in flex 3
 framework?



 Not every .as file is a class.  If I had time, I would rename the .swc to
 .zip, pull  the catalog.xml and find a cheap way to count scripts.



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Vivian Richard
 *Sent:* Tuesday, December 16, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: How many classes are there in flex 3
 framework?



 By the way this counting does not include charting, adv data grids.
 Am I right?

 On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck 
 n...@tldstudio.comnate%40tldstudio.com
 wrote:
  Yours is probably more accurate. :D
 
  On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck 
  n...@tldstudio.comnate%40tldstudio.com
 wrote:
 
  I had the same idea... except using ruby:
  require 'find'
  dirs =
 
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
  dirs.each do |dir|
  count = 0
  Find.find(dir) do |path|
  if (path =~ /(\.as|\.mxml)/)
  if(path =~ /\.svn-base/)
  #ignore
  else
  count += 1
  end
  end
  end
  puts In #{dir} there are #{count} files that match the filter.
  end
  OUTPUT:
  [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696
 matches
  [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches
 
 
  On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda 
  msakre...@truviso.commsakrejda%40truviso.com
 
  wrote:
 
  Our FlexBuilder may be in perpetual alpha, but on Linux, at least we've
  got some basic tools on our platform and don't have to resort to
 boorish
  counting ;)
 
  find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o
 -name
  \*.as | wc -l
  669
 
  If I include projects/* instead (including air, rpc, automation), it's
  999.
  --
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso.com
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 
 
 
 
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 
 
 




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@gfunk007.com
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Josh McDonald
A quick bit of regex gives us:

28 Globals (all Flash AFAIK)
3 classes in air.*
235 classes in flash.*
914 public classes in mx.*

On Wed, Dec 17, 2008 at 3:31 PM, Josh McDonald dzn...@gmail.com wrote:

 Yeah, all public interfaces as well.


 On Wed, Dec 17, 2008 at 2:44 PM, Alex Harui aha...@adobe.com wrote:

  Did that include flash.*.* classes?



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Josh McDonald
 *Sent:* Tuesday, December 16, 2008 4:23 PM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: How many classes are there in flex 3
 framework?



 A quick copy-n-paste from All Classes in the ASDoc into textmate gives
 us 1180 public classes in the API.

 -Josh

 On Wed, Dec 17, 2008 at 10:10 AM, Gordon Smith gosm...@adobe.com wrote:

 And .mxmlc files like RichTextEditor.mxml ARE classes. But does anybody
 really care about an accurate count?



 - Gordon



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Alex Harui
 *Sent:* Tuesday, December 16, 2008 3:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Re: How many classes are there in flex 3
 framework?



 Not every .as file is a class.  If I had time, I would rename the .swc to
 .zip, pull  the catalog.xml and find a cheap way to count scripts.



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Vivian Richard
 *Sent:* Tuesday, December 16, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: How many classes are there in flex 3
 framework?



 By the way this counting does not include charting, adv data grids.
 Am I right?

 On Tue, Dec 16, 2008 at 3:14 PM, Nate Beck 
 n...@tldstudio.comnate%40tldstudio.com
 wrote:
  Yours is probably more accurate. :D
 
  On Tue, Dec 16, 2008 at 3:09 PM, Nate Beck 
  n...@tldstudio.comnate%40tldstudio.com
 wrote:
 
  I had the same idea... except using ruby:
  require 'find'
  dirs =
 
 [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src,/workspaces/flex_sdk/trunk/frameworks/projects]
  dirs.each do |dir|
  count = 0
  Find.find(dir) do |path|
  if (path =~ /(\.as|\.mxml)/)
  if(path =~ /\.svn-base/)
  #ignore
  else
  count += 1
  end
  end
  end
  puts In #{dir} there are #{count} files that match the filter.
  end
  OUTPUT:
  [/workspaces/flex_sdk/trunk/frameworks/projects/framework/src] 696
 matches
  [/workspaces/flex_sdk/trunk/frameworks/projects] 1366 matches
 
 
  On Tue, Dec 16, 2008 at 3:02 PM, Maciek Sakrejda 
 msakre...@truviso.com msakrejda%40truviso.com
  wrote:
 
  Our FlexBuilder may be in perpetual alpha, but on Linux, at least
 we've
  got some basic tools on our platform and don't have to resort to
 boorish
  counting ;)
 
  find $FLEX_HOME/frameworks/projects/framework/src -name \*.mxml -o
 -name
  \*.as | wc -l
  669
 
  If I include projects/* instead (including air, rpc, automation), it's
  999.
  --
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso.com
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 
 
 
 
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 
 
 




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@gfunk007.com
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk

  




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@gfunk007.com
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


[flexcoders] problem in WebService help me plz

2008-12-16 Thread NATA RAJAN
Hi All,


The Below code is working very fine . but my need is i want to place the XML 
file instead of parameter (externalServiceParameterInfo). if i print in  XML 
file using Aert it will show correctly..


mx:WebService id=ws_IM 
wsdl=http://125.17.111.152:8600/imedicore/services/ExternalServiceDAO?wsdl; 
service=ExternalServiceDAO
port=ExternalServiceDAOSOAP11Port useProxy=false 
mx:operation name=UpdateAllExternalServiceParameterInfo 
resultFormat=e4x result=ws_IM_result(event) fault=ws_IM_fault(event)
mx:request xmlns=http://www.resilient-networks.com/schemas; 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
inParam
externalServiceParameterInfo
  externalServiceGUID{ExGuid}/externalServiceGUID
  
externalServiceParameterGUID{getAllExSrParam_arr_guid.getItemAt(0)}/externalServiceParameterGUID
  name{getAllExSrParam_arr_names.getItemAt(0)}/name
  typeText/type
  value{getAllExSrParam_arr_values.getItemAt(0)}/value
   /externalServiceParameterInfo
/inParam
/mx:request
/mx:operation
 /mx:WebService




MY CODE IS
~~
[Bindable]
public var inParameter:XMLList = new XMLList(inParam/);


mx:WebService id=ws_IM 
wsdl=http://125.17.111.152:8600/imedicore/services/ExternalServiceDAO?wsdl; 
service=ExternalServiceDAO
port=ExternalServiceDAOSOAP11Port useProxy=false 
mx:operation name=UpdateAllExternalServiceParameterInfo 
resultFormat=e4x result=ws_IM_result(event) fault=ws_IM_fault(event)
mx:request xmlns=http://www.resilient-networks.com/schemas; 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
inParam

{inParameter. externalServiceParameterInfo}  // XML file it 
will print correctly in Alert but not working  here 


/inParam
/mx:request
/mx:operation
 /mx:WebService


XML file
~~

 externalServiceParameterInfo
  externalServiceGUID1200/externalServiceGUID
  
externalServiceParameterGUID1001/externalServiceParameterGUID
  nameLipix/name
  typeText/type
  valueReference/value
  /externalServiceParameterInfo


Plz find me a solution for this WebService parameter issue .

Thanks in Advance


Regards
Natarajan V




  Download prohibited? No problem. CHAT from any browser, without download. 
Go to http://in.webmessenger.yahoo.com/


Re: [flexcoders] getting refs to items in Group.mxmlContent?

2008-12-16 Thread Haykel BEN JEMIA
You should use the content management functions of group to access its
children: numElements(), getElementAt(index:int),
getElementIndex(element:Object) etc.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Tue, Dec 16, 2008 at 10:28 PM, Mic chigwel...@yahoo.com wrote:

   (OK to ask Gumbo questions?)When an .fxg file is loaded into
 FxApplication and added to a Group, and that Group is then added to
 FxApplication, array mxmlContent[0] contains the .fxg Graphic object,
 whose child Groups can be accessed directly by name:

 displayGroup.mxmlContent[0].myGroup1

 However I cannot access mxmlContent[0] with getChildAt() etc, nor can
 I work out how to extract out references to mxmlContent[0] into
 another array etc so a list can be displayed where a Group object
 might be selected. Can find no info on mxmlContent :-(

 code:
 testFXG.fxg contains group id=myGroup1, group id=myGroup2 etc

 private var displayGroup:Group;
 displayGroup = new Group();
 var source: testFXG= new testFXG();
 displayGroup.addItem(source);
 addItem(displayGroup);

 breakpoint shows:

 displayGroup
 [inherited]
 mxmlContent
 [0]
 myGroup1
 myGroup2
 etc

 code:
 private var testGroup:Group;
 testGroup = displayGroup.mxmlContent[0].myGroup1;

 - this is a good reference and can be used to change myGroup1.x,
 myGroup1.y etc. However as stated above I cannot get a reference to
 e.g. the 3rd child etc. As always, TIA,

 Mic.

  



  1   2   >