[flexcoders] Tree problem

2008-08-13 Thread venkat eswar
i have one doubt.i have to create a tree(group like chat application). actually 
i am using an array and that values has to be displayed as children.Here it is 
groupArr.also the groupName has to be kept as root and the array values has to 
be the children of the root (ie groupName).



  ?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;  width=448 height=454

mx:Script
![CDATA[
import mx.controls.Alert;

 import mx.controls.CheckBox;
 import mx.collections.ArrayCollection;
 import mx.events.CollectionEvent;
 import com.screencasterlive.model.DataManager;
 import org.igniterealtime.xiff.data.im.RosterItem;
 import com.screencasterlive.events.JabberEvent;

 
 
 public var obj:Object = new Object();
 
 
 [Bindable]
 private var dataManager:DataManager=DataManager.getInstance();
 

  private function saveGroup(evt:Event):void 
  {
   
   
   var idx:int;
   
   var len:int = dataManager.userGroup.length;

   for (idx=0; idxlen; idx++)
   {
 if (groupCheck[idx].selected) 
 {
 dataManager.groupArr.push(groupCheck[idx].label);
 }
 
   }
  
   dataManager.groupName = GroupNameText.text;
   
   Alert.show(dataManager.groupArr.toString());
   
   obj.groupArr = dataManager.groupArr;
   obj.groupName = dataManager.groupName;
   trace(obj.groupName);
   trace(obj.groupArr);
   groupListBox.visible = false;
   formName.visible = false;
   treeGroupBox.visible = true;
   
   tree.dataProvider = dataManager.groupArr;
   
   
 
  }

  

]]
/mx:Script


mx:TitleWindow x=61 y=10 width=316 height=399 
layout=absolute showCloseButton=true
mx:Form width=296 id=formName verticalScrollPolicy=off 
horizontalScrollPolicy=off
mx:FormItem label=Group Name  width=265
mx:TextInput id=GroupNameText width=176/
/mx:FormItem
/mx:Form
   
mx:VBox y=62 x=26 id=groupListBox
   mx:Repeater id=r dataProvider={dataManager.userGroup} 
mx:CheckBox id=groupCheck  
label={r.currentItem.toString()} /
   /mx:Repeater
/mx:VBox

mx:VBox id=treeGroupBox visible=false  x=10 y=122 height=107 
width=226 verticalScrollPolicy=off horizontalScrollPolicy=off
mx:Tree id=tree   height=190 verticalScrollPolicy=off 
horizontalScrollPolicy=off width=251

/mx:Tree
/mx:VBox
mx:Button x=74 y=327 label=Save emphasized=true
click=saveGroup(event);/
mx:Button x=147 y=327 label=Cancel /

/mx:TitleWindow


/mx:Canvas


Re: [flexcoders] Re: Error 1069 Decoding Error

2008-08-13 Thread Peeyush Tuli
Could be a problem with a malformed soap response which is not
confirming to the schema bound in the wsdl.

Please use a HTTP proxy like Charles to verify the response from the server.
Check if a fault element is in the xml response, which a soap webservice
enabled server
should send in most cases.

If the server response seems ok in charles, then try to turn on the strict
schema validation on the server side. It should tell if the problem is
server side or not.

~Peeyush

On Tue, Aug 12, 2008 at 6:21 PM, Mandy [EMAIL PROTECTED] wrote:

   Here is the full xml response:

 [RPC Fault faultString=Error #1069 faultCode=DecodingError
 faultDetail=null]
 (mx.messaging.messages::AcknowledgeMessage)#0
 body = ?xml version=1.0 encoding=utf-8?soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 soapenv:Body
 ns2:getProductsResponse
 xmlns:ns2=http://service.xxx.xx.xxx.xxx.xxx.xxx/;
 return ns2:size=344 ns2:name=Products ns2:link=Products
 product ns2:name=WEATHER ns2:link=WEATHER
 product ns2:name=CYCLONE ns2:link=WEATHER.ANALYSES.CYCLONE/
 product ns2:name=HYDROMARINE
 ns2:link=WEATHER.ANALYSES.HYDROMARINE/
 product ns2:name=MISCELLANEOUS
 ns2:link=WEATHER.ANALYSES.MISCELLANEOUS/
 /product
 /return
 /ns2:getProductsResponse
 /soapenv:Body/soapenv:Envelope

 ~Amanda

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  My xml response here doesn't really give us a lot to go on :)
 
  But, 1069 is field not found so you're probably decoding into a
 class
  that's missing a required field that's trying to be populated.
 
  -Josh
 
  On Tue, Aug 12, 2008 at 5:19 AM, Mandy [EMAIL PROTECTED] wrote:
 
   I am getting a decoding error calling a JAX-WS webservice. Both
 the
   flex app calling the webservice and the webservice are on the same
   machine, so I don't think I need a crossdomain.xml file. The funny
   thing is the webservice is returning the xml response to me that I
   want, but it gets sent to the fault method. I am using the Flex 2
   SDK.
  
   Here is the error:
   [RPC Fault faultString=Error #1069 faultCode=DecodingError
   faultDetail=null]
   (mx.messaging.messages::AcknowledgeMessage)#0
   body = ?xml version=1.0 encoding=utf-8?soapenv:Envelope
   xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Body
   My xml response here
   /soapenv:Body/soapenv:Envelope
   Here is my code:
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute
   mx:Script
   ![CDATA[
   import mx.controls.Alert;
   import mx.rpc.events.ResultEvent;
   import mx.rpc.events.FaultEvent;
  
   public function get(event:ResultEvent):void
   {
   Alert.show(event.toString());
   }
  
   public function web(event:FaultEvent):void
   {
   Alert.show(EVENT  +
 event.toString
   () + \nFAULT  + event.fault.toString()
   + \nMESSAGE  +
   event.message.toString() + \nTYPE  + event.type.toString()
   + \nEVENT_PHASE  +
   event.eventPhase.toString());
   }
  
   public function callWS():void
   {
   ProductsWS.getProducts(username,
   password);
   }
   ]]
   /mx:Script
   mx:WebService id=ProductsWS
   wsdl=http://host:port/Workspace/Project/WEB-INF/wsdl/Sample.wsdl;
   useProxy=false fault=web(event)
   showBusyCursor=true requestTimeout=30
   mx:operation name=getProducts result=get
 (event)
   fault=web(event)/
   /mx:WebService
   mx:Button id=CallWS label=call WS click=callWS();
   enabled=true x=292 y=234/
   /mx:Application
  
   Thanks,
   Amanda
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
 Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  



[flexcoders] Re: Loop through all visual components

2008-08-13 Thread itdanny2002

Still not success. I gave an example.

My user enter something e.g. login name and 
then program display the full name.

private function DoChecking(S:String):String {
 ...
if (TryOnce) then { 
  return Already Tried;
}
else {
  return First Time;
}
}

 mx:Label id=ShowName text={DoChecking(login)}/mx:Label

First time is ok but when another button is clicked and change
the variable TryOnce. The label 'ShowName' cannot be refreshed
eventhough I use ShowName.validatedisplaylist(). I also tried
validatenow()but not successAny help ?


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

 Somebody ask a similar question on this list recently. You can loop 
through all the components in your app by using the numChildren 
property and getChildAt method:
 
 function checkAllButtons(container) {
 
 ?for (var i = 0; i  container.numChildren; i++) {
 ??var c = container.getChildAt(i);
 ??if (c is Container) {
 ???checkAllButtons(c);
 ??} else {
 ???if (c is Button) {
 // Do your changes here
 ???}
 ??}
 ? 
 }
 
 
 Then start the process by passing the application as a parameter:
 
 checkAllButtons(Application.application);
 
 
 
 
 --
 Laurent Cozic
 
 Flash, Flex and Web Application development
 http://pogopixels.com
 
 --- On Tue, 8/12/08, itdanny2002 [EMAIL PROTECTED] wrote:
 From: itdanny2002 [EMAIL PROTECTED]
 Subject: [flexcoders] Loop through all visual components
 To: flexcoders@yahoogroups.com
 Date: Tuesday, August 12, 2008, 9:19 AM
 
 
 
 
 
 
 
 
 
 
 
 I have created a custom button and used it
 
 throughoutly in my FLEX application. How 
 
 can I change it dynamically by looping through 
 
 all components ? Is there any like children
 
 stuff and then use ValidateDisplayLis t to 
 
 make it refresh ? Actually, it likes changing
 
 the skin dynamically. But I need to check the 
 
 content of button before modification. 
 
 
 
 Having example is great. Thanks in advance.





Re: [flexcoders] Re: Loop through all visual components

2008-08-13 Thread Laurent Cozic
Not sure but I think you need to make your login variable (whather that is) 
bindable, so that, when it changes, the showName label is notified:


[Bindable]
private var login:String; // just guessing the declaration. The important part 
is the [Bindable] tag



--
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com

--- On Wed, 8/13/08, itdanny2002 [EMAIL PROTECTED] wrote:
From: itdanny2002 [EMAIL PROTECTED]
Subject: [flexcoders] Re: Loop through all visual components
To: flexcoders@yahoogroups.com
Date: Wednesday, August 13, 2008, 10:58 AM













Still not success. I gave an example.



My user enter something e.g. login name and 

then program display the full name.



private function DoChecking(S: String):String {

 ...

if (TryOnce) then { 

  return Already Tried;

}

else {

  return First Time;

}

}



mx:Label id=ShowName text={DoChecking( login)} /mx:Label



First time is ok but when another button is clicked and change

the variable TryOnce. The label 'ShowName' cannot be refreshed

eventhough I use ShowName.validatedi splaylist( ). I also tried

validatenow( )but not successAny help ?



--- In [EMAIL PROTECTED] ups.com, Laurent Cozic pogopixels@ ... 

wrote:



 Somebody ask a similar question on this list recently. You can loop 

through all the components in your app by using the numChildren 

property and getChildAt method:

 

 function checkAllButtons( container) {

 

 ?for (var i = 0; i  container.numChildr en; i++) {

 ??var c = container.getChildA t(i);

 ??if (c is Container) {

 ???checkAllButtons( c);

 ??} else {

 ???if (c is Button) {

 // Do your changes here

 ???}

 ??}

 ? 

 }

 

 

 Then start the process by passing the application as a parameter:

 

 checkAllButtons( Application. application) ;

 

 

 

 

 --

 Laurent Cozic

 

 Flash, Flex and Web Application development

 http://pogopixels. com

 

 --- On Tue, 8/12/08, itdanny2002 Chow.Danny@ ... wrote:

 From: itdanny2002 Chow.Danny@ ...

 Subject: [flexcoders] Loop through all visual components

 To: [EMAIL PROTECTED] ups.com

 Date: Tuesday, August 12, 2008, 9:19 AM

 

 

 

 

 

 

 

 

 

 

 

 I have created a custom button and used it

 

 throughoutly in my FLEX application. How 

 

 can I change it dynamically by looping through 

 

 all components ? Is there any like children

 

 stuff and then use ValidateDisplayLis t to 

 

 make it refresh ? Actually, it likes changing

 

 the skin dynamically. But I need to check the 

 

 content of button before modification. 

 

 

 

 Having example is great. Thanks in advance.






  




 

















  

[flexcoders] EU speakers (yes again ;) )

2008-08-13 Thread Gregor Kiddie
Having been reminded by Ted's post,

http://www.onflex.org/ted/2008/08/max-early-bird-pricing-19-days-left.ph
p

Are we going to get the EU speakers before the NA early bird runs out?
I've got the choice of either but I need to know if the NA one is going
to give me anything over the EU one! (And I'm sure the company would
like the early bird discount ;) )

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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

 



[flexcoders] Compiler Extension point

2008-08-13 Thread Marvin Froeder
Hi folks,

I was looking at flex SDK sources.

Looking at ImplementationCompiler, there one As3Compiler is instanced and
some extensions are added (addCompilerExtension) to As3Compiler.

At present time I can only add extensions by change compiler code, right?

Exists any extension point that I can call to add 3rdparty extensions to
compiler?  Or the only way is changing code?


VELO


Re: [flexcoders] WordWrapping a Label

2008-08-13 Thread Scott Melby
Make sure you set the width property, or the text will not wrap.

hth
Scott

-- 
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com


Gordon Smith wrote:
 You need to use mx:Text instead of mx:Label.

  

 Gordon Smith

 Adobe Flex SDK Team

  

 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of shafram
 Sent: Tuesday, August 12, 2008 5:43 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] WordWrapping a Label

  

 Hi is there a way to Word wrap a label? I know about the truncateToFit
 property but that's not exactly what I'm looking for.

 Thanks 

  


   




[flexcoders] Re: Problem in Identfying Flash Objects in QTP 9.2

2008-08-13 Thread jp_bit2001
Thanks for replay Anthony.

I did include these files but it did not made any difference. Is there 
anything else I' am missing here.

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

 Did you include automation.swc, automation_agent.swc, and qtp.swc?
 
 Besure to use IE and not Firefox... but if your using ActiveX I would 
 guess your already using firefox.
 
 Also - turn off Tabbed browsing - this can cause issues.
 
 
 
 It should work





[flexcoders] Re: what is a reliable way to know when your component is re-displayed

2008-08-13 Thread Amy
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Most folks use the Viewstack's change event.  You don't want to wait
 until they are displayed to update them, you want to do it just 
before,
 which is when the viewstack is changing.

I've found that sometimes in this event, children of the ViewStack are 
still null, so I will call invalidateProperties().  In commitProperties
(), I will call all my set functions.  Each set function checks to see 
what ViewStack pane it is in, and will exit immediately if it is not 
the right one.  This is probably not best practice, but it works for me.

HTH;

Amy



[flexcoders] Getting an ItemEditEnd event to fire from a customer itemEditor (Focus?)

2008-08-13 Thread Charlie Hubbard
Hi,

I have a customer item editor that handles a 5 star rating system.  If the
user clicks on the component it will rate it 1-5 stars.  I've gotten
everything working except I can't get the DataGrid to fire an itemEditEnd
event when I click on the component.  I figured it would work similar to
CheckBox, but I think my missing piece is that CheckBox is focusable where
my HBox with 5 Image components is probably not.  What actually triggers the
DataGrid to know when an editor is done editting?  Should my customer editor
fire the itemEditEnd event?  Or is that DataGrid's responsibility?  If it
is, what event can I fire to force DataGrid to fire it's ItemEditEnd event?

Thanks
Charlie


[flexcoders] Issues with mx:Text, mouse cursors, and Hrefs inside the text

2008-08-13 Thread Todd
Hello All,
  I'm using the mx:Text to render some htmlText complete with some
embedded href links.  My goal is to use the htmlText with a link (via
an href in the text), catch the event for the link, but treat the rest
of the text as a button in the parent.  Also, it's important to keep
the mouse pointer as either a arrow or hand.  Any suggestions?

  When I set the properties on the mx:Text with this: 
 mouseChildren=false
 buttonMode=true
 useHandCursor=true
The events for the LINK aren't raised, and the entire text area is
a button.  But the mouse pointer is functioning properly

  However, with the following settings, I get the proper
functionality, but the cursor over the text is selectable (and must be
to make the Link event fire):
 mouseChildren=true 
 buttonMode=false 
 useHandCursor=true

BTW, I've tried implementing the rolloever/rollout to change the
cursor, which it does.  But over the mx:Text it still shows the
selectable text.

Thanks,



[flexcoders] treeview advanced datagrid

2008-08-13 Thread natjai
I am looking to filter on tree view of an advanced datagrid. (Assuming
there are two columns item-name, misc-info. item-name object contains
the children objects, each having a name field).
Upon user typing a string (regexp) the effect is to match an item's
name or one of it's children's name and appropriately open (if not
already opened) the item and show the matched children.

How does one go about this?
thanks,
-jlogan



Re: [flexcoders] Trying to undo changes to datagrid dataprovider

2008-08-13 Thread Howard Fore
It was good enough. However I had a temporary case of what I like to call
PEBCAK - Problem Exists Between Keyboard And Chair!  :-) I have three
different cancel functions for various things and I was resetting the
datagrid in the wrong one!

Thanks for your help.

On Wed, Aug 13, 2008 at 12:41 AM, Alex Harui [EMAIL PROTECTED] wrote:

  What didn't work when you swapped in the original AC?  That should be
 good enough.




-- 
Howard Fore, [EMAIL PROTECTED]
The universe tends toward maximum irony. Don't push it. - Jeff Atwood


[flexcoders] Project Clean/Build All

2008-08-13 Thread Nik Derewianka
Ok,  someone let me in on the secret.

I do a project clean, verify that yes it empties out the directory  
except for the folders.

Build All...  for some reason it doesn't copy across ALL of the  
swf's.  It used to.  There is only one option on the Flex Compiler  
properties page to 'Copy all non-embedded files to output folder'.  It  
is checked, and has been since the beginning of the project.  Machine  
reboot etc doesn't fix this.  Is Flex trying to be smart about what it  
copies ?  Is there someway that I can force a copy of all files ?

Secondly - We have fonts, with exported classes sitting in swc's that  
are then referenced by css on components.  Compile first time, no  
problems text appears in the components, compile again after making no  
changes whatsoever to any source files.  Text disappears from all  
components that reference it.  Why would this happen ?, How can I stop  
it from doing that ?

Regards,
Nik


[flexcoders] Re: WordWrapping a Label

2008-08-13 Thread shafram
Thanks for the responses. As a follow on question, is there a way to
control the spacing in between the lines (for example single space,
double space) When the word wraps there is too much of a gap in
between the lines, and it would be nice to control that spacing.

Thanks


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

 Make sure you set the width property, or the text will not wrap.
 
 hth
 Scott
 
 -- 
 Scott Melby
 Founder, Fast Lane Software LLC
 http://www.fastlanesw.com
 
 
 Gordon Smith wrote:
  You need to use mx:Text instead of mx:Label.
 
   
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
   
 
  
 
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of shafram
  Sent: Tuesday, August 12, 2008 5:43 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] WordWrapping a Label
 
   
 
  Hi is there a way to Word wrap a label? I know about the truncateToFit
  property but that's not exactly what I'm looking for.
 
  Thanks 
 
   
 
 
 





Re: [flexcoders] Re: WordWrapping a Label

2008-08-13 Thread Scott Melby
I have not tried... but, it appears the styles on this page 
http://livedocs.adobe.com/flex/3/langref/mx/controls/Text.html should 
get you where you want to go.


hth
Scott

--
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com


shafram wrote:

Thanks for the responses. As a follow on question, is there a way to
control the spacing in between the lines (for example single space,
double space) When the word wraps there is too much of a gap in
between the lines, and it would be nice to control that spacing.

Thanks


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

Make sure you set the width property, or the text will not wrap.

hth
Scott

--
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com


Gordon Smith wrote:


You need to use mx:Text instead of mx:Label.

 


Gordon Smith

Adobe Flex SDK Team

 




From: flexcoders@yahoogroups.com
  

[mailto:[EMAIL PROTECTED] On
  

Behalf Of shafram
Sent: Tuesday, August 12, 2008 5:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] WordWrapping a Label

 


Hi is there a way to Word wrap a label? I know about the truncateToFit
property but that's not exactly what I'm looking for.

Thanks 

 




  




  




[flexcoders] Re: WordWrapping a Label

2008-08-13 Thread shafram
Thanks actually I found it, you have to play with the leading property


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

 I have not tried... but, it appears the styles on this page 
 http://livedocs.adobe.com/flex/3/langref/mx/controls/Text.html should 
 get you where you want to go.
 
 hth
 Scott
 
 -- 
 Scott Melby
 Founder, Fast Lane Software LLC
 http://www.fastlanesw.com
 
 
 shafram wrote:
  Thanks for the responses. As a follow on question, is there a way to
  control the spacing in between the lines (for example single space,
  double space) When the word wraps there is too much of a gap in
  between the lines, and it would be nice to control that spacing.
 
  Thanks
 
 
  --- In flexcoders@yahoogroups.com, Scott Melby smelby@ wrote:

  Make sure you set the width property, or the text will not wrap.
 
  hth
  Scott
 
  -- 
  Scott Melby
  Founder, Fast Lane Software LLC
  http://www.fastlanesw.com
 
 
  Gordon Smith wrote:
  
  You need to use mx:Text instead of mx:Label.
 
   
 
  Gordon Smith
 
  Adobe Flex SDK Team
 
   
 
  
 
  From: flexcoders@yahoogroups.com

  [mailto:[EMAIL PROTECTED] On

  Behalf Of shafram
  Sent: Tuesday, August 12, 2008 5:43 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] WordWrapping a Label
 
   
 
  Hi is there a way to Word wrap a label? I know about the
truncateToFit
  property but that's not exactly what I'm looking for.
 
  Thanks 
 
   
 
 
 

 
 
 
 





[flexcoders] Re: Tree problem

2008-08-13 Thread guillaumeracine

If you want your tree to be displayed correctly populate it with custom
value object that follows this structure:

public class GroupItemVO{
   public var name:String;
   public var children:Array;

   public function addChildren(item:GroupItem):void{
 this.children.addItem(item);
   }
}

and then the dataProvider of the tree must be a collection containing a
single GroupItemVO (root) that contains sub GroupItemVO in its children
property...and so on

The flex tree will know how to display the nodes correctly by recusivly
inspecting the children attribute.

I hope this will help you.
--- In flexcoders@yahoogroups.com, venkat eswar [EMAIL PROTECTED] wrote:

 i have one doubt.i have to create a tree(group like chat application).
actually i am using an array and that values has to be displayed as
children.Here it is groupArr.also the groupName has to be kept as root
and the array values has to be the children of the root (ie groupName).




 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;  width=448
height=454

 mx:Script
  ![CDATA[
   import mx.controls.Alert;

   import mx.controls.CheckBox;
   import mx.collections.ArrayCollection;
  import mx.events.CollectionEvent;
  import com.screencasterlive.model.DataManager;
  import org.igniterealtime.xiff.data.im.RosterItem;
  import com.screencasterlive.events.JabberEvent;



  public var obj:Object = new Object();


  [Bindable]
   private var dataManager:DataManager=DataManager.getInstance();


   private function saveGroup(evt:Event):void
   {


var idx:int;

var len:int = dataManager.userGroup.length;

for (idx=0; idxlen; idx++)
{
  if (groupCheck[idx].selected)
  {
  dataManager.groupArr.push(groupCheck[idx].label);
  }

}

dataManager.groupName = GroupNameText.text;

Alert.show(dataManager.groupArr.toString());

obj.groupArr = dataManager.groupArr;
obj.groupName = dataManager.groupName;
trace(obj.groupName);
trace(obj.groupArr);
groupListBox.visible = false;
formName.visible = false;
treeGroupBox.visible = true;

tree.dataProvider = dataManager.groupArr;



   }



  ]]
 /mx:Script


  mx:TitleWindow x=61 y=10 width=316 height=399
layout=absolute showCloseButton=true
  mx:Form width=296 id=formName verticalScrollPolicy=off
horizontalScrollPolicy=off
 mx:FormItem label=Group Name  width=265
 mx:TextInput id=GroupNameText width=176/
 /mx:FormItem
 /mx:Form

 mx:VBox y=62 x=26 id=groupListBox
mx:Repeater id=r dataProvider={dataManager.userGroup}
 mx:CheckBox id=groupCheck 
label={r.currentItem.toString()} /
/mx:Repeater
 /mx:VBox

 mx:VBox id=treeGroupBox visible=false  x=10 y=122
height=107 width=226 verticalScrollPolicy=off
horizontalScrollPolicy=off
  mx:Tree id=tree   height=190 verticalScrollPolicy=off
horizontalScrollPolicy=off width=251

  /mx:Tree
 /mx:VBox
  mx:Button x=74 y=327 label=Save emphasized=true
 click=saveGroup(event);/
  mx:Button x=147 y=327 label=Cancel /

  /mx:TitleWindow


 /mx:Canvas




Re: [flexcoders] SoundChannel position misreporting

2008-08-13 Thread Mark Carter

There is already a bug about this:

http://bugs.adobe.com/jira/browse/FP-33

The last comment says it might be fixed in the latest Flash Player 10
pre-release (beta 2, version 10,0,0,525) from early July...

I'll try to check this soon...
-- 
View this message in context: 
http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18963918.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Datavisualization.swc

2008-08-13 Thread yagogak
Where i can download the lastest version of datavisualization ? 
opensource.adobe.com allowed to download the lastest release of the
SDK, but i can't find a way to get release of datavisualization except
in official Flex Builder 3 pro.

thanks.





Re: [flexcoders] Re: Tree problem

2008-08-13 Thread Ryan Gravener
Also look at treedatadescriptor, that gives you a lot of control.

On 8/13/08, guillaumeracine [EMAIL PROTECTED] wrote:

 If you want your tree to be displayed correctly populate it with custom
 value object that follows this structure:

 public class GroupItemVO{
public var name:String;
public var children:Array;

public function addChildren(item:GroupItem):void{
  this.children.addItem(item);
}
 }

 and then the dataProvider of the tree must be a collection containing a
 single GroupItemVO (root) that contains sub GroupItemVO in its children
 property...and so on

 The flex tree will know how to display the nodes correctly by recusivly
 inspecting the children attribute.

 I hope this will help you.
 --- In flexcoders@yahoogroups.com, venkat eswar [EMAIL PROTECTED] wrote:

 i have one doubt.i have to create a tree(group like chat application).
 actually i am using an array and that values has to be displayed as
 children.Here it is groupArr.also the groupName has to be kept as root
 and the array values has to be the children of the root (ie groupName).




 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;  width=448
 height=454

 mx:Script
  ![CDATA[
   import mx.controls.Alert;

   import mx.controls.CheckBox;
   import mx.collections.ArrayCollection;
  import mx.events.CollectionEvent;
  import com.screencasterlive.model.DataManager;
  import org.igniterealtime.xiff.data.im.RosterItem;
  import com.screencasterlive.events.JabberEvent;



  public var obj:Object = new Object();


  [Bindable]
   private var dataManager:DataManager=DataManager.getInstance();


   private function saveGroup(evt:Event):void
   {


var idx:int;

var len:int = dataManager.userGroup.length;

for (idx=0; idxlen; idx++)
{
  if (groupCheck[idx].selected)
  {
  dataManager.groupArr.push(groupCheck[idx].label);
  }

}

dataManager.groupName = GroupNameText.text;

Alert.show(dataManager.groupArr.toString());

obj.groupArr = dataManager.groupArr;
obj.groupName = dataManager.groupName;
trace(obj.groupName);
trace(obj.groupArr);
groupListBox.visible = false;
formName.visible = false;
treeGroupBox.visible = true;

tree.dataProvider = dataManager.groupArr;



   }



  ]]
 /mx:Script


  mx:TitleWindow x=61 y=10 width=316 height=399
 layout=absolute showCloseButton=true
  mx:Form width=296 id=formName verticalScrollPolicy=off
 horizontalScrollPolicy=off
 mx:FormItem label=Group Name  width=265
 mx:TextInput id=GroupNameText width=176/
 /mx:FormItem
 /mx:Form

 mx:VBox y=62 x=26 id=groupListBox
mx:Repeater id=r dataProvider={dataManager.userGroup}
 mx:CheckBox id=groupCheck
 label={r.currentItem.toString()} /
/mx:Repeater
 /mx:VBox

 mx:VBox id=treeGroupBox visible=false  x=10 y=122
 height=107 width=226 verticalScrollPolicy=off
 horizontalScrollPolicy=off
  mx:Tree id=tree   height=190 verticalScrollPolicy=off
 horizontalScrollPolicy=off width=251

  /mx:Tree
 /mx:VBox
  mx:Button x=74 y=327 label=Save emphasized=true
 click=saveGroup(event);/
  mx:Button x=147 y=327 label=Cancel /

  /mx:TitleWindow


 /mx:Canvas





-- 
Ryan Gravener
http://twitter.com/ryangravener


Re: [flexcoders] Re: datagridcolumn

2008-08-13 Thread Michelle Davis
Hi Tim,
Thanks so much for the answer.  You are my savior.  I got it now.

At the beginning I tried getNumberAt but it didn't work so that's why I tried 
others.
privatefunctiongetLabelUnit2(item:Object, column:DataGridColumn): Number{   
return
}item.CaServiceIds.getNumberAt(1)
Have a nice day,
Michelle.

- Original Message 
From: Tim Hoff [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, August 12, 2008 8:17:39 PM
Subject: [flexcoders] Re: datagridcolumn


Hi Michelle,
You're on the right track with the labelFunction.  Give this a try:
privatefunctiongetLabelUnit1( item:Object, column:DataGridColu mn) : Number
{
 returnitem.CaServiceIds. getItemAt( 0);
}
privatefunctiongetLabelUnit2( item:Object, column:DataGridColu mn) : Number
{
 returnitem.CaServiceIds. getItemAt( 1);
}
mx:columns
mx:DataGridColumn headerText=Content Name dataField=ContentName width=64 
wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit1 labelFunction= getLabelUnit1 
width=63 wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit2 labelFunction= getLabelUnit2 
width=63 wordWrap=true/
/mx:columns
-TH

--- In [EMAIL PROTECTED] ups.com, Michelle Davis [EMAIL PROTECTED] wrote:

 Hello,
  
 I have the following issue and I don't know what to do.
  
 My DatagGrid dataProvider is ArrayCollection contains the following 
 information
  
 _1363246720dgCaAsso ciation = mx.controls. DataGrid (@34090a1) 
  mx.controls. dataGridClasses. DataGridBase [inherited] =  
  columnCount = 3 : Number 
  columns = Array (@317af59) 
  dataProvider = webservices. caconfigurator. CaAssociationArr ay (@3413601) 
   mx.collections. ArrayCollection [inherited] =  
   [0] = webservices. caconfigurator. CaAssociation (@33f3e51) 
    CaServiceIds = webservices. caconfigurator. CaServiceIdArray (@3413501) 
 mx.collections. ArrayCollection [inherited] =  
 [0] = 242 [0xf2] : Number 
 [1] = 243 [0xf3] : Number 
    ContentName = cu2 : String 
    Id = 1 : Number 
    RadioStationName = knx : String 
  
  
  
 I called DataGridColumn to display ContentName on the first column, 
 CaServiceIds[ 0] on the second column and CaServiceIds[ 1]on the third 
 column. But not successful.  Please help
  
 I tried the following:
  
 1) I used dataField in all 3 DataGridColumn.  The first column displayed 
 cu2, second column display 242,243  and third column display 242,243
   
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 dataField=CaServic eIds 
 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 dataField=CaServic eIds 
 width=63 wordWrap=true /
 /mx:columns
  
  
  
  
  
 2) I used labelFunction to display CaServiceIds[ 0] and CaServiceIds[ 1].  I 
 got an error Main Thread (Suspended: Error: Unknown Property: 'null'.) 
  mx.collections: :ListCollectionV iew/http: //www.adobe. com/2006/ 
 actionscript/ flash/proxy: :getProperty 
  view::RadioStations /getLabelUnit1 
  mx.controls. dataGridClasses: :DataGridColumn/ itemToLabel 
  mx.controls. dataGridClasses: :DataGridBase/ makeListData 
  mx.controls: :DataGrid/ http://www. adobe.com/ 2006/flex/ mx/internal: 
 :setupRendererFr omData 
  mx.controls: :DataGrid/ commitProperties 
  mx.core::UIComponen t/validateProper ties 
  mx.managers: :LayoutManager/ validateProperti es 
  mx.managers: :LayoutManager/ doPhasedInstanti ation 
  Function/http: //adobe.com/ AS3/2006/ builtin:: apply [no source] 
  mx.core::UIComponen t/callLaterDispa tcher2 
  mx.core::UIComponen t/callLaterDispa tcher 
 
 }privatefunctiondis playSellableUnit (ids:CaServiceId Array, index:Number) 
 :Number{returnid s.getNumberAt( index)privatefun ctiongetLabelUni 
 t1(item:Object, column:DataGridColu mn): Number{sellableUnit 1 = 
 displaySellableUnit (item.CaServiceI ds[column. dataField] ,0)varsellableUn 
 it1:Number} returnsellableUn it1
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 labelFunction= 
 getLabelUnit1 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 labelFunction= 
 getLabelUnit2 width=63 wordWrap=true /
 /mx:columns
  
 Thanks so much,
 Michelle  - beginner on Flex builder 3

 


  

[flexcoders] Shutoff or de-init BrowserManager (IE7 issues)

2008-08-13 Thread flexaustin
Is it possible to shutoff or browserManager for certain components or
for the entire application? 

So after you do the following:

browserManager = BrowserManager.getInstance();
browserManager.init(, Welcome);
// browserUrlChange just gets the
fragment on startup
browserUrlChange();

Can you now shut off or de-init the browserManager instance for
certain components or the entire app?  Or can you put a setting in
your children components to not notify the browserManager?  

I know you can do historyManagementEnabled=false for certain
navigator components, but since historyManagementEnabled is set to
false by browserManager and I set it manually in the application tag I
know its off. 

The problem I am having is that I have custom component that contains
several child components that go very deep. So when I navigate in my
component and all the children change IE7 makes several hundred
clicking sounds for change of each child so it clicks for about 3
mintues each time you navigate.  

I know I can shut off the clicking sound in my windows settings, but I
don't want all my users to have to do this.




Re: [flexcoders] Datavisualization.swc

2008-08-13 Thread Maciek Sakrejda
That's the place to get it. It's a commercial product. It's bundled with
Flex Builder 3 Pro.


-Original Message-
From: yagogak [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datavisualization.swc
Date: Wed, 13 Aug 2008 14:20:04 -

Where i can download the lastest version of datavisualization ? 
opensource.adobe.com allowed to download the lastest release of the
SDK, but i can't find a way to get release of datavisualization except
in official Flex Builder 3 pro.

thanks.




 




Re: [flexcoders] Re: datagridcolumn

2008-08-13 Thread Michelle Davis
Hi Tim,
Can I ask you another stupid question?  I learned labelFunction from the web 
site, I don't understand the second parameter column:DataGridColumn.  What is 
that for?
Thanks,
Michelle. 



- Original Message 
From: Tim Hoff [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, August 12, 2008 8:17:39 PM
Subject: [flexcoders] Re: datagridcolumn


Hi Michelle,
You're on the right track with the labelFunction.  Give this a try:
privatefunctiongetLabelUnit1( item:Object, column:DataGridColu mn) : Number
{
 returnitem..CaServiceIds. getItemAt( 0);
}
privatefunctiongetLabelUnit2( item:Object, column:DataGridColu mn) : Number
{
 returnitem.CaServiceIds. getItemAt( 1);
}
mx:columns
mx:DataGridColumn headerText=Content Name dataField=ContentName width=64 
wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit1 labelFunction= getLabelUnit1 
width=63 wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit2 labelFunction= getLabelUnit2 
width=63 wordWrap=true/
/mx:columns
-TH

--- In [EMAIL PROTECTED] ups.com, Michelle Davis [EMAIL PROTECTED] wrote:

 Hello,
  
 I have the following issue and I don't know what to do.
  
 My DatagGrid dataProvider is ArrayCollection contains the following 
 information
  
 _1363246720dgCaAsso ciation = mx.controls. DataGrid (@34090a1) 
  mx.controls. dataGridClasses. DataGridBase [inherited] =  
  columnCount = 3 : Number 
  columns = Array (@317af59) 
  dataProvider = webservices. caconfigurator. CaAssociationArr ay (@3413601) 
   mx.collections. ArrayCollection [inherited] =  
   [0] = webservices. caconfigurator. CaAssociation (@33f3e51) 
    CaServiceIds = webservices. caconfigurator. CaServiceIdArray (@3413501) 
 mx.collections. ArrayCollection [inherited] =  
 [0] = 242 [0xf2] : Number 
 [1] = 243 [0xf3] : Number 
    ContentName = cu2 : String 
    Id = 1 : Number 
    RadioStationName = knx : String 
  
  
  
 I called DataGridColumn to display ContentName on the first column, 
 CaServiceIds[ 0] on the second column and CaServiceIds[ 1]on the third 
 column. But not successful.  Please help
  
 I tried the following:
  
 1) I used dataField in all 3 DataGridColumn..  The first column displayed 
 cu2, second column display 242,243  and third column display 242,243
   
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 dataField=CaServic eIds 
 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 dataField=CaServic eIds 
 width=63 wordWrap=true /
 /mx:columns
  
  
  
  
  
 2) I used labelFunction to display CaServiceIds[ 0] and CaServiceIds[ 1].  I 
 got an error Main Thread (Suspended: Error: Unknown Property: 'null'.) 
  mx.collections: :ListCollectionV iew/http: //www.adobe. com/2006/ 
 actionscript/ flash/proxy: :getProperty 
  view::RadioStations /getLabelUnit1 
  mx.controls. dataGridClasses: :DataGridColumn/ itemToLabel 
  mx.controls. dataGridClasses: :DataGridBase/ makeListData 
  mx.controls: :DataGrid/ http://www. adobe.com/ 2006/flex/ mx/internal: 
 :setupRendererFr omData 
  mx.controls: :DataGrid/ commitProperties 
  mx.core::UIComponen t/validateProper ties 
  mx.managers: :LayoutManager/ validateProperti es 
  mx.managers: :LayoutManager/ doPhasedInstanti ation 
  Function/http: //adobe.com/ AS3/2006/ builtin:: apply [no source] 
  mx.core::UIComponen t/callLaterDispa tcher2 
  mx.core::UIComponen t/callLaterDispa tcher 
 
 }privatefunctiondis playSellableUnit (ids:CaServiceId Array, index:Number) 
 :Number{returnid s.getNumberAt( index)privatefun ctiongetLabelUni 
 t1(item:Object, column:DataGridColu mn): Number{sellableUnit 1 = 
 displaySellableUnit (item.CaServiceI ds[column. dataField] ,0)varsellableUn 
 it1:Number} returnsellableUn it1
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 labelFunction= 
 getLabelUnit1 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 labelFunction= 
 getLabelUnit2 width=63 wordWrap=true /
 /mx:columns
  
 Thanks so much,
 Michelle  - beginner on Flex builder 3

 


  

[flexcoders] Re: Shutoff or de-init BrowserManager (IE7 issues)

2008-08-13 Thread Tim Hoff

If you want to turn it off completely, there is a compiler setting.  Go
to project -- properties -- Flex Compiler.  Then uncheck the Enable
integration with browser navigation option.  This should disable the
forward/back browser buttons from interacting with the swf.  If you only
want to turn it off for certain navigation components, you're correct,
you'll need to use:

mx:ViewStack historyManagementEnabled=false/

-TH

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

 Is it possible to shutoff or browserManager for certain components or
 for the entire application?

 So after you do the following:

 browserManager = BrowserManager.getInstance();
 browserManager.init(, Welcome);
 // browserUrlChange just gets the
 fragment on startup
 browserUrlChange();

 Can you now shut off or de-init the browserManager instance for
 certain components or the entire app? Or can you put a setting in
 your children components to not notify the browserManager?

 I know you can do historyManagementEnabled=false for certain
 navigator components, but since historyManagementEnabled is set to
 false by browserManager and I set it manually in the application tag I
 know its off.

 The problem I am having is that I have custom component that contains
 several child components that go very deep. So when I navigate in my
 component and all the children change IE7 makes several hundred
 clicking sounds for change of each child so it clicks for about 3
 mintues each time you navigate.

 I know I can shut off the clicking sound in my windows settings, but I
 don't want all my users to have to do this.





[flexcoders] Re: My itemRenderer is cancelling wordWrap setting on AdvancedDataGridColumn

2008-08-13 Thread whatabrain
Just changing Label to Text worked. I didn't have to write a measure 
method.

I really wish the Flex controls had been written in a way that 
matches the OS's behavior better. I've had to write a lot of code 
(for example, this tooltip fix), just to make standard controls.

Ah well. Better the way it is, than not existing at all.



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

 Wordwrapping is the responsibility of the renderer.  Label is a
 single-line control so it won't word wrap.  Using Text is possible 
but
 you have to wire up the measure method correctly.  See past threads 
for
 how to do that.  Also, that makes a heavy weight renderer.
 
  
 
 My recommendation is to copy DataGridItemRenderer and remove the 
datatip
 code.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of whatabrain
 Sent: Tuesday, August 12, 2008 3:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] My itemRenderer is cancelling wordWrap 
setting on
 AdvancedDataGridColumn
 
  
 
 I want an AdvancedDataGridColumn to have word wrap, soI set the 
 wordWrap attribute to true. The column contains an itemRenderer, 
which 
 renders an mx:Label, which contains the actual text. But that text 
 doesn't wrap.
 
 mx:AdvancedDataGridColumn wordWrap=true
 mx:itemRenderer
 mx:Component
 mx:Label text=I am an unhappy table cell/
 /mx:Component
 /mx:itemRenderer
 /mx:AdvancedDataGridColumn
 
 The reason I'm using an itemRenderer is because otherwise, tooltips 
 don't work properly. They are always drawn within the cell, instead 
of 
 appearing at the corner of the mouse cursor like they should. 
Putting 
 the tooltip on the Label fixes the problem.





[flexcoders] Re: datagridcolumn

2008-08-13 Thread Tim Hoff

There are no stupid questions. :-)  I'm glad that you got it working. 
The second parameter specifies the DataGrid column.  This can be useful
if, for instance, you are using the same labelFunction for several
columns, and you need to conditionally format the returned object;
depending on the column that is using the callback function.

private functiongetLabelUnit( item:Object, column:DataGridColumn) :
Number
{
  if (column.headerText == Sellable Unit1) return
item.CaServiceIds. getItemAt(0);
  if (column.headerText == Sellable Unit2) return
item.CaServiceIds. getItemAt(1);
}

mx:columns
mx:DataGridColumn headerText=Content Name dataField=ContentName
width=64 wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit1 labelFunction=
getLabelUnit width=63 wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit2 labelFunction=
getLabelUnit width=63 wordWrap=true/
/mx:columns

-TH

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

 Hi Tim,
 Can I ask you another stupid question?  I learned labelFunction from
the web site, I don't understand the second parameter
column:DataGridColumn.  What is that for?
 Thanks,
 Michelle.



 - Original Message 
 From: Tim Hoff [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, August 12, 2008 8:17:39 PM
 Subject: [flexcoders] Re: datagridcolumn


 Hi Michelle,
 You're on the right track with the labelFunction.  Give this a try:
 privatefunctiongetLabelUnit1( item:Object, column:DataGridColu mn) :
Number
 {
  returnitem..CaServiceIds. getItemAt( 0);
 }
 privatefunctiongetLabelUnit2( item:Object, column:DataGridColu mn) :
Number
 {
  returnitem.CaServiceIds. getItemAt( 1);
 }
 mx:columns
 mx:DataGridColumn headerText=Content Name dataField=ContentName
width=64 wordWrap=true/
 mx:DataGridColumn headerText=Sellable Unit1 labelFunction=
getLabelUnit1 width=63 wordWrap=true/
 mx:DataGridColumn headerText=Sellable Unit2 labelFunction=
getLabelUnit2 width=63 wordWrap=true/
 /mx:columns
 -TH

 --- In [EMAIL PROTECTED] ups.com, Michelle Davis mtndavis@ wrote:
 
  Hello,
 
  I have the following issue and I don't know what to do.
 
  My DatagGrid dataProvider is ArrayCollection contains the following
information
 
  _1363246720dgCaAsso ciation = mx.controls. DataGrid (@34090a1)
   mx.controls. dataGridClasses. DataGridBase [inherited] =
   columnCount = 3 : Number
   columns = Array (@317af59)
   dataProvider = webservices. caconfigurator. CaAssociationArr ay
(@3413601)
mx.collections. ArrayCollection [inherited] =
[0] = webservices. caconfigurator. CaAssociation (@33f3e51)
 CaServiceIds = webservices. caconfigurator. CaServiceIdArray
(@3413501)
  mx.collections. ArrayCollection [inherited] =
  [0] = 242 [0xf2] : Number
  [1] = 243 [0xf3] : Number
 ContentName = cu2 : String
 Id = 1 : Number
 RadioStationName = knx : String
 
 
 
  I called DataGridColumn to display ContentName on the first column,
CaServiceIds[ 0] on the second column and CaServiceIds[ 1]on the third
column. But not successful.  Please help
 
  I tried the following:
 
  1) I used dataField in all 3 DataGridColumn..  The first column
displayed cu2, second column display 242,243  and third column
display 242,243
 
  mx:columns
  mx:DataGridColumn headerText= Content Name dataField=ContentN
ame width=64 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit1 dataField=CaServic
eIds width=63 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit2 dataField=CaServic
eIds width=63 wordWrap=true /
  /mx:columns
 
 
 
 
 
  2) I used labelFunction to display CaServiceIds[ 0] and
CaServiceIds[ 1].  I got an error Main Thread (Suspended: Error: Unknown
Property: 'null'.)
   mx.collections: :ListCollectionV iew/http: //www.adobe. com/2006/
actionscript/ flash/proxy: :getProperty
   view::RadioStations /getLabelUnit1
   mx.controls. dataGridClasses: :DataGridColumn/ itemToLabel
   mx.controls. dataGridClasses: :DataGridBase/ makeListData
   mx.controls: :DataGrid/ http://www. adobe.com/ 2006/flex/
mx/internal: :setupRendererFr omData
   mx.controls: :DataGrid/ commitProperties
   mx.core::UIComponen t/validateProper ties
   mx.managers: :LayoutManager/ validateProperti es
   mx.managers: :LayoutManager/ doPhasedInstanti ation
   Function/http: //adobe.com/ AS3/2006/ builtin:: apply [no source]
   mx.core::UIComponen t/callLaterDispa tcher2
   mx.core::UIComponen t/callLaterDispa tcher
 
  }privatefunctiondis playSellableUnit (ids:CaServiceId Array,
index:Number) :Number{returnid s.getNumberAt( index)privatefun
ctiongetLabelUni t1(item:Object, column:DataGridColu mn):
Number{sellableUnit 1 = displaySellableUnit (item.CaServiceI ds[column.
dataField] ,0)varsellableUn it1:Number} returnsellableUn it1
  mx:columns
  mx:DataGridColumn headerText= Content Name dataField=ContentN
ame width=64 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit1 labelFunction=
getLabelUnit1 width=63 wordWrap=true /
  

[flexcoders] Automation with addSynchronization

2008-08-13 Thread martinruiz87
Hello, I am trying to add automation, but i need to configure the
automationObjectHelper to wait until the server retrieves the
information. So basically I need the automation framework to freeze at
the execution of the command, and continue when the result method is
finished.

This is the idea of what is done but not working:

private var request: Boolean = false;

private function isComplete(): Boolean
{
  return !request;
}

public function execute( event : CairngormEvent) : void
{
  request = true;
  Automation.automationObjectHelper.addSynchronization(isComplete);
  doExecute(event);
}

public function result( event : Object ) : void
{
  request = false;
  doResult(event);
}

But the isComplete function is never used from the
automationObjectHelper.  I saw some examples and in all of them are
doing the same.
Am i missing something here?
Any help will be appreciated.

Thank you,
Regards
Martin




Re: [flexcoders] Re: datagridcolumn

2008-08-13 Thread Michelle Davis
Wows, I learned the new thing.  
Thanks so much,
Michelle.


- Original Message 
From: Tim Hoff [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 13, 2008 8:39:20 AM
Subject: [flexcoders] Re: datagridcolumn


There are no stupid questions. :-)  I'm glad that you got it working.  The 
second parameter specifies the DataGrid column.  This can be useful if, for 
instance, you are using the same labelFunction for several columns, and you 
need to conditionally format the returned object; depending on the column that 
is using the callback function.  privatefunctiongetLabelUni t( item:Object, 
column:DataGridColu mn) : Number
{
 if(column.headerText == Sellable Unit1) returnitem.CaServiceIds. 
getItemAt(0) ;
 if(column.headerText == Sellable Unit2) returnitem.CaServiceIds. 
getItemAt(1) ;
}mx:columns
mx:DataGridColumn
-TH
headerText=Content Name dataField=ContentName width=64 wordWrap=true/
mx:DataGridColumnheaderText=Sellable Unit1 labelFunction= getLabelUnit 
width=63 wordWrap=true/
mx:DataGridColumnheaderText=Sellable Unit2 labelFunction= getLabelUnit 
width=63 wordWrap=true/
/mx:columns
--- In [EMAIL PROTECTED] ups.com, Michelle Davis [EMAIL PROTECTED] wrote:

 Hi Tim,
 Can I ask you another stupid question?  I learned labelFunction from the web 
 site, I don't understand the second parameter column:DataGridColu mn.  What 
 is that for?
 Thanks,
 Michelle. 
 
 
 
 - Original Message 
 From: Tim Hoff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] ups.com
 Sent: Tuesday, August 12, 2008 8:17:39 PM
 Subject: [flexcoders] Re: datagridcolumn
 
 
 Hi Michelle,
 You're on the right track with the labelFunction.  Give this a try:
 privatefunctiongetL abelUnit1( item:Object, column:DataGridColu mn) : Number
 {
  returnitem.. CaServiceIds. getItemAt( 0);
 }
 privatefunctiongetL abelUnit2( item:Object, column:DataGridColu mn) : Number
 {
  returnitem.CaServic eIds. getItemAt( 1);
 }
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 labelFunction= 
 getLabelUnit1 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 labelFunction= 
 getLabelUnit2 width=63 wordWrap=true /
 /mx:columns
 -TH
 
 --- In [EMAIL PROTECTED] ups.com, Michelle Davis mtndavis@ wrote:
 
  Hello,
   
  I have the following issue and I don't know what to do.
   
  My DatagGrid dataProvider is ArrayCollection contains the following 
  information
   
  _1363246720dgCaAsso ciation = mx.controls. DataGrid (@34090a1) 
   mx.controls. dataGridClasses. DataGridBase [inherited] =  
   columnCount = 3 : Number 
   columns = Array (@317af59) 
   dataProvider = webservices. caconfigurator. CaAssociationArr ay (@3413601) 
    mx.collections. ArrayCollection [inherited] =  
    [0] = webservices. caconfigurator. CaAssociation (@33f3e51) 
     CaServiceIds = webservices. caconfigurator. CaServiceIdArray (@3413501) 
  mx.collections. ArrayCollection [inherited] =  
  [0] = 242 [0xf2] : Number 
  [1] = 243 [0xf3] : Number 
     ContentName = cu2 : String 
     Id = 1 : Number 
     RadioStationName = knx : String 
   
   
   
  I called DataGridColumn to display ContentName on the first column, 
  CaServiceIds[ 0] on the second column and CaServiceIds[ 1]on the third 
  column. But not successful.  Please help
   
  I tried the following:
   
  1) I used dataField in all 3 DataGridColumn. .  The first column 
  displayed cu2, second column display 242,243  and third column display 
  242,243
    
  mx:columns
  mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
  width=64 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit1 dataField=CaServic eIds 
  width=63 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit2 dataField=CaServic eIds 
  width=63 wordWrap=true /
  /mx:columns
   
   
   
   
   
  2) I used labelFunction to display CaServiceIds[ 0] and CaServiceIds[ 1].  
  I got an error Main Thread (Suspended: Error: Unknown Property: 'null'.) 
   mx.collections: :ListCollectionV iew/http: //www.adobe. com/2006/ 
  actionscript/ flash/proxy: :getProperty 
   view::RadioStations /getLabelUnit1 
   mx.controls. dataGridClasses: :DataGridColumn/ itemToLabel 
   mx.controls. dataGridClasses: :DataGridBase/ makeListData 
   mx.controls: :DataGrid/ http://www. adobe.com/ 2006/flex/ mx/internal: 
  :setupRendererFr omData 
   mx.controls: :DataGrid/ commitProperties 
   mx.core::UIComponen t/validateProper ties 
   mx.managers: :LayoutManager/ validateProperti es 
   mx.managers: :LayoutManager/ doPhasedInstanti ation 
   Function/http: //adobe.com/ AS3/2006/ builtin:: apply [no source] 
   mx.core::UIComponen t/callLaterDispa tcher2 
   mx.core::UIComponen t/callLaterDispa tcher 
  
  }privatefunctiondis playSellableUnit (ids:CaServiceId Array, index:Number) 
  :Number{returnid s.getNumberAt( index)privatefun ctiongetLabelUni 
  t1(item:Object, 

[flexcoders] Re: Datagrid editedItem

2008-08-13 Thread rmarples
I'm also looking for this. Does anybody have any thoughts? I'm using the 
AdvancedDataGrid.

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

 Hello guys,
 I need to write excell like aplication. which will send data to server
 after every cell edited. 
 I wrote some code and send data in event editing ended but by doing
 this it send data to server every time I change focus of cell. I need
 some code to determinate sell content is changed or not. 
 Does it any way to find content of editing cell?
 
 Thanks
 Deniz Davutoglu






Re: [flexcoders] Re: datagridcolumn

2008-08-13 Thread Michelle Davis
Hi Tim,
Now I know why when I tried labelFunction and getNumberAt.  It didn't work 
the first time.  The reason is I had only 1 argument in 
labelFunction.privatefunctiongetLabelUnit2(item:Object): Number{
    returnitem.CaServiceIds.getNumberAt(1)
  }
I got the error
ArgumentError: Error #1063: Argument count mismatch on 
view::RadioStations/getLabelUnit2(). Expected 1, got 2.
Michelle..

- Original Message 
From: Tim Hoff [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, August 12, 2008 8:17:39 PM
Subject: [flexcoders] Re: datagridcolumn


Hi Michelle,
You're on the right track with the labelFunction.  Give this a try:
privatefunctiongetLabelUnit1( item:Object, column:DataGridColu mn) : Number
{
 returnitem.CaServiceIds. getItemAt( 0);
}
privatefunctiongetLabelUnit2( item:Object, column:DataGridColu mn) : Number
{
 returnitem.CaServiceIds. getItemAt( 1);
}
mx:columns
mx:DataGridColumn headerText=Content Name dataField=ContentName width=64 
wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit1 labelFunction= getLabelUnit1 
width=63 wordWrap=true/
mx:DataGridColumn headerText=Sellable Unit2 labelFunction= getLabelUnit2 
width=63 wordWrap=true/
/mx:columns
-TH

--- In [EMAIL PROTECTED] ups.com, Michelle Davis [EMAIL PROTECTED] wrote:

 Hello,
  
 I have the following issue and I don't know what to do.
  
 My DatagGrid dataProvider is ArrayCollection contains the following 
 information
  
 _1363246720dgCaAsso ciation = mx.controls. DataGrid (@34090a1) 
  mx.controls. dataGridClasses. DataGridBase [inherited] =  
  columnCount = 3 : Number 
  columns = Array (@317af59) 
  dataProvider = webservices. caconfigurator. CaAssociationArr ay (@3413601) 
   mx.collections. ArrayCollection [inherited] =  
   [0] = webservices. caconfigurator. CaAssociation (@33f3e51) 
    CaServiceIds = webservices. caconfigurator. CaServiceIdArray (@3413501) 
 mx.collections. ArrayCollection [inherited] =  
 [0] = 242 [0xf2] : Number 
 [1] = 243 [0xf3] : Number 
    ContentName = cu2 : String 
    Id = 1 : Number 
    RadioStationName = knx : String 
  
  
  
 I called DataGridColumn to display ContentName on the first column, 
 CaServiceIds[ 0] on the second column and CaServiceIds[ 1]on the third 
 column. But not successful.  Please help
  
 I tried the following:
  
 1) I used dataField in all 3 DataGridColumn.  The first column displayed 
 cu2, second column display 242,243  and third column display 242,243
   
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 dataField=CaServic eIds 
 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 dataField=CaServic eIds 
 width=63 wordWrap=true /
 /mx:columns
  
  
  
  
  
 2) I used labelFunction to display CaServiceIds[ 0] and CaServiceIds[ 1].  I 
 got an error Main Thread (Suspended: Error: Unknown Property: 'null'.) 
  mx.collections: :ListCollectionV iew/http: //www.adobe. com/2006/ 
 actionscript/ flash/proxy: :getProperty 
  view::RadioStations /getLabelUnit1 
  mx.controls. dataGridClasses: :DataGridColumn/ itemToLabel 
  mx.controls. dataGridClasses: :DataGridBase/ makeListData 
  mx.controls: :DataGrid/ http://www. adobe.com/ 2006/flex/ mx/internal: 
 :setupRendererFr omData 
  mx.controls: :DataGrid/ commitProperties 
  mx.core::UIComponen t/validateProper ties 
  mx.managers: :LayoutManager/ validateProperti es 
  mx.managers: :LayoutManager/ doPhasedInstanti ation 
  Function/http: //adobe.com/ AS3/2006/ builtin:: apply [no source] 
  mx.core::UIComponen t/callLaterDispa tcher2 
  mx.core::UIComponen t/callLaterDispa tcher 
 
 }privatefunctiondis playSellableUnit (ids:CaServiceId Array, index:Number) 
 :Number{returnid s.getNumberAt( index)privatefun ctiongetLabelUni 
 t1(item:Object, column:DataGridColu mn): Number{sellableUnit 1 = 
 displaySellableUnit (item.CaServiceI ds[column. dataField] ,0)varsellableUn 
 it1:Number} returnsellableUn it1
 mx:columns
 mx:DataGridColumn headerText= Content Name dataField=ContentN ame 
 width=64 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit1 labelFunction= 
 getLabelUnit1 width=63 wordWrap=true /
 mx:DataGridColumn headerText= Sellable Unit2 labelFunction= 
 getLabelUnit2 width=63 wordWrap=true /
 /mx:columns
  
 Thanks so much,
 Michelle  - beginner on Flex builder 3

 


  

RE: [flexcoders] Displaying custom items in ComboBox

2008-08-13 Thread Regert, Michael
I'm looking at that now.  Thanks.  I'm going to need to see if I can
tweak it to use a canvas vs. a Icon Class.

 



Michael J. Regert

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, August 12, 2008 6:17 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Displaying custom items in ComboBox

 

IconComboBOx on my blog (blogs.adobe.com/aharui)

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Regert
Sent: Tuesday, August 12, 2008 2:46 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Displaying custom items in ComboBox

 

Below is a hello world program that creates a combo box which has 
a circle or a square as the drop-down selections. The drop down has 
a custom renderer which shows a label as well as a graphic of the 
shape. What I'd like to do is display this shape not just in the 
drop-down menu, but when the combo box list is closed(show the image 
as the selected item). Righ now, I can only get it to display text. 
Is this not possible? Suggestions? Thanks.

!-- MAIN MXML FILE --

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute creationComplete=initApp()
mx:Script
![CDATA[
import mx.containers.Canvas;
import mx.collections.ArrayCollection;
[Bindable]
public var acSelections:ArrayCollection;
public var aSelections:Array = 
[{type:'circle', image:circleSelection()},{type:'square', 
image:squareSelection()}];

private function initApp():void {
acSelections = new ArrayCollection
(aSelections);
}
private function squareSelection():Canvas {
var canvas:Canvas = new Canvas(); // 
New canvas to hold the drawing object
canvas.width = canvas.height = 20;
canvas.graphics.lineStyle(2, 
0x00, 1);
canvas.graphics.drawRect(2, 2, 16, 
16);
return canvas; 

}
private function circleSelection():Canvas {
var canvas:Canvas = new Canvas(); // 
New canvas to hold the drawing object
canvas.width = canvas.height = 20;
canvas.graphics.lineStyle(2, 
0x00, 1);
canvas.graphics.drawCircle(10, 10, 
8);
return canvas; 

}

]]
/mx:Script
mx:Panel id=pnlMain layout=absolute title=Custom Combo 
Box x=10 y=10 width=250 height=200
mx:ComboBox id=cbSelection horizontalCenter=0 
verticalCenter=0 dataProvider={acSelections}
itemRenderer=MyComboBox labelField=type 
rowCount={acSelections.length} width=100/
/mx:Panel

/mx:Application

!-- * MYCOMBOBOX.MXML RENDERER BELOW * --

?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script
![CDATA[
private var _data:Object;
override public function set data(value:Object):void 
{
_data = value;
removeAllChildren();
switch (_data.type) {
case circle: addChild
(_data.image); break;
case square: addChild
(_data.image); break;
}
}
override public function get data():Object
{
return _data;
}

]]
/mx:Script
mx:Label text={data.type}/
/mx:HBox

 



RE: [flexcoders] AS 3.0 event target problem!!!

2008-08-13 Thread Zoran Avramov
Hi Alex/Gordon
 
The problem with assigning IDs is that the popup container has that close 
button (the path that I gave) when you create the actual popup. For example the 
button that I gave an example with no path to the root 
(ConfirmScreen388.UIComponent418.Button422), is created by just setting this 
flag 'showCloseButton=true' in the code below. I need to be able to find a 
way to identify that button or any other DisplayObject that I want to monitor 
for clicks and then execute those clicks on a different instance of the same 
.swf. I have not found a good way to do this and if you can help me understand 
how you render your DOM in flex (at least the part that will help me do this) 
it would be greatly appreciated. 
 
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical
 close=PopUpManager.removePopUp(this)
 showCloseButton=true
 
 
Thanks,
Zoran
 


--- On Tue, 8/12/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: flexcoders@yahoogroups.com
Date: Tuesday, August 12, 2008, 9:38 PM








He’s surprised that the popup isn’t parented by the app.  Popups are parented 
by the systemMgr which also parents the app.
 
Id’s are per-document (or per-mxml file) so you can traverse documents and pull 
objects by their ids.
 




From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of Gordon Smith
Sent: Tuesday, August 12, 2008 7:54 PM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
 




What do you mean by I don't have the path to the root?
 
If you assign an id to each component, the toString() method will use that 
instead of a dynamically generated name like Button498.
 
Gordon Smith
Adobe Flex SDK Team
 




From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of zoran_101
Sent: Tuesday, August 12, 2008 4:30 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] AS 3.0 event target problem!!!
 



I have an interesting problem regarding event.target in Flex 
2/ActionScript 3.0. I am using the Flex Grocer app in order to try 
something out. I am attaching listeners to all the click events and 
then printing out event.target to keep track of my events and where 
we clicked, nothing revolutionary here very easy stuff. Once I get 
the paths I would like to run code that will execute my steps and 
play the clicks back based on the event.target information that I got 
and I was able to do that except when we have popups. Here is the 
problem:

When I execute a click on a button with event.target =
DataEntry0._ UpdateDeleteProd 1.Form10. FormItem102. HBox103.Button10 4 
A poupup appears and then I click on the close button on that popup 
with event.target=
ConfirmScreen464. UIComponent494. Button498

COUPLE OF PROBLEMS HERE:
1) I don't have the path to the root (DataEntry0) even though I 
use the standard event.target.
2) This is even a bigger problem, the DOM path 
(ConfirmScreen464. UIComponent494. Button498) is dynamically generated 
(the numbers are dynamically generated) so when I use that path that 
I got during the time I was monitoring the app, when I use my code to 
play the events that very same target does not correspond to the 
popup that the fist event caused. 

I tried using IDs but in Flex I have not found anything like 
document.getElement ById() that is available in JavaScript. Any help 
on this will be greatly appreciated.

Thanks

p.s. I looked at the automation library that Flex has (and Mercury 
QTP uses) but that will not work for me.
 














  

[flexcoders] .swf displays fine, but MovieClip methods fail

2008-08-13 Thread Merrill, Jason
I'm displaying some sprites inside a Flex 3 container with Actionscript.  So 
far on this project, the sprites I have been showing have been visually drawn 
on the screen either by embedding an image or by drawing with sprite.graphics 
methods. Now, I'm trying to embed a .swf, and it works (it displays and plays), 
but MovieClip method actions attempting to control the embedded .swf fail.  

My first thought was I published as AM1 on accident, but the .swf is AVM2 - 
Flash CS3 published as Player 9 and Actionscript 3.  The .swf contains an 
animation on it's root, no child clips.  See the comments in the code below 
(this is a simplified version of the class, I stripped out everything I thought 
was irrelevant to my question).  Does it have to do with a MovieClip being a 
child to a Sprite?  If so, why?  If not, what's the issue with the code below?  

package com.venice.view.network.atom
{
import flash.display.MovieClip;
import flash.display.Sprite;

public class AtomView extends Sprite
{   
private var _menu:MovieClip;

[Embed(source = /media/buttons/atomMenu.swf)]
[Bindable]
private var _menuSource:Class;

public function AtomView()
{
createSprites();
}

private function createSprites():void
{
//this works fine, the menu.swf appears:
_menu = new _menuSource() as MovieClip;
addChild(_menu);

//however, the following MovieClip actions don't work.  
//For example, (when uncommented), the following 
actions 
//have no effect on the root timeline:
//
//_menu.stop();
//
//or if I put a stop action on the .swf 
timeline, these don't work either:
//_menu.nextFrame();
//or
//_menu.play();
//
//why? It's a Flash 9/Actionscript 3.0 .swf created 
with Flash CS3.
}
}
}

Thanks for any help.


Jason Merrill 
Bank of America 
Enterprise Technology  Global Risk LLD 
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx 

Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx  
 subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.aspx
 . 




[flexcoders] Re: datagridcolumn

2008-08-13 Thread Tim Hoff
Yup.  Also, I'm not familiar with getNumberAt().  The collection API 
uses getItemAt(), or you can use bracket notation.

-TH

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

 Hi Tim,
 Now I know why when I tried labelFunction and getNumberAt.  It 
didn't work the first time.  The reason is I had only 1 argument in 
labelFunction.privatefunctiongetLabelUnit2(item:Object): Number{
     returnitem.CaServiceIds.getNumberAt(1)
   }
 I got the error
 ArgumentError: Error #1063: Argument count mismatch on 
view::RadioStations/getLabelUnit2(). Expected 1, got 2.
 Michelle..
 
 - Original Message 
 From: Tim Hoff [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, August 12, 2008 8:17:39 PM
 Subject: [flexcoders] Re: datagridcolumn
 
 
 Hi Michelle,
 You're on the right track with the labelFunction.  Give this a try:
 privatefunctiongetLabelUnit1( item:Object, column:DataGridColu 
mn) : Number
 {
  returnitem.CaServiceIds. getItemAt( 0);
 }
 privatefunctiongetLabelUnit2( item:Object, column:DataGridColu 
mn) : Number
 {
  returnitem.CaServiceIds. getItemAt( 1);
 }
 mx:columns
 mx:DataGridColumn headerText=Content Name 
dataField=ContentName width=64 wordWrap=true/
 mx:DataGridColumn headerText=Sellable Unit1 
labelFunction= getLabelUnit1 width=63 wordWrap=true/
 mx:DataGridColumn headerText=Sellable Unit2 
labelFunction= getLabelUnit2 width=63 wordWrap=true/
 /mx:columns
 -TH
 
 --- In [EMAIL PROTECTED] ups.com, Michelle Davis mtndavis@ 
wrote:
 
  Hello,
   
  I have the following issue and I don't know what to do.
   
  My DatagGrid dataProvider is ArrayCollection contains the 
following information
   
  _1363246720dgCaAsso ciation = mx.controls. DataGrid (@34090a1) 
   mx.controls. dataGridClasses. DataGridBase [inherited] =  
   columnCount = 3 : Number 
   columns = Array (@317af59) 
   dataProvider = webservices. caconfigurator. CaAssociationArr ay 
(@3413601) 
    mx.collections. ArrayCollection [inherited] =  
    [0] = webservices. caconfigurator. CaAssociation (@33f3e51) 
     CaServiceIds = webservices. caconfigurator. CaServiceIdArray 
(@3413501) 
  mx.collections. ArrayCollection [inherited] =  
  [0] = 242 [0xf2] : Number 
  [1] = 243 [0xf3] : Number 
     ContentName = cu2 : String 
     Id = 1 : Number 
     RadioStationName = knx : String 
   
   
   
  I called DataGridColumn to display ContentName on the first 
column, CaServiceIds[ 0] on the second column and CaServiceIds[ 1]on 
the third column. But not successful.  Please help
   
  I tried the following:
   
  1) I used dataField in all 3 DataGridColumn.  The first column 
displayed cu2, second column display 242,243  and third column 
display 242,243
    
  mx:columns
  mx:DataGridColumn headerText= Content Name dataField=ContentN 
ame width=64 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit1 
dataField=CaServic eIds width=63 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit2 
dataField=CaServic eIds width=63 wordWrap=true /
  /mx:columns
   
   
   
   
   
  2) I used labelFunction to display CaServiceIds[ 0] and 
CaServiceIds[ 1].  I got an error Main Thread (Suspended: Error: 
Unknown Property: 'null'.) 
   mx.collections: :ListCollectionV iew/http: //www.adobe. 
com/2006/ actionscript/ flash/proxy: :getProperty 
   view::RadioStations /getLabelUnit1 
   mx.controls. dataGridClasses: :DataGridColumn/ itemToLabel 
   mx.controls. dataGridClasses: :DataGridBase/ makeListData 
   mx.controls: :DataGrid/ http://www. adobe.com/ 2006/flex/ 
mx/internal: :setupRendererFr omData 
   mx.controls: :DataGrid/ commitProperties 
   mx.core::UIComponen t/validateProper ties 
   mx.managers: :LayoutManager/ validateProperti es 
   mx.managers: :LayoutManager/ doPhasedInstanti ation 
   Function/http: //adobe.com/ AS3/2006/ builtin:: apply [no 
source] 
   mx.core::UIComponen t/callLaterDispa tcher2 
   mx.core::UIComponen t/callLaterDispa tcher 
  
  }privatefunctiondis playSellableUnit (ids:CaServiceId Array, 
index:Number) :Number{returnid s.getNumberAt( index)privatefun 
ctiongetLabelUni t1(item:Object, column:DataGridColu mn): Number
{sellableUnit 1 = displaySellableUnit (item.CaServiceI ds[column. 
dataField] ,0)varsellableUn it1:Number} returnsellableUn it1
  mx:columns
  mx:DataGridColumn headerText= Content Name dataField=ContentN 
ame width=64 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit1 
labelFunction= getLabelUnit1 width=63 wordWrap=true /
  mx:DataGridColumn headerText= Sellable Unit2 
labelFunction= getLabelUnit2 width=63 wordWrap=true /
  /mx:columns
   
  Thanks so much,
  Michelle  - beginner on Flex builder 3
 





[flexcoders] Re: Datagrid editedItem

2008-08-13 Thread Tim Hoff
You could take a snapshot of the cell's listData on the 
itemEditBeginning event.  Then, on the itemEditEnd event, compare the 
cell's listData to the snapshot; to determine if you really need to 
send the data.

-TH

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

 I'm also looking for this. Does anybody have any thoughts? I'm 
using the AdvancedDataGrid.
 
 --- In flexcoders@yahoogroups.com, Deniz Davutoglu 
deniz.davutoglu@ wrote:
 
  Hello guys,
  I need to write excell like aplication. which will send data to 
server
  after every cell edited. 
  I wrote some code and send data in event editing ended but by 
doing
  this it send data to server every time I change focus of cell. I 
need
  some code to determinate sell content is changed or not. 
  Does it any way to find content of editing cell?
  
  Thanks
  Deniz Davutoglu
 





[flexcoders] Re: Datagrid editedItem

2008-08-13 Thread rmarples
The thing I'm finding cumbersome is that the dataProvider has not yet been 
modified when 
the itemEditEnd fires. I have to look at the 
TextInput(grid.itemEditorInstance).text property 
to get the new value. What I really want to do is just fire off a command to go 
save the 
current record to the server and have that command just refer to my model's 
collection to 
get the new value. But as I say, the value hasn't been written back to the 
collection yet.

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

 You could take a snapshot of the cell's listData on the 
 itemEditBeginning event.  Then, on the itemEditEnd event, compare the 
 cell's listData to the snapshot; to determine if you really need to 
 send the data.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, rmarples 
 rmarples+flexcoders@ wrote:
 
  I'm also looking for this. Does anybody have any thoughts? I'm 
 using the AdvancedDataGrid.
  
  --- In flexcoders@yahoogroups.com, Deniz Davutoglu 
 deniz.davutoglu@ wrote:
  
   Hello guys,
   I need to write excell like aplication. which will send data to 
 server
   after every cell edited. 
   I wrote some code and send data in event editing ended but by 
 doing
   this it send data to server every time I change focus of cell. I 
 need
   some code to determinate sell content is changed or not. 
   Does it any way to find content of editing cell?
   
   Thanks
   Deniz Davutoglu
  
 






[flexcoders] DateValidator not being disabled with errorString=

2008-08-13 Thread netdeep
I have Validators for some of my TextInput and Datefields.  I am loading my 
TextInput and 
DateFields first via ActionScript and then resetting them later through 
ActionScript so I 
never even click on the DateField but the Validator still triggers when I 
reset. Basically I 
want the 'reset all' behavior to not trigger validator warnings. I am resetting 
all of the 
fields in my interface and my validator is firing for the DateField but not for 
TextInputs. I 
can disable TextInput with:

textInput.errorString = ;

And get no red lines or errors. But when I try:

dateField.errorString = ; 

the red box is still there. What is going on? I've tried it with both 
StringValidators and with 
DateValidators, but both exhibit the same problem.

Here are my mxml definitions: 

mx:DateValidator id=startFixedValidator source={startDate} property=text 
/

mx:DateField color=#00 id=startDate/



[flexcoders] Re: Error 1069 Decoding Error

2008-08-13 Thread Mandy
I fixed the problem. The method the webservice was suppose to return 
to had the wrong signature.
I had this signature:

public function getProductsResult(result:ResultEvent):void
{
}

when I needed this signature:

public function getProductsResult(resultObj:Object):void
{
}

Thanks for the help!
~Amanda

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

 Could be a problem with a malformed soap response which is not
 confirming to the schema bound in the wsdl.
 
 Please use a HTTP proxy like Charles to verify the response from 
the server.
 Check if a fault element is in the xml response, which a soap 
webservice
 enabled server
 should send in most cases.
 
 If the server response seems ok in charles, then try to turn on the 
strict
 schema validation on the server side. It should tell if the problem 
is
 server side or not.
 
 ~Peeyush
 
 On Tue, Aug 12, 2008 at 6:21 PM, Mandy [EMAIL PROTECTED] wrote:
 
Here is the full xml response:
 
  [RPC Fault faultString=Error #1069 faultCode=DecodingError
  faultDetail=null]
  (mx.messaging.messages::AcknowledgeMessage)#0
  body = ?xml version=1.0 encoding=utf-8?soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Body
  ns2:getProductsResponse
  xmlns:ns2=http://service.xxx.xx.xxx.xxx.xxx.xxx/;
  return ns2:size=344 ns2:name=Products ns2:link=Products
  product ns2:name=WEATHER ns2:link=WEATHER
  product ns2:name=CYCLONE ns2:link=WEATHER.ANALYSES.CYCLONE/
  product ns2:name=HYDROMARINE
  ns2:link=WEATHER.ANALYSES.HYDROMARINE/
  product ns2:name=MISCELLANEOUS
  ns2:link=WEATHER.ANALYSES.MISCELLANEOUS/
  /product
  /return
  /ns2:getProductsResponse
  /soapenv:Body/soapenv:Envelope
 
  ~Amanda
 
  --- In flexcoders@yahoogroups.com flexcoders%
40yahoogroups.com, Josh
  McDonald dznuts@ wrote:
  
   My xml response here doesn't really give us a lot to go 
on :)
  
   But, 1069 is field not found so you're probably decoding into 
a
  class
   that's missing a required field that's trying to be populated.
  
   -Josh
  
   On Tue, Aug 12, 2008 at 5:19 AM, Mandy saltydg2003@ wrote:
  
I am getting a decoding error calling a JAX-WS webservice. 
Both
  the
flex app calling the webservice and the webservice are on the 
same
machine, so I don't think I need a crossdomain.xml file. The 
funny
thing is the webservice is returning the xml response to me 
that I
want, but it gets sent to the fault method. I am using the 
Flex 2
SDK.
   
Here is the error:
[RPC Fault faultString=Error #1069 faultCode=DecodingError
faultDetail=null]
(mx.messaging.messages::AcknowledgeMessage)#0
body = ?xml version=1.0 encoding=utf-8?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Body
My xml response here
/soapenv:Body/soapenv:Envelope
Here is my code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
   
public function get(event:ResultEvent):void
{
Alert.show(event.toString());
}
   
public function web(event:FaultEvent):void
{
Alert.show(EVENT  +
  event.toString
() + \nFAULT  + event.fault.toString()
+ \nMESSAGE  +
event.message.toString() + \nTYPE  + event.type.toString()
+ \nEVENT_PHASE  +
event.eventPhase.toString());
}
   
public function callWS():void
{
ProductsWS.getProducts(username,
password);
}
]]
/mx:Script
mx:WebService id=ProductsWS
wsdl=http://host:port/Workspace/Project/WEB-
INF/wsdl/Sample.wsdl
useProxy=false fault=web(event)
showBusyCursor=true requestTimeout=30
mx:operation name=getProducts result=get
  (event)
fault=web(event)/
/mx:WebService
mx:Button id=CallWS label=call WS click=callWS();
enabled=true x=292 y=234/
/mx:Application
   
Thanks,
Amanda
   
   

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





[flexcoders] Re: Datagrid editedItem

2008-08-13 Thread Tim Hoff

Ok, makes sense.  You could manually update the collection inside the
itemEditor itself:

private function onChange():void
{
  data.myDataField = myTextInput.text;
  // dispatch an event here to send the data to the server
}

mx:TextInput id=myTextInput change=onChange()/

-TH

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

 The thing I'm finding cumbersome is that the dataProvider has not yet
been modified when
 the itemEditEnd fires. I have to look at the
TextInput(grid.itemEditorInstance).text property
 to get the new value. What I really want to do is just fire off a
command to go save the
 current record to the server and have that command just refer to my
model's collection to
 get the new value. But as I say, the value hasn't been written back to
the collection yet.

 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  You could take a snapshot of the cell's listData on the
  itemEditBeginning event. Then, on the itemEditEnd event, compare the
  cell's listData to the snapshot; to determine if you really need to
  send the data.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, rmarples
  rmarples+flexcoders@ wrote:
  
   I'm also looking for this. Does anybody have any thoughts? I'm
  using the AdvancedDataGrid.
  
   --- In flexcoders@yahoogroups.com, Deniz Davutoglu
  deniz.davutoglu@ wrote:
   
Hello guys,
I need to write excell like aplication. which will send data to
  server
after every cell edited.
I wrote some code and send data in event editing ended but by
  doing
this it send data to server every time I change focus of cell. I
  need
some code to determinate sell content is changed or not.
Does it any way to find content of editing cell?
   
Thanks
Deniz Davutoglu
   
  
 





[flexcoders] Re: Loading style sheets at run time

2008-08-13 Thread saatreddy

Hi,

I have to embed fonts into my application. I have .swf font files.
I have to use these swf files as an array in a combo box, so that the 
user can select the font. Once he selects that font I have to use the
selected swf(ex Arial.swf) file in an xml element as value. I 
specifically dont use the emded fonts to display any component in my 
app. But the xml file is used by a chart flex component to display 
the chart. In the xml file I have to specify the font file name and 
the path where it is found. I tried using @font face. But when I try 
to use the .swf in the dropdown, and specify the path to it in the 
xml file, I get an IO error. I am not sure if the font.swf files are 
getting loaded or how should I approach resolving this issue.

Thanks









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

 2.Bseides the @font-face, you must have some way of specifying 
in
 CSS to use the Ad Lib font.  What does the relevant CSS look like?
 
 4.   What happens if you load the CSS from the main app instead of 
the
 module?
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of kaushal_bshah
 Sent: Thursday, July 24, 2008 10:31 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Loading style sheets at run time
 
  
 
 Alex,
 
 Thanks for quick response. Following are the answers to your 
questions.
 
 1. Yes I have embed each fonts in .swf, and use following css
 @font-face {
 src: url(adlib_embed.swf);
 fontFamily: Ad Lib;
 }
 
 2. Sorry I have no idea on selectors. Is it the thing which I am
 missing? 
 
 3. MyTextArea is a mxml file, and root tag of this component is 
TextArea
 
 4. The code which loads CSS SWF is in the module but again in Card
 component. (main app  module  card (custom component)load CSS SWF)
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Are you embedding fonts? Or just setting the font family?
  
  
  
  What kinds of selectors are you using to tell MyTextArea about its
 font?
  
  
  
  What does MyTextArea extend?
  
  
  
  Is the code that loads the CSS SWF in the module or main app?
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of kaushal_bshah
  Sent: Thursday, July 24, 2008 3:06 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Loading style sheets at run time
  
  
  
  I have created few fonts css and compiled them into swf to load 
them
  at run time.
  
  There is one custom component Card, is placed into a Module and 
this
  Module is loaded by main application.
  
  The Card component contains TextArea, MyTextArea(custom 
component) and
  ComboBox (which display font list).
  
  Now when user select any font from ComboBox, Card component load 
css
  and when it get loaded, it updates fontFamily of TextArea and
  MyTextArea. But only TextArea updated with new fonts while 
MyTextArea
  is not getting update anytime.
  
  Can anyone help me to figure out this.
  
  I am using following code to load css run time.
  
  var myEvent:IEventDispatcher =
 
 StyleManager.loadStyleDeclarations(fontSource
[0].src,true,false,Applicat
  ionDomain.currentDomain);
  myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);
  myEvent.addEventListener(StyleEvent.ERROR,fontError);
  
  Any help is appreciated, Thanks
 





[flexcoders] Can I set the image source in CSS?

2008-08-13 Thread luvfotography
For an image, can I set the source in css?
ie.
mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /

can I move the source to the css?

or is there another way to do this?





[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread cuttenv
--- In flexcoders@yahoogroups.com, luvfotography [EMAIL PROTECTED] wrote:

 For an image, can I set the source in css?
 ie.
 mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /
 
 can I move the source to the css?
 
 or is there another way to do this?

Don't think you can because source is a property not a style. Only styles can 
be set in the 
css. Do you have multiple images that have the same image source? I think flex 
should only 
embed the image once and then reuse the image data for the other embedded 
images. 



[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine

Yes :

Button{

corner-radius: 0;

border-style: solid;

border-color: #FF;

border-thickness: 2;

up-skin: Embed(source=assets/slideshow/btnBleu.jpg);

over-skin: Embed(source=assets/slideshow/btnOver.jpg);

color: #FF;

font-size: 10px;

}

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

 For an image, can I set the source in css?
 ie.
 mx:Image id=myimage source=@Embed(source='../mypic.png') /

 can I move the source to the css?

 or is there another way to do this?




[flexcoders] Re: WordWrapping a Label

2008-08-13 Thread cuttenv
--- In flexcoders@yahoogroups.com, shafram [EMAIL PROTECTED] wrote:

 Thanks for the responses. As a follow on question, is there a way to
 control the spacing in between the lines (for example single space,
 double space) When the word wraps there is too much of a gap in
 between the lines, and it would be nice to control that spacing.
 
 Thanks
 
 
 --- In flexcoders@yahoogroups.com, Scott Melby smelby@ wrote:
 
  Make sure you set the width property, or the text will not wrap.
  
  hth
  Scott
  
  -- 
  Scott Melby
  Founder, Fast Lane Software LLC
  http://www.fastlanesw.com
  
  
  Gordon Smith wrote:
   You need to use mx:Text instead of mx:Label.
  

  
   Gordon Smith
  
   Adobe Flex SDK Team
  

  
   
  
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of shafram
   Sent: Tuesday, August 12, 2008 5:43 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] WordWrapping a Label
  

  
   Hi is there a way to Word wrap a label? I know about the truncateToFit
   property but that's not exactly what I'm looking for.
  
   Thanks 
  

  
  
  
 

Yup! There is a style called leading that is the line spacing between rows of 
text ;)
Think of it like this label is for only one row of text so that when the text 
is too long it can 
go ... meaning there is text that got cut off whereas the text tag has multiple 
rows of text.



[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine
Yes:

 Button{
 corner-radius: 0;
 border-style: solid;
 border-color: #FF;
 border-thickness: 2;
 up-skin: Embed(source=assets/upSkin.jpg);
 over-skin: Embed(source=assets/downSkin.jpg);
 color: #FF;
 font-size: 10px;
 }
--- In flexcoders@yahoogroups.com, luvfotography [EMAIL PROTECTED] wrote:

 For an image, can I set the source in css?
 ie.
 mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /

 can I move the source to the css?

 or is there another way to do this?




[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine
Yes:

 Button{
 corner-radius: 0;
 border-style: solid;
 border-color: #FF;
 border-thickness: 2;
 up-skin: Embed(source=assets/upSkin.jpg);
 over-skin: Embed(source=assets/downSkin.jpg);
 color: #FF;
 font-size: 10px;
 }
--- In flexcoders@yahoogroups.com, luvfotography [EMAIL PROTECTED] wrote:

 For an image, can I set the source in css?
 ie.
 mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /

 can I move the source to the css?

 or is there another way to do this?




[flexcoders] Modal Popup inside a module (or inside a view) of my application

2008-08-13 Thread cuttenv
Help! I am trying to create a popup that is modal over only one area of my 
application. I don't 
know if it helps but that area is actually a module that is loaded into the 
main application. It 
only takes up about half of the stage. Is there a way to make a modal popup 
over only a 
module or any view inside your application for that matter. I know there used 
to be a way in 
Flex 2 when modules still used the application tag...
Thanks in advance! 
-Vito



[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine
Sorry for my multiple reply...

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

 Yes:
 
  Button{
  corner-radius: 0;
  border-style: solid;
  border-color: #FF;
  border-thickness: 2;
  up-skin: Embed(source=assets/upSkin.jpg);
  over-skin: Embed(source=assets/downSkin.jpg);
  color: #FF;
  font-size: 10px;
  }
 --- In flexcoders@yahoogroups.com, luvfotography ygroups@ wrote:
 
  For an image, can I set the source in css?
  ie.
  mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /
 
  can I move the source to the css?
 
  or is there another way to do this?
 





[flexcoders] allowing CDATA in inline XML of ActionScript code of MXML

2008-08-13 Thread Keith
When I declare an inline XML object in the actionscript of my MXML document,
how do I keep the compiler from throwing errors when I have CDATA in my XML?
(The mx:Script  already uses CDATA for actionscript)

private function init():void
{
var doc:XML=
SAMPLE
   INFO![CDATA[Cool stuff about Unicorns in Unicode text here.]]/INFO
/SAMPLE;

Alert.show(doc.toXMLString());
}




-- Keith H --
www.keith-hair.net


begin:vcard
fn:Keith H
n:H;Keith
email;internet:[EMAIL PROTECTED]
x-mozilla-html:TRUE
url:http://www.keith-hair.com
version:2.1
end:vcard



RE: [flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread Gordon Smith
The 'upSkin' and 'overSkin' of a Button are styles. The 'source' of an
Image is a property, not a style, and properties cannot be specified in
CSS.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of guillaumeracine
Sent: Wednesday, August 13, 2008 11:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Can I set the image source in CSS?

 

Sorry for my multiple reply...

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

 Yes:
 
 Button{
 corner-radius: 0;
 border-style: solid;
 border-color: #FF;
 border-thickness: 2;
 up-skin: Embed(source=assets/upSkin.jpg);
 over-skin: Embed(source=assets/downSkin.jpg);
 color: #FF;
 font-size: 10px;
 }
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , luvfotography ygroups@
wrote:
 
  For an image, can I set the source in css?
  ie.
  mx:Image id=myimage source=@Embed(source='../mypic.png') /
 
  can I move the source to the css?
 
  or is there another way to do this?
 


 



Re: [flexcoders] allowing CDATA in inline XML of ActionScript code of MXML

2008-08-13 Thread Daniel Freiman
You can split up the XML into a couple strings and concatenate them together
to work around the compiler.  Something like this:

var doc:XML= new XML(SAMPLEINFO![CDATA[Cool stuff about Unicorns in
Unicode text here.]+]+/INFO/SAMPLE);


- Daniel Freiman

On Wed, Aug 13, 2008 at 2:44 PM, Keith [EMAIL PROTECTED] wrote:

   When I declare an inline XML object in the actionscript of my MXML
 document,
 how do I keep the compiler from throwing errors when I have CDATA in my
 XML?
 (The mx:Script already uses CDATA for actionscript)

 private function init():void
 {
 var doc:XML=
 SAMPLE
 INFO![CDATA[Cool stuff about Unicorns in Unicode text here.]]/INFO
 /SAMPLE;

 Alert.show(doc.toXMLString());
 }

 -- Keith H --
 www.keith-hair.net

  



[flexcoders] Re: Shutoff or de-init BrowserManager (IE7 issues)

2008-08-13 Thread flexaustin
Thanks for the help you got me thinking. I can't shut off the
browsermanager entirely as I will probably need it in the future. The
issue is with the history.js file and our app. Our app runs an ajax
type animation that changes the fragment every 30 seconds. Well with
IE7 when browsermanager calls setup(initialValue:string, something
else) it sets the default fragment. Mine in this case is blank so it
put www.url.com/myflex# . Well then our ajax would ad to it and if I
clicked something to navigate as well then I ended up with
www.url.com/myflex##new_area_navigated to.

If you wait for our app to stop the ajax to stop then click something
all is fine and it replaces the entire fragement.

IE would freak out and IFrame would start trying to figure out what is
going on and report back to flex and was in a never ending loop. If I
then clicked something else in my flex app the fragment would clear
out and put just a new #somethingelse and all would be fine.

So I went into the history.js file and commented out the code to set
the #initialvalue to the url so now nothing is set on app entry only
when you actually start to navigate. 

I probably should 



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

 
 If you want to turn it off completely, there is a compiler setting.  Go
 to project -- properties -- Flex Compiler.  Then uncheck the Enable
 integration with browser navigation option.  This should disable the
 forward/back browser buttons from interacting with the swf.  If you only
 want to turn it off for certain navigation components, you're correct,
 you'll need to use:
 
 mx:ViewStack historyManagementEnabled=false/
 
 -TH
 
 --- In flexcoders@yahoogroups.com, flexaustin flexaustin@ wrote:
 
  Is it possible to shutoff or browserManager for certain components or
  for the entire application?
 
  So after you do the following:
 
  browserManager = BrowserManager.getInstance();
  browserManager.init(, Welcome);
  // browserUrlChange just gets the
  fragment on startup
  browserUrlChange();
 
  Can you now shut off or de-init the browserManager instance for
  certain components or the entire app? Or can you put a setting in
  your children components to not notify the browserManager?
 
  I know you can do historyManagementEnabled=false for certain
  navigator components, but since historyManagementEnabled is set to
  false by browserManager and I set it manually in the application tag I
  know its off.
 
  The problem I am having is that I have custom component that contains
  several child components that go very deep. So when I navigate in my
  component and all the children change IE7 makes several hundred
  clicking sounds for change of each child so it clicks for about 3
  mintues each time you navigate.
 
  I know I can shut off the clicking sound in my windows settings, but I
  don't want all my users to have to do this.
 





[flexcoders] Is POST a sync event?

2008-08-13 Thread markgoldin_2000
I am posting a large amount of XML data using HTTPService. It looks 
like my server starts processing of Request object before the data is 
trasmitted in full. Same code works fine with a smaller data.

Any idea?

Thanks



[flexcoders] Take the latest Adobe Developer Survey

2008-08-13 Thread Matt Chotin
Hey all,

We've got another survey out as we try to determine what tools and services
are going to be appealing as part of future work here at Adobe.  Would
appreciate it if you could take a few minutes and fill it out.



[flexcoders] Re: Take the latest Adobe Developer Survey

2008-08-13 Thread Matt Chotin
Er, hit send too early.

Hey all,

We've got another survey out as we try to determine what tools and services
are going to be appealing as part of future work here at Adobe.  Would
appreciate it if you could take a few minutes and fill it out.

http://www.adobe.com/go/devsurvey

For those in the US there is a raffle for a 32GB Apple iPod Touch.

Matt



RE: [flexcoders] Modal Popup inside a module (or inside a view) of my application

2008-08-13 Thread Alex Harui
Modal is done by putting a transparent sprite over the area that
shouldn't be clicked.  So, if you pop up a transparent sprite then popup
your dialog and position and size everything, you should get what you
want.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cuttenv
Sent: Wednesday, August 13, 2008 11:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Modal Popup inside a module (or inside a view) of
my application

 

Help! I am trying to create a popup that is modal over only one area of
my application. I don't 
know if it helps but that area is actually a module that is loaded into
the main application. It 
only takes up about half of the stage. Is there a way to make a modal
popup over only a 
module or any view inside your application for that matter. I know there
used to be a way in 
Flex 2 when modules still used the application tag...
Thanks in advance! 
-Vito

 



[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine

Yes right...
My bad

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

 The 'upSkin' and 'overSkin' of a Button are styles. The 'source' of an
 Image is a property, not a style, and properties cannot be specified in
 CSS.
 
  
 
 Gordon Smith
 
 Adobe Flex SDK Team
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of guillaumeracine
 Sent: Wednesday, August 13, 2008 11:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Can I set the image source in CSS?
 
  
 
 Sorry for my multiple reply...
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , guillaumeracine
 guillaume.racine@ wrote:
 
  Yes:
  
  Button{
  corner-radius: 0;
  border-style: solid;
  border-color: #FF;
  border-thickness: 2;
  up-skin: Embed(source=assets/upSkin.jpg);
  over-skin: Embed(source=assets/downSkin.jpg);
  color: #FF;
  font-size: 10px;
  }
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , luvfotography ygroups@
 wrote:
  
   For an image, can I set the source in css?
   ie.
   mx:Image id=myimage source=@Embed(source='../mypic.png') /
  
   can I move the source to the css?
  
   or is there another way to do this?
  
 





RE: [flexcoders] Re: WordWrapping a Label

2008-08-13 Thread Alex Harui
The leading style

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cuttenv
Sent: Wednesday, August 13, 2008 11:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WordWrapping a Label

 

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

 Thanks for the responses. As a follow on question, is there a way to
 control the spacing in between the lines (for example single space,
 double space) When the word wraps there is too much of a gap in
 between the lines, and it would be nice to control that spacing.
 
 Thanks
 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Scott Melby smelby@ wrote:
 
  Make sure you set the width property, or the text will not wrap.
  
  hth
  Scott
  
  -- 
  Scott Melby
  Founder, Fast Lane Software LLC
  http://www.fastlanesw.com http://www.fastlanesw.com 
  
  
  Gordon Smith wrote:
   You need to use mx:Text instead of mx:Label.
  
   
  
   Gordon Smith
  
   Adobe Flex SDK Team
  
   
  
   
  
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On
   Behalf Of shafram
   Sent: Tuesday, August 12, 2008 5:43 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] WordWrapping a Label
  
   
  
   Hi is there a way to Word wrap a label? I know about the
truncateToFit
   property but that's not exactly what I'm looking for.
  
   Thanks 
  
   
  
  
  
 

Yup! There is a style called leading that is the line spacing between
rows of text ;)
Think of it like this label is for only one row of text so that when the
text is too long it can 
go ... meaning there is text that got cut off whereas the text tag has
multiple rows of text.

 



RE: [flexcoders] Re: Loading style sheets at run time

2008-08-13 Thread Alex Harui
I think you will need to contact the provider of the chart component to
determine how to work with their API.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of saatreddy
Sent: Wednesday, August 13, 2008 11:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Loading style sheets at run time

 


Hi,

I have to embed fonts into my application. I have .swf font files.
I have to use these swf files as an array in a combo box, so that the 
user can select the font. Once he selects that font I have to use the
selected swf(ex Arial.swf) file in an xml element as value. I 
specifically dont use the emded fonts to display any component in my 
app. But the xml file is used by a chart flex component to display 
the chart. In the xml file I have to specify the font file name and 
the path where it is found. I tried using @font face. But when I try 
to use the .swf in the dropdown, and specify the path to it in the 
xml file, I get an IO error. I am not sure if the font.swf files are 
getting loaded or how should I approach resolving this issue.

Thanks

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

 2. Bseides the @font-face, you must have some way of specifying 
in
 CSS to use the Ad Lib font. What does the relevant CSS look like?
 
 4. What happens if you load the CSS from the main app instead of 
the
 module?
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of kaushal_bshah
 Sent: Thursday, July 24, 2008 10:31 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Loading style sheets at run time
 
 
 
 Alex,
 
 Thanks for quick response. Following are the answers to your 
questions.
 
 1. Yes I have embed each fonts in .swf, and use following css
 @font-face {
 src: url(adlib_embed.swf);
 fontFamily: Ad Lib;
 }
 
 2. Sorry I have no idea on selectors. Is it the thing which I am
 missing? 
 
 3. MyTextArea is a mxml file, and root tag of this component is 
TextArea
 
 4. The code which loads CSS SWF is in the module but again in Card
 component. (main app  module  card (custom component)load CSS SWF)
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Are you embedding fonts? Or just setting the font family?
  
  
  
  What kinds of selectors are you using to tell MyTextArea about its
 font?
  
  
  
  What does MyTextArea extend?
  
  
  
  Is the code that loads the CSS SWF in the module or main app?
  
  
  
  
  
  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 kaushal_bshah
  Sent: Thursday, July 24, 2008 3:06 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Loading style sheets at run time
  
  
  
  I have created few fonts css and compiled them into swf to load 
them
  at run time.
  
  There is one custom component Card, is placed into a Module and 
this
  Module is loaded by main application.
  
  The Card component contains TextArea, MyTextArea(custom 
component) and
  ComboBox (which display font list).
  
  Now when user select any font from ComboBox, Card component load 
css
  and when it get loaded, it updates fontFamily of TextArea and
  MyTextArea. But only TextArea updated with new fonts while 
MyTextArea
  is not getting update anytime.
  
  Can anyone help me to figure out this.
  
  I am using following code to load css run time.
  
  var myEvent:IEventDispatcher =
 
 StyleManager.loadStyleDeclarations(fontSource
[0].src,true,false,Applicat
  ionDomain.currentDomain);
  myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);
  myEvent.addEventListener(StyleEvent.ERROR,fontError);
  
  Any help is appreciated, Thanks
 


 



RE: [flexcoders] Re: Datagrid editedItem

2008-08-13 Thread Alex Harui
I think you should listen to the collection for CollectionChange events
and use that to sync to the server.  Don't work from UI events.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Hoff
Sent: Wednesday, August 13, 2008 11:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Datagrid editedItem

 

Ok, makes sense.  You could manually update the collection inside the
itemEditor itself:

private function onChange():void 
{ 
 data.myDataField = myTextInput.text;
 // dispatch an event here to send the data to the server
}

mx:TextInput id=myTextInput change=onChange()/

-TH

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

 The thing I'm finding cumbersome is that the dataProvider has not yet
been modified when 
 the itemEditEnd fires. I have to look at the
TextInput(grid.itemEditorInstance).text property 
 to get the new value. What I really want to do is just fire off a
command to go save the 
 current record to the server and have that command just refer to my
model's collection to 
 get the new value. But as I say, the value hasn't been written back to
the collection yet.
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  You could take a snapshot of the cell's listData on the 
  itemEditBeginning event. Then, on the itemEditEnd event, compare the

  cell's listData to the snapshot; to determine if you really need to 
  send the ! data.
  
  -TH
  
  --- In flexcoders@yahoogroups.com, rmarples 
  rmarples+flexcoders@ wrote:
  
   I'm also looking for this. Does anybody have any thoughts? I'm 
  using the AdvancedDataGrid.
   
   --- In flexcoders@yahoogroups.com, Deniz Davutoglu 
  deniz.davutoglu@ wrote:
   
Hello guys,
I need to write excell like aplication. which will send data to 
  server
after every cell edited. 
I wrote some code and send data in event editing ended but by 
  doing
this it send data to server every time I change focus of cell. I

  need
some code to determinate sell content is changed or not. 
D! oes it any way to find content of editing cell?
  ! gt;  
Thanks
Deniz Davutoglu
   
  
 


 



RE: [flexcoders] .swf displays fine, but MovieClip methods fail

2008-08-13 Thread Alex Harui
When you embed a SWF, it gets wrapped in a MovieClipLoaderAsset and is
not the MovieClip itself.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Merrill, Jason
Sent: Wednesday, August 13, 2008 10:23 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] .swf displays fine, but MovieClip methods fail

 

I'm displaying some sprites inside a Flex 3 container with Actionscript.
So far on this project, the sprites I have been showing have been
visually drawn on the screen either by embedding an image or by drawing
with sprite.graphics methods. Now, I'm trying to embed a .swf, and it
works (it displays and plays), but MovieClip method actions attempting
to control the embedded .swf fail.  

My first thought was I published as AM1 on accident, but the .swf is
AVM2 - Flash CS3 published as Player 9 and Actionscript 3.  The .swf
contains an animation on it's root, no child clips.  See the comments in
the code below (this is a simplified version of the class, I stripped
out everything I thought was irrelevant to my question).  Does it have
to do with a MovieClip being a child to a Sprite?  If so, why?  If not,
what's the issue with the code below?  

package com.venice.view.network.atom 
{ 
import flash.display.MovieClip; 
import flash.display.Sprite; 

public class AtomView extends Sprite 
{   
private var _menu:MovieClip; 

[Embed(source = /media/buttons/atomMenu.swf)] 
[Bindable] 
private var _menuSource:Class; 

public function AtomView() 
{ 
createSprites(); 
} 

private function createSprites():void 
{ 
//this works fine, the menu.swf appears: 
_menu = new _menuSource() as MovieClip; 
addChild(_menu); 

//however, the following MovieClip actions don't
work.  
//For example, (when uncommented), the following
actions 
//have no effect on the root timeline: 
// 
//_menu.stop(); 
// 
//or if I put a stop action on the
.swf timeline, these don't work either: 
//_menu.nextFrame(); 
//or 
//_menu.play(); 
// 
//why? It's a Flash 9/Actionscript 3.0 .swf
created with Flash CS3. 
} 
} 
} 

Thanks for any help. 

 

Jason Merrill
Bank of America 
Enterprise Technology  Global Risk LLD
Instructional Technology  Media 

Join the Bank of America Flash Platform Developer Community
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.as
px  

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.
aspx   subscribe
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts
/SubNew.aspx?List=\%7b41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\%7dSource=ht
tp://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.
aspx . 

 

 



RE: [flexcoders] AS 3.0 event target problem!!!

2008-08-13 Thread Alex Harui
The root of a SWF is a SystemManager.  All Popups and the Application are 
children of the SystemManager.

 

You may be able to use getChildByName and get more consistent results.

 

We have a much more sophisticated technology we use in house to exercise 
components similar to what you are doing.  Maybe it will be public someday.

 



From: Zoran Avramov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2008 9:40 AM
To: flexcoders@yahoogroups.com
Cc: Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

Hi Alex/Gordon

 

The problem with assigning IDs is that the popup container has that close 
button (the path that I gave) when you create the actual popup. For example the 
button that I gave an example with no path to the root 
(ConfirmScreen388.UIComponent418.Button422), is created by just setting this 
flag 'showCloseButton=true' in the code below. I need to be able to find a 
way to identify that button or any other DisplayObject that I want to monitor 
for clicks and then execute those clicks on a different instance of the same 
.swf. I have not found a good way to do this and if you can help me understand 
how you render your DOM in flex (at least the part that will help me do this) 
it would be greatly appreciated. 

 

mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical
 close=PopUpManager.removePopUp(this)
 showCloseButton=true

 

 

Thanks,

Zoran

 



--- On Tue, 8/12/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: flexcoders@yahoogroups.com
Date: Tuesday, August 12, 2008, 9:38 PM

He’s surprised that the popup isn’t parented by the app.  Popups are 
parented by the systemMgr which also parents the app.

 

Id’s are per-document (or per-mxml file) so you can traverse documents 
and pull objects by their ids.

 





From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On 
Behalf Of Gordon Smith
Sent: Tuesday, August 12, 2008 7:54 PM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What do you mean by I don't have the path to the root?

 

If you assign an id to each component, the toString() method will use 
that instead of a dynamically generated name like Button498.

 

Gordon Smith

Adobe Flex SDK Team

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of zoran_101
Sent: Tuesday, August 12, 2008 4:30 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] AS 3.0 event target problem!!!

 

I have an interesting problem regarding event.target in Flex 
2/ActionScript 3.0. I am using the Flex Grocer app in order to try 
something out. I am attaching listeners to all the click events and 
then printing out event.target to keep track of my events and where 
we clicked, nothing revolutionary here very easy stuff. Once I get 
the paths I would like to run code that will execute my steps and 
play the clicks back based on the event.target information that I got 
and I was able to do that except when we have popups. Here is the 
problem:

When I execute a click on a button with event.target =
DataEntry0._ UpdateDeleteProd 1.Form10. FormItem102. HBox103.Button10 4 
A poupup appears and then I click on the close button on that popup 
with event.target=
ConfirmScreen464. UIComponent494. Button498

COUPLE OF PROBLEMS HERE:
1) I don't have the path to the root (DataEntry0) even though I 
use the standard event.target.
2) This is even a bigger problem, the DOM path 
(ConfirmScreen464. UIComponent494. Button498) is dynamically generated 
(the numbers are dynamically generated) so when I use that path that 
I got during the time I was monitoring the app, when I use my code to 
play the events that very same target does not correspond to the 
popup that the fist event caused. 

I tried using IDs but in Flex I have not found anything like 
document.getElement ById() that is available in JavaScript. Any help 
on this will be greatly appreciated.

Thanks

p.s. I looked at the automation library that Flex has (and Mercury 
QTP uses) but that will not work for me.

 

 



RE: [flexcoders] Issues with mx:Text, mouse cursors, and Hrefs inside the text

2008-08-13 Thread Alex Harui
I don't think you can override behavior of the internal TextField

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Todd
Sent: Wednesday, August 13, 2008 6:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Issues with mx:Text, mouse cursors, and Hrefs
inside the text

 

Hello All,
I'm using the mx:Text to render some htmlText complete with some
embedded href links. My goal is to use the htmlText with a link (via
an href in the text), catch the event for the link, but treat the rest
of the text as a button in the parent. Also, it's important to keep
the mouse pointer as either a arrow or hand. Any suggestions?

When I set the properties on the mx:Text with this: 
mouseChildren=false
buttonMode=true
useHandCursor=true
The events for the LINK aren't raised, and the entire text area is
a button. But the mouse pointer is functioning properly

However, with the following settings, I get the proper
functionality, but the cursor over the text is selectable (and must be
to make the Link event fire):
mouseChildren=true 
buttonMode=false 
useHandCursor=true

BTW, I've tried implementing the rolloever/rollout to change the
cursor, which it does. But over the mx:Text it still shows the
selectable text.

Thanks,

 



RE: [flexcoders] Re: My itemRenderer is cancelling wordWrap setting on AdvancedDataGridColumn

2008-08-13 Thread Alex Harui
Which os?  Flex is multi-platform.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of whatabrain
Sent: Wednesday, August 13, 2008 8:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: My itemRenderer is cancelling wordWrap setting
on AdvancedDataGridColumn

 

Just changing Label to Text worked. I didn't have to write a measure 
method.

I really wish the Flex controls had been written in a way that 
matches the OS's behavior better. I've had to write a lot of code 
(for example, this tooltip fix), just to make standard controls.

Ah well. Better the way it is, than not existing at all.

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

 Wordwrapping is the responsibility of the renderer. Label is a
 single-line control so it won't word wrap. Using Text is possible 
but
 you have to wire up the measure method correctly. See past threads 
for
 how to do that. Also, that makes a heavy weight renderer.
 
 
 
 My recommendation is to copy DataGridItemRenderer and remove the 
datatip
 code.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of whatabrain
 Sent: Tuesday, August 12, 2008 3:55 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] My itemRenderer is cancelling wordWrap 
setting on
 AdvancedDataGridColumn
 
 
 
 I want an AdvancedDataGridColumn to have word wrap, soI set the 
 wordWrap attribute to true. The column contains an itemRenderer, 
which 
 renders an mx:Label, which contains the actual text. But that text 
 doesn't wrap.
 
 mx:AdvancedDataGridColumn wordWrap=true
 mx:itemRenderer
 mx:Component
 mx:Label text=I am an unhappy table cell/
 /mx:Component
 /mx:itemRenderer
 /mx:AdvancedDataGridColumn
 
 The reason I'm using an itemRenderer is because otherwise, tooltips 
 don't work properly. They are always drawn within the cell, instead 
of 
 appearing at the corner of the mouse cursor like they should. 
Putting 
 the tooltip on the Label fixes the problem.


 



[flexcoders] how to search an arraycollection

2008-08-13 Thread blc187
I have an arraycollection of objects, each of which has a timestamp.
ex: {timestamp:4342423432, value:5}

I want to search the arraycollection for the object which has the 
closest timestamp to the time I'm looking for.
Is there a way to search the arraycollection for an approximate value?

As of right now I'm looping through each object in my arraycollection 
to find if the value is between 2 numbers.

for(var i:int = 0; i  dataProvider.length; i++) {
  if(myTimestamp  dataProvider[i]  myTimestamp  dataProvider[i+1])
//this is the correct spot.
}



RE: [flexcoders] Getting an ItemEditEnd event to fire from a customer itemEditor (Focus?)

2008-08-13 Thread Alex Harui
ItemEditEnd fires when the DG has editable=true, and you click somewhere
else or tab somewhere else.  There could be an issue if the editor
doesn't take focus, I've never tried that.  Set its tabEnabled=true and
have it implement IFocusManagerComponent.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charlie Hubbard
Sent: Wednesday, August 13, 2008 6:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Getting an ItemEditEnd event to fire from a
customer itemEditor (Focus?)

 

Hi,

I have a customer item editor that handles a 5 star rating system.  If
the user clicks on the component it will rate it 1-5 stars.  I've gotten
everything working except I can't get the DataGrid to fire an
itemEditEnd event when I click on the component.  I figured it would
work similar to CheckBox, but I think my missing piece is that CheckBox
is focusable where my HBox with 5 Image components is probably not.
What actually triggers the DataGrid to know when an editor is done
editting?  Should my customer editor fire the itemEditEnd event?  Or is
that DataGrid's responsibility?  If it is, what event can I fire to
force DataGrid to fire it's ItemEditEnd event?

Thanks
Charlie

 



RE: [flexcoders] how to search an arraycollection

2008-08-13 Thread Alex Harui
You'll have to loop through yourself and keep track of the minimum
difference

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of blc187
Sent: Wednesday, August 13, 2008 12:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how to search an arraycollection

 

I have an arraycollection of objects, each of which has a timestamp.
ex: {timestamp:4342423432, value:5}

I want to search the arraycollection for the object which has the 
closest timestamp to the time I'm looking for.
Is there a way to search the arraycollection for an approximate value?

As of right now I'm looping through each object in my arraycollection 
to find if the value is between 2 numbers.

for(var i:int = 0; i  dataProvider.length; i++) {
if(myTimestamp  dataProvider[i]  myTimestamp  dataProvider[i+1])
//this is the correct spot.
}

 



[flexcoders] Re: .swf displays fine, but MovieClip methods fail

2008-08-13 Thread Jason
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 When you embed a SWF, it gets wrapped in a MovieClipLoaderAsset and is
 not the MovieClip itself.

Thanks... so that explains why it doesn't work and that helps a little, 
but... umm... ok and?? What would I do to fix this? 

I'm trying to read between the lines - does this mean I can't do it 
this way and I need to instead load in the .swf and not embed, or that 
I just need to find a way to extract the actual movie clip out of 
MovieClipLoaderAsset?  

Thanks for any help,

Jason



RE: [flexcoders] Re: .swf displays fine, but MovieClip methods fail

2008-08-13 Thread Alex Harui
If something can't be done, I'll tell you, and it is rare that you can't
do something, it is usually a matter of how hard.

 

I'm usually going to type as little as possible and hope you'll search
for the 9 other times I've answered this question, but just so it is in
recent history:

 

Someone should file an enhancement request to make a property on MCLA
that exposes the internal SWF.  Right now, you have to use
getChildAt(0).content or something like that.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason
Sent: Wednesday, August 13, 2008 1:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: .swf displays fine, but MovieClip methods fail

 

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

 When you embed a SWF, it gets wrapped in a MovieClipLoaderAsset and is
 not the MovieClip itself.

Thanks... so that explains why it doesn't work and that helps a little, 
but... umm... ok and?? What would I do to fix this? 

I'm trying to read between the lines - does this mean I can't do it 
this way and I need to instead load in the .swf and not embed, or that 
I just need to find a way to extract the actual movie clip out of 
MovieClipLoaderAsset? 

Thanks for any help,

Jason

 



[flexcoders] Re: Datagrid editedItem

2008-08-13 Thread Tim Hoff
agreed.

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

 I think you should listen to the collection for CollectionChange
events
 and use that to sync to the server. Don't work from UI events.



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Tim Hoff
 Sent: Wednesday, August 13, 2008 11:06 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Datagrid editedItem



 Ok, makes sense. You could manually update the collection inside the
 itemEditor itself:

 private function onChange():void
 {
 data.myDataField = myTextInput.text;
 // dispatch an event here to send the data to the server
 }

 mx:TextInput id=myTextInput change=onChange()/

 -TH

 --- In flexcoders@yahoogroups.com, rmarples rmarples+flexcoders@
 wrote:
 
  The thing I'm finding cumbersome is that the dataProvider has not
yet
 been modified when
  the itemEditEnd fires. I have to look at the
 TextInput(grid.itemEditorInstance).text property
  to get the new value. What I really want to do is just fire off a
 command to go save the
  current record to the server and have that command just refer to my
 model's collection to
  get the new value. But as I say, the value hasn't been written back
to
 the collection yet.
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
   You could take a snapshot of the cell's listData on the
   itemEditBeginning event. Then, on the itemEditEnd event, compare
the

   cell's listData to the snapshot; to determine if you really need
to
   send the ! data.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, rmarples
   rmarples+flexcoders@ wrote:
   
I'm also looking for this. Does anybody have any thoughts? I'm
   using the AdvancedDataGrid.
   
--- In flexcoders@yahoogroups.com, Deniz Davutoglu
   deniz.davutoglu@ wrote:

 Hello guys,
 I need to write excell like aplication. which will send data
to
   server
 after every cell edited.
 I wrote some code and send data in event editing ended but by
   doing
 this it send data to server every time I change focus of cell.
I

   need
 some code to determinate sell content is changed or not.
 D! oes it any way to find content of editing cell?
   ! gt; 
 Thanks
 Deniz Davutoglu

   
  
 





[flexcoders] Re: .swf displays fine, but MovieClip methods fail

2008-08-13 Thread Jason
I'm usually going to type as little as possible and hope you'll 
search for the 9 other times I've answered this question

I tried searching for the answer here, Google, and the Flex docs, and 
didn't find it.  Perhaps I didn't use the right search terms.  It's not 
like it's spelled out in the Flex docs (that I could find).  Sorry, if 
you're just annoyed at responding for the 10th time, then don't bother 
answering at all rather than making me feel bad for asking. But 
seriously, I do appreciate the response and thank you for the help.

See you at Max, I just registered!

Jason




[flexcoders] Getting the clicked column index in AdvancedDataGrid (including invisible)

2008-08-13 Thread whatabrain
I have an AdvancedDataGrid, where the first column has 
visible=false. When I click on the second column, the event calls 
it column 0, even though it should be column 1. How do I get the 
actual column index? I need this because in my application, it's not 
completely obvious at any given time which columns are visible.



mx:AdvancedDataGrid itemClick=OnClick(event)
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.ListEvent;

[Bindable] public var gridData:ArrayCollection = new ArrayCollection
([{name:moo}]);

private function OnClick(event:ListEvent):void
{
Alert.show(String(event.columnIndex));
}
]]
/mx:Script

mx:dataProvider
mx:HierarchicalData source={gridData}/
/mx:dataProvider

mx:columns
mx:AdvancedDataGridColumn width=20 visible=false/
mx:AdvancedDataGridColumn dataField=name width=100/
/mx:columns
/mx:AdvancedDataGrid



RE: [flexcoders] Can I set the image source in CSS?

2008-08-13 Thread Jim Hayes
I recall you can use resource files / ResourceManager to specify
embedded images, if that's the sort of thing that you want to do?
There's a relevant article on the adobe developer site somewhere as far
as I remember.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of luvfotography
Sent: 13 August 2008 19:17
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can I set the image source in CSS?
 
For an image, can I set the source in css?
ie.
mx:Image id=myimage source=@Embed(source='../mypic.png') /

can I move the source to the css?

or is there another way to do this?
 

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

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

[flexcoders] Re: Getting the clicked column index in AdvancedDataGrid (including invisible)

2008-08-13 Thread whatabrain
Oh yeah. I just remembered my real problem, which looks like a bug in 
flex.

ListEvent.columnIndex ignores invisible columns. So if column 0 is 
invisible, then column 1 will have an index of 0. However, 
AdvancedDataGrid.columns knows about invisible columns. Is there any 
way to fix this, other than looping through and figuring out which 
columns are visible?


This code always shows the wrong result on a click:



mx:AdvancedDataGrid id=grid itemClick=OnClick(event)
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.ListEvent;

[Bindable] public var gridData:ArrayCollection = new ArrayCollection
([{field0:0, field1:1}]);

private function OnClick(event:ListEvent):void
{
Alert.show(grid.columns[event.columnIndex].dataField);
}
]]
/mx:Script

mx:dataProvider
mx:HierarchicalData source={gridData}/
/mx:dataProvider

mx:columns
mx:AdvancedDataGridColumn width=20 visible=false 
dataField=field0/
mx:AdvancedDataGridColumn dataField=field1 width=100/
/mx:columns
/mx:AdvancedDataGrid



[flexcoders] Re: how to search an arraycollection

2008-08-13 Thread Michael VanDaniker
If your collection is sorted by timestamp a binary search would be faster.

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

 You'll have to loop through yourself and keep track of the minimum
 difference
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of blc187
 Sent: Wednesday, August 13, 2008 12:57 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] how to search an arraycollection
 
  
 
 I have an arraycollection of objects, each of which has a timestamp.
 ex: {timestamp:4342423432, value:5}
 
 I want to search the arraycollection for the object which has the 
 closest timestamp to the time I'm looking for.
 Is there a way to search the arraycollection for an approximate value?
 
 As of right now I'm looping through each object in my arraycollection 
 to find if the value is between 2 numbers.
 
 for(var i:int = 0; i  dataProvider.length; i++) {
 if(myTimestamp  dataProvider[i]  myTimestamp  dataProvider[i+1])
 //this is the correct spot.
 }





[flexcoders] Re: Is POST a sync event?

2008-08-13 Thread markgoldin_2000
Found the problem.
IIS6 POST limitation of 200K.

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

 I am posting a large amount of XML data using HTTPService. It looks 
 like my server starts processing of Request object before the data is 
 trasmitted in full. Same code works fine with a smaller data.
 
 Any idea?
 
 Thanks





RE: [flexcoders] Re: .swf displays fine, but MovieClip methods fail

2008-08-13 Thread Alex Harui
Sorry, didn't mean to be mean.  

 

I searched embed swf moviecliploaderasset and the third result was an
example from colin moock that had the secret sauce in it.

 

Definitely hunt me down at Max.  I'll apologize in person, then get on
your case about using all these sprites and movieclips in your app. :-)

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason
Sent: Wednesday, August 13, 2008 1:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: .swf displays fine, but MovieClip methods fail

 

I'm usually going to type as little as possible and hope you'll 
search for the 9 other times I've answered this question

I tried searching for the answer here, Google, and the Flex docs, and 
didn't find it. Perhaps I didn't use the right search terms. It's not 
like it's spelled out in the Flex docs (that I could find). Sorry, if 
you're just annoyed at responding for the 10th time, then don't bother 
answering at all rather than making me feel bad for asking. But 
seriously, I do appreciate the response and thank you for the help.

See you at Max, I just registered!

Jason

 



[flexcoders] Rebuild the whole screen

2008-08-13 Thread markgoldin_2000
My apps. consists of a large number of DGs. Number of these DGs and 
their columns are completely data driven. The users want to be able to 
save screen configuration data with a later load. How can I remove 
everything from the player without actual browser refresh before I can 
load data and rebuld the screen?

Thanks



[flexcoders] Re: Datagrid selected item highlight behavior changes based on dataprovider object

2008-08-13 Thread Andrew Longley
Ryan, thank you.  That worked.  I understand the globally unique ID
and the benefit, from a Flex perspective, of updating objects while
appearing to Flex to be the same object, as described in the link.  I
don't understand why that affects the selected style in the datagrid.
 It sounds like another copy of the object behind that row of the
datagrid is being created, and because Flex doesn't realize it's the
same object the row you see loses the knowledge that it is selected
and the selected style.  If you have further insight I'd appreciate
it, but bottom line, this fixed it for me and I thank you.

Andrew

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

 Have your typed objects implement IUID.
 
 Read this entry for a better explanation:
 http://ryangravener.com/wordpress/?p=36
 
 On Tue, Aug 12, 2008 at 3:54 PM, Alex Harui [EMAIL PROTECTED] wrote:
 
 Post an example if it is small.
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Andrew Longley
  *Sent:* Tuesday, August 12, 2008 12:37 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Re: Datagrid selected item highlight behavior
  changes based on dataprovider object
 
 
 
  Tim thanks for your response. I have a very simple datagrid
  implementation and yes, simply changing the objects in the datagrid
  from untyped to typed alters the behavior of the datagrid with respect
  to the look of the selected row. Doesn't matter if I use the objects
  returned from the server or just manufacture a collection of typed
  objects.
 
  So far I'm using the work-around of manufacturing untyped objects.
 
  Andrew
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim
  Hoff TimHoff@ wrote:
  
   Hmm, strongly typed objects or not, the DataGrid should behave the
   same; as long as you're not using selectable=false. Are you sure
   it's not something else? Are you doing something on the change
   event?
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Andrew Longley alongley@
   wrote:
   
I expect that when I click on a row in a datagrid, the item gains
   the
selected row highlight. I'm developing an Air app and my
datagrid
does not act this way. After much messing around I discovered
that,
everything else being the same, if I changed the dataProvider
of the
datagrid the behavior of the datagrid changed.
   
1. if the dataProvider is an ArrayCollection of untyped objects,
   i.e.,
{name:blah,phone:1231231234}, it performs as expected, i.e.,
   when
you click on a row it gains the selected row highlight
   
2. if the dataProvider is an ArrayCollection of typed objects,
i.e.,
User objects with name and phone attributes, it performs
   differently.
While the datagrid knows that a row is selected, the selected row
looks as if it is unselected.
   
Now it is slightly more complicated in that the User object
extends
another base class and both use the Bindable metadata tag and are
RemoteClassed to Java objects on the server, and have another 30
attributes.. but I'm still stymied. Anyone have a suggestion for a
work-around besides creating untyped objects for every object at
runtime? What would the code look like to force a selected
style to
show up for the selected row?
   
Thanks.
Andrew
   
  
 
   
 
 
 
 
 -- 
 Ryan Gravener
 http://twitter.com/ryangravener





RE: [flexcoders] Re: Datagrid selected item highlight behavior changes based on dataprovider object

2008-08-13 Thread Alex Harui
The list classes track selection by the UID of the object.  If the UIDs
are not unique, the wrong thing will show selection.  If the UID
changes, we probably can't find it to show it is selected.  However, I
still don't get why untyped objects made a difference.  Typed objects
and untyped objects that don't implement IUID still get UID's assigned.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrew Longley
Sent: Wednesday, August 13, 2008 2:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Datagrid selected item highlight behavior
changes based on dataprovider object

 

Ryan, thank you. That worked. I understand the globally unique ID
and the benefit, from a Flex perspective, of updating objects while
appearing to Flex to be the same object, as described in the link. I
don't understand why that affects the selected style in the datagrid.
It sounds like another copy of the object behind that row of the
datagrid is being created, and because Flex doesn't realize it's the
same object the row you see loses the knowledge that it is selected
and the selected style. If you have further insight I'd appreciate
it, but bottom line, this fixed it for me and I thank you.

Andrew

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

 Have your typed objects implement IUID.
 
 Read this entry for a better explanation:
 http://ryangravener.com/wordpress/?p=36
http://ryangravener.com/wordpress/?p=36 
 
 On Tue, Aug 12, 2008 at 3:54 PM, Alex Harui [EMAIL PROTECTED] wrote:
 
  Post an example if it is small.
 
 
  --
 
  *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] *On
  Behalf Of *Andrew Longley
  *Sent:* Tuesday, August 12, 2008 12:37 PM
  *To:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  *Subject:* [flexcoders] Re: Datagrid selected item highlight
behavior
  changes based on dataprovider object
 
 
 
  Tim thanks for your response. I have a very simple datagrid
  implementation and yes, simply changing the objects in the datagrid
  from untyped to typed alters the behavior of the datagrid with
respect
  to the look of the selected row. Doesn't matter if I use the objects
  returned from the server or just manufacture a collection of typed
  objects.
 
  So far I'm using the work-around of manufacturing untyped objects.
 
  Andrew
 
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com,
Tim
  Hoff TimHoff@ wrote:
  
   Hmm, strongly typed objects or not, the DataGrid should behave the
   same; as long as you're not using selectable=false. Are you sure
   it's not something else? Are you doing something on the change
   event?
  
   -TH
  
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com,
  Andrew Longley alongley@
   wrote:
   
I expect that when I click on a row in a datagrid, the item
gains
   the
selected row highlight. I'm developing an Air app and my
datagrid
does not act this way. After much messing around I discovered
that,
everything else being the same, if I changed the dataProvider
of the
datagrid the behavior of the datagrid changed.
   
1. if the dataProvider is an ArrayCollection of untyped objects,
   i.e.,
{name:blah,phone:1231231234}, it performs as expected, i.e.,
   when
you click on a row it gains the selected row highlight
   
2. if the dataProvider is an ArrayCollection of typed objects,
i.e.,
User objects with name and phone attributes, it performs
   differently.
While the datagrid knows that a row is selected, the selected
row
looks as if it is unselected.
   
Now it is slightly more complicated in that the User object
extends
another base class and both use the Bindable metadata tag and
are
RemoteClassed to Java objects on the server, and have another 30
attributes.. but I'm still stymied. Anyone have a suggestion for
a
work-around besides creating untyped objects for every object at
runtime? What would the code look like to force a selected
style to
show up for the selected row?
   
Thanks.
Andrew
   
  
 
  
 
 
 
 
 -- 
 Ryan Gravener
 http://twitter.com/ryangravener http://twitter.com/ryangravener 


 



RE: [flexcoders] AS 3.0 event target problem!!!

2008-08-13 Thread Alex Harui
Hmm.  I thought the name property of every sprite was filled out.  You could 
certainly walk the tree and find things with no name and give them names.

 

The numbering has to do with when it got instantiated.  The ConfirmScreen was 
the 388th thing, UIComponent was the 418th, etc.  But one UI change or timing 
glitch can change those numbers.

 



From: Zoran Avramov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2008 2:21 PM
To: flexcoders@yahoogroups.com; Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What happens when the object does not have a name (or it does not have a static 
name) like the close button that I mentioned below? Also can you share 
something on how the numbering schema works (ConfirmScreen388. UIComponent418. 
Button422), maybe I can match the numbering somehow that if that information is 
publicly available. 

--- On Wed, 8/13/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: [EMAIL PROTECTED], flexcoders@yahoogroups.com
Date: Wednesday, August 13, 2008, 12:53 PM

The root of a SWF is a SystemManager.  All Popups and the Application are 
children of the SystemManager.

 

You may be able to use getChildByName and get more consistent results.

 

We have a much more sophisticated technology we use in house to exercise 
components similar to what you are doing.  Maybe it will be public someday.

 



From: Zoran Avramov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2008 9:40 AM
To: flexcoders@yahoogroups.com
Cc: Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

Hi Alex/Gordon

 

The problem with assigning IDs is that the popup container has that close 
button (the path that I gave) when you create the actual popup. For example the 
button that I gave an example with no path to the root 
(ConfirmScreen388.UIComponent418.Button422), is created by just setting this 
flag 'showCloseButton=true' in the code below. I need to be able to find a 
way to identify that button or any other DisplayObject that I want to monitor 
for clicks and then execute those clicks on a different instance of the same 
.swf. I have not found a good way to do this and if you can help me understand 
how you render your DOM in flex (at least the part that will help me do this) 
it would be greatly appreciated. 

 

mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml 
http://www.adobe.com/2006/mxml 
 layout=vertical
 close=PopUpManager.removePopUp(this)
 showCloseButton=true

 

 

Thanks,

Zoran

 



--- On Tue, 8/12/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: flexcoders@yahoogroups.com
Date: Tuesday, August 12, 2008, 9:38 PM

He’s surprised that the popup isn’t parented by the app.  Popups are parented 
by the systemMgr which also parents the app.

 

Id’s are per-document (or per-mxml file) so you can traverse documents and pull 
objects by their ids.

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of Gordon Smith
Sent: Tuesday, August 12, 2008 7:54 PM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What do you mean by I don't have the path to the root?

 

If you assign an id to each component, the toString() method will use that 
instead of a dynamically generated name like Button498.

 

Gordon Smith

Adobe Flex SDK Team

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of zoran_101
Sent: Tuesday, August 12, 2008 4:30 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] AS 3.0 event target problem!!!

 

I have an interesting problem regarding event.target in Flex 
2/ActionScript 3.0. I am using the Flex Grocer app in order to try 
something out. I am attaching listeners to all the click events and 
then printing out event.target to keep track of my events and where 
we clicked, nothing revolutionary here very easy stuff. Once I get 
the paths I would like to run code that will execute my steps and 
play the clicks back based on the event.target information that I got 
and I was able to do that except when we have popups. Here is the 
problem:

When I execute a click on a button with event.target =
DataEntry0._ UpdateDeleteProd 1.Form10. FormItem102. HBox103.Button10 4 
A poupup appears and then I click on the close button on that popup 
with event.target=
ConfirmScreen464. UIComponent494. Button498

COUPLE OF PROBLEMS HERE:
1) I don't have the path to the root (DataEntry0) even though I 
use the standard event.target.
2) This is even a bigger problem, the DOM path 
(ConfirmScreen464. UIComponent494. Button498) is dynamically generated 
(the numbers are dynamically generated) so when I use 

Re: [flexcoders] Re: Take the latest Adobe Developer Survey

2008-08-13 Thread Paul Andrews
- Original Message - 
From: Matt Chotin [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 13, 2008 8:35 PM
Subject: [flexcoders] Re: Take the latest Adobe Developer Survey


 Er, hit send too early.

 Hey all,

 We've got another survey out as we try to determine what tools and 
 services
 are going to be appealing as part of future work here at Adobe.  Would
 appreciate it if you could take a few minutes and fill it out.

 http://www.adobe.com/go/devsurvey

 For those in the US there is a raffle for a 32GB Apple iPod Touch.

There's got to be some irony about Adobe offering a prize from a company 
that is reluctant to allow Adobes developers onto their phone. Just as well 
the draw isn't for an iPhone dontTouch for non US developers to not be 
entered in.. ;-)

 Matt



RE: [flexcoders] Re: Sending data back

2008-08-13 Thread Tracy Spratt
Yes.  Trace that out to verify it.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Tuesday, August 12, 2008 9:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Sending data back

 

I will try but here is a question:
I need to send data from DG. So, I am sending 
DG.dataProvider.toXMLString().
Is that right?
--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 Can you debug RequestObject to see what it contains?
 
 
 
 What is your back-end platform? The code looks like classic asp.
 
 
 
 If so then I would pass a string from flex as in my perv post, then 
do:
 
 Dim sXML = Request(xmlstring) 'will work for either post or get 
args
 
 'you could debug the string here to see if it has your xml in it
 
 ...
 
 oDom.loadXML(sXML)
 
 
 
 Again, you *should* be able to use XML instead of string, but is 
seems
 harder.
 
 
 
 Tracy
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of markgoldin_2000
 Sent: Tuesday, August 12, 2008 6:10 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Sending data back
 
 
 
 Yes, I would want that working.
 I am trying to extract am XML on the server using Request object 
and 
 I have done that before but somehow it does not work.
 oDom = createobject(Msxml2.FreeThreadedDOMDocument)
 oDom.load(RequestObject)
 but oDom.xml is empty.
 Any idea?
 
 Thanks
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 , nathanpdaniel ndaniel@ 
 wrote:
 
  My suggestion would be to change the content type 
  to application/xml - then it post XML to the server. :D No name 
  value pairs needed for that.. Examples:
  AS3: 
  var http:HTTPService = new HTTPService();
  http.url = serverURL;
  http.contentType = application/xml;
  
  MXML:
  mx:HTTPService url={serverURL} contentType=application/xml /
  
  That's of course in general terms - you'd have to add code to 
each 
 to 
  really make it work properly... 
  
  Hope this helps!
  -Nathan D.
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com , markgoldin_2000 
  markgoldin_2000@ wrote:
  
   Yes, I am using HTTPService.
   But I cannot use name=value pair. My XML has a complex 
structure 
  that 
   cannot be broken into a simple name=value pair.
   
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ 
 wrote:
   
You typically use one of the three RPC protocols. The easiest 
  way 
   to
send an xml string is to use the HTTPService RPC protocol. 
 Leave 
   the
default contentType, and send the xml string in a name=value 
 pair 
   in the
request object.

Tracy





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 markgoldin_2000
Sent: Tuesday, August 12, 2008 2:49 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Sending data back



How exaclty is Flex sending data back?
Is it possible to send an XML string back to server so I can 
   restore it 
there into an xml string?

Thanks
   
  
 


 



RE: [flexcoders] Re: Sending data back

2008-08-13 Thread Tracy Spratt
Are you setting the method=POST?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Tuesday, August 12, 2008 10:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Sending data back

 

Yes, I did send it.
Here is a fragment of data being sent:
lt;?xml version = quot;1.0quot; encoding=quot;Windows-1252quot; 
standalone=quot;yesquot;?
gt;lt;plandatagt;lt;curtrainblockscarsorderedgt;
lt;train_idgt;496lt;/train_idgt;
lt;locationgt;West Departurelt;/locationgt;
lt;trainsymbolgt;MCCHU 12lt;/trainsymbolgt;
lt;bnumber1gt;470lt;/bnumber1gt;
lt;bnumber1wgt;0lt;/bnumber1wgt;
lt;carsb1gt;89lt;/carsb1gt;
lt;bnumber2gt;Totallt;/bnumber2gt;
lt;bnumber2wgt;0lt;/bnumber2wgt;
lt;carsb2gt;89lt;/carsb2gt;
lt;trainplangt;falselt;/trainplangt;
lt
..

Why  and  are escaped?

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

 I will try but here is a question:
 I need to send data from DG. So, I am sending 
 DG.dataProvider.toXMLString().
 Is that right?
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote:
 
  Can you debug RequestObject to see what it contains?
  
  
  
  What is your back-end platform? The code looks like classic asp.
  
  
  
  If so then I would pass a string from flex as in my perv post, 
then 
 do:
  
  Dim sXML = Request(xmlstring) 'will work for either post or get 
 args
  
  'you could debug the string here to see if it has your xml in it
  
  ...
  
  oDom.loadXML(sXML)
  
  
  
  Again, you *should* be able to use XML instead of string, but is 
 seems
  harder.
  
  
  
  Tracy
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On
  Behalf Of markgoldin_2000
  Sent: Tuesday, August 12, 2008 6:10 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: [flexcoders] Re: Sending data back
  
  
  
  Yes, I would want that working.
  I am trying to extract am XML on the server using Request object 
 and 
  I have done that before but somehow it does not work.
  oDom = createobject(Msxml2.FreeThreadedDOMDocument)
  oDom.load(RequestObject)
  but oDom.xml is empty.
  Any idea?
  
  Thanks
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  , nathanpdaniel ndaniel@ 
  wrote:
  
   My suggestion would be to change the content type 
   to application/xml - then it post XML to the server. :D No 
name 
   value pairs needed for that.. Examples:
   AS3: 
   var http:HTTPService = new HTTPService();
   http.url = serverURL;
   http.contentType = application/xml;
   
   MXML:
   mx:HTTPService url={serverURL} 
contentType=application/xml /
   
   That's of course in general terms - you'd have to add code to 
 each 
  to 
   really make it work properly... 
   
   Hope this helps!
   -Nathan D.
   
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com , markgoldin_2000 
   markgoldin_2000@ wrote:
   
Yes, I am using HTTPService.
But I cannot use name=value pair. My XML has a complex 
 structure 
   that 
cannot be broken into a simple name=value pair.

--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ 
  wrote:

 You typically use one of the three RPC protocols. The 
easiest 
   way 
to
 send an xml string is to use the HTTPService RPC protocol. 
  Leave 
the
 default contentType, and send the xml string in a 
name=value 
  pair 
in the
 request object.
 
 Tracy
 
 
 
 
 
 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 markgoldin_2000
 Sent: Tuesday, August 12, 2008 2:49 PM
 To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Sending data back
 
 
 
 How exaclty is Flex sending data back?
 Is it possible to send an XML string back to server so I 
can 
restore it 
 there into an xml string?
 
 Thanks

   
  
 


 



RE: [flexcoders] Can I set the image source in CSS?

2008-08-13 Thread Gordon Smith
You could also reference an embedded graphic in some CSS selector and
then do something like

 

mx:Image id=myimage

  initialize=myimage.source =
StyleManager.getStyleDeclaration('someSelector').getStyle('someStyle')/


 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Hayes
Sent: Wednesday, August 13, 2008 2:09 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Can I set the image source in CSS?

 

I recall you can use resource files / ResourceManager to specify
embedded images, if that's the sort of thing that you want to do?

There's a relevant article on the adobe developer site somewhere as far
as I remember.

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of luvfotography
Sent: 13 August 2008 19:17
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can I set the image source in CSS?

 

For an image, can I set the source in css?
ie.
mx:Image id=myimage source=@Embed(source='../mypic.png') /

can I move the source to the css?

or is there another way to do this?


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

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



 



[flexcoders] Re: how to search an arraycollection

2008-08-13 Thread blc187
can i use a binary search if the value i am searching for is not 
explicitly in my arraycollection? i want to get the closest value to 
the timestamp i am searching for.



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

 If your collection is sorted by timestamp a binary search would be 
faster.
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  You'll have to loop through yourself and keep track of the minimum
  difference
  
   
  
  
  
  From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
  Behalf Of blc187
  Sent: Wednesday, August 13, 2008 12:57 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] how to search an arraycollection
  
   
  
  I have an arraycollection of objects, each of which has a 
timestamp.
  ex: {timestamp:4342423432, value:5}
  
  I want to search the arraycollection for the object which has the 
  closest timestamp to the time I'm looking for.
  Is there a way to search the arraycollection for an approximate 
value?
  
  As of right now I'm looping through each object in my 
arraycollection 
  to find if the value is between 2 numbers.
  
  for(var i:int = 0; i  dataProvider.length; i++) {
  if(myTimestamp  dataProvider[i]  myTimestamp  dataProvider
[i+1])
  //this is the correct spot.
  }
 





[flexcoders] Re: My itemRenderer is cancelling wordWrap... (derailed discussion)

2008-08-13 Thread whatabrain
Ideally, Flex would detect the OS and behave accordingly, but at the 
very least, it should incorporate accepted UI standards that are 
common to all major platforms. For example, it's very rare to see a 
tooltip appear anywhere but at the corner of the mouse cursor. And 
right-clicking on a grid item usually selects it.


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

 Which os?  Flex is multi-platform.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of whatabrain
 Sent: Wednesday, August 13, 2008 8:27 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: My itemRenderer is cancelling wordWrap 
setting
 on AdvancedDataGridColumn
 
  
 
 Just changing Label to Text worked. I didn't have to write a 
measure 
 method.
 
 I really wish the Flex controls had been written in a way that 
 matches the OS's behavior better. I've had to write a lot of code 
 (for example, this tooltip fix), just to make standard controls.
 
 Ah well. Better the way it is, than not existing at all.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Wordwrapping is the responsibility of the renderer. Label is a
  single-line control so it won't word wrap. Using Text is possible 
 but
  you have to wire up the measure method correctly. See past 
threads 
 for
  how to do that. Also, that makes a heavy weight renderer.
  
  
  
  My recommendation is to copy DataGridItemRenderer and remove the 
 datatip
  code.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of whatabrain
  Sent: Tuesday, August 12, 2008 3:55 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] My itemRenderer is cancelling wordWrap 
 setting on
  AdvancedDataGridColumn
  
  
  
  I want an AdvancedDataGridColumn to have word wrap, soI set the 
  wordWrap attribute to true. The column contains an itemRenderer, 
 which 
  renders an mx:Label, which contains the actual text. But that 
text 
  doesn't wrap.
  
  mx:AdvancedDataGridColumn wordWrap=true
  mx:itemRenderer
  mx:Component
  mx:Label text=I am an unhappy table cell/
  /mx:Component
  /mx:itemRenderer
  /mx:AdvancedDataGridColumn
  
  The reason I'm using an itemRenderer is because otherwise, 
tooltips 
  don't work properly. They are always drawn within the cell, 
instead 
 of 
  appearing at the corner of the mouse cursor like they should. 
 Putting 
  the tooltip on the Label fixes the problem.
 





RE: [flexcoders] AS 3.0 event target problem!!!

2008-08-13 Thread Gordon Smith
If you assign an id, the name is the id. But if you don't assign an id, the 
name is set to the class name concatenated with an incrementing counter value, 
to ensure uniqueness. Look at the following file:

 

http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils//NameUtil.as

 

The counter is simply a static var starting at 0 and incrementing every time a 
component calls NameUtil.createUniqueName().

 

When an object gets toString(), a string is formed by concatenating together, 
with periods, the names of the object and the names of its ancestors, omitting 
the SystemManager.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex 
Harui
Sent: Wednesday, August 13, 2008 2:41 PM
To: [EMAIL PROTECTED]; flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

Hmm.  I thought the name property of every sprite was filled out.  You could 
certainly walk the tree and find things with no name and give them names.

 

The numbering has to do with when it got instantiated.  The ConfirmScreen was 
the 388th thing, UIComponent was the 418th, etc.  But one UI change or timing 
glitch can change those numbers.

 



From: Zoran Avramov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2008 2:21 PM
To: flexcoders@yahoogroups.com; Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What happens when the object does not have a name (or it does not have a static 
name) like the close button that I mentioned below? Also can you share 
something on how the numbering schema works (ConfirmScreen388. UIComponent418. 
Button422), maybe I can match the numbering somehow that if that information is 
publicly available. 

--- On Wed, 8/13/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: [EMAIL PROTECTED], flexcoders@yahoogroups.com
Date: Wednesday, August 13, 2008, 12:53 PM

The root of a SWF is a SystemManager.  All Popups and the Application are 
children of the SystemManager.

 

You may be able to use getChildByName and get more consistent results.

 

We have a much more sophisticated technology we use in house to exercise 
components similar to what you are doing.  Maybe it will be public someday.

 



From: Zoran Avramov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2008 9:40 AM
To: flexcoders@yahoogroups.com
Cc: Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

Hi Alex/Gordon

 

The problem with assigning IDs is that the popup container has that close 
button (the path that I gave) when you create the actual popup. For example the 
button that I gave an example with no path to the root 
(ConfirmScreen388.UIComponent418.Button422), is created by just setting this 
flag 'showCloseButton=true' in the code below. I need to be able to find a 
way to identify that button or any other DisplayObject that I want to monitor 
for clicks and then execute those clicks on a different instance of the same 
.swf. I have not found a good way to do this and if you can help me understand 
how you render your DOM in flex (at least the part that will help me do this) 
it would be greatly appreciated. 

 

mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml 
http://www.adobe.com/2006/mxml 
 layout=vertical
 close=PopUpManager.removePopUp(this)
 showCloseButton=true

 

 

Thanks,

Zoran

 



--- On Tue, 8/12/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: flexcoders@yahoogroups.com
Date: Tuesday, August 12, 2008, 9:38 PM

He’s surprised that the popup isn’t parented by the app.  Popups are parented 
by the systemMgr which also parents the app.

 

Id’s are per-document (or per-mxml file) so you can traverse documents and pull 
objects by their ids.

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of Gordon Smith
Sent: Tuesday, August 12, 2008 7:54 PM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What do you mean by I don't have the path to the root?

 

If you assign an id to each component, the toString() method will use that 
instead of a dynamically generated name like Button498.

 

Gordon Smith

Adobe Flex SDK Team

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of zoran_101
Sent: Tuesday, August 12, 2008 4:30 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] AS 3.0 event target problem!!!

 

I have an interesting problem regarding event.target in Flex 
2/ActionScript 3.0. I am using the Flex Grocer app in order to try 
something out. I am 

RE: [flexcoders] Re: My itemRenderer is cancelling wordWrap... (derailed discussion)

2008-08-13 Thread Gordon Smith
Please file bugs or enhancement requests at http://bugs.adobe.com/flex
for the problems you've encountered.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of whatabrain
Sent: Wednesday, August 13, 2008 3:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: My itemRenderer is cancelling wordWrap...
(derailed discussion)

 

Ideally, Flex would detect the OS and behave accordingly, but at the 
very least, it should incorporate accepted UI standards that are 
common to all major platforms. For example, it's very rare to see a 
tooltip appear anywhere but at the corner of the mouse cursor. And 
right-clicking on a grid item usually selects it.

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

 Which os? Flex is multi-platform.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of whatabrain
 Sent: Wednesday, August 13, 2008 8:27 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: My itemRenderer is cancelling wordWrap 
setting
 on AdvancedDataGridColumn
 
 
 
 Just changing Label to Text worked. I didn't have to write a 
measure 
 method.
 
 I really wish the Flex controls had been written in a way that 
 matches the OS's behavior better. I've had to write a lot of code 
 (for example, this tooltip fix), just to make standard controls.
 
 Ah well. Better the way it is, than not existing at all.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Wordwrapping is the responsibility of the renderer. Label is a
  single-line control so it won't word wrap. Using Text is possible 
 but
  you have to wire up the measure method correctly. See past 
threads 
 for
  how to do that. Also, that makes a heavy weight renderer.
  
  
  
  My recommendation is to copy DataGridItemRenderer and remove the 
 datatip
  code.
  
  
  
  
  
  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 whatabrain
  Sent: Tuesday, August 12, 2008 3:55 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] My itemRenderer is cancelling wordWrap 
 setting on
  AdvancedDataGridColumn
  
  
  
  I want an AdvancedDataGridColumn to have word wrap, soI set the 
  wordWrap attribute to true. The column contains an itemRenderer, 
 which 
  renders an mx:Label, which contains the actual text. But that 
text 
  doesn't wrap.
  
  mx:AdvancedDataGridColumn wordWrap=true
  mx:itemRenderer
  mx:Component
  mx:Label text=I am an unhappy table cell/
  /mx:Component
  /mx:itemRenderer
  /mx:AdvancedDataGridColumn
  
  The reason I'm using an itemRenderer is because otherwise, 
tooltips 
  don't work properly. They are always drawn within the cell, 
instead 
 of 
  appearing at the corner of the mouse cursor like they should. 
 Putting 
  the tooltip on the Label fixes the problem.
 


 



[flexcoders] Re: My itemRenderer is cancelling wordWrap setting on AdvancedDataGridColumn

2008-08-13 Thread whatabrain
Alright, you've convinced me. :) I subclassed 
AdvancedDataGridItemRenderer, and made toolTipShowHandler a blank 
method. I hadn't realized that they'd so specifically implemented 
that behavior.


Now two more issues have come up.

1) Word-wrap works as one used to web browsers and various OSs would 
expect, except when there's a very long word. Flex cuts the word in 
the middle, and splits it across lines. I would prefer it if the 
table grew a horizontal scrollbar in this case, like tables in HTML. 
Is there any easy way to do this?

1) There's a lot more horizontal space than there used to be between 
the previous column and the column with its new itemRenderer. I know 
that some controls have a horizontalGap attribute which can be used 
to fix this problem, but that attribute isn't available on 
AdvancedDataGridColumn. How would I emulate the behavior of that 
attribute?

Thanks for your help!



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

 Wordwrapping is the responsibility of the renderer.  Label is a
 single-line control so it won't word wrap.  Using Text is possible 
but
 you have to wire up the measure method correctly.  See past threads 
for
 how to do that.  Also, that makes a heavy weight renderer.
 
  
 
 My recommendation is to copy DataGridItemRenderer and remove the 
datatip
 code.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of whatabrain
 Sent: Tuesday, August 12, 2008 3:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] My itemRenderer is cancelling wordWrap 
setting on
 AdvancedDataGridColumn
 
  
 
 I want an AdvancedDataGridColumn to have word wrap, soI set the 
 wordWrap attribute to true. The column contains an itemRenderer, 
which 
 renders an mx:Label, which contains the actual text. But that text 
 doesn't wrap.
 
 mx:AdvancedDataGridColumn wordWrap=true
 mx:itemRenderer
 mx:Component
 mx:Label text=I am an unhappy table cell/
 /mx:Component
 /mx:itemRenderer
 /mx:AdvancedDataGridColumn
 
 The reason I'm using an itemRenderer is because otherwise, tooltips 
 don't work properly. They are always drawn within the cell, instead 
of 
 appearing at the corner of the mouse cursor like they should. 
Putting 
 the tooltip on the Label fixes the problem.





[flexcoders] Stacked Charts - Series[0].items.length not accurate at certain times. Bug or ?

2008-08-13 Thread EddieBerman
I've got a ColumnChart with its type set to stacked. I also have a
BackgroundElement extended from CartesianDataCanvas, which I'll call
myDataCanvas.

There are times, particularly when the myDataCanvas
updateDisplayList() is called, where it's not possible to get the
items of Series[0]. I can get the items of Series[1] and above, but
not Series[0]. Series[0].items.length will show as 0 (yet you can see
the entire series items array in the debugger's Variables pane!).

This isn't a problem when it's clustered, only when stacked.

I can reproduce this easily in sample apps, and can include code if
need be, but I was curious if perhaps anyone else has experienced this
problem, and/or can offer some guidance towards a solution. 


Thanks in advance.



Re: [flexcoders] allowing CDATA in inline XML of ActionScript code of MXML

2008-08-13 Thread Keith
Thanks, I can work with that.



-- Keith H --
www.keith-hair.net

Daniel Freiman wrote:
 You can split up the XML into a couple strings and concatenate them 
 together to work around the compiler.  Something like this:

 var doc:XML= new XML(SAMPLEINFO![CDATA[Cool stuff about Unicorns 
 in Unicode text here.]+]+/INFO/SAMPLE);


 - Daniel Freiman

 On Wed, Aug 13, 2008 at 2:44 PM, Keith [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 When I declare an inline XML object in the actionscript of my MXML
 document,
 how do I keep the compiler from throwing errors when I have CDATA
 in my XML?
 (The mx:Script already uses CDATA for actionscript)

 private function init():void
 {
 var doc:XML=
 SAMPLE
 INFO![CDATA[Cool stuff about Unicorns in Unicode text
 here.]]/INFO
 /SAMPLE;

 Alert.show(doc.toXMLString());
 }

 -- Keith H --
 www.keith-hair.net http://www.keith-hair.net


  

begin:vcard
fn:Keith H
n:H;Keith
email;internet:[EMAIL PROTECTED]
x-mozilla-html:TRUE
url:http://www.keith-hair.com
version:2.1
end:vcard



[flexcoders] Re: how to search an arraycollection

2008-08-13 Thread Michael VanDaniker
Yes.  If X isn't in the list, the search will end on either the
position before or after where X should be.

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

 can i use a binary search if the value i am searching for is not 
 explicitly in my arraycollection? i want to get the closest value to 
 the timestamp i am searching for.
 
 
 
 --- In flexcoders@yahoogroups.com, Michael VanDaniker michael@ 
 wrote:
 
  If your collection is sorted by timestamp a binary search would be 
 faster.
  
  --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
  
   You'll have to loop through yourself and keep track of the minimum
   difference
   

   
   
   
   From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
   Behalf Of blc187
   Sent: Wednesday, August 13, 2008 12:57 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] how to search an arraycollection
   

   
   I have an arraycollection of objects, each of which has a 
 timestamp.
   ex: {timestamp:4342423432, value:5}
   
   I want to search the arraycollection for the object which has the 
   closest timestamp to the time I'm looking for.
   Is there a way to search the arraycollection for an approximate 
 value?
   
   As of right now I'm looping through each object in my 
 arraycollection 
   to find if the value is between 2 numbers.
   
   for(var i:int = 0; i  dataProvider.length; i++) {
   if(myTimestamp  dataProvider[i]  myTimestamp  dataProvider
 [i+1])
   //this is the correct spot.
   }
  
 





Re: [flexcoders] Re: how to search an arraycollection

2008-08-13 Thread Sid Maskit
My understanding of a binary search is that you keep adjusting the floor and 
ceiling. You would need to check to find when floor and ceiling are consecutive 
items. At that point, you would only have two items, and you could run a 
comparison to see which is closer to your target number.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: blc187 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 13, 2008 3:11:06 PM
Subject: [flexcoders] Re: how to search an arraycollection


can i use a binary search if the value i am searching for is not 
explicitly in my arraycollection? i want to get the closest value to 
the timestamp i am searching for.

--- In [EMAIL PROTECTED] ups.com, Michael VanDaniker [EMAIL PROTECTED]  
wrote:

 If your collection is sorted by timestamp a binary search would be 
faster.
 
 --- In [EMAIL PROTECTED] ups.com, Alex Harui aharui@ wrote:
 
  You'll have to loop through yourself and keep track of the minimum
  difference
  
  
  
   _ _ __
  
  From: [EMAIL PROTECTED] ups.com 
[mailto:[EMAIL PROTECTED] ups.com] On
  Behalf Of blc187
  Sent: Wednesday, August 13, 2008 12:57 PM
  To: [EMAIL PROTECTED] ups.com
  Subject: [flexcoders] how to search an arraycollection
  
  
  
  I have an arraycollection of objects, each of which has a 
timestamp.
  ex: {timestamp:43424234 32, value:5}
  
  I want to search the arraycollection for the object which has the 
  closest timestamp to the time I'm looking for.
  Is there a way to search the arraycollection for an approximate 
value?
  
  As of right now I'm looping through each object in my 
arraycollection 
  to find if the value is between 2 numbers.
  
  for(var i:int = 0; i  dataProvider. length; i++) {
  if(myTimestamp  dataProvider[ i]  myTimestamp  dataProvider
[i+1])
  //this is the correct spot.
  }
 





  

[flexcoders] Re: Take the latest Adobe Developer Survey

2008-08-13 Thread Amy
--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:

 Er, hit send too early.
 
 Hey all,
 
 We've got another survey out as we try to determine what tools and 
services
 are going to be appealing as part of future work here at Adobe.  Would
 appreciate it if you could take a few minutes and fill it out.
 
 http://www.adobe.com/go/devsurvey
 
 For those in the US there is a raffle for a 32GB Apple iPod Touch.

I notice you don't have an option for ASP classic.  Are you assuming 
that no one uses this anymore?  I'd be interested in seeing if I'm the 
only one still doing this.

-Amy



RE: [flexcoders] AS 3.0 event target problem!!!

2008-08-13 Thread Alex Harui
Well, you can use getChildAt() and assume indexes (they are less likely
to change).  You can subclass the components and walk their trees
assigning names

 



From: Zoran Avramov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2008 2:54 PM
To: flexcoders@yahoogroups.com; Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

Yep I thought you did something like that for the numbering and that is
definitely not going to work. In terms of walking the tree and assigning
names this will not work either since one of my requirements (It sucks
to be me...) is to use my path or control name (that I just got from
clicking on a button lets say) on a different instance of the .swf and
this new instance will not have those names that I will generate. Is
there any way that I can associate a control on the .swf with some type
of identifier that can be used at a different instance of the .swf and
select that control.



--- On Wed, 8/13/08, Alex Harui [EMAIL PROTECTED] wrote:

From: Alex Harui [EMAIL PROTECTED]
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: [EMAIL PROTECTED], flexcoders@yahoogroups.com
Date: Wednesday, August 13, 2008, 2:40 PM

Hmm.  I thought the name property of every sprite was filled out.  You
could certainly walk the tree and find things with no name and give them
names.

 

The numbering has to do with when it got instantiated.  The
ConfirmScreen was the 388th thing, UIComponent was the 418th, etc.  But
one UI change or timing glitch can change those numbers.

 



From: Zoran Avramov [mailto:zoran_ [EMAIL PROTECTED] com] 
Sent: Wednesday, August 13, 2008 2:21 PM
To: [EMAIL PROTECTED] ups.com ; Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What happens when the object does not have a name (or it does not have a
static name) like the close button that I mentioned below? Also can you
share something on how the numbering schema works (ConfirmScreen388.
UIComponent418. Button422), maybe I can match the numbering somehow that
if that information is publicly available. 

--- On Wed, 8/13/08, Alex Harui [EMAIL PROTECTED] com wrote:

From: Alex Harui [EMAIL PROTECTED] com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: [EMAIL PROTECTED] com, [EMAIL PROTECTED] ups.com
Date: Wednesday, August 13, 2008, 12:53 PM

The root of a SWF is a SystemManager.  All Popups and the Application
are children of the SystemManager.

 

You may be able to use getChildByName and get more consistent results.

 

We have a much more sophisticated technology we use in house to exercise
components similar to what you are doing.  Maybe it will be public
someday.

 



From: Zoran Avramov [mailto:zoran_ [EMAIL PROTECTED] com] 
Sent: Wednesday, August 13, 2008 9:40 AM
To: [EMAIL PROTECTED] ups.com
Cc: Alex Harui
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

Hi Alex/Gordon

 

The problem with assigning IDs is that the popup container has that
close button (the path that I gave) when you create the actual popup.
For example the button that I gave an example with no path to the root
(ConfirmScreen388. UIComponent418. Button422) , is created by just
setting this flag 'showCloseButton=true' in the code below. I need to
be able to find a way to identify that button or any other DisplayObject
that I want to monitor for clicks and then execute those clicks on a
different instance of the same .swf. I have not found a good way to do
this and if you can help me understand how you render your DOM in flex
(at least the part that will help me do this) it would be greatly
appreciated. 

 

mx:TitleWindow xmlns:mx=http://www.adobe. com/2006/ mxml
http://www.adobe.com/2006/mxml 
 layout=vertical
 close=PopUpManager. removePopUp( this)
 showCloseButton=true

 

 

Thanks,

Zoran

 



--- On Tue, 8/12/08, Alex Harui [EMAIL PROTECTED] com wrote:

From: Alex Harui [EMAIL PROTECTED] com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!
To: [EMAIL PROTECTED] ups.com
Date: Tuesday, August 12, 2008, 9:38 PM

He's surprised that the popup isn't parented by the app.  Popups are
parented by the systemMgr which also parents the app.

 

Id's are per-document (or per-mxml file) so you can traverse documents
and pull objects by their ids.

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ]
On Behalf Of Gordon Smith
Sent: Tuesday, August 12, 2008 7:54 PM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] AS 3.0 event target problem!!!

 

What do you mean by I don't have the path to the root?

 

If you assign an id to each component, the toString() method will use
that instead of a dynamically generated name like Button498.

 

Gordon Smith

Adobe Flex SDK Team

 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ]
On Behalf Of 

Re: [flexcoders] Re: Take the latest Adobe Developer Survey

2008-08-13 Thread Nancy Gill
I notice you don't have an option for ASP classic. Are you assuming 
that no one uses this anymore? I'd be interested in seeing if I'm the 
only one still doing this.


Not at all, Amy.  I prefer ASP Classic also .. but Flex has most definitely 
ignored this supposedly fading but still widely used server model.  It's a pain 
to have to learn something else just for this purpose when I use ASP for 
everything else.  The truth is, whether or not Microsoft is going to ignore it 
in the future, it does work with IIS and will for years to come.  

I've done a few things with PHP and it's not too bad .. 
Nancy


[flexcoders] How early can I get SystemManager, and what's the best way to get it?

2008-08-13 Thread Josh McDonald
Hey guys,

Is it possible to get SystemManager before Application.application is set?
If so, how?

-Josh

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


  1   2   >