[flexcoders] Re: changing states from within a component

2007-02-28 Thread stephen50232
Thanks everyone,

I thought that might be the best way to go.

Stephen

--- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote:

 
   Have the login component fire an event upon succesful, or failed,
login.
 
   Have the 'main app respond to the event by changing states (or 
 displaying an error).
 
 At 12:23 PM 2/27/2007, you wrote:
 
 Hi,
 
 I'm working on an application, which is component based. One of my 
 components is a Login screen, in which the user enters the username 
 and password, these details are passed to a ColdFusion CFC and 
 checked, the result is then checked.
 
 If the login is successful I want to be able to change the state in 
 the main application file from the Login state to the Home state, 
 originally I tried using:
 
 this.currentState = 'Home';
 
 But this was in the Login component, which doesn't have states, so 
 that didn't work. What is the best practice for components to call 
 the main application to perform tasks like changing the state?
 
 Thanks
 
 Stephen
 
 
 --
 Jeffry Houser, Software Developer, Writer, Songwriter, Recording
Engineer
 AIM: Reboog711  | Phone: 1-203-379-0773
 --
 My Company: http://www.dot-com-it.com
 My Podcast: http://www.theflexshow.com
 My Blog: http://www.jeffryhouser.com
 Connecticut Macromedia User Group: http://www.ctmug.com





[flexcoders] Re: Result to ArrayCollection - somtimes node is single, sometimes it's an array

2007-02-28 Thread greenfishinwater
This works for me:

if (event.result.price_sets.price_set is ArrayCollection) {
  arr = event.result.price_sets.price_set.source;
} else {
  arr = [event.result.price_sets.price_set];
}

arrCol = new ArrayCollection(arr);

Andrew

--- In flexcoders@yahoogroups.com, darylgmyers [EMAIL PROTECTED] wrote:

 When I use an HTTPService result as an ArrayCollection, certain nodes 
 will be set as a single item or an array depending on the number of 
 items in the node.  Is there a simple way to always force a node to an 
 array regardless of how many items there are?





[flexcoders] Leading spaces for text data trimmed?

2007-02-28 Thread Chua Chee Seng
Hi all,

I have a web service call which return text data from the server side.  
I use e4x for the resultFormat, but to my surprise when read the data 
from actionscript I get leading spaces trimmed.  For example ' Hello' 
will be read as 'Hello'.  I checked the soap message the leading space
(s) is there.  Is there anyway I can preserve the leading space(s) when 
I read the data in actionscript?

Thanks in advance for help.

Best Regards,
Chee Seng



[flexcoders] flex 2 - printing. child disappers from container after i add it to my print

2007-02-28 Thread bhaq1972
Hi 
I have a PrintView template which looks like this

PrintView.mxml
--
mx:VBox
 mx:Label /
 mx:PrintDataGrid/
/mx:VBox

In my printThis() function i decide whether to add an extra child to 
the PrintView. What then happens is, it disappears from the original 
container.

public function printThis(vbox1:MyVBox, bPrint:Boolean)
{
  // create a printjob etc
  ...
  var print_view:PrintView = new PrintView();
  if(bPrint)
  {
print_view.addChildAt(vbox1.child1, 1);//child is another VBox
//after this, child1 disappears from vbox1 (on screen anyway)
  }
}
 
I know it some kind of reference thing but not sure what knowledge 
i'm lacking here. would love to know

regards
bod



Re: [flexcoders] Re: Result to ArrayCollection - somtimes node is single, sometimes it's an array

2007-02-28 Thread leds usop
If the result format is set to object... or not set at
all (default is object), the result will be wrapped by
an ObjectProxy if there's a single node. Hence
Andrew's solution should do the trick.  However, in my
case, to ensure that I can indeed use it as an array i
do:

ArrayUtil.toArray(event.result.SomeNode);

then assign that to arr if its a valid array (or throw
an error if not). then set arr as the source of the
new arraycollection. 


--- greenfishinwater [EMAIL PROTECTED]
wrote:

 This works for me:
 
 if (event.result.price_sets.price_set is
 ArrayCollection) {
   arr = event.result.price_sets.price_set.source;
 } else {
   arr = [event.result.price_sets.price_set];
 }
 
 arrCol = new ArrayCollection(arr);
 
 Andrew
 
 --- In flexcoders@yahoogroups.com, darylgmyers
 [EMAIL PROTECTED] wrote:
 
  When I use an HTTPService result as an
 ArrayCollection, certain nodes 
  will be set as a single item or an array depending
 on the number of 
  items in the node.  Is there a simple way to
 always force a node to an 
  array regardless of how many items there are?
 
 
 
 



 

Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.


[flexcoders] Re: Ely's example of ItemRenderer cause tooltip to be always orange

2007-02-28 Thread vigen2000
Hi Ely,

I know its been a while but I'm still having this problem. can you
please post a short example of the solution? i saw other people who
had the same problem and i could not see it on your website.

thanks a lot for your help,
vigen

--- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote:

  
  
 That's right.
  
 Ely.
 
 [esg]   
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of vigen2000
 Sent: Friday, January 05, 2007 4:55 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Ely's example of ItemRenderer cause tooltip to
 be always orange
 
 
 
 Hi Ely, 
 
 thank you very much for your reply. so if i understand correctly, if i
 take your perColumnColor example and i want the dataTip to have the
 correct color of the column, i need to extend the series class and
 override the findDataTip function, and return the hitdata object with
 the right color?
 
 thanks,
 
 vigen
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Ely Greenfield egreenfi@ wrote:
 
  
  
  
  Hi Vigen. The color used by the datatip is defined by the series, in
  the hitData structure returned from the findDataPoints() method. This
  method is called by the chart to decide what datatips to show and how
 to
  show it. If you want to change the hilight color, you'll need to
  override the findDataPoints() method of your series.
  
  (Or create a new custom datatip).
  
  Ely.
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of vigen2000
  Sent: Thursday, January 04, 2007 1:40 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Ely's example of ItemRenderer cause tooltip to
 be
  always orange
  
  
  
  Hi,
  
  im trying to make something similar to Ely's example of the
  itemRenderer of chart series, like the PerColumnFill (PerColumnColor)
  class. the problem is that if u add tooltip to the chart (showDataTip
  = true) they are always in orange. any ideas on how to solve this?
  
  help...
  Vigen
 





RE: [flexcoders] Storing / retrieving rich text

2007-02-28 Thread Brian Holmes
You need to escape the xml formatting before sending it to the client.
In cold fusion you could use the XMLFormat() function so if you're using
cf, just wrap that around your return, or find a similar function for
the back end lang you're using.


Brian.. 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pdflibpilot
Sent: Monday, February 26, 2007 9:54 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Storing / retrieving rich text

I am trying to develop a method to allow web administrators to be able
to edit text in their Flex application directly in the UI (without
Flex). This text gets saved to mySQL when they close the rich text
editor.  

The data is stored correctly in mySQL however when its retrieved it gets
formated as an XML object when extracted from the event.result.

While this makes it easy to populate the various labels and text objects
with the rich text data. The problem is that the rich text data gets
formatted as XML with new lines and indents. Like in this
dmup

contentLive
  TEXTFORMAT LEADING=2
P ALIGN=CENTER
  FONT FACE=Verdana SIZE=14 COLOR=#FF LETTERSPACING=0
KERNING=0
BThis is /B
FONT COLOR=#0033FF
  B
Ulive content/U
  /B
/FONT
  /FONT
/P
  /TEXTFORMAT
/contentLive

How can I force it to treat it as raw text just like its stored in mySQL
without the formatting ? 



 Yahoo! Groups Sponsor ~--
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links





***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Re: Need help seaching and comparing in an ArrayCollection

2007-02-28 Thread Brian Holmes
Exactly what you need to do sounds a lot like what the filter and sort
functions can do for you, with out all that extra work. I'd check those
out first.
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of e_baggg
Sent: Tuesday, February 27, 2007 11:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Need help seaching and comparing in an
ArrayCollection

That is exactly what you need to do. Create a for loop and get a
handle on each object in the loop. 

Then, set up a method that returns a Boolean if it needs to be flagged.
This method will check the dates. if true, then inside your For loop,
flag the data object.

Note: You can do the conditionals inside the for loop, it's just better
for readability to extract that logic out to another method within the
same class.

--- In flexcoders@yahoogroups.com, Mark [EMAIL PROTECTED] wrote:

 I'm at a bit of a loss right now how to do something.   I'm building 
 an app that shows current and future projects with deploy dates, 
 names, etc.  One thing they want this app to do is to flag projects 
 that are to be deployed within a week of any other project.  In other 
 words, if one is going out the door on March 1 and anther is going out

 on March 3 or February 27, each gets a flag.
 
 I'm really at a loss on how to best go about searching my 
 ArrayCollection for these items.  Can someone please help with how I 
 can get started?  I guess I somehow need to pull out one item at a 
 time from the AC and compare it with all the rest in the AC?
 
 Thanks





 Yahoo! Groups Sponsor ~--
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links





***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Re: ArrayCollection.filterFunction assigned but returns null

2007-02-28 Thread Brian Holmes
I'd imagine there is something wrong with the logic. The way I think
about filterFunction is that it inspects each
Item in a collection and says yes or no. If it's returning null, the
evaluation is flawed.


Brian..

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben.clinkinbeard
Sent: Tuesday, February 27, 2007 7:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ArrayCollection.filterFunction assigned but
returns null

Anyone?


--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:

 I've got a filterFunction assigned, the DataGrid that is bound to the 
 ArrayCollection shows the correctly filtered list, and debugging shows

 that the source Array has 10 items while the collection only has 3.
 However, myCollection.filterFunction returns null.
 
 Anyone have an idea of what could be going on here?
 
 TIA,
 Ben





 Yahoo! Groups Sponsor ~--
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links





***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Re: Flex choking while converting less than 2 MB of data

2007-02-28 Thread Matt Chotin
Can you send us a test-case please?  Instantiating 10,000 objects like
you have shouldn't be so bad as far as I know.

 

Sounds like getting the XML into anonymous objects is OK, it's just the
strongly-typed ones right?

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben.clinkinbeard
Sent: Tuesday, February 27, 2007 1:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex choking while converting less than 2 MB
of data

 

Wow, that sucks REALLY bad. I appreciate the response Karl.

I did try (before posting the original message) setting resultFormat
to e4x and then assembling my objects with pretty much the same
outcome. Are you suggesting I leave the data as XML permanently? I
suppose thats worth a shot but I've found using XML dataProviders to
be a real PITA when making extensive use of itemRenderers and
labelFunctions (like my app does).

Thanks,
Ben

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Karl Johnson [EMAIL PROTECTED]
wrote:

 It is unfortunate, but it is the way it is. When returning large
sets of data like this, we had to stop using webservices returning
objects and change to using webservices returning an XML string or
HTTPServices returning XML. Having the flash player consume a big blog
of XML and then you do what you want with it (like turn it in to AS
XML Objects and use it for a grid's dataprovider, etc) is WAY faster
than letting flex try to deserialize it all and put it all into memory
as strongly typed objects.
 
 One perf test we did in 1.5 was to return three hundred items as
nested, strongly typed objects took about 45 seconds for the FP to
handle the result set and render. When using straight xml, it took
about 2 seconds. Of course it all depends on how large your result set
as well as how deep and nested your objects are.
 
 Karl
 Cynergy
 
 Shameless Plug:
 Come see us at AJAXWorld next month! Several Cynergy employees,
including myself, will be presenting on great Flex topics. Don't miss
it!
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
on behalf of ben.clinkinbeard
 Sent: Tue 2/27/2007 1:42 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Flex choking while converting less than 2 MB
of data
 
 
 
 I am calling a web service that sometimes returns up to 1.9 MB of SOAP
 formatted data. I have left the resultFormat set to object, and it
 seems to handle the initial parsing into anonymous objects without
 much trouble. However, when I attempt to convert this structure into
 class instances the player chokes and usually ends up freezing the
 browser.
 
 The object structure consists of one main Batch object instance, which
 contains 2000 BatchDocument instances, which in turn each contain a
 single ClientInfo object instance and up to four Plan object
 instances. This doesn't seem like a structure that Flex should fail so
 miserably with as the performance everywhere else has been pretty
 impressive. I have attempted this using Darron Schall's
 ObjectTranslator class
 (http://www.darronschall.com/weblog/archives/000247.cfm
http://www.darronschall.com/weblog/archives/000247.cfm 
http://www.darronschall.com/weblog/archives/000247.cfm
http://www.darronschall.com/weblog/archives/000247.cfm  ) as well as
 simply passing the anonymous objects to my class constructors. Both
 result in a completely unusable application.
 
 Any help is greatly appreciated.
 
 Ben


 



RE: [flexcoders] how do you call the super's super?

2007-02-28 Thread Gordon Smith
There is no super.super syntax in AS3. What you want can only be done
indirectly, such as through a scheme like this:
 
class A
{
function foo():void { trace(1); }
}
 
class B extends A
{
function $foo():void { super.foo(); }
override function foo() { trace(2) };
}
 
class C extends B
{
// can call $foo() to execute A's foo()
}
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Anthony Lee
Sent: Monday, February 26, 2007 8:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how do you call the super's super?



Hi,

Sorry for the lame AS questions, but can anyone tell me how to call
the super method of the class I'm extending? ie. the grandparent and
not the parent.

Thanks,

tonio


 


RE: [flexcoders] DataGrid to Xml

2007-02-28 Thread Brian Holmes

Just as simple: lose the array




mx:DataGrid id=grid dataProvider={myXmlListCollection()}
width=100% height=100% e 
mx:columns
   mx:DataGridColumn dataField=NAME headerText=NAME/
   mx:DataGridColumn dataField=TITLE headerText=TITLE
width=75 /
  /mx:columns
/mx:DataGrid


As opposed to


mx:DataGrid id=grid dataProvider={myArrayCollection()} width=100%
height=100% e 
mx:columns
   mx:Array
 mx:DataGridColumn dataField=NAME headerText=NAME/
 mx:DataGridColumn dataField=TITLE headerText=TITLE
width=75 /
   /mx:Array
  /mx:columns
/mx:DataGrid
 


Brian...

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jaap Cammeraat
Sent: Tuesday, February 27, 2007 8:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid to Xml

Hi all,

To populate a DataGrid is simple thru binding an ArrayCollection.
Is there also a simple way to save the DataGrid (or ArrayCollection) as
Xml?

Regards
Jaap Cammeraat


 Yahoo! Groups Sponsor ~--
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/kOt0.A/gOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links





***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Basic inheritance question

2007-02-28 Thread Gordon Smith
The Developer's Guide is wrong... you won't get a compilation error if
you don't cast. However, casting is best practice so that the compiler
can help you catch coding mistakes. For example,
 
e.currentTarget.setSytle(...)
 
would compile despite the typo, but throw a runtime error. However,
 
Button(e.currentTarget).setSytle(...)
 
would not compile.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Johnson
Sent: Tuesday, February 27, 2007 10:27 AM
To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Basic inheritance question



In general you always want to cast something like this - because
event.currentTarget is of type object and NOT UIComponent or Button. But
since objects are loosely typed as type Object, then you reference any
property or method you want at compile time. Often at runtime though you
will hit errors unless it is properly casted. Your sample application
was done in Flex 2 right?
 
Definitely a best practice to be casting generic objects like this to
the type of object you want to be working with to avoid runtime errors
 
Karl
Cynergy



From: flexcoders@yahoogroups.com on behalf of jairokan
Sent: Tue 2/27/2007 11:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Basic inheritance question



Hi,
I'm reading the Developer's Guide and in the section using Events, they
say on a paragraph that :
If you try to call another method on the currentTarget (for example,
the setStyle() method), Flex returns an error. The setStyle() method is
defined on UIComponent, a subclass of DisplayObject. Therefore, you must
cast currentTarget to UIComponent before calling the setStyle() method
for example:
mx:Script
![CDATA[
 import mx.core.UIComponent;

 private function myEventHandler(e:Event):void {
UIComponent(e.currentTarget).setStyle(color, red);
 }
  ]]
/mx:Script

and e.currentTarget is of type Button. But Button extends UIComponent,
so we don't have to upcast the reference because setStyle method is
public and is available to Button object reference0. I tried the code
without upcasting and it works.
Is the writer wrong or Am I missing something on the concept.

Thanks

Jairo

 

 


Re: [flexcoders] Using Flex Components in an ActionScript Project

2007-02-28 Thread Daniel Freiman

Check to make sure the size of the TextArea (and it's parents) aren't 0.

- Dan

On 2/26/07, August Gresens [EMAIL PROTECTED] wrote:


  Hello

We're putting together an ActionScript Project with FlexBuilder and
would like to use the TextArea component.

We've had success including the proper libraries and getting this to
compile, but it doesn't show up when added an instance of TextArea to a
DisplayObjectContainer (a Sprite).

Does anyone have any info about how to get this to work?

Thanks,

August

--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

 



RE: [flexcoders] How do I prevent the user from selecting text in a text area component?

2007-02-28 Thread Brian Holmes
editable=false



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Robin Burrer
Sent: Monday, February 26, 2007 6:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I prevent the user from selecting text in a
text area component?



Hi there,

 

How do I prevent the user from selecting text in a text area component?


I noticed that it does not have a selectable property and does not
derive from the Text object either.

 

 

Robin

 


***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Transitions Explanation

2007-02-28 Thread Brian Holmes
The problem is a timing issue. 
 
view states define what and how to change states
transitions define which order visual changes occur during a state
change
You must still take into account the timing of when things are rendered
to the screen
 
On Your problem the button was getting rendered on the screen and then
the effect being applied. To get those fade in's and fade out's to
appear normal you have to trap for them a bit
using the creationCompleteEffect, showEffect and hideEffect. 
 
 
Try this:
 
I took the fadeIn out of the transition and set the effects on button2
and also the visible to false, when the button is rendered to the screen
it's hidden and then I set the visible = true
which applies the fadeIn. The creationCompleteEffect applies the fadeIn
the first time the component is rendered, after that, it uses the
showEffect
 
 
 
--brian..
 
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute 
 
mx:transitions
mx:Transition fromState=* toState=*
mx:Sequence
mx:Resize duration=500 target={panel1}/
/mx:Sequence
/mx:Transition
/mx:transitions
  
 
 mx:Fade id=fadeIn duration=1000 alphaFrom=0.0 alphaTo=1.0/
 
mx:states
mx:State name=bigger
mx:SetStyle target={panel1} name=bottom value=10/
mx:SetEventHandler target={button1} name=click
handler=currentState='';/ 
mx:AddChild relativeTo={controlbar1} position=before
mx:Button x=10 y=10 id=button2
showEffect={fadeIn} creationCompleteEffect={fadeIn} visible=false
/
/mx:AddChild 
mx:SetProperty target={button2} name=visible
value=true/
/mx:State
/mx:states

mx:Panel layout=absolute top=10 left=10 bottom=300
right=10 title=Panel 1 id=panel1 
mx:ControlBar id=controlbar1
mx:Button label=Click Me click=currentState='bigger';
id=button1/
/mx:ControlBar 
/mx:Panel

/mx:Application
 
 
 
 
 
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Neil Middleton
Sent: Monday, February 26, 2007 7:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Transitions Explanation


Can anyone explain transistions to me as I'm currently having trouble
getting it.

I have the code below which is working almost exactly as I expect -
except for an issue with the appearing button control in the panel.  I
would expect this button to Fade in as the Resize finishes, but there is
obviously something I'm not quite understanding. 

Cheers in advance:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute 

mx:transitions
mx:Transition fromState=* toState=*
mx:Sequence
mx:Resize duration=500 target={panel1}/ 
mx:Fade duration=500 target={button2}/
/mx:Sequence
/mx:Transition
/mx:transitions

mx:states
mx:State name=bigger
mx:SetStyle target={panel1} name=bottom value=10/
mx:SetEventHandler target={button1} name=click
handler=currentState='';/ 
mx:AddChild relativeTo={controlbar1} position=before
mx:Button x=10 y=10 id=button2/
/mx:AddChild 
/mx:State
/mx:states

mx:Panel layout=absolute top=10 left=10 bottom=300
right=10 title=Panel 1 id=panel1 
mx:ControlBar id=controlbar1
mx:Button label=Click Me click=currentState='bigger';
id=button1/
/mx:ControlBar 
/mx:Panel

/mx:Application

-- 
Neil Middleton

Visit feed-squirrel.com  


***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] list of events really dispatched by a view

2007-02-28 Thread Gordon Smith
Take a look at the 'events' property of ComponentDescriptor. Each
UIComponent like Canvas and Button has 'descriptor' property for
accessing its UIComponentDescriptor, which extends ComponentDescriptor.
But this will only tell you about event handlers written as MXML
attributes.
 
If you need to know about all event handlers added using AS, I think
you'd have to recompile the framework with an override of
addEventListener() in UIComponent. But then you'll get all the event
handlers that the framework adds as well.
 
BTW, what are you trying to do with this?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Eric Guesdon
Sent: Tuesday, February 27, 2007 2:10 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] list of events really dispatched by a view



Hi to All,

I'm looking to get the list of events really connected in a view.

For example:

mx:Canvas 
xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
creationComplete=dispatchEvent (new Event
('myViewCreationCompleteHandler')) 

mx:Button id=myButton click=dispatchEvent (new Event
('myButtonClickHandler')) / 

/mx:Canvas

So I would like to get 
[creationComplete , click] and [myViewCreationCompleteHandler ,
myButtonClickHandler]

In precedent version of actionscript I existed an attributes named
_listeners... but unfortunately this one has been deprecated...

Do you know if it exists a substitute?

Thanks in advance

Eric 



 


RE: [flexcoders] Dispatching an event between 2 classes -

2007-02-28 Thread Gordon Smith
 My class that is adding the event listener is like this :
_caption = new Caption();
 this.addEventListener(MeEvent.STOP,pauseStop);
 and from my calling class:
var evt:MeEvent = new MeEvent(MeEvent.STOP);
 
This code doesn't really give enough detail to diagnose the problem.
What is the relevance of _caption? Is your calling (i.e., dispatching)
class actually calling dispatchEvent(evt)? It's best to post a complete
-- but as small as possible -- app that doesn't work, so we can
determine exactly what the problem is.
 
However, I suspect that the problem is that your listening class is
calling
 
this.addEventListener(MeEvent.STOP, ...)
 
which means that it is listening to a STOP event which is dispatched by
'this' -- i.e., by the listener. But you want your listener to listen
for a STOP event dispatched by your dispatching class, so you want to
call
 
instanceOfDispatchingClass.addEventListener(MeEvent.STOP, ...)
 
In other words, you add listeners to the dispatching object.

 I am implementing the IEventDispatcher class instead of extending the
EventDispatcher class

Why do you need to do that?

 My application uses all actionscript no flex.

IEventDispatcher and EventDispatcher are part of the Flash Player, not
part of the Flex Framework.

- Gordon

--

Gordon,

I'm just trying to finish a project and maybe I'm missing something. 

I've posted and I just am real dumbfounded why I am stuck and my 

listener's aren't working.

I've looked at some examples in a few texts and did some research and I 

am using your example below, I must be doing something silly. My 

project is based on a earlier post from you though I am implementing the


IEventDispatcher class instead of extending the EventDispatcher class

My application uses all actionscript no flex.

Sorry to ask for help directly. I am just stumped and trying to finish 

this project, which was going smoothly until this hiccup.

Thanks for your time,

Patrick

from your post...

Only the second class -- the one that dispatches the event by calling 

dispatchEvent() -- needs to extend EventDispatcher. You don't need to be


an EventDispatcher to listen to events.

The dispatching class must declare [Event] metadata if you want to write


listeners in MXML.

If your first class -- the one that listens -- is written in AS, you 

register for the event by calling addEventListener():

instanceOfDispatchingClass.addEventListener(someEventType, 

myEventHandler);

You would normally do this immediately after creating 

instanceOfDispatchingClass.

- Gordon




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick Lemiuex
Sent: Tuesday, February 27, 2007 5:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dispatching an event between 2 classes -



Flex People... Please help...

I have two classes fully loaded with inheritance... I'm trying to 
make an event from one class fire back at the class that called it 
like in my example below. Since, AS only supports single level 
inheritance, calling super is not available to me.

This has been a real block in understanding how to program events 
correctly, I keep running into this issue. I know how to extend the 
event Class and I know how to use composition to make a custom Event 
Dispatcher. I still can't seem to get my events to work with either 
situation.

My class that is adding the event listener is like this :

_caption = new Caption();
this.addEventListener(MeEvent.STOP,pauseStop);

and from my calling class:

var evt:MeEvent = new MeEvent(MeEvent.STOP);

I guess I am missing something fundamental in my approach to event 
management in actionscript

Thanks,
Patrick


 


RE: [flexcoders] How does sprite listener work?

2007-02-28 Thread Gordon Smith
It's not obvious to me why that would be happening.  Can you post the
code for a simple app which demonstrates the problem?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sandwish
Sent: Tuesday, February 27, 2007 11:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How does sprite listener work?



I new a sprite and addeventlistener which listens roll_over and
roll_out event. But after a circle is drawn with beginfill and
endfill, each time I roll inside the circle, both events get invoked.
I don't know why? :(

Thanks in advance!
Regards,
Sand



 


Re: [flexcoders] how do you call the super's super?

2007-02-28 Thread Daniel Freiman

You can't.  I wish you could, but you can't.

- Dan

On 2/26/07, Anthony Lee [EMAIL PROTECTED] wrote:


  Hi,

Sorry for the lame AS questions, but can anyone tell me how to call
the super method of the class I'm extending? ie. the grandparent and
not the parent.

Thanks,

tonio
 



RE: [flexcoders] How can I access public members of custom MXML component using inline statemen ?

2007-02-28 Thread Gordon Smith
What you're doing should work. Post a sample app and component that
don't work.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of helihobby
Sent: Tuesday, February 27, 2007 5:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How can I access public members of custom MXML
component using inline statemen ?



Hello all,

How can I access public members of custom MXML component using inline 
statemen ?

For example, I have my own MXML component name myComp which has 
public members.

How can I access these public member from inling mxml.

In other words, of couse I can do myComp.myMember = ABC;

But I wish to do it not in ActionScript but in MXML ( inline ).

In other words, I wish to do:

myview:MyComp x=100 y=100 myMember=ABC /

In other words, in line MXML ( not in AS ).

I tried using the setter function in myComp, but no luck.

As always, Thank you for all the help and support.

Regards,

Sean - http://www.HeliHobby.com http://www.HeliHobby.com 

P.S.

You can read my solution for Flex Component communication here:

http://www.helihobby.com/html/alon_desingpattern.html
http://www.helihobby.com/html/alon_desingpattern.html 

public function doThis():void {
}

Now I want 

ns1 leDisplay id=viewerContainer x=263 y=85
/ns1 leDisplay



 


Re: [flexcoders] Flex Builder Syntax Highlighting Not Working

2007-02-28 Thread feiy

give me the detail about your mxml code!maybe the namespace define error

2007/2/27, mark_c_robinson [EMAIL PROTECTED]:


  Has anyone experienced syntax highlighting for the Flex Builder plugin
(2.0.1) in Eclipse (3.2.1) failing all together or at best working
sporadically?

And has anyone determined a fix?

 





--
闲云孤鹤 - 清冷香中抱膝吟


Re: [flexcoders] How can I access public members of custom MXML component using inline statemen ?

2007-02-28 Thread feiy

the public property must defined :
private _prog;
public function set somPro(String:prog):void{
   this._prog=prog;
}
public function get somPro():String{
   return  this._prog;
}

usage within mxml

component somPro=value /

2007/2/28, helihobby [EMAIL PROTECTED]:


  Hello all,

How can I access public members of custom MXML component using inline
statemen ?

For example, I have my own MXML component name myComp which has
public members.

How can I access these public member from inling mxml.

In other words, of couse I can do myComp.myMember = ABC;

But I wish to do it not in ActionScript but in MXML ( inline ).

In other words, I wish to do:

myview:MyComp x=100 y=100 myMember=ABC /

In other words, in line MXML ( not in AS ).

I tried using the setter function in myComp, but no luck.

As always, Thank you for all the help and support.

Regards,

Sean - http://www.HeliHobby.com

P.S.

You can read my solution for Flex Component communication here:

http://www.helihobby.com/html/alon_desingpattern.html

public function doThis():void {
}

Now I want

ns1 leDisplay id=viewerContainer x=263 y=85
/ns1 leDisplay

 





--
闲云孤鹤 - 清冷香中抱膝吟


RE: [flexcoders] Re: Just curious, A big development team or individual developers

2007-02-28 Thread Roger Gonzalez
Modules were a point-release feature that were released earlier than the
corresponding IDE support so that we could get feedback from the
community about what people wanted.
 
If we had waited to get Module support into FlexBuilder, you wouldn't
have seen Modules until 3.0.
 
Would that have been preferable to you?
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of - FI / Jonas Eliasson +
Sent: Monday, February 26, 2007 8:24 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Just curious, A big development
team or individual developers



We are a team of 6 developers working on a flex project from two
offices
using SVN. We have a modular setup where we use different RSL's
and external
modules which are pulled in from a main application. This way we
can work
independently. 

I have been developing Adobe (Macromedia) products for about 5
years and
this time I was hoping for a solid product. But right now it
feels like I am
a paying beta tester... Flexbuilder is not easy to setup for a
modular
application approach. Right now we are using the Flex SDK and
ANT which
makes it easier to set up a large application with many external
modules and
RSL's. Now we only use Flexbuiler for the text editor and step
debugger.
$500 for a text editor, silly huh! Hopefully we will se good
updates in the
near future. 

Jonas 

-Original Message-
From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
Behalf Of softwarecat
Sent: den 23 februari 2007 15:35
To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: Just curious, A big development team
or individual
developers

For our project it is a TEAM of 2. I am entirely new to flex and
AS3 
with more of a design/html background. I'm now knee (sometimes
it 
feels neck deep) in the front end design while my partner is
more 
code PHP background is providing the code and architectures. It 
seems to work.

We are sharing with CVS through flex builder, but it is tough to
work 
on the main file (commit - update issues maybe someone has some

advice on this area). It is working, but we are only 6 weeks in
and 
development has definately been slowed by our learning curve,
But 
with that said I'm head over heels in love with Flex and AS.

We plan to add an additional developer over the next two weeks
(any 
ideas where to find a respectable one?)

--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com ,
Robert Chyko [EMAIL PROTECTED] wrote:

 For the project I am on now, it is just me.
 
 For the project that is being designed it will be a team. We
have 3
 inhouse Flex devs currently (myself and 2 others) and will
either be
 hiring more or bringing in some consultants.
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com ]
On Behalf Of boy_trike
 Sent: Friday, February 23, 2007 1:57 PM
 To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Just curious, A big development team or
 individual developers
 
 
 
 I wonder how many people are working on TEAM to develop their
 flex applications (and how 
 many are 1 or 2 men (whoops I mean PEOPLE) developers. Please
 discount the Graphic 
 artists, HTML coders. et. al. If you have 3 or more people
 working on the same flex 
 application, please answer as a TEAM. 2 or 1, INDIVIDUAL.
 
 Thanks
 Bruce




 



Re: [flexcoders] Annoying IE Error (Works in All other browsers!)

2007-02-28 Thread Douglas Knudsen

sounds like a caching issue.  Been running into this too.  Will depend on
your browser settings though.

how are you fetching this data?

DK

On 2/26/07, danneri21 [EMAIL PROTECTED] wrote:


I have a Flex app, an administration panel for one of my clients site.

There is a section where the client can add / delete/ edit advertising
supporters.

There are three states, one to create the new supporters, one to view all
the supporters, and then from there edit the sponsers or delete them.

Here is it running live :
http://www.reinvestorsnetwork.net/new/admin/main.html
You can sign in using test / test for now.  (Advertising Supporters-
Manage Existing Advertisers)

A Datagrid should come up. As soon as you click delete and say yes you are
sure you want to delete it, the datagrid should automatically refresh and
the deleted sponser shouldn't be there anymore. However in Internet Explorer
7 / SP2 it doesn't. Any dynamic updating doesn't work!!

It's really frustrating. I've tried it in Firefox  Opera and they both
work.

Can anybody point me in the right direction?

I can post the source code to my main.mxml file if you wish, but it's
extremely messy and poorly coded [image: :p]






--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


Re: [flexcoders] ArrayCollection length

2007-02-28 Thread feiy

u can use the 
mx.collectionsfile:///home/feiy/Programs/Flex2/flex201_documentation/langref/mx/collections/package-detail.html.ArrayCollection
's 
filterFunctionfile:///home/feiy/Programs/Flex2/flex201_documentation/langref/mx/collections/ListCollectionView.html#filterFunction:
Functionfile:///home/feiy/Programs/Flex2/flex201_documentation/langref/Function.htmlproperty

2007/2/28, Mehul Doshi [EMAIL PROTECTED]:



If I have my dataprovider in the following manner:

var dataProvider = [{Date: 02-12-2007, Company1: 20, Company2: 30},
{Date: 02-09-2007, Company1: 20, Company2: 30},
{Date: 02-08-2007, Company1: 20, Company2: 30}]

How can I determine programatically:

1. The number of companies.
I dont't seem to be able to figure out how to find the number of
items in a particular element of the ArrayCollection.

2. Is there a way to structure the dataProvider so that I can also
include the company names. Thus, I can use those names for my legend.

Thanks.



 





--
闲云孤鹤 - 清冷香中抱膝吟


Re: [flexcoders] Dispatching an event between 2 classes -

2007-02-28 Thread Doug McCune

In your caption class do you have the call to dispatchEvent?

try this:

var evt:MeEvent = new MeEvent(MeEvent.STOP);
this.dispatchEvent(MeEvent);

Doug


On 2/27/07, Patrick Lemiuex [EMAIL PROTECTED] wrote:


  Flex People... Please help...

I have two classes fully loaded with inheritance... I'm trying to
make an event from one class fire back at the class that called it
like in my example below. Since, AS only supports single level
inheritance, calling super is not available to me.

This has been a real block in understanding how to program events
correctly, I keep running into this issue. I know how to extend the
event Class and I know how to use composition to make a custom Event
Dispatcher. I still can't seem to get my events to work with either
situation.

My class that is adding the event listener is like this :

_caption = new Caption();
this.addEventListener(MeEvent.STOP,pauseStop);

and from my calling class:

var evt:MeEvent = new MeEvent(MeEvent.STOP);

I guess I am missing something fundamental in my approach to event
management in actionscript

Thanks,
Patrick
 



Re: [flexcoders] text line height

2007-02-28 Thread Daniel Freiman

If you want the height of the entire text component, you can use the
textHeight property.  If you're looking for a specific line, you going to
want to use getLineMetrics().

- Dan

On 2/26/07, Pablo Samela [EMAIL PROTECTED] wrote:


   Hi,

I want to know how can I set the line height to a text component. I tried
to use the leading property, but It´s not the minimun necesary.

Thanks,

Paul

 



Re: [flexcoders] Finding out when an arraycollection in my model is set

2007-02-28 Thread Douglas Knudsen

Nice.  What if in this case user.projects.myArrayCollection contained a
arraycollection of tasks, and each tasks had a array collection of
activities.  how do you watch for a change in a activity and fire
dataGrid.invalidateList(); ??

DK

On 2/24/07, Yiðit Boyar [EMAIL PROTECTED] wrote:


i had a similar problem; when an array collection in my model is changed;
my datagrid should be refreshed so here is my code: (here ; user.projectsis an 
arrayCollection)
in the creation complete of the mxml file :
ModelVT.getInstance
().user.projects.addEventListener(collectionChange,dgYenile);
private function dgYenile(e:Event):void{
dataGrid.invalidateList();
}

- Original Message 
From: Webdevotion [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Saturday, February 24, 2007 11:20:34 PM
Subject: [flexcoders] Finding out when an arraycollection in my model is
set

 Hello,

How can I now when my arraycollection in my modellocator is filled with
items ?
I tried using collectionEvent. collection_ change, but it does not fire
when
setting my AC like this in my command, after the remoting result handler:

model.library = new ArrayCollection( data.result) ;

What is the correct way ? ( I'm using Cairngorm )



--
It's here! Your new message!
Get new email 
alertshttp://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/with
 the free Yahoo!
Toolbar. 





--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


Re: [flexcoders] flash cookie

2007-02-28 Thread Muzak
AFAIK, nope.

regards,
Muzak

- Original Message - 
From: thierrybertossa [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, February 27, 2007 2:38 PM
Subject: [flexcoders] flash cookie


Is it possible to store a cookie (LSO) from a domain www.x.com and
then access this cookie from a .swf played outside internet explorer or
mozilla (in flash player directly) if we know the name of the domain
www.x.com ??

thanks





[flexcoders] Re: Modules and Cairngorm - Solution... I think

2007-02-28 Thread Bjorn Schultheiss
Has anyone established what actually causes this bug, so i can fast- 
track my fix?



regards,

Bjorn


On 03/02/2007, at 4:58 AM, alimcleod wrote:


Hi,

This does look like a bug with SequenceCommand.

I've been looking at the various options as to how to fix this. I've
never been overly enamoured with SequenceCommand (it wasn't
something we ever used in projects), but there was enough requests
for us to add it.

I suppose my initial question would be around how attached people
are to the current API. We have discussed this here and can see a
better implementation, but that would require changes to existing
code.

So, for the people who use SequenceCommand, how would you feel about
having to change your client code, though it would be a relatively
only small change in each place you use SequenceCommand?

Thoughts?

Alistair

--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:

 Martin, you did give me enough of an idea to wonder if
SequenceCommand
 was making the same mistake you were. After some experimenting I
 suspect that it was. I was setting nextEvent in the execute method
of
 my SequenceCommand subclass. I went and looked at the docs
 (http://www.cairngormdocs.org/docs/cairngorm_2_1/index.html) and
they
 suggest setting it in the constructor, so I tried that. Same error.
 Finally, I tried setting it in a handler method in my SC subclass
(its
 a file upload command), on the line right before executeNextCommand
()
 and that seems to have fixed it.

 It makes me wary of SequenceCommand though, so I am converting any
 classes that subclass it to regular command classes and I will just
 set and dispatch the next event manually. I also tried (very
 briefly) switching to the Cairngorm 2.2 beta SWC and was still
getting
 the error.

 Hey AC guys, is there a bug in SequenceCommand? :)

 Hopefully this info helps others.
 Ben



 --- In flexcoders@yahoogroups.com, Martin Wood-Mitrovski
 flashdev@ wrote:
 
  I just had the same error and it was because i was trying to re-
use
 event
  instances rather than dispatching new ones each time. But i wasnt
 using modules,
  just a normal Cairngorm app.
 
  I was going to look into it to find out exactly what was
happening
 but I just
  dont have the time at the moment.
 
  maybe this is enough of a clue for someone else to say why :)
 
  Bjorn Schultheiss wrote:
   Hey Can anyone give me the lowdown on this error
  
   TypeError: Error #1034: Type Coercion failed: cannot convert
   flash.events::[EMAIL PROTECTED] to
 com.adobe.cairngorm.control.CairngormEvent.
 








RE: [flexcoders] how do you call the super's super?

2007-02-28 Thread Steve Cox
Could be wrong but I'm 99% sure this is not possible.
 
Steve
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Anthony Lee
Sent: 27 February 2007 04:00
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how do you call the super's super?
 
Hi,

Sorry for the lame AS questions, but can anyone tell me how to call
the super method of the class I'm extending? ie. the grandparent and
not the parent.

Thanks,

tonio
 


Re: [flexcoders] Basic inheritance question

2007-02-28 Thread Doug McCune
The docs are telling you that event.currentTarget is typed to
DisplayObject, which is higher in the inheritance chain that
UIComponent. So to use setStyle you've got to type-cast
event.currentTarget to either UIComponent, or some type below
UIComponent in the inheritance chain. So typecasting to Button would
work fine as well, but you can't not typecast it and expect to get
access to setStyle, or other methods of UIComponent.

So either:
UIComponent(e.currentTarget).setStyle(color, red);

or:
Button(e.currentTarget).setStyle(color, red);

would work fine, but simply:
e.currentTarget.setStyle(color, red);

wouldn't.

Doug

On 2/27/07, jairokan [EMAIL PROTECTED] wrote:








 Hi,
 I'm reading the Developer's Guide and in the section using Events, they say 
 on a paragraph that :
 If you try to call another method on the currentTarget (for example, the 
 setStyle() method), Flex returns an error. The setStyle() method is defined 
 on UIComponent, a subclass of DisplayObject. Therefore, you must cast 
 currentTarget to UIComponent before calling the setStyle() method
 for example:
 mx:Script
 ![CDATA[
  import mx.core.UIComponent;

  private function myEventHandler(e:Event):void {
 UIComponent(e.currentTarget).setStyle(color, red);
  }
   ]]
 /mx:Script

 and e.currentTarget is of type Button. But Button extends UIComponent, so we 
 don't have to upcast the reference because setStyle method is public and is 
 available to Button object reference0. I tried the code without upcasting and 
 it works.
 Is the writer wrong or Am I missing something on the concept.

 Thanks

 Jairo



   


Re: [flexcoders] Annoying IE Error (Works in All other browsers!)

2007-02-28 Thread Rich Tretola

It worked fine for me on IE, although I did get a couple of errors thrown or
initilization.  Here they are:


ArgumentError: Undefined state 'LoginForm'.
   at mx.core::UIComponent/::getState()
   at mx.core::UIComponent/::findCommonBaseState()
   at mx.core::UIComponent/::commitCurrentState()
   at mx.core::UIComponent/::creationCompleteHandler()
   at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction
()
   at flash.events::EventDispatcher/dispatchEvent()
   at mx.core::UIComponent/set initialized()
   at mx.managers::LayoutManager/::doPhasedInstantiation()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at mx.core::UIComponent/::callLaterDispatcher2()
   at mx.core::UIComponent/::callLaterDispatcher()


TypeError: Error #1009: Cannot access a property or method of a null object
reference.
   at main/::updateStats()
   at main/__membersRegistered_result()
   at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction
()
   at flash.events::EventDispatcher/dispatchEvent()
   at
mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent
()
   at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler
()
   at mx.rpc::Responder/result()
   at mx.rpc::AsyncRequest/acknowledge()
   at ::DirectHTTPMessageResponder/completeHandler()
   at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction
()
   at flash.events::EventDispatcher/dispatchEvent()
   at flash.net::URLLoader/flash.net:URLLoader::onComplete()

Rich





On 2/26/07, danneri21 [EMAIL PROTECTED] wrote:


  I have a Flex app, an administration panel for one of my clients site.

There is a section where the client can add / delete/ edit advertising
supporters.

There are three states, one to create the new supporters, one to view all
the supporters, and then from there edit the sponsers or delete them.

Here is it running live : http://www.reinvest
orsnetwork.net/new/admin/main.html
You can sign in using test / test for now.  (Advertising Supporters-
Manage Existing Advertisers)

A Datagrid should come up. As soon as you click delete and say yes you are
sure you want to delete it, the datagrid should automatically refresh and
the deleted sponser shouldn't be there anymore. However in Internet Explorer
7 / SP2 it doesn't. Any dynamic updating doesn't work!!

It's really frustrating. I've tried it in Firefox  Opera and they both
work.

Can anybody point me in the right direction?

I can post the source code to my main.mxml file if you wish, but it's
extremely messy and poorly coded [image: :p]
 





--
Rich Tretola
mx:EverythingFlex/
http://www.EverythingFlex.com


Re: [flexcoders] changing states from within a component

2007-02-28 Thread Clint Tredway

try parentDocument.currentState = 'home'

On 2/27/07, stephen50232 [EMAIL PROTECTED] wrote:


  Hi,

I'm working on an application, which is component based. One of my
components is a Login screen, in which the user enters the username and
password, these details are passed to a ColdFusion CFC and checked, the
result is then checked.

If the login is successful I want to be able to change the state in the
main application file from the Login state to the Home state, originally I
tried using:

this.currentState = 'Home';

But this was in the Login component, which doesn't have states, so that
didn't work. What is the best practice for components to call the main
application to perform tasks like changing the state?

Thanks

Stephen






--
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] flash cookie

2007-02-28 Thread julien castelain

hi thierry

maybe you could use a shared object to store what's in the cookie

julien


On 2/27/07, thierrybertossa [EMAIL PROTECTED] wrote:


Is it possible to store a cookie (LSO) from a domain www.x.com and
then access this cookie from a .swf played outside internet explorer or
mozilla (in flash player directly) if we know the name of the domain
www.x.com ??

thanks




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links






RE: [flexcoders] Re: Just curious, A big development team or individual developers

2007-02-28 Thread Robert Chyko
I have found that Flex Builder has already paid for itself by having the
debugger.  The time I have saved using it versus trying to flesh out
bugs in Flash has easily made it worthwhile (If this is what you do
professionally).
 
 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of - FI / Jonas Eliasson +
Sent: Monday, February 26, 2007 11:24 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Just curious, A big development
team or individual developers



We are a team of 6 developers working on a flex project from two
offices
using SVN. We have a modular setup where we use different RSL's
and external
modules which are pulled in from a main application. This way we
can work
independently. 

I have been developing Adobe (Macromedia) products for about 5
years and
this time I was hoping for a solid product. But right now it
feels like I am
a paying beta tester... Flexbuilder is not easy to setup for a
modular
application approach. Right now we are using the Flex SDK and
ANT which
makes it easier to set up a large application with many external
modules and
RSL's. Now we only use Flexbuiler for the text editor and step
debugger.
$500 for a text editor, silly huh! Hopefully we will se good
updates in the
near future. 

Jonas 

-Original Message-
From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
Behalf Of softwarecat
Sent: den 23 februari 2007 15:35
To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: Just curious, A big development team
or individual
developers

For our project it is a TEAM of 2. I am entirely new to flex and
AS3 
with more of a design/html background. I'm now knee (sometimes
it 
feels neck deep) in the front end design while my partner is
more 
code PHP background is providing the code and architectures. It 
seems to work.

We are sharing with CVS through flex builder, but it is tough to
work 
on the main file (commit - update issues maybe someone has some

advice on this area). It is working, but we are only 6 weeks in
and 
development has definately been slowed by our learning curve,
But 
with that said I'm head over heels in love with Flex and AS.

We plan to add an additional developer over the next two weeks
(any 
ideas where to find a respectable one?)

--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com ,
Robert Chyko [EMAIL PROTECTED] wrote:

 For the project I am on now, it is just me.
 
 For the project that is being designed it will be a team. We
have 3
 inhouse Flex devs currently (myself and 2 others) and will
either be
 hiring more or bringing in some consultants.
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com ]
On Behalf Of boy_trike
 Sent: Friday, February 23, 2007 1:57 PM
 To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Just curious, A big development team or
 individual developers
 
 
 
 I wonder how many people are working on TEAM to develop their
 flex applications (and how 
 many are 1 or 2 men (whoops I mean PEOPLE) developers. Please
 discount the Graphic 
 artists, HTML coders. et. al. If you have 3 or more people
 working on the same flex 
 application, please answer as a TEAM. 2 or 1, INDIVIDUAL.
 
 Thanks
 Bruce




 



Re: [flexcoders] ui design question, ideas for showing the user to wait while a record loads

2007-02-28 Thread Anthony Lee

Is it just me or is the busy cursor not a really bad idea. I mean why lock
up the whole application while you're waiting on data for a single component
to load? Is this Web 2.0 or not ;-)

Sorry, I know this doesn't answer your question.

tonio

On 2/28/07, rumpleminzeflickr [EMAIL PROTECTED] wrote:


  Hi there,

I've seen on the mxml remote object a tag that sats:

showbusycursor=true

For the actionscript version, (RemoteObject) I can't see an equivelant?

My code goes like this:

// call controller to call as remote object
pageController.getPage(selectedItem);

// switch view from a list of records to a record detail
viewstack1.selectedChild = detail;

How can I using this kind of detail put a busycursor up during the
wait period? Do I need to use events? any help would be appreciated.

Many thanks,

 



Re: [flexcoders] Result to ArrayCollection - somtimes node is single, sometimes it's an array

2007-02-28 Thread Valy Sivec


See  ArrayUtil.toArray(object )  : Array in the doc

http://livedocs.adobe.com/flex/201/langref/mx/utils/ArrayUtil.html


Regards,
Valy
 






- Original Message 
From: darylgmyers [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, February 27, 2007 9:26:39 AM
Subject: [flexcoders] Result to ArrayCollection - somtimes node is single, 
sometimes it's an array









  



When I use an HTTPService result as an ArrayCollection, certain 
nodes 

will be set as a single item or an array depending on the number of 

items in the node.  Is there a simple way to always force a node to an 

array regardless of how many items there are?






  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;
}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;
}
#ygrp-vitnav{
padding-top:10px;
font-family:Verdana;
font-size:77%;
margin:0;
}
#ygrp-vitnav a{
padding:0 1px;
}
#ygrp-actbar{
clear:both;
margin:25px 0;
white-space:nowrap;
color:#666;
text-align:right;
}
#ygrp-actbar .left{
float:left;
white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;
font-size:77%;
padding:15px 0;
}
#ygrp-ft{
font-family:verdana;
font-size:77%;
border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;
}

#ygrp-vital{
background-color:#e0ecee;
margin-bottom:20px;
padding:2px 0 8px 8px;
}
#ygrp-vital #vithd{
font-size:77%;
font-family:Verdana;
font-weight:bold;
color:#333;
text-transform:uppercase;
}
#ygrp-vital ul{
padding:0;
margin:2px 0;
}
#ygrp-vital ul li{
list-style-type:none;
clear:both;
border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;
color:#ff7900;
float:right;
width:2em;
text-align:right;
padding-right:.5em;
}
#ygrp-vital ul li .cat{
font-weight:bold;
}
#ygrp-vital a {
text-decoration:none;
}

#ygrp-vital a:hover{
text-decoration:underline;
}

#ygrp-sponsor #hd{
color:#999;
font-size:77%;
}
#ygrp-sponsor #ov{
padding:6px 13px;
background-color:#e0ecee;
margin-bottom:20px;
}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;
margin:0;
}
#ygrp-sponsor #ov li{
list-style-type:square;
padding:6px 0;
font-size:77%;
}
#ygrp-sponsor #ov li a{
text-decoration:none;
font-size:130%;
}
#ygrp-sponsor #nc {
background-color:#eee;
margin-bottom:20px;
padding:0 8px;
}
#ygrp-sponsor .ad{
padding:8px 0;
}
#ygrp-sponsor .ad #hd1{
font-family:Arial;
font-weight:bold;
color:#628c2a;
font-size:100%;
line-height:122%;
}
#ygrp-sponsor .ad a{
text-decoration:none;
}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;
}
#ygrp-sponsor .ad p{
margin:0;
}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;
}
#ygrp-text tt{
font-size:120%;
}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--








 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

Re: [flexcoders] Quick Question: Conditional Operator ?:

2007-02-28 Thread Troy Gilbert

The difference you point out is the only difference.

The trinary operator (?:) is an operator so it can be used in expressions
(it evaluates to something). if/else is control flow and thus does not
evaluate to anything nor can it be used inside of an expression.

For certain situations, it can make the code easier to read and more compact
than a control flow statement. It could possibly make the generated code
faster if only because the byte code is simpler or more compact (more cache
coherent). But I can't imagine it'd make a huge difference.

Personally, I prefer it for the situations you mentioned... whenever I see
if x return y else return z I always think, could this be more concisely
written with the trinary operator?

The place I most often use it, though, is in initialization of variables
passed into function parameters, e.g. this.x = (x) ? x : 0; will set
this.x to x if x is valid (not null, not undefined) otherwise it'll set it
to zero. I'm sure its not an accident that it almost reads like a sentence
with a question mark... ;-)

Troy.


On 2/27/07, camlinaeizerous [EMAIL PROTECTED] wrote:


  I know using ?: does the same thing as if else but is there an actual
benefit of one over the other besides a difference in typing a few
characters? Not that I would go through all my code an chance one to
the other just curious if someone knows.

something really simple for example

return (a==b)?Yes:No

vs

if(a==b)
{return Yes}
else
{return No}

 



Re: [flexcoders] ui design question, ideas for showing the user to wait while a record loads

2007-02-28 Thread Adam Royle
Use the following methods to show and hide the busy cursor.

Cheers,
Adam


import mx.managers.CursorManager;


CursorManager.setBusyCursor();

CursorManager.removeBusyCursor();


  - Original Message - 
  From: rumpleminzeflickr 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, February 28, 2007 3:01 PM
  Subject: [flexcoders] ui design question, ideas for showing the user to wait 
while a record loads


  Hi there,

  I've seen on the mxml remote object a tag that sats:

  showbusycursor=true

  For the actionscript version, (RemoteObject) I can't see an equivelant?

  My code goes like this:

  // call controller to call as remote object
  pageController.getPage(selectedItem); 

  // switch view from a list of records to a record detail
  viewstack1.selectedChild = detail;

  How can I using this kind of detail put a busycursor up during the
  wait period? Do I need to use events? any help would be appreciated.

  Many thanks,



   

Re: [flexcoders] disabling COPY in drag/drop operations

2007-02-28 Thread Andrey

what i'm trying to do is exactly the opposite. I'm trying to reorder the
list by drag/drop, so i want to make it so you can ONLY move, and can not
copy. dragCopyEnabled i guess would be the ultimate answer :)  is there
something out there or some technique that could do that?

i wanted to try the other email's approach, but there is really no dragStart
on datagrid, and canceling the drop didn't help for some reason either... so
we're stumped :(


On 2/27/07, Brian Holmes [EMAIL PROTECTED] wrote:


   set the dragMoveEnabled=false on your datagrid



a+
brian..


--
***
The information in this e-mail is confidential and intended solely for the
individual or entity to whom it is addressed. If you have received this
e-mail in error please notify the sender by return e-mail delete this e-mail
and refrain from any disclosure or action based on the information.
***

 



Re: [flexcoders] Re: How can I loop through a Tile ?

2007-02-28 Thread Ciarán
Hi Mark,

What you're trying to accomplish is (don't quote my authority here...)
I think best tackled in Flex with a TileList and a custom
ItemRenderer. You're definitely going into too much depth by altering
component children individually at runtime.

Since there's more than one way to skin a cat, best take a step back
an prepare for a paradigm shift... forget about adding children and
looping through and the like - Flex shouldn't need to follow that kind
of model.

If you need to loop through because your sources are live, you can
schedule a call to one of the invalidation methods in the Flex display
architecture, and thereby have Flex redraw the screen (except you
should override the method so it does your stuff too...)

http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=ascomponents_advanced_148_16.html

You'll need an understanding of ItemRenderers:

http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/

The basic concepts:

- Any sort of List has a dataProvider.
- A TileList is a sort of List.
- Your dataProvider is normally an Array or ArrayCollection of items

- A list has a default ItemRenderer which renders the items in the
dataProvider (ordinarily extracting values from the label and data
properties of objects in the dataProvider's ArrayList)

- Your dataProvider can be a collection of *any object type*
(in your case, I'd recommend creating a class that contains all the
data relevant to each pair of image/text)

- At render-time (to coin a term), an itemRenderer has it's content
dropped into it. Flex will populate the with the TileList with
itemRenderers, and set the data property on each itemRenderer. Flex
loops over the dataProvider of the list, passing in one object at a
time.

- Each itemRenderer can now see one item (whatever is passed in) of
the dataProvider (one instance of your custom class) in it's local
scope as the data property if your itemRenderer is MXML. If it's
ActionScript, you can override the data setter.

So in your case, create a TileList with a columnWidth of 1.
Each item in your TileList dataProvider should be of a custom type
(create whatever type is necessary to store the data relating to each
image and it's text).
Put all your data into an ArrayCollection and bind it to the TileList
dataProvider
Create a custom itemRenderer in MXML (a VBox with an Image on one
side, labels on the other) - bind it's properties (i.e. the image
source, the label text, to the object you expect to be dropped in via
the data property).

If you need any more detailed modifications, look into creating your
itemRenderer with ActionScript.

This is an abstract of a wide range of concepts, so you may have to
look round a bit on docs, blogs and the like, to find examples of
similar stuff (there's plenty out there).

It seems the main thing would be to change the approach your taking
(if I'm making the right assumptions about what you're trying to do).

Best Regards,
Ciarán

On 2/27/07, oneproofdk [EMAIL PROTECTED] wrote:
 Hi Ciarán

 Just put up a small example for you (and others) to see. Rightclick to
 view source:
 http://flex2.dk/mark/addchild/childTest.html

 Very simple app - 2 buttons.
 Add Children - will add 12 vboxes, each containing 2 images
 Loop Through Children - Will loop through tile1.numChildren - printing
 each name into the textarea.
 But HOW can I get hold of the names of the images (and even more,
 their source)

 I need this to be able to loop through each item, check if the source
 has been updated, and if so, reload the image.

 Thanks for your time.

 Mark




 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links






[flexcoders] Re: ArrayCollection length

2007-02-28 Thread iilsley
 
 var dataProvider = [{Date: 02-12-2007, Company1: 20, Company2: 30},
   {Date: 02-09-2007, Company1: 20, Company2: 30},
   {Date: 02-08-2007, Company1: 20, Company2: 30}]
 
 How can I determine programatically:
 
 1. The number of companies.
I dont't seem to be able to figure out how to find the number of 
 items in a particular element of the ArrayCollection.
 
please excuse me if this is a double post .. 

--
I am newbie to Flex2 so there is probably a better way todo this  ..
but here is my solution .. 

-
public var con:ArrayCollection = 
new ArrayCollection([{name: 'Matt', last: 'Matthews'}
,{first: 'Matt', last: 'Smith'}
,{first: 'Albert', last: 'Jones'}]
);

public function howManyFirst():void
{
var fst:int =0;
for ( x=0 ; x  con.length ; x++ ) 
{
  if ( con[x].hasOwnProperty(first) == true ) 
  {
fst++;
  }
}   
Alert.show(There are +fst+ first elements);
}
--




Re: [flexcoders] list of events really dispatched by a view

2007-02-28 Thread Clint Modien

http://livedocs.flexsearch.org/index.shtml?cx=017079146949617508304%3Amv4wpsyofxucof=FORID%3A9q=_listeners#243

On 2/27/07, Eric Guesdon [EMAIL PROTECTED] wrote:


  Hi to All,

I'm looking to get the list of events really connected in a view.

For example:

mx:Canvas
xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=dispatchEvent (new Event
('myViewCreationCompleteHandler')) 

mx:Button id=myButton click=dispatchEvent (new Event
('myButtonClickHandler')) /

/mx:Canvas

So I would like to get
[creationComplete , click] and [myViewCreationCompleteHandler ,
myButtonClickHandler]

In precedent version of actionscript I existed an attributes named
_listeners... but unfortunately this one has been deprecated...

Do you know if it exists a substitute?

Thanks in advance

Eric

 



[flexcoders] Re: ArrayCollection length

2007-02-28 Thread iilsley
--- In flexcoders@yahoogroups.com, Mehul Doshi [EMAIL PROTECTED] wrote:

 
 If I have my dataprovider in the following manner:
 
 var dataProvider = [{Date: 02-12-2007, Company1: 20, Company2: 30},
   {Date: 02-09-2007, Company1: 20, Company2: 30},
   {Date: 02-08-2007, Company1: 20, Company2: 30}]
 
 How can I determine programatically:
 
 1. The number of companies.
I dont't seem to be able to figure out how to find the number of 
 items in a particular element of the ArrayCollection.


Hi , 

I'm a newbie to Flex2 so there is probably a better way todo this but 
for now this seems to work .. :) .. 

-
public var con:ArrayCollection = 
new ArrayCollection([{name: 'Matt', last: 'Matthews'}
,{first: 'Matt', last: 'Smith'}
,{first: 'Albert', last: 'Jones'}]
);

public function howManyFirstelements():void
{
var fst:int =0;
for ( x=0 ; x  con.length ; x++ ) 
{
if ( con[x].hasOwnProperty(first) == true) 
  {
  fst++;
  }
}
Alert.show(There are +fst+ first elements );
 }






RE: [flexcoders] Flex not sending over SSL

2007-02-28 Thread Allen Riddle
We are using the Proxy Services, so those destinations are set up using
http. We are using web and app server pairs. Apache is the web server
serving up the swf on port 443. We route requests the the swf makes
(rootContext/messagebroker/http requests) to the app server, which is
our data services app. At that point, the requests should be decrypted
before it hits the app server and I would think it would be able to
handle that endpoint destination being over http.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Johnson
Sent: Tuesday, February 27, 2007 3:04 PM
To: flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex not sending over SSL

 

Are you sure that the wsdl path you have specified on the webservice
object is relative and not hardcoded to use http? Also, open your WSDL
in the browser and make sure it is not returning a method URL to the
Flash Player with HTTP hardcoded in it.

 

Karl

Cynergy

 

Shameless Plug:

Come see us at AJAXWorld next month! Several Cynergy employees,
including myself, will be presenting on great Flex topics. Don't miss
it!

 



From: flexcoders@yahoogroups.com on behalf of Allen Riddle
Sent: Tue 2/27/2007 2:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex not sending over SSL

Hello all, we are setting up our production environment for our Flex
Data Services app. According to the Apache logs, all requests that the
swf makes for images,css, etc is in fact going over ssl. However when
the .swf invokes a  web service (using proxy endpoints/destinations),
the request is using /messagebroker/http, and does not appear to be
going over ssl (we know this because there is no ssl or tsa entry on the
line in the log file, as there is for images and css files). If the swf
is being served up on 443, shouldn't all communication through the swf
be going over port 443. I guess another way to ask is, do the requests
from the swf use relative pathing, and by default be going over
https/443? I hope I'm explaining the problem well enough. Thanks.

 

Allen Riddle

Sofware Development

x3217

 

 



Re: [flexcoders] assigning a value to a model value object

2007-02-28 Thread Webdevotion

Thanks Karl for this solution!


On 2/28/07, Karl Johnson [EMAIL PROTECTED] wrote:


What type of objects are in your grid's dataprovider? Are the items in the
grid actual TrackVo objects (and were typed as such prior to being added to
the dataprovider)?



Karl

Cynergy



*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Webdevotion
*Sent:* Tuesday, February 27, 2007 6:22 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] assigning a value to a model value object



Hello,

I want to assign a value from my libraryview's datagrid to
a TrackVO in my modelLocator.

model.currentTrack = gridlist.selectedItem as TrackVO;

However, this will not work, currentTrack is null.
When I do Alert.show( gridlist.selectedItem.file ) it shows
me the correct output.

What is the correct way to put the gridlist.selectedItem data
in a value object of my modellocator, so I can keep my data
wellformed.

tnx.




[flexcoders] FDS port in biggest disadvantage in Flex?

2007-02-28 Thread marcel.panse
Because flex uses another port for FDS instead of 80... A lot of users
have firewalls installed and cant use ports other than 80 or have to
adjust there firewalls. I work at a company who just can't use other
ports..
When using FDS you exclude a lot of users from your application (and
thus potential customers). So you just cant create like a webshop
using FDS or some helpdesk at a company which restricts ports other
then 80.

Another problem is you have to specify an new port for every flex
application you host on your server. Every webapp needs its own fds
port. So you have to forward who ranges of ports in you firewalls and
systems..

I am a big fan of flex, but this would be a problem if i start selling
flex to client (like big insurance agency's or large companies)
because it is just not acceptable to exclude users from accessing your
site..

So FDS usefull or not? (or maybe there is some way to fix this issue,
that i dont know about?) 



[flexcoders] Re: Fisheye component

2007-02-28 Thread softwarecat
Here try this - got it from a svn root from qs server that came up 
in a yahoo search.  I had the same issue.  I named this 
appropriately stored it my com folder, and voila - error fixed - but 
now I have others  :(  I'm such a noob!

Good luck!

---


package qs.controls
{
import mx.core.UIComponent;
import mx.core.UITextField;
import mx.core.IDataRenderer;
import flash.geom.*;

import flash.display.*
import flash.text.TextLineMetrics;;

/**
 *  Color of text in the component, including the component label.
 *  The default value is code0x0B333C/code.
 */
[Style(name=color, type=uint, format=Color, inherit=yes)]

/**
 *  Color of the component if it is disabled.
 *  The default value is code0xAAB3B3/code.
 */
[Style(name=disabledColor, type=uint, format=Color, 
inherit=yes)]

/**
 *  Name of the font to use.
 *  Unlike in a full CSS implementation,
 *  comma-separated lists are not supported.
 *  You can use any font family name.
 *  If you specify a generic font name,
 *  it is converted to an appropriate device font.
 *  The default value is codeVerdana/code.
 */
[Style(name=fontFamily, type=String, inherit=yes)]

/**
 *  Height of the text in pixels.
 *  The default value is 10.
 */
[Style(name=fontSize, type=Number, format=Length, 
inherit=yes)]

/**
 *  Determines whether the text is italic font.
 *  Recognized values are codenormal/code and 
codeitalic/code.
 *  The default value is codenormal/code.
 */
[Style(name=fontStyle, type=String, enumeration=normal,italic, 
inherit=yes)]

/**
 *  Determines whether the text is boldface.
 *  Recognized values are codenormal/code and 
codebold/code.
 *  The default value is codenormal/code.
 */
[Style(name=fontWeight, type=String, enumeration=normal,bold, 
inherit=yes)]

/**
 *  Alignment of text within a container.
 *  Possible values are codeleft/code, coderight/code,
 *  or codecenter/code.
 *  The default value is codeleft/code.br
 *  For the Button, LinkButton, and AccordionHeader components,
 *  the default value is codecenter/code.
 *  For these components, this property is only recognized when the
 *  codelabelPlacement/code property is set to 
codeleft/code or
 *  coderight/code.
 *  If codelabelPlacement/code is set to codetop/code or
 *  codebottom/code, the text and any icon are centered.
 */
[Style(name=textAlign, type=String, 
enumeration=left,center,right, inherit=yes)]

/**
 *  Determines whether the text is underlined.
 *  Possible values are codenone/code and 
codeunderline/code.
 *  The default value is codenone/code.
 */
[Style(name=textDecoration, type=String, 
enumeration=none,underline, inherit=no)]

/**
 *  Offset of first line of text from the left side of the container.
 *  The default value is 0.
 */
[Style(name=textIndent, type=Number, format=Length, 
inherit=yes)]

public class CachedLabel extends UIComponent implements 
IDataRenderer
{
private var _label:UITextField;
private var _bitmap:Bitmap;
private var _capturedText:BitmapData;
private static var xUnit:Point = new Point(1,0);
private static var origin:Point = new Point(0,0);
private var _data:Object;
private var _text:String = ;

private var _cachePolicy:String = auto;

public function CachedLabel()
{
super();
}

public function set useCache(value:String):void
{
_cachePolicy = value;
invalidateDisplayList();
}
public function get useCache():String
{
return _cachePolicy;
}
override protected function createChildren():void
{
super.createChildren();

_label = new UITextField();
_label.multiline = true;
_label.selectable = false;
_label.autoSize = left;
_label.text = _text;
addChild(_label);

}

override protected function measure():void
{
_label.validateNow();
if(_label.embedFonts)
{
measuredWidth = _label.measuredWidth 
+ 6;
measuredHeight = 
_label.measuredHeight + 4;
}
else
{
var metrics:TextLineMetrics = 
measureText(_text);
measuredWidth = metrics.width + 6;
measuredHeight  = metrics.height + 4;
   

[flexcoders] How can I rotate a shape or sprite with mouse movement?

2007-02-28 Thread allenyoungsjtu
Hi all,

In my project, I need to draw some shapes in a canvas and rotate them in
any direction. I've found some topics related to rotating in the help
content of flex builder 2, that I can enter a value of rotate degrees
and then my shapes will be rotated. But I think a better way is to use
mouse movement to rotate them, just like I rotate a shape object in MS
Word.

Is this possible with flex? And if so, how can I implement this? Thanks
a lot.




Re: [flexcoders] changing states from within a component

2007-02-28 Thread John Wilker

What I do is set a global var in my model for state. then bind currentState
to that variable. Then just update your model var.

On 2/27/07, stephen50232 [EMAIL PROTECTED] wrote:


  Hi,

I'm working on an application, which is component based. One of my
components is a Login screen, in which the user enters the username and
password, these details are passed to a ColdFusion CFC and checked, the
result is then checked.

If the login is successful I want to be able to change the state in the
main application file from the Login state to the Home state, originally I
tried using:

this.currentState = 'Home';

But this was in the Login component, which doesn't have states, so that
didn't work. What is the best practice for components to call the main
application to perform tasks like changing the state?

Thanks

Stephen
 





--
John Wilker
Vice President Software Development/Writer
Red Omega Solutions, Inc.
www.johnwilker.com / www.red-omega.com

Everything changes, nothing remains without change. ~Buddha c.483 bc


[flexcoders] LocalConnection Bug?

2007-02-28 Thread zhongtie
I tried to send an XML object over LocalConnection, and noticed if
this XML doesn't have any child node, the other side will only see an
empty one. For example:

lc.send(lc_id, fn, new XML(a b='1'/))

lc_id.fn() will see an .
However if we send ab/b/a, things work well.

Is this a LocalConnection bug? Any workaround? I am using flash9/AS3.
I thought about toString() but since I may also send objects
containing XML object, it will be hard to decide when to do this
conversion to/from string.

Any ideas?

Thanks!

Tim



[flexcoders] Re:ui design question, ideas for showing the user to wait while a recor

2007-02-28 Thread Robi Ray
You can do the following:
   Within the remote call method, you can add the following as the first
line :
CursorManager.setBusyCursor();
   Next, within the method's result handler, add the following line once you
get resultstatus as true (I mean once data retreival is successful):
CursorManager.removeAllCursors();

  You'll have to include the CursorManager class for the above.

All the best,
Robi.



[flexcoders] Re: How do I prevent the user from selecting text in a text area component?

2007-02-28 Thread beecee1977
Yes, but that doesn't stop the user from selecting the text (dragging 
mouse over and highlighting)... Is there an easy way to prevent that? 
(Other than disabling the component)

Bill

--- In flexcoders@yahoogroups.com, Brian Holmes [EMAIL PROTECTED] wrote:

 editable=false
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Robin Burrer
 Sent: Monday, February 26, 2007 6:08 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How do I prevent the user from selecting text 
in a
 text area component?
 
 
 
 Hi there,
 
  
 
 How do I prevent the user from selecting text in a text area 
component?
 
 
 I noticed that it does not have a selectable property and does not
 derive from the Text object either.
 
  
 
  
 
 Robin
 
  
 
 
 ***
 The information in this e-mail is confidential and intended solely 
for the individual or entity to whom it is addressed.  If you have 
received this e-mail in error please notify the sender by return e-
mail delete this e-mail and refrain from any disclosure or action 
based on the information.
 ***





Re: [flexcoders] Re: Just curious, A big development team or individual developers

2007-02-28 Thread Tom Chiverton
On Tuesday 27 Feb 2007, Roger Gonzalez wrote:
 Would that have been preferable to you?

Hell, no, and we've not even started using them yet :-)

-- 
Tom Chiverton
Helping to professionally implement 24/365 patterns
On: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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


RE: [flexcoders] Re: How do I prevent the user from selecting text in a text area component?

2007-02-28 Thread Karl Johnson
You could make them disabled, but change the disabled styles so it does
not look quite so disabled. Or trap the click event and stop the user
action at that point.

 

Karl

Cynergy

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of beecee1977
Sent: Wednesday, February 28, 2007 8:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I prevent the user from selecting text
in a text area component?

 

Yes, but that doesn't stop the user from selecting the text (dragging 
mouse over and highlighting)... Is there an easy way to prevent that? 
(Other than disabling the component)

Bill

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Brian Holmes [EMAIL PROTECTED] wrote:

 editable=false
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Robin Burrer
 Sent: Monday, February 26, 2007 6:08 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] How do I prevent the user from selecting text 
in a
 text area component?
 
 
 
 Hi there,
 
 
 
 How do I prevent the user from selecting text in a text area 
component?
 
 
 I noticed that it does not have a selectable property and does not
 derive from the Text object either.
 
 
 
 
 
 Robin
 
 
 
 
 ***
 The information in this e-mail is confidential and intended solely 
for the individual or entity to whom it is addressed. If you have 
received this e-mail in error please notify the sender by return e-
mail delete this e-mail and refrain from any disclosure or action 
based on the information.
 ***


 



[flexcoders] GLOBAL Exception Handler?

2007-02-28 Thread Steve Kellogg
Hello,

 

Does anyone happen to know:  What's the BEST PRACTICE for catching any
unhandled exceptions?  I'm looking for the correct place to put a TOP
LEVEL Try/Catch/Finally block to do any last-ditch cleanup/recovery in
case my app is about to fail.

 

Thanks in Advance,

 

Steve

 

 



[flexcoders] JEE5 web application glassfish EJB Hibernate....how use it by fds and flex?

2007-02-28 Thread lruinelli
Hello,


I have a JEE5 web application based on EJB and Hibernate.
for each entity I have:
- an Hibernate mapping
- a java class
- a controller of the java class (with method to create, modify, ecc
the entity)
- a controllerLocalInterface 
- a controllerRemoteInteface

example for entity Year...i have:
- Year.hbm.xml
- Year.java
- YearControllerBean.java (Year createYear()...updateYear(Year y)...ecc)
- YearControllerLocal.java
- YearRemoteLocal.java


...a java client has the following structures (it works fine!):

public class TestClient {
public static void main(String[] args) {
try {
InitialContext ic = new InitialContext();

YearControllerRemote yc =(YearControllerRemote)
ic.lookup(YearControllerRemote.class.getName());
Year anno = yc.createYear();
anno.setValue(2013);
yc.updateYear(anno);

...
}


How to perform something like this with fds2 and flex...I see an
article on:

http://weblogs.macromedia.com/pmartin/archives/2006/08/ejb_and_flex_in.cfm

and I based my fds and my client on this (using the given
flex-ejb-factory.jar and configuring remoting-config.xml and
service-config.xml as described)
 
remoting-config.xml:
destination id=MyEJB
 properties
  factoryejb3/factory
  sourceorg.seamless_ip.ontologies.farm.YearControllerBean/source
 /properties
/destination

and service-config.xml:
factories 
 factory id=ejb3 class=com.adobe.ac.ejb.EJB3Factory /
/factories


In the client side I have a YearControllerBean.as and a Year.as 

...my flex client (as entry point I use a remoteObject which point the
org.seamless_ip.ontologies.farm.YearControllerBean):


mx:RemoteObject id=ro destination=MyEJB
/mx:RemoteObject

private function initApp():void
{
year = Year(ro.retrieveYear(1));

}



...but the following error occours:
type Coercion failed: cannot convert mx.rpc::[EMAIL PROTECTED] to Year.

Could someone please help me...giving me tricks or interesting link,
samples?


thanks
Lorenzo




[flexcoders] crossdomain? image dragging

2007-02-28 Thread Paul Hastings
we're getting some user complaints about some functionality based on
drag  drop of an image. for servers in domains local to them, works a
treat. for servers in remote domains it appears the drag image can't
be retrieved  they're getting the broken image instead when dragging.
what's puzzling us is that we can load images from those remote
domains w/out any problems:

theMap.load(mapResults.mapSrc);

where mapResults.mapSrc consists of a URL pointing at the image we
want to display which works fine for all servers. only the drag
operations seem broken.

any ideas?

thanks.


Re: [flexcoders] Re: Just curious, A big development team or individual developers

2007-02-28 Thread Paul Hastings
On 2/27/07, Robert Chyko [EMAIL PROTECTED] wrote:
 I have  found that Flex Builder has already paid for itself by having the  
 debugger.  The time I have saved using it versus trying to flesh out bugs  in 
 Flash has easily made it worthwhile (If this is what you do  professionally).

i agree, the debugger  designer layout are worth it.


[flexcoders] passing lists of DTO's, client-side AS class not getting compiled

2007-02-28 Thread sgrosven2
We are working on a set of data transfer objects where we have 
matching server-side java classes and client-side AS classes.  Some 
of these DTO contain lists of other DTOs.  As an example:

A.java:
public class A {
   
   ListB blist
   ...
}

In A.as we have...
class A {
   
   public var blist : ArrayCollection;
   

And we have B.java and B.as

Then we have a RemoteObject call to pull down a bunch of A 
objects

Here's the problem, Flex does not compile B.as at build-time.

So if B.as has a compiler problem, you never know about it, except 
that the 'blist' in A never gets populated.   If you break down the 
data transfer and debug it.  You find that during RemoteObject call, 
the blist data comes down the wire, but as an ArrayCollection 
generic Objects, they never get turned into instances of Bs... 

I am guessing that this is happening because at compile time, there 
is not direct reference to B in the clientside project.  Our 
covering .mxml wants one or more A objects, and inside A the blist 
is an ArrayCollection.  So the compiler doesn't see a reference to 
B.. 

So anyone know how we can fairly seamlessly make sure B.as gets 
compiled at build time so we'd know of compiler issues with it 
rather than spending lots of time debugging mysterious null values?

(This appears to happen whether the project is set to compile on the 
client-side or the server-side.  We are using Flex and FDS 2.0.1 and 
Java 1.5)




RE: [flexcoders] Basic inheritance question

2007-02-28 Thread Jamal Romero
Hi,
Thanks for your reply. Yes that's what I wanted to
say. The code will compile, I've tried it on
www.flex.org online compiler and it did what expected
without error. I think the compiler is not strict
about type reference. But as has been said, it's
better to type cast to the right ancestor or
descendent an call the appropiate method. As coming
from java land the java compiler won't tolerate this
error if it is an error. When I get the target from
the event it's not even a UIComponent, it's as been
said an Object type. Anyway I'm still learning Flex.
Java Swing id too slow, but I must say it wasn't a
wast of time. It is a very elegant architecture but
the problem is too slow. All the concept reading the
Develp. Guide are familiar to me because they all
implemented in Java Swing.
Thanks
Jairo 
--- Gordon Smith [EMAIL PROTECTED] wrote:

 The Developer's Guide is wrong... you won't get a
 compilation error if
 you don't cast. However, casting is best practice so
 that the compiler
 can help you catch coding mistakes. For example,
  
 e.currentTarget.setSytle(...)
  
 would compile despite the typo, but throw a runtime
 error. However,
  
 Button(e.currentTarget).setSytle(...)
  
 would not compile.
  
 - Gordon
 
 
 
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Karl Johnson
 Sent: Tuesday, February 27, 2007 10:27 AM
 To: flexcoders@yahoogroups.com;
 flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Basic inheritance question
 
 
 
 In general you always want to cast something like
 this - because
 event.currentTarget is of type object and NOT
 UIComponent or Button. But
 since objects are loosely typed as type Object, then
 you reference any
 property or method you want at compile time. Often
 at runtime though you
 will hit errors unless it is properly casted. Your
 sample application
 was done in Flex 2 right?
  
 Definitely a best practice to be casting generic
 objects like this to
 the type of object you want to be working with to
 avoid runtime errors
  
 Karl
 Cynergy
 
 
 
 From: flexcoders@yahoogroups.com on behalf of
 jairokan
 Sent: Tue 2/27/2007 11:53 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Basic inheritance question
 
 
 
 Hi,
 I'm reading the Developer's Guide and in the section
 using Events, they
 say on a paragraph that :
 If you try to call another method on the
 currentTarget (for example,
 the setStyle() method), Flex returns an error. The
 setStyle() method is
 defined on UIComponent, a subclass of DisplayObject.
 Therefore, you must
 cast currentTarget to UIComponent before calling the
 setStyle() method
 for example:
 mx:Script
 ![CDATA[
  import mx.core.UIComponent;
 
  private function myEventHandler(e:Event):void {

 UIComponent(e.currentTarget).setStyle(color,
 red);
  }
   ]]
 /mx:Script
 
 and e.currentTarget is of type Button. But Button
 extends UIComponent,
 so we don't have to upcast the reference because
 setStyle method is
 public and is available to Button object reference0.
 I tried the code
 without upcasting and it works.
 Is the writer wrong or Am I missing something on the
 concept.
 
 Thanks
 
 Jairo
 
  
 
  
 



 

Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food  Drink QA.
http://answers.yahoo.com/dir/?link=listsid=396545367


[flexcoders] Flex and Java

2007-02-28 Thread thierrybertossa
Is it possible to embed swf in java application?
And call method between them?

http://www.javaworld.com/javaworld/jw-01-2003/jw-0117-flash.html
if not with flex perhaps with flash 6 7 8 ?



[flexcoders] What's up with runtime errors silent failing.

2007-02-28 Thread Ralph Hauwert
Hi guys,

If recently (since FB 2.0.1) been experiencing several cases where my
code would fail silently at runtime, not coming up with a runtime
error at all, and just stopping code execution, restarting at the next
logical step. Is there something I have missed in the release notes of
FB2.0.1 ?

-- 
Ralph Hauwert


[flexcoders] Getting a Third-Party Component into Builder 2?

2007-02-28 Thread Bruce H. Johnson
I downloaded a neat-looking speedometer chart component in a zip file.
I can extract with the directory structure (GaugeComponent\Gauge... etc.)

Now, how do I get Builder 2 to recognize the sucker is there? I've
tried File  Import..., pointing a Source Path at it, etc. I've spent
a couple hours in Builder Help so I'm obviously asking the wrong question.




RE: [flexcoders] Re: Flex choking while converting less than 2 MB of data

2007-02-28 Thread Karl Johnson
Hey Matt-
 
I would never even try 10,000 objects in a strongly typed result set because of 
the performance. But I think the bigger key factor here is how deeply nested 
your strongly typed objects are. In the example I gave in my reply, it was a 
very complex nested object...and I gotta think the actual delay is the 
deserialization and creation of the strongly typed objects in memory by the 
player instead of rendering time or something else.
 
I think what you suggest below is correct.
 
Karl
Cynergy



From: flexcoders@yahoogroups.com on behalf of Matt Chotin
Sent: Tue 2/27/2007 3:59 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Flex choking while converting less than 2 MB of 
data



Can you send us a test-case please?  Instantiating 10,000 objects like you have 
shouldn't be so bad as far as I know.

 

Sounds like getting the XML into anonymous objects is OK, it's just the 
strongly-typed ones right?

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
ben.clinkinbeard
Sent: Tuesday, February 27, 2007 1:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex choking while converting less than 2 MB of data

 

Wow, that sucks REALLY bad. I appreciate the response Karl.

I did try (before posting the original message) setting resultFormat
to e4x and then assembling my objects with pretty much the same
outcome. Are you suggesting I leave the data as XML permanently? I
suppose thats worth a shot but I've found using XML dataProviders to
be a real PITA when making extensive use of itemRenderers and
labelFunctions (like my app does).

Thanks,
Ben

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Karl 
Johnson [EMAIL PROTECTED]
wrote:

 It is unfortunate, but it is the way it is. When returning large
sets of data like this, we had to stop using webservices returning
objects and change to using webservices returning an XML string or
HTTPServices returning XML. Having the flash player consume a big blog
of XML and then you do what you want with it (like turn it in to AS
XML Objects and use it for a grid's dataprovider, etc) is WAY faster
than letting flex try to deserialize it all and put it all into memory
as strongly typed objects.
 
 One perf test we did in 1.5 was to return three hundred items as
nested, strongly typed objects took about 45 seconds for the FP to
handle the result set and render. When using straight xml, it took
about 2 seconds. Of course it all depends on how large your result set
as well as how deep and nested your objects are.
 
 Karl
 Cynergy
 
 Shameless Plug:
 Come see us at AJAXWorld next month! Several Cynergy employees,
including myself, will be presenting on great Flex topics. Don't miss it!
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  on 
 behalf of ben.clinkinbeard
 Sent: Tue 2/27/2007 1:42 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Flex choking while converting less than 2 MB
of data
 
 
 
 I am calling a web service that sometimes returns up to 1.9 MB of SOAP
 formatted data. I have left the resultFormat set to object, and it
 seems to handle the initial parsing into anonymous objects without
 much trouble. However, when I attempt to convert this structure into
 class instances the player chokes and usually ends up freezing the
 browser.
 
 The object structure consists of one main Batch object instance, which
 contains 2000 BatchDocument instances, which in turn each contain a
 single ClientInfo object instance and up to four Plan object
 instances. This doesn't seem like a structure that Flex should fail so
 miserably with as the performance everywhere else has been pretty
 impressive. I have attempted this using Darron Schall's
 ObjectTranslator class
 (http://www.darronschall.com/weblog/archives/000247.cfm 
 http://www.darronschall.com/weblog/archives/000247.cfm 
http://www.darronschall.com/weblog/archives/000247.cfm 
http://www.darronschall.com/weblog/archives/000247.cfm  ) as well as
 simply passing the anonymous objects to my class constructors. Both
 result in a completely unusable application.
 
 Any help is greatly appreciated.
 
 Ben


 


[flexcoders] Re: Flex choking while converting less than 2 MB of data

2007-02-28 Thread Paul DeCoursey
I'd say 10,000 objects is a lot to process in a single result, I'm of
the opinion that this kind of thing should be paginated and processed
in a queue, then Flash won't choke on it.  It will take multiple
requests but then you give the user the opportunity to know what is
going on and cancel it if they want.  Remember if a script takes too
long, like more than a few milliseconds, then the interface won't be
updating.  When you get into the seconds time frame then the app will
become unresponsive, and the browser might start throttling the plugin.


--- In flexcoders@yahoogroups.com, Karl Johnson [EMAIL PROTECTED]
wrote:

 Hey Matt-
  
 I would never even try 10,000 objects in a strongly typed result set
because of the performance. But I think the bigger key factor here is
how deeply nested your strongly typed objects are. In the example I
gave in my reply, it was a very complex nested object...and I gotta
think the actual delay is the deserialization and creation of the
strongly typed objects in memory by the player instead of rendering
time or something else.
  
 I think what you suggest below is correct.
  
 Karl
 Cynergy
 
 
 
 From: flexcoders@yahoogroups.com on behalf of Matt Chotin
 Sent: Tue 2/27/2007 3:59 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: Flex choking while converting less
than 2 MB of data
 
 
 
 Can you send us a test-case please?  Instantiating 10,000 objects
like you have shouldn't be so bad as far as I know.
 
  
 
 Sounds like getting the XML into anonymous objects is OK, it's just
the strongly-typed ones right?
 
  
 
 Matt
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of ben.clinkinbeard
 Sent: Tuesday, February 27, 2007 1:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Flex choking while converting less than 2
MB of data
 
  
 
 Wow, that sucks REALLY bad. I appreciate the response Karl.
 
 I did try (before posting the original message) setting resultFormat
 to e4x and then assembling my objects with pretty much the same
 outcome. Are you suggesting I leave the data as XML permanently? I
 suppose thats worth a shot but I've found using XML dataProviders to
 be a real PITA when making extensive use of itemRenderers and
 labelFunctions (like my app does).
 
 Thanks,
 Ben
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Karl Johnson karl.johnson@
 wrote:
 
  It is unfortunate, but it is the way it is. When returning large
 sets of data like this, we had to stop using webservices returning
 objects and change to using webservices returning an XML string or
 HTTPServices returning XML. Having the flash player consume a big blog
 of XML and then you do what you want with it (like turn it in to AS
 XML Objects and use it for a grid's dataprovider, etc) is WAY faster
 than letting flex try to deserialize it all and put it all into memory
 as strongly typed objects.
  
  One perf test we did in 1.5 was to return three hundred items as
 nested, strongly typed objects took about 45 seconds for the FP to
 handle the result set and render. When using straight xml, it took
 about 2 seconds. Of course it all depends on how large your result set
 as well as how deep and nested your objects are.
  
  Karl
  Cynergy
  
  Shameless Plug:
  Come see us at AJAXWorld next month! Several Cynergy employees,
 including myself, will be presenting on great Flex topics. Don't
miss it!
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  on behalf of ben.clinkinbeard
  Sent: Tue 2/27/2007 1:42 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Flex choking while converting less than 2 MB
 of data
  
  
  
  I am calling a web service that sometimes returns up to 1.9 MB of SOAP
  formatted data. I have left the resultFormat set to object, and it
  seems to handle the initial parsing into anonymous objects without
  much trouble. However, when I attempt to convert this structure into
  class instances the player chokes and usually ends up freezing the
  browser.
  
  The object structure consists of one main Batch object instance, which
  contains 2000 BatchDocument instances, which in turn each contain a
  single ClientInfo object instance and up to four Plan object
  instances. This doesn't seem like a structure that Flex should fail so
  miserably with as the performance everywhere else has been pretty
  impressive. I have attempted this using Darron Schall's
  ObjectTranslator class
  (http://www.darronschall.com/weblog/archives/000247.cfm
http://www.darronschall.com/weblog/archives/000247.cfm 
 http://www.darronschall.com/weblog/archives/000247.cfm
http://www.darronschall.com/weblog/archives/000247.cfm  ) as well as
  simply passing the anonymous objects to my class constructors. Both
  result in a completely unusable application.
  
  

[flexcoders] Customizing error messages

2007-02-28 Thread {reduxdj}
Is there a way to customize error messages:

SeverityDescriptionResourceIn FolderLocationCreation 
TimeId
21013: The private attribute may be used only on class property 
definitions.CaptionMaker.asmeBucket/com/me/views/typesline 
125February 28, 2007 8:03:34 AM105684


To say something like this:
Yo forgot a close bracket after a function dummy

Just curious. 
Patrick



RE: [flexcoders] Announcing FlexLib - open source flex component library

2007-02-28 Thread Merrill, Jason
Awesome!  I hope this grows into something really great.
 

Jason Merrill 
Bank of America  
Global Technology  Operations 
Learning  Leadership Development 
eTools  Multimedia Team 


 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Doug McCune
Sent: Wednesday, February 28, 2007 11:08 AM
To: flexcoders@yahoogroups.com; flexcomponents@yahoogroups.com
Subject: [flexcoders] Announcing FlexLib - open source flex
component library



I'm pleased to announce FlexLib: a new open-source project for
Flex 2
components. This project is a Google Code hosted project,
released
under the MIT license. I've been working with Darron Schall,
Mike
Chambers and Ted Patrick to get the project up and running.
We're
hoping to build a concentrated community effort for custom Flex
component development.

Have you been looking for a community project to contribute to?
Do you
have custom components you've been releasing on your blog? Want
to
brainstorm about new and improved components?

The project currently contains a handful of components that have
been
developed by me or Darron (including some new ones I haven't
blogged
about yet). We want to get the Flex developer community involved
and
have a central resource that will help us all build off each
other's
work. To get involved take a look at the project page on google
code
(link below) and read the HowToContribute wiki page.

For more information read through the project website, join the
discussion group, and email me if you have more questions. If
you want
to contribute your code, drop us a line and we'll get you
involved.

FlexLib project page: http://code.google.com/p/flexlib
http://code.google.com/p/flexlib 

Announcement on my blog:

http://dougmccune.com/blog/2007/02/28/announcing-flexlib-open-source-fle
x-component-library/
http://dougmccune.com/blog/2007/02/28/announcing-flexlib-open-source-fl
ex-component-library/ 

Darron Schall's announcement: http://darronschall.com/weblog/
http://darronschall.com/weblog/ 


 



Re: [flexcoders] Getting a Third-Party Component into Builder 2?

2007-02-28 Thread Nuno Morgadinho

Try adding the folder source path of the component under Project Properties

ActionScript Build Path .


[flexcoders] Re: How do I prevent the user from selecting text in a text area component?

2007-02-28 Thread Paul DeCoursey
If you don't need any other mouseEvents you could try setting
mouseEnabled to false.  Haven't tried it so I don't know.  Any reason
you can't use Text verses TextArea?



RE: [flexcoders] Announcing FlexLib - open source flex component library

2007-02-28 Thread leds usop
Great work as always! 

--- Merrill, Jason [EMAIL PROTECTED]
wrote:

 Awesome!  I hope this grows into something really
 great.
  
 
 Jason Merrill 
 Bank of America  
 Global Technology  Operations 
 Learning  Leadership Development 
 eTools  Multimedia Team 
 
 
  
 
 
 
 
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Doug McCune
   Sent: Wednesday, February 28, 2007 11:08 AM
   To: flexcoders@yahoogroups.com;
 flexcomponents@yahoogroups.com
   Subject: [flexcoders] Announcing FlexLib - open
 source flex
 component library
   
   
 
   I'm pleased to announce FlexLib: a new open-source
 project for
 Flex 2
   components. This project is a Google Code hosted
 project,
 released
   under the MIT license. I've been working with
 Darron Schall,
 Mike
   Chambers and Ted Patrick to get the project up and
 running.
 We're
   hoping to build a concentrated community effort for
 custom Flex
   component development.
   
   Have you been looking for a community project to
 contribute to?
 Do you
   have custom components you've been releasing on
 your blog? Want
 to
   brainstorm about new and improved components?
   
   The project currently contains a handful of
 components that have
 been
   developed by me or Darron (including some new ones
 I haven't
 blogged
   about yet). We want to get the Flex developer
 community involved
 and
   have a central resource that will help us all build
 off each
 other's
   work. To get involved take a look at the project
 page on google
 code
   (link below) and read the HowToContribute wiki
 page.
   
   For more information read through the project
 website, join the
   discussion group, and email me if you have more
 questions. If
 you want
   to contribute your code, drop us a line and we'll
 get you
 involved.
   
   FlexLib project page:
 http://code.google.com/p/flexlib
 http://code.google.com/p/flexlib 
   
   Announcement on my blog:
   

http://dougmccune.com/blog/2007/02/28/announcing-flexlib-open-source-fle
 x-component-library/

http://dougmccune.com/blog/2007/02/28/announcing-flexlib-open-source-fl
 ex-component-library/ 
   
   Darron Schall's announcement:
 http://darronschall.com/weblog/
 http://darronschall.com/weblog/ 
   
 

 
 



 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front


Re: [flexcoders] FDS port in biggest disadvantage in Flex?

2007-02-28 Thread Tom Chiverton
On Wednesday 28 Feb 2007, marcel.panse wrote:
 Because flex uses another port for FDS instead of 80... A lot of users
 have firewalls installed and cant use ports other than 80 or have to
 adjust there firewalls. I work at a company who just can't use other
 ports..

I belive there was a post from Adobe asking if anyone wanted to try a new 
FDS/SDK that would tunnel over port 80.

 Another problem is you have to specify an new port for every flex
 application you host on your server. Every webapp needs its own fds
 port. So you have to forward who ranges of ports in you firewalls and
 systems..

You could then use a reverse web proxy to send the requests to the correct 
back end.

-- 
Tom Chiverton
Helping to assertively optimize edge-of-your-seat partnerships
On: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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


Re: [flexcoders] Embedding FusionCharts in a Flex application

2007-02-28 Thread leds usop
not directly perhaps. try using flashinterface.

--- Muzak [EMAIL PROTECTED] wrote:

 FusionCharts are AS2.
 You'll be able to load a FusionChart swf into a Flex
 app, but you won't be able to control it from Flex
 though.
 
 regards,
 Muzak
 
 - Original Message - 
 From: Jon Rowland  [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, February 27, 2007 11:16 AM
 Subject: [flexcoders] Embedding FusionCharts in a
 Flex application
 
 
 Hi there,
 
 I'm looking at embedding a diagramming tool called
 PowerCharts from the
 FusionCharts suite within a Flex application. The
 chart is shipped as an
 SWF file, there are lots of examples of use, but
 none using Flex. Has
 anyone done this before? Basically I want to access
 it programatically,
 and use it like you would a 3rd party control in
 Visual Studio - e.g.
 drop it on my flex designer and access it
 programatically.
 
 Is this possible?
 
 Many thanks,
 
 Jon Rowland
 
 
 
 



 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php


[flexcoders] Re: Right Aligned Text in a UIComponent

2007-02-28 Thread Nate Pearson
Anyone have any ideas?

--- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote:

 I'm adding a label to a UIComponent at a dynamic x location.  The text
 for that label is also dynamic.
 
 How can I make it so the x location is the right side of the label? 
 Here is my code:
 
 var endDate:Label = new Label();
 endDate.graphics.lineStyle(1,0x00);
 endDate.text = data.EDText;
 endDate.styleName = columnEnd;
 endDate.height=20;
 endDate.width = 100;
 endDate.x = ratio*data.ED;
 endDate.y = 30;
 myUIComp.addChild(endDate);
 
 -Nate





[flexcoders] Re: How can I access public members of custom MXML component using inline statemen ?

2007-02-28 Thread helihobby
Pefect.
This solved the problem.


private var _prog:String;

public function set somPro(prog:String):void{
this._prog=prog;
}

public function get somPro():String{
return  this._prog;
}



As always, Thank you for all the help and support.

Regards,

Sean - http://www.HeliHobby.com

P.S.

You can read my solution for Flex Component communication here:

http://www.helihobby.com/html/alon_desingpattern.html



--- In flexcoders@yahoogroups.com, feiy [EMAIL PROTECTED] wrote:

 the public property must defined :
 private _prog;
 public function set somPro(String:prog):void{
 this._prog=prog;
 }
 public function get somPro():String{
 return  this._prog;
 }
 
 usage within mxml
 
 component somPro=value /
 
 2007/2/28, helihobby [EMAIL PROTECTED]:
 
Hello all,
 
  How can I access public members of custom MXML component using 
inline
  statemen ?
 
  For example, I have my own MXML component name myComp which has
  public members.
 
  How can I access these public member from inling mxml.
 
  In other words, of couse I can do myComp.myMember = ABC;
 
  But I wish to do it not in ActionScript but in MXML ( inline ).
 
  In other words, I wish to do:
 
  myview:MyComp x=100 y=100 myMember=ABC /
 
  In other words, in line MXML ( not in AS ).
 
  I tried using the setter function in myComp, but no luck.
 
  As always, Thank you for all the help and support.
 
  Regards,
 
  Sean - http://www.HeliHobby.com
 
  P.S.
 
  You can read my solution for Flex Component communication here:
 
  http://www.helihobby.com/html/alon_desingpattern.html
 
  public function doThis():void {
  }
 
  Now I want
 
  ns1 leDisplay id=viewerContainer x=263 y=85
  /ns1 leDisplay
 
   
 
 
 
 
 -- 
 ÏÐÔÆ¹Âº× - ÇåÀäÏãÖб§Ï¥Ò÷





Re: [flexcoders] Embedding FusionCharts in a Flex application

2007-02-28 Thread Muzak
http://livedocs.macromedia.com/flex/2/docs/1955.html
quote
Cross-scripting is not supported between AVM1 SWF files and AVM2 SWF files.
/quote

The only way to have an AVM1 and AVM2 swf communicate is through a 
LocalConnection.
No idea how large the FusionCharts API is, but if all you need is to call a 
method or two, then LocalConnection might be worth it.

regards,
Muzak


- Original Message - 
From: leds usop [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, February 28, 2007 6:01 PM
Subject: Re: [flexcoders] Embedding FusionCharts in a Flex application


 not directly perhaps. try using flashinterface.

 --- Muzak [EMAIL PROTECTED] wrote:

 FusionCharts are AS2.
 You'll be able to load a FusionChart swf into a Flex
 app, but you won't be able to control it from Flex
 though.

 regards,
 Muzak

 - Original Message - 
 From: Jon Rowland  [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, February 27, 2007 11:16 AM
 Subject: [flexcoders] Embedding FusionCharts in a
 Flex application


 Hi there,

 I'm looking at embedding a diagramming tool called
 PowerCharts from the
 FusionCharts suite within a Flex application. The
 chart is shipped as an
 SWF file, there are lots of examples of use, but
 none using Flex. Has
 anyone done this before? Basically I want to access
 it programatically,
 and use it like you would a 3rd party control in
 Visual Studio - e.g.
 drop it on my flex designer and access it
 programatically.

 Is this possible?

 Many thanks,

 Jon Rowland




[flexcoders] Re: Filterfunction on a XMLListCollection is misbehaving

2007-02-28 Thread iko_knyphausen

Here is the relevant code...Without the filter function all edits are
inplace without the updated record gets resorted... thanks.

mx:Script
![CDATA[
.



private function itemFilter (item : Object ) : Boolean
{
return true;
}
]]
/mx:Script



mx:HTTPService id=xmlItems result=searchComplete(event)
resultFormat=e4x contentType=application/x-www-form-urlencoded
fault=httpsFault(event) useProxy=false method=POST
url=items.asp/
mx:XMLListCollection id=xlcItems source={xmlItems.lastResult.item}
filterFunction=itemFilter/
mx:DataGrid sortableColumns=false dataProvider={xlcItems}
id=dgItems headerShift=reGroup(event)
headerRelease=headerRelease(event) editable=false focusAlpha=0.0
doubleClickEnabled=true doubleClick=editItem()
headerStyleName=header headerColors=[#ff,#dd] height=22
fontSize=11 left=10 right=10 top=10 alpha=1.0 bottom=10
borderStyle=solid borderColor=#bb
.
/mx:DataGrid






--- In flexcoders@yahoogroups.com, bobignacio [EMAIL PROTECTED] wrote:

 Any chance you can post your source code?


 --- In flexcoders@yahoogroups.com, iko_knyphausen iko@ wrote:
 
 
  Here is the deal... I have an XMLListCollection as a dataProvider
for a
  dataGrid, so that I can use custom sort and filterfunctions. My
  application provides for editing selected items (=rows) in the Grid,
  and when an edit is done, I update the Grid, by setting values of
the
  selectedItem, e.g.
 
  myGrid.selectedItem.dataField = newValue;
 
  This works fine, if I have no filterFunction defined for the
  XMLListCollection. The updates happen inplace, the Grid is updated
and
  the selectedItem (=row) is still highlighted, i.e. selected.
 
  The moment, I specify a filterFunction (one that returns true for
all
  records, mind you), any update to a field in the current
selectedItem
  will resort the Grid (no sort object specified, and the dataGrid
column
  sort is set to false), and the item is always sorted second last in
the
  grid. At the same time the selectedItem property is lost (set to
null).
 
  I know how to disable and enableAutoUpdate (to avoid loosing the
  selectedItem), but it still does not explain, why the grid data gets
  resorted
 
  Any insight from the pros?
 
  Thanks
 
  Iko
 





RE: [flexcoders] Re: Right Aligned Text in a UIComponent

2007-02-28 Thread Karl Johnson
What do you mean by making the x location the right side? If this is a canvas, 
then just set right equal to 0 if you just want the text box to be as far to 
the right as possible in the container.
 
You could also set the x to equal parent.width - 100. Does that solve what you 
are asking?
 
Karl
Cynergy



From: flexcoders@yahoogroups.com on behalf of Nate Pearson
Sent: Wed 2/28/2007 11:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Right Aligned Text in a UIComponent



Anyone have any ideas?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Nate 
Pearson [EMAIL PROTECTED] wrote:

 I'm adding a label to a UIComponent at a dynamic x location. The text
 for that label is also dynamic.
 
 How can I make it so the x location is the right side of the label? 
 Here is my code:
 
 var endDate:Label = new Label();
 endDate.graphics.lineStyle(1,0x00);
 endDate.text = data.EDText;
 endDate.styleName = columnEnd;
 endDate.height=20;
 endDate.width = 100;
 endDate.x = ratio*data.ED;
 endDate.y = 30;
 myUIComp.addChild(endDate);
 
 -Nate




 


[flexcoders] Re: How do I prevent the user from selecting text in a text area component?

2007-02-28 Thread Doug Lowder
You may find some helpful tips in this thread:

http://tech.groups.yahoo.com/group/flexcoders/message/44779

Unfortunately, it looks like the sample code may not be available at 
the moment.

--- In flexcoders@yahoogroups.com, beecee1977 [EMAIL PROTECTED] 
wrote:

 Yes, but that doesn't stop the user from selecting the text 
(dragging 
 mouse over and highlighting)... Is there an easy way to prevent 
that? 
 (Other than disabling the component)
 
 Bill
 
 --- In flexcoders@yahoogroups.com, Brian Holmes bholme@ wrote:
 
  editable=false
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
  Behalf Of Robin Burrer
  Sent: Monday, February 26, 2007 6:08 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] How do I prevent the user from selecting 
text 
 in a
  text area component?
  
  
  
  Hi there,
  
   
  
  How do I prevent the user from selecting text in a text area 
 component?
  
  
  I noticed that it does not have a selectable property and does 
not
  derive from the Text object either.
  
   
  
   
  
  Robin
  
   
  
  
  ***
  The information in this e-mail is confidential and intended 
solely 
 for the individual or entity to whom it is addressed.  If you have 
 received this e-mail in error please notify the sender by return e-
 mail delete this e-mail and refrain from any disclosure or action 
 based on the information.
  ***
 





[flexcoders] Re: Filterfunction on a XMLListCollection is misbehaving

2007-02-28 Thread iko_knyphausen

Correction: WITHOUT the filter function all edits are inplace, WITH the
filter function the updated record gets resorted...


--- In flexcoders@yahoogroups.com, iko_knyphausen [EMAIL PROTECTED] wrote:


 Here is the relevant code...Without the filter function all edits are
 inplace without the updated record gets resorted... thanks.

 mx:Script
 ![CDATA[
 .



 private function itemFilter (item : Object ) : Boolean
 {
 return true;
 }
 ]]
 /mx:Script



 mx:HTTPService id=xmlItems result=searchComplete(event)
 resultFormat=e4x contentType=application/x-www-form-urlencoded
 fault=httpsFault(event) useProxy=false method=POST
 url=items.asp/
 mx:XMLListCollection id=xlcItems
source={xmlItems.lastResult.item}
 filterFunction=itemFilter/
 mx:DataGrid sortableColumns=false dataProvider={xlcItems}
 id=dgItems headerShift=reGroup(event)
 headerRelease=headerRelease(event) editable=false focusAlpha=0.0
 doubleClickEnabled=true doubleClick=editItem()
 headerStyleName=header headerColors=[#ff,#dd] height=22
 fontSize=11 left=10 right=10 top=10 alpha=1.0 bottom=10
 borderStyle=solid borderColor=#bb
 .
 /mx:DataGrid






 --- In flexcoders@yahoogroups.com, bobignacio bobignacio@ wrote:
 
  Any chance you can post your source code?
 
 
  --- In flexcoders@yahoogroups.com, iko_knyphausen iko@ wrote:
  
  
   Here is the deal... I have an XMLListCollection as a dataProvider
 for a
   dataGrid, so that I can use custom sort and filterfunctions. My
   application provides for editing selected items (=rows) in the
Grid,
   and when an edit is done, I update the Grid, by setting values of
 the
   selectedItem, e.g.
  
   myGrid.selectedItem.dataField = newValue;
  
   This works fine, if I have no filterFunction defined for the
   XMLListCollection. The updates happen inplace, the Grid is updated
 and
   the selectedItem (=row) is still highlighted, i.e. selected.
  
   The moment, I specify a filterFunction (one that returns true
for
 all
   records, mind you), any update to a field in the current
 selectedItem
   will resort the Grid (no sort object specified, and the dataGrid
 column
   sort is set to false), and the item is always sorted second last
in
 the
   grid. At the same time the selectedItem property is lost (set to
 null).
  
   I know how to disable and enableAutoUpdate (to avoid loosing the
   selectedItem), but it still does not explain, why the grid data
gets
   resorted
  
   Any insight from the pros?
  
   Thanks
  
   Iko
  
 






[flexcoders] Re: FDS with Java Question: Why is it grouping requests?

2007-02-28 Thread billy_d_white
I think I'm just not closing or committing something correctly because
it looks like I'm supposed to do something else besides revertChanges to
'clear-out' the previous (failed) request.

I've added this change and it did remove part of the problem.  But now
I'm in a sort of limbo.  Take for example a deletion of a course subject
using deleteItem().

Previously, I would delete 'Art' which should cause an error.  It works
fine and returns the correct error code from the serverside.  Then I
would delete 'Science' but it would still be trying to delete 'Art' on
the backend.  Using revertChanges() fixed this issue.

However, now I'm getting 2 fault events on the clientside for each
deleteItem() call after the first call.  So I can delete 'Art' and
things work great (it shows me the serverside error code when the delete
fails.)   But when I try to delete 'Science', it works correctly on the
backend (trying to delete Science and returning the error code), but on
the client side, I get TWO fault events.  Oddly enough, the tokens
contained inside both of these FaultEvents have the correct server side
error code (Cannot delete Science) but the body property of the first
token still has a reference to the 'Art' object, while the second one
has the 'Science' object in the body property.  Even more interesting,
from this point on, I will always get 2 faultEvents and no more.  It is
not adding a return event for each call, but rather it is treating them
like a stack of 2 with the previous event being removed and the latest
even being added.  I always get 2 with the first having the previous
subject value in the body property.

Any ideas?


--- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote:

 When you get the fault for the first delete, you probably just need to
 call revertChanges - either for all changes or just that item.  
After
 any fault, all messages you commit as part of that batch get reverted
-
 i.e. put back into the uncommitted list.  When you revert them, we'll
 undo those changes - i.e. recreate the deleted item.  This is
necessary
 to keep the client's view of the managed state in sync with the
server's
 view.



 Jeff



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of billy_d_white
 Sent: Monday, February 26, 2007 9:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] FDS with Java Question: Why is it grouping
 requests?



 Maybe Vroom or one of you other FDS experts can tell my what I'm doing
 wrong :

 I'm using Cairngorm with a Java/Spring backend. I'm using autocommit
 and autosync enabled and when I perform a deleteItem which I want to
 fail, it calls my Java assembler which attempts the deletion and
 fails. I customize the error message and send it back as a
 MessageException. So far so good.

 However, if I then try another deletion, the request is sent to the
 assembler with an array of inside the DataMessage and this array
 contains the previous delete request as well as the new delete
 request. Apparently it is trying to batch the multiple requests since
 the previous one failed. (These are stored in that _token_chain_
 property of the request) How do I avoid this and make each deletion
 request atomic so it will not attempt to execute the previous (failed)
 request? Do I need to re-write the service call on the client to use
 the manual commit() call or something like that?

 Any




[flexcoders] Struggling with itemRenderer in DataGrid

2007-02-28 Thread Steve Gustafson

Help.

I'm trying to use an itemRenderer to create a comboBox in a DataGrid that is
being created with AS.

I can create the comboBox, but I am struggling with being able to change the
dataProvider for the rendered comboBox, and setting the selected index on
the comboBox.

The relevant code I am using is below.

Any help is GREATLY APPRECIATED as I am rapidly approaching a deadline.

Steve

public function createPositionTable():void
{
   _datagrid = positionsGrid;  // positionsGrid is an already created
DataGrid object
   _col1 = new DataGridColumn;
   _col2 = new DataGridColumn;
   _col3 = new DataGridColumn;
   _col4 = new DataGridColumn;
   _col5 = new DataGridColumn;

   _col1.headerText= Position;
   _col1.dataField = Description;
   _col1.editable = true;
   _col1.width = 100;

   _col2.dataField = Type;
   _col2.headerText= Type;
   _col2.editable = true;
   _col2.width = 50;

   _col3.dataField = levelCode;
   _col3.headerText = Level Code;
   _col3.width = 150;
   _col3.editable = false;
   _col3.itemRenderer = new ClassFactory(cbRender);  // HERE IS WHERE I AM
CREATING THE COMBO BOX
   _col3.editorDataField = levelCode;


   _columns = new Array(_col1,_col2,_col3);

   _datagrid.columns = _columns
   _datagrid.sortableColumns = false;
   _datagrid.dataProvider = objAdminTableGridDP;
   _datagrid.dragEnabled = false;
   _datagrid.dragMoveEnabled = false;
   _datagrid.dropEnabled = false;
   _datagrid.editable = true;
   _datagrid.rowHeight = 30;
   updateTablesButton.label = 'Update Positions Table';
}


cbRender.mxml

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=50 height=25

mx:Script
   ![CDATA[
   import mx.utils.ObjectUtil;
   [Bindable]
   public var myLevels:Array =
   [{label:Accounting, data:accounting},
   {label: Administator, data:1},
   {label:Programmer, data:2},
   {label:Vice President, data:3},
   {label:President, data:4},];

   public var cboLevelID:String = '';

   public function get setLevel():String {
   return cboLevels.selectedItem.data;
   }
   ]]
/mx:Script
   mx:ComboBox id=cboLevels dataProvider={myFolders}/
/mx:VBox


[flexcoders] Save a BitmapData as a local file

2007-02-28 Thread ecpmaz
... and that without passing by the server :S

I don't know if my question is stupid.. but all I've been able to do
till now was to send as a POST var my bytes to my server to assemble
them, and send them back to the user as a JPEG...

It seems not to be an optimal solution, do you have any solution ?

{Maz}



[flexcoders] Does anyone know of ActionScript for Linux ? Just the basic AS3 will be fine ...

2007-02-28 Thread helihobby
Does anyone know of ActionScript for Linux ? Just the basic AS3 will be 
fine ...

Don't need the full UI and Libs of Flex. 
Just basic AS3 Core Libs would be fine if they can run on Linux.

As always, Thank you for all the help and support.

Regards,

Sean - http://www.HeliHobby.com

P.S.

You can read my solution for Flex Component communication here:

http://www.helihobby.com/html/alon_desingpattern.html




[flexcoders] Re: any interest in an alternative to QTP to automate Flex apps?

2007-02-28 Thread brian.knorr

If you are interested we can collaborate on creating this...we are
taking a similar tdd approach to automating flex apps.  We too
explored using the automation package and found some useful
functionality, but we still intend to abstract this to a higher level
api so one can write test scripts using AS3 and never have to deal
with the automation packages.  Currently we are experimenting with
using asunit and flexunit as our test runner...no need to reinvent the
wheel here.  The one thing that they both lack though is a mechanism
to handle async events in the setUp method.

Also since the Flash Player is single threaded, everything is event
based.  Which doesn't work very well with procedural scripts. 
Basically you end up have to pass in continuation functions all over
the place which is very messy.  Currently we are working with the
Flash VM team to see if they can provide something that will help us
get around this issue.

Can your school assignment only be completed on your own, or can you
collaborate with others in an open source project?  We have already
created a project on sourceforge to house the new framework.  Would
you like to join us in this endeavor?


--- In flexcoders@yahoogroups.com, pmotzfeldt [EMAIL PROTECTED] wrote:

 Hi, I am a last year student at Norwegian University of Science and
 Technology and in my assignment I will try to make an open source
 framework for functional testing of flex applications.
 
 I have been playing a bit with the automation in Flex and is capable
 to record event, even though I do not need that, because I am going to
 have an Test Driven Development approach for this framework.
 
 But one thing that I have not managed is to programatically drive the
 Flex application. What methods in the automation package do you use, I
 have tried the replay event stuff, but does not get any response?
 
 Do you have any pointers?
 
 --- In flexcoders@yahoogroups.com, brian.knorr wundahwheel@ wrote:
 
  
  I started playing around with the automation package.  I first had to
  copy the automation source from the Flex SDK into my project and
  compile it...for some reason the classes are not accessible starting
  out.  I see that I can drive the Flex UI through the automation events
  programmatically...I did a little test and it seems to work so far.  I
  will continue looking into leveraging the automation classes found in
  the SDK.  I still plan on creating a scripting layer that abstracts
  folks from having to do event based logic.  But why do I need FDS?  It
  seems to work fine so far without it.
  
  
  --- In flexcoders@yahoogroups.com, Matt Chotin mchotin@ wrote:
  
   FDS requirement first: it is a licensing requirement; it is not a
   technical requirement.  And the license is that you need to pay
 for one
   FDS CPU license per tester seat.  That license could be Departmental
   (list $6k) or Enterprise.  So if you're looking to create a tool
that
   can be used for free by the testers, the automation framework is
   probably not for you.  But if you're just looking to avoid using QTP
   then this could give you a big head start.
   

   
   We are working on documentation for writing an agent.  That has been
   slower to come out because it's primarily ISV/partners who are
   interested in building agents.  When the docs are ready we'll post
 them.
   

   
   I think it is fair to say that playback is essentially what you
 need to
   support scripting, even if you don't need recording.  QTP for
example
   records actions into scripts, then the tool plays the script back
 and we
   turn those into the playback commands.  You can do the same thing.
   Either you can write to the automation framework directly with
events,
   or you could write some layer that takes your own scripting
calls and
   generates the automation events for you.  The automation
framework is
   written in AS and exposes classes, methods, and events, so it is
 capable
   of being used programmatically.
   

   
   Matt
   

   
   
   
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of brian.knorr
   Sent: Thursday, February 08, 2007 7:35 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: any interest in an alternative to QTP to
   automate Flex apps?
   

   
   
   Is there any documentation on building an adapter to use the
   automation packages? I browsed through the source of the classes in
   the automation package and it appears to support the record and
   playback model of testing, which in my opinion what you want to
avoid.
   Can the automation package be leveraged for programmatically
   controlling the Flex components like you would do in a tool like
   Watir, Watij, or Jemmy? Is FDS absolutely required to build on
top of
   this system? 
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   , Matt Chotin mchotin@ wrote:
   
I am not looking to derail 

[flexcoders] Re: Right Aligned Text in a UIComponent

2007-02-28 Thread Nate Pearson
Yes I mean aligned right.  The x to equal parent.width - 100 doesn't
work because the text is dynamic.  Some times it will have a width of
10 and some times it will be 90.  I just set it to 100 because I know
it will never go over 100.

Maybe there is a parameter that will make the label width flex with
the amount of text in it?  Then i could do x = parent.width -
label.width.  I couldn't find this parameter though.

--- In flexcoders@yahoogroups.com, Karl Johnson [EMAIL PROTECTED]
wrote:

 What do you mean by making the x location the right side? If this is
a canvas, then just set right equal to 0 if you just want the text
box to be as far to the right as possible in the container.
  
 You could also set the x to equal parent.width - 100. Does that
solve what you are asking?
  
 Karl
 Cynergy
 
 
 
 From: flexcoders@yahoogroups.com on behalf of Nate Pearson
 Sent: Wed 2/28/2007 11:13 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Right Aligned Text in a UIComponent
 
 
 
 Anyone have any ideas?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Nate Pearson napearson99@
wrote:
 
  I'm adding a label to a UIComponent at a dynamic x location. The text
  for that label is also dynamic.
  
  How can I make it so the x location is the right side of the label? 
  Here is my code:
  
  var endDate:Label = new Label();
  endDate.graphics.lineStyle(1,0x00);
  endDate.text = data.EDText;
  endDate.styleName = columnEnd;
  endDate.height=20;
  endDate.width = 100;
  endDate.x = ratio*data.ED;
  endDate.y = 30;
  myUIComp.addChild(endDate);
  
  -Nate
 





RE: [flexcoders] Re: Right Aligned Text in a UIComponent

2007-02-28 Thread Karl Johnson
You could grab the actual width of the label or you could put the label in a 
container like an HBox and set the horizontalAlign=right on the HBox. Set the 
width of the HBox to 100 if that is the max. Then set the x property or right 
style on the HBox as stated below.
 
Karl
Cynergy



From: flexcoders@yahoogroups.com on behalf of Nate Pearson
Sent: Wed 2/28/2007 1:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Right Aligned Text in a UIComponent



Yes I mean aligned right. The x to equal parent.width - 100 doesn't
work because the text is dynamic. Some times it will have a width of
10 and some times it will be 90. I just set it to 100 because I know
it will never go over 100.

Maybe there is a parameter that will make the label width flex with
the amount of text in it? Then i could do x = parent.width -
label.width. I couldn't find this parameter though.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Karl 
Johnson [EMAIL PROTECTED]
wrote:

 What do you mean by making the x location the right side? If this is
a canvas, then just set right equal to 0 if you just want the text
box to be as far to the right as possible in the container.
 
 You could also set the x to equal parent.width - 100. Does that
solve what you are asking?
 
 Karl
 Cynergy
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  on 
 behalf of Nate Pearson
 Sent: Wed 2/28/2007 11:13 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Right Aligned Text in a UIComponent
 
 
 
 Anyone have any ideas?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com , Nate Pearson napearson99@
wrote:
 
  I'm adding a label to a UIComponent at a dynamic x location. The text
  for that label is also dynamic.
  
  How can I make it so the x location is the right side of the label? 
  Here is my code:
  
  var endDate:Label = new Label();
  endDate.graphics.lineStyle(1,0x00);
  endDate.text = data.EDText;
  endDate.styleName = columnEnd;
  endDate.height=20;
  endDate.width = 100;
  endDate.x = ratio*data.ED;
  endDate.y = 30;
  myUIComp.addChild(endDate);
  
  -Nate
 




 


[flexcoders] Custom Collection Sorting Challenge

2007-02-28 Thread iko_knyphausen

Hi all,

more questions on custom collection sorting... I have a
XMLListCollection dataprovider, which I am sorting using a sort object.
The sorting works as expected, when I use the following syntax to define
the array of SortFields:

aSort.fields = [sfSortField, sfLevel];

However, I would like to assemble the fields array dynamically,
depending on column position, or what have you, so my first thought was
to use the array.push() method to add the individual SortFields, but
this fails without an exception being thrown...

i = aSort.fields.push(sfSortField);
i = aSort.fields.push(sfLevel);

Any ideas? Thanks



[flexcoders] Announcing FlexLib - open source flex component library

2007-02-28 Thread Doug McCune
I'm pleased to announce FlexLib: a new open-source project for Flex 2
components. This project is a Google Code hosted project, released
under the MIT license. I've been working with Darron Schall, Mike
Chambers and Ted Patrick to get the project up and running. We're
hoping to build a concentrated community effort for custom Flex
component development.

Have you been looking for a community project to contribute to? Do you
have custom components you've been releasing on your blog? Want to
brainstorm about new and improved components?

The project currently contains a handful of components that have been
developed by me or Darron (including some new ones I haven't blogged
about yet). We want to get the Flex developer community involved and
have a central resource that will help us all build off each other's
work. To get involved take a look at the project page on google code
(link below) and read the HowToContribute wiki page.

For more information read through the project website, join the
discussion group, and email me if you have more questions. If you want
to contribute your code, drop us a line and we'll get you involved.

FlexLib project page: http://code.google.com/p/flexlib

Announcement on my blog:
http://dougmccune.com/blog/2007/02/28/announcing-flexlib-open-source-flex-component-library/

Darron Schall's announcement: http://darronschall.com/weblog/


[flexcoders] Message board

2007-02-28 Thread avincen4
hello.. Im some what new to flex and for my first project I'd like to
make a message board using flex.. If there are any message boards that
were made using flex 2, it would be great just to get an idea of how
the  structure of the application was done. 

Thanks 



[flexcoders] Charting: Changing marker size for just one legend item

2007-02-28 Thread jeanette_stallons
Hi
I have another charting question. Is there a way to change the marker
size for just one legend item without having to make the entire legend
from scratch using mx:LegendItem tags? If possible, I still want to
use my chart as a dataProvider for the legend.
Thanks!
Jeanette



[flexcoders] Re: Right Aligned Text in a UIComponent

2007-02-28 Thread Paul DeCoursey
try

endDate.setStyle(right, 0);


paul


--- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote:

 I'm adding a label to a UIComponent at a dynamic x location.  The text
 for that label is also dynamic.
 
 How can I make it so the x location is the right side of the label? 
 Here is my code:
 
 var endDate:Label = new Label();
 endDate.graphics.lineStyle(1,0x00);
 endDate.text = data.EDText;
 endDate.styleName = columnEnd;
 endDate.height=20;
 endDate.width = 100;
 endDate.x = ratio*data.ED;
 endDate.y = 30;
 myUIComp.addChild(endDate);
 
 -Nate





[flexcoders] Re: Custom Collection Sorting Challenge

2007-02-28 Thread iko_knyphausen

Duh, was not thinking...forgot creating a new array first...interesting
though that it did not throw an exception...

aSort.fields = new Array();


--- In flexcoders@yahoogroups.com, iko_knyphausen [EMAIL PROTECTED] wrote:


 Hi all,

 more questions on custom collection sorting... I have a
 XMLListCollection dataprovider, which I am sorting using a sort
object.
 The sorting works as expected, when I use the following syntax to
define
 the array of SortFields:

 aSort.fields = [sfSortField, sfLevel];

 However, I would like to assemble the fields array dynamically,
 depending on column position, or what have you, so my first thought
was
 to use the array.push() method to add the individual SortFields, but
 this fails without an exception being thrown...

 i = aSort.fields.push(sfSortField);
 i = aSort.fields.push(sfLevel);

 Any ideas? Thanks





[flexcoders] Re: Custom Collection Sorting Challenge

2007-02-28 Thread Doug Lowder
Are you setting aSort.fields to an Array before calling push()?  Try 
the following before you push the sort fields:

 aSort.fields = [];

--- In flexcoders@yahoogroups.com, iko_knyphausen [EMAIL PROTECTED] wrote:

 
 Hi all,
 
 more questions on custom collection sorting... I have a
 XMLListCollection dataprovider, which I am sorting using a sort 
object.
 The sorting works as expected, when I use the following syntax to 
define
 the array of SortFields:
 
 aSort.fields = [sfSortField, sfLevel];
 
 However, I would like to assemble the fields array dynamically,
 depending on column position, or what have you, so my first 
thought was
 to use the array.push() method to add the individual SortFields, 
but
 this fails without an exception being thrown...
 
 i = aSort.fields.push(sfSortField);
 i = aSort.fields.push(sfLevel);
 
 Any ideas? Thanks





[flexcoders] Re: Charting: Selectively removing filters for one itemRenderer

2007-02-28 Thread jeanette_stallons
Anyone? Still wondering about this. Thanks!

--- In flexcoders@yahoogroups.com, jeanette_stallons [EMAIL PROTECTED]
wrote:

 Hi 
 I want to keep all the default drop shadow filters except on the data
 points for one series on a LineChart. 
 
 I can successfully remove all the filters (by either setting the
 seriesFilters equal to an empty array on the LineChart component or by
 changing the LineChart to a CartesianChart) and then add back the drop
 shadows as required, but how do I do this the other way around? ie
 just removing the filters for one specific itemRenderer? 
 
 I tried setting the filters property equal to an empty array for the
 itemRenderer as shown below, but this didn't work.
 
 mx:LineSeries id=s1 xField=A yField=B radius=20
   mx:itemRenderer
 mx:Component
   mx:CrossItemRenderer rotation=45 filters=[]/
 /mx:Component
   /mx:itemRenderer 
 /mx:LineSeries
 
 I also tried setting it with AS, setting it equal to an intermediate
 empty array as discussed in the docs (here on the series instead-
 which i also couldn't get working):
 mx:LineSeries id=s1 xField=A yField=B radius=20
 initialize=init()
 with
 public function init():void{
 var temp:Array=new Array();
 s1.filters=temp;
 }
 
 But no go. What am I missing?
 Thanks!
 Jeanette





[flexcoders] E4X not finding empty tags

2007-02-28 Thread thirtyfivemph
I've run into a curious problem with E4X (which is otherwise
spectacular). Given this document:

var document:XML =
document id=1
object id=4
content id=3
node id=20 /
/content
/object
object id=7
/object
/document;

I would have expected this code to work:

var list:XMLList = game..(@id == 7);

But the compiler gives me an error message:

Syntax error: expecting doublecolon before rightparen.

Can I not use the descendant selector (..) directly on an XML
object? All of the examples I've seen use it on XMLList objects, but I
didn't see any specific mentions that it only works with XMLList
objects. For now, it seems I have to do this to get the result I'm
looking for:

var list:XMLList = game.descendants().(@id == 7);

Which is fine, I just need to make sure I'm not misunderstanding the
E4X syntax or rules.

Thanks,

Troy.




[flexcoders] Re: Flex2 - Bug with chart Legend and ScrollPolicy

2007-02-28 Thread mgrayfmr
Hey guys:

Just an update to this problem.
If you put the legend inside a VBox or HBox, and set a fixed 
width/height, scrollbars can be added. This assumes the scrollpolicy 
is set to either 'auto' or 'on'.
I tried this out and it worked. The only drawback is you can't use 
percentages for width and height.

Cheers,
Mike

--- In flexcoders@yahoogroups.com, thunderstumpgesatwork 
[EMAIL PROTECTED] wrote:

 I did Anchor both the left and right sides of the HBox. Maybe the
 appearance of the scrollbars for the HBox caused the outer canvas
 scrollbars to appear too?
 
 I'll check this out again when I upgrade to Beta2.
 
 thanks for the info.
 Thunder
 
 --- In flexcoders@yahoogroups.com, Ely Greenfield egreenfi@ 
wrote:
 
  
  
  Hi Thunder.  The chart legend wasn't built to scroll. For 
codesize
  reasons, it extends Tile, which means it inherits scroll 
functionality,
  but it's been explicitly disabled.
  
  Assuming you either anchored both sides of the hbox (left/right 
or
  top/bottom, depending on what direction you're talking about) or 
set an
  explicit width/height, it should definitely constrain the hbox, 
forcing
  scrollbars. 
  
  Ely.
  
  
  -Original Message-
  From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
  Behalf Of thunderstumpgesatwork
  Sent: Friday, March 24, 2006 12:07 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Flex2 - Bug with chart Legend and 
ScrollPolicy
  
  Hi,
  
  I am trying to get the chart legend to scroll if there are more 
items
  than room to display. I have set the 'hScrollPolicy' to auto 
both in
  mxml, and after adding the chart series, in ActionScript.
  
  In the debugger the value is always 'off' even immediately after 
setting
  it.
  
  To work around this I tried putting the legend in an HBox to 
perform the
  scrolling. I am using Anchor LayoutConstraints on a Canvas, and 
I put
  the Anchor on the HBox, but aparently it doesn't take precedence 
over a
  large child (the legend) because the HBox just grew, and caused 
the
  whole canvas to add scrollbars.
  
  This may be two bugs, but seems like at least one.
  
  let me know if I'm missing something.
  thanks,
  Thunder
  
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 





[flexcoders] Serializing Object that contains IExternalizable properties

2007-02-28 Thread remygendron
Hello all,

I'm looking for the easiest way to serialize a dynamic Object 
instance that contains object types that implement IExternalizable. 
In my root object writeExternal method, I sucessfully serializes 
simple types. Everything still works great when I serializes an 
Object instance that contains only simple properties.

But when this Object instance contains class types that implements 
IExternalizable, I get the following error:

ArgumentError: Error #2004: One of the parameters is invalid.
at flash.utils::ByteArray/writeObject()

Here's the code for my main object, which btw extends Proxy. 
_dynamicProperties is an Object instance used to manage the object 
dynamic properties... ;-)

Any help appreciated!

Thanks!

Starman

public function writeExternal(output: IDataOutput): void
{
// _entityKey implements IExternalizable.
_entityKey.writeExternal(output);

output.writeBoolean(_dirty);
output.writeBoolean(_readonly);

// _dynamicProperties is an Object instance.
output.writeObject(_dynamicProperties);
}



  1   2   >