[flexcoders] popup a module

2007-05-21 Thread Luis Eduardo

Hello, i am trying to do a mx:Module being Popuped but i am finding 
this very dificult.
My classes are like this:   MyWindow - MyTitleWindow - mx:TitleWindow
The code works very fine if i run it all together (without 
modules).  But when i split the swf i cannot popup MyWindow class.

here is the sample that works, but without modules. This is the 
behaviour i seek. Is it possible with modules?

?xml version=1.0 encoding=utf-8?
!-- MainApp.mxml --
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Button label=show click=showTheWindow()/
mx:Script
![CDATA[
import mx.managers.PopUpManagerChildList;
import mx.managers.PopUpManager;
   
public function showTheWindow():void {
PopUpManager.centerPopUp( 
PopUpManager.createPopUp(DisplayObject(Application.application), 
MyWindow, false, PopUpManagerChildList.APPLICATION) );
}
]]
/mx:Script
/mx:Application
---
?xml version=1.0 encoding=utf-8?
!-- MyWindow.mxml  --
local:MyTitleWindow
xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:local=*
width=400 height=300 showCloseButton=true
close=PopUpManager.removePopUp(this)
mx:Label text=HERE IS THE WINDOW !!!/
mx:Script
![CDATA[
import mx.managers.PopUpManager;
]]
/mx:Script
/local:MyTitleWindow

?xml version=1.0 encoding=utf-8?
!-- MyTitleWindow.mxml --
mx:TitleWindow
xmlns:mx=http://www.adobe.com/2006/mxml;
width=400 height=300
/mx:TitleWindow
---

i found a PowerPoint from Alex Harui but it don't compile.  I made some 
adjust to compile the example but not work ok.
here is the link:  
blogs.adobe.com/aharui/360*Flex*2007/*Module*s.ppt/*Module*s.ppt

can someone give any help?

- Luís Eduardo.




Re: [flexcoders] popup a module

2007-05-21 Thread Luis Eduardo

Cool! i was able to find just the .ppt presentation before.
Now that you give the link to your blog i found the sample codes. Will 
try again with a better start.

thank you very much Alex!

btw, the presentation was amazing. Very clarificate about the under 
hood :)


Alex Harui escreveu:

 There’s an example on my blog blogs.adobe.com/aharui

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Luis Eduardo
 *Sent:* Monday, May 21, 2007 6:10 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] popup a module


 Hello, i am trying to do a mx:Module being Popuped but i am finding
 this very dificult.
 My classes are like this: MyWindow - MyTitleWindow - mx:TitleWindow
 The code works very fine if i run it all together (without
 modules). But when i split the swf i cannot popup MyWindow class.

 here is the sample that works, but without modules. This is the
 behaviour i seek. Is it possible with modules?

 ?xml version=1.0 encoding=utf-8?
 !-- MainApp.mxml --
 mx:Application
 xmlns:mx=http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml
 mx:Button label=show click=showTheWindow()/
 mx:Script
 ![CDATA[
 import mx.managers.PopUpManagerChildList;
 import mx.managers.PopUpManager;

 public function showTheWindow():void {
 PopUpManager.centerPopUp(
 PopUpManager.createPopUp(DisplayObject(Application.application),
 MyWindow, false, PopUpManagerChildList.APPLICATION) );
 }
 ]]
 /mx:Script
 /mx:Application
 ---
 ?xml version=1.0 encoding=utf-8?
 !-- MyWindow.mxml --
 local:MyTitleWindow
 xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
 xmlns:local=*
 width=400 height=300 showCloseButton=true
 close=PopUpManager.removePopUp(this)
 mx:Label text=HERE IS THE WINDOW !!!/
 mx:Script
 ![CDATA[
 import mx.managers.PopUpManager;
 ]]
 /mx:Script
 /local:MyTitleWindow
 
 ?xml version=1.0 encoding=utf-8?
 !-- MyTitleWindow.mxml --
 mx:TitleWindow
 xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
 width=400 height=300
 /mx:TitleWindow
 ---

 i found a PowerPoint from Alex Harui but it don't compile. I made some
 adjust to compile the example but not work ok.
 here is the link:
 blogs.adobe.com/aharui/360*Flex*2007/*Module*s.ppt/*Module*s.ppt

 can someone give any help?

 - Luís Eduardo.

  




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


Re: [flexcoders] popup a module

2007-05-21 Thread Luis Eduardo

Alex, i tried your samples and they work almost perfect.  But yet i 
could not make the poped-up window move around the screen with the user 
interaction.
It seems that the new window just come and go but cant be dragged away.
I tried too the sample that have ShareCode and put the 2 managers 
(dragManager and popupManager) and yet didnt work.

Can you explain how to make the new poped-up window be free to move 
with user mouse interaction?

many thanks!

Luís Eduardo.


Luis Eduardo escreveu:

Cool! i was able to find just the .ppt presentation before.
Now that you give the link to your blog i found the sample codes. Will 
try again with a better start.

thank you very much Alex!

btw, the presentation was amazing. Very clarificate about the under 
hood :)


Alex Harui escreveu:

  

There’s an example on my blog blogs.adobe.com/aharui



*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
*On Behalf Of *Luis Eduardo
*Sent:* Monday, May 21, 2007 6:10 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] popup a module


Hello, i am trying to do a mx:Module being Popuped but i am finding
this very dificult.
My classes are like this: MyWindow - MyTitleWindow - mx:TitleWindow
The code works very fine if i run it all together (without
modules). But when i split the swf i cannot popup MyWindow class.

here is the sample that works, but without modules. This is the
behaviour i seek. Is it possible with modules?

?xml version=1.0 encoding=utf-8?
!-- MainApp.mxml --
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml 
http://www.adobe.com/2006/mxml
mx:Button label=show click=showTheWindow()/
mx:Script
![CDATA[
import mx.managers.PopUpManagerChildList;
import mx.managers.PopUpManager;

public function showTheWindow():void {
PopUpManager.centerPopUp(
PopUpManager.createPopUp(DisplayObject(Application.application),
MyWindow, false, PopUpManagerChildList.APPLICATION) );
}
]]
/mx:Script
/mx:Application
---
?xml version=1.0 encoding=utf-8?
!-- MyWindow.mxml --
local:MyTitleWindow
xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
xmlns:local=*
width=400 height=300 showCloseButton=true
close=PopUpManager.removePopUp(this)
mx:Label text=HERE IS THE WINDOW !!!/
mx:Script
![CDATA[
import mx.managers.PopUpManager;
]]
/mx:Script
/local:MyTitleWindow

?xml version=1.0 encoding=utf-8?
!-- MyTitleWindow.mxml --
mx:TitleWindow
xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
width=400 height=300
/mx:TitleWindow
---

i found a PowerPoint from Alex Harui but it don't compile. I made some
adjust to compile the example but not work ok.
here is the link:
blogs.adobe.com/aharui/360*Flex*2007/*Module*s.ppt/*Module*s.ppt

can someone give any help?

- Luís Eduardo.

 






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




  




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


[flexcoders] uploading file flex - servlet

2007-05-12 Thread Luis Eduardo
  Hello, can some one send me just a bit of code regard of how to make a 
servlet handle a fileupload coming from flex?
  To flex send the file appear to be ok...  but my servlet simple appear 
to not know how to get the data of the image being uploaded.

i already search and read a lot but unfortunatelly dont figured out 
how to separate the data from the other headers.

so...  just a peace of code regard of this is enought.


  thanks!


Re: [flexcoders] uploading file flex - servlet

2007-05-12 Thread Luis Eduardo


  Sry, never mind.  after searching with some more faith  :)   i 
discover the o'reilly servlet multipart API on http://servlets.com/cos/ 
that, with some black magic, did the trick!

 


Luis Eduardo escreveu:

 Hello, can some one send me just a bit of code regard of how to make a
 servlet handle a fileupload coming from flex?
 To flex send the file appear to be ok... but my servlet simple appear
 to not know how to get the data of the image being uploaded.

 i already search and read a lot but unfortunatelly dont figured out
 how to separate the data from the other headers.

 so... just a peace of code regard of this is enought.

 thanks!

  




Re: [flexcoders] youtube

2007-05-05 Thread Luis Eduardo


  OpenLaszlo has already an application that load FLVs directly from the 
server and plays it. (so its possible)
 heres the link for the demo:   http://www.openlaszlo.org/demos#YouTube

  perhaps here is a good start to do in the flex.
http://www.youtube.com/dev

  in time:  with a small google, here is a link to a apollo one (with 
source):  http://www.mojoflex.net/


-  Luís Eduardo.




André Rodrigues Pena escreveu:

 loading an external FLV wont be prevented by sandbox?

 On 5/4/07, *Mark Kornfilt* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 I don't think you can embed the Youtube player itself (SWF)
 directly because of security crossdomain issues, and because there
 is no way to control the behavior of the player, i.e stopping and
 closing the stream when you are done with it.

 Mark

 On 5/4/07, *André Rodrigues Pena*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 but loading from youtube server?

 On 5/4/07, *Manish Jethani*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 On 5/5/07, André Rodrigues Pena [EMAIL PROTECTED]
 mailto:andre.ufrj%40gmail.com wrote:
 is there a way to embed a youtube video inside a flex 2
 application?

 You could either embed the YouTube video player itself
 (SWF) using
 SWFLoader, or you could play the FLV directly using
 VideoDisplay.




 -- 
 André Rodrigues Pena

 LOCUS
 www.locus.com.br http://www.locus.com.br

 Blog
 www.techbreak.org http://www.techbreak.org





 -- 
 André Rodrigues Pena

 LOCUS
 www.locus.com.br http://www.locus.com.br

 Blog
 www.techbreak.org http://www.techbreak.org
  




Re: [flexcoders] Preventing IE to cache Flex

2007-04-25 Thread Luis Eduardo


  Nice Manish!  ty very much.  it explained a problem i was postponing 
here  ;)


Manish Jethani escreveu:

 For general cache issues with IE, check this out:

 http://en.wikipedia.org/wiki/XMLHttpRequest#Microsoft_Internet_Explorer_cache_issues
  
 http://en.wikipedia.org/wiki/XMLHttpRequest#Microsoft_Internet_Explorer_cache_issues

 On 4/26/07, André Rodrigues Pena [EMAIL PROTECTED] 
 mailto:andre.ufrj%40gmail.com wrote:
  Thanks matt.. Are you sure that there's not a solution a little bit 
 more...
  clean? lol thanks again
 
 
  On 4/25/07, Matt Wicks [EMAIL PROTECTED] 
 mailto:matt%40thewebforge.co.uk wrote:
  
  
  
  
  
  
   add a random number to the end of the url
  
  
   http://blah,cm/flexhtml?id=89 http://blah,cm/flexhtml?id=89
  
  
   ??
  
  
  
   On 25 Apr 2007, at 19:19, André Rodrigues Pena wrote:
  
  
  
  
  
  
   Hi all,
  
   My customers browsers are caching flex and preventing them to see my
   last updated applications. The HTML they are accessing is the one
   generated by default by Flex Builder.
  
   Can you give me some glance on it?
  
   --
   André Rodrigues Pena
  
  
  
  
  
  
 
 
 
  --
  André Rodrigues Pena
 
  LOCUS
  www.locus.com.br
 
  Blog
  www.techbreak.org

  




Re: [flexcoders] Re: Using TabNavigator to switch view states

2007-04-22 Thread Luis Eduardo


  Luckly i was doing something last week that i think can help you.
  (or at least give you some directions)

  here is the code.  try change the tabs to see the resize.
  i dont know yet how to find the amount to shrink automaticly...  if 
you or someone find the answer and share with us that would be nice!

 
Luís Eduardo.




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

mx:states
mx:State name=toCourses /
/mx:states
   
mx:transitions
mx:Transition fromState= toState=toCourses
mx:Sequence target={win}
mx:SetPropertyAction target={tn} name=visible 
value=false/
mx:Resize
widthBy=-200
heightBy=-200
duration=1000
easingFunction={Quintic.easeInOut}/
mx:SetPropertyAction target={tn} name=selectedIndex 
value=1/
mx:SetPropertyAction target={tn} name=visible 
value=true/
/mx:Sequence
/mx:Transition
mx:Transition fromState=toCourses toState=
mx:Sequence target={win}
mx:SetPropertyAction target={tn} name=visible 
value=false/
mx:Resize
widthBy=200
heightBy=200
duration=1000
easingFunction={Quintic.easeInOut}/
   
mx:SetPropertyAction target={tn} name=selectedIndex 
value=0/
mx:SetPropertyAction target={tn} name=visible 
value=true/
/mx:Sequence
/mx:Transition
/mx:transitions

mx:TitleWindow title=Shrink Test id=win width=600 height=500
mx:TabNavigator id=tn width=100% height=100%
mx:Canvas label=Students width=100% height=100% 
show=changeStudents()
   
/mx:Canvas
mx:Canvas label=Courses width=100% height=100% 
show=changeCourses()
   
/mx:Canvas
/mx:TabNavigator
/mx:TitleWindow
mx:Script
![CDATA[
import mx.effects.easing.Quintic;
   
public function changeCourses():void {
this.currentState = toCourses;
}
public function changeStudents():void {
this.currentState = ;
}
]]
/mx:Script
/mx:Application








munene_uk escreveu:

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, Manish Jethani
 [EMAIL PROTECTED] wrote:
 
  Set resizeToContent on the tab navigator to true.
 
  On 4/22/07, munene_uk [EMAIL PROTECTED] wrote:
   --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, munene_uk munene_uk@ wrote:
   
i've got two canvases in a tabnavigator which are named students and
courses
   
the student canvas contains alot more information than the courses
canvas
my idea is that when the user click on the course tab the
 tabnavigator
should resize(shrink) to fit.
does anyone know how i can achieve this?
   
my other question is can i achieve the same effect without having to
switch states instead tell the tab navigato to resize itself
   
  
   can anyone please offer some advice on how i can achieve this?
  
  
  
  
   --
   Flexcoders Mailing List
   FAQ: 
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
   Yahoo! Groups Links
  
  
  
  
 
 thanks for the reply but for some reason it doesn't seem to work can
 you maybe exaplin to me in a bit more detail how this should be
 implemented?

  




Re: [flexcoders] boolean not casting ok from string

2007-04-20 Thread Luis Eduardo


  ok Gordon.  so i will make my wrapper.
  thanks to you and Alex.

  []'s

  Luís Eduardo.


Gordon Smith escreveu:

 No, you cannot overload operators in AS3. The point has been made 
 several times now: the only way to convert true to true and false 
 to false is to write
  
 var btest:Boolean = someString == true;
  
 - Gordon

 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Luis Eduardo
 *Sent:* Thursday, April 19, 2007 7:32 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] boolean not casting ok from string



 i see.

 So can i overload the = operator to it understand my needs? So i
 can do the converting transparently.

 btest:Boolean = false;

 i search on google and find it from a forum:
 overloading is still not supported in AS3 (and that includes operators)

 but dont know if its true.

 Alex Harui escreveu:

  It is weird, but that what the ECMAScript committee decided. It is a
  bit inconsistent, but you are actually calling functions and not
  really casting. So you'll have to live with converting as to whether
  the string == true
 
  --
  *From:* flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com]
  *On Behalf Of *Luis Eduardo
  *Sent:* Wednesday, April 18, 2007 9:06 PM
  *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  *Subject:* Re: [flexcoders] boolean not casting ok from string
 
 
 
  yeah shaun, you are rigth. After follow your sugestion i searched in
  the docs and found what you mean here:
  http://livedocs.adobe.com/flex/201/langref/package.html#Boolean 
 http://livedocs.adobe.com/flex/201/langref/package.html#Boolean
  http://livedocs.adobe.com/flex/201/langref/package.html#Boolean 
 http://livedocs.adobe.com/flex/201/langref/package.html#Boolean()
  Boolean its a function that have the same behavior than the Boolean
  constructor that take a non-empty string and convert it to true.
 
  aww.
 
  very weird.
 
  anyway thank you and the others to help understand what is going on 
 here.
  now i will try to minimize the damages :)
 
  []'s,
 
  Luís Eduardo.
 
  shaun escreveu:
 
   Hi,
  
   Its not a bug. Note: the Constructor for Boolean in the docs.
   Think about it as if you have the following:
  
   var moo:String = Moo;
   if (moo) {
   // have a cow.
   }else{
   //no cow.
   }
  
   So, Boolean(false) is true!
  
   var y;
   var x:Object;
   var b:Boolean = Boolean(false);
   trace(b1 false is +b.valueOf());
  
   b = 0;
   trace(b2 (0) is +b.valueOf());
  
   b = 1;
   trace(b3 (1) is +b.valueOf());
  
   b = 2;
   trace(b4 (2) is +b.valueOf());
  
   b = -1;
   trace(b5 (-1) is +b.valueOf());
  
   b = null;
   trace(b6 (explicit null) is +b.valueOf());
  
   b = x;
   trace(b7 (unassigned null, undef) is +b.valueOf());
  
   b = y;
   trace(b8 (undef) is +b.valueOf());
  
   b = (new Object() as Boolean);
   trace(b9 (as not a boolean ie, null) is +b.valueOf());
  
   -
   b1 false is true
   b2 (0) is false
   b3 (1) is true
   b4 (2) is true
   b5 (-1) is true
   b6 (explicit null) is false
   b7 (unassigned null, undef) is false
   b8 (undef) is false
   b9 (as not a boolean ie, null) is false
  
   
  
   HTH,
   shaun
  
  
 
 

  




Re: [flexcoders] boolean not casting ok from string

2007-04-19 Thread Luis Eduardo


  i see.

  So can i overload the  = operator to it understand my needs?  So i 
can do the converting transparently.

  btest:Boolean = false;


  i search on google and find it from a forum:
overloading is still not supported in AS3 (and that includes operators)

but dont know if its true.



Alex Harui escreveu:

 It is weird, but that what the ECMAScript committee decided.  It is a 
 bit inconsistent, but you are actually calling functions and not 
 really casting.  So you'll have to live with converting as to whether 
 the string == true

 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Luis Eduardo
 *Sent:* Wednesday, April 18, 2007 9:06 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] boolean not casting ok from string



 yeah shaun, you are rigth. After follow your sugestion i searched in
 the docs and found what you mean here:
 http://livedocs.adobe.com/flex/201/langref/package.html#Boolean 
 http://livedocs.adobe.com/flex/201/langref/package.html#Boolean()
 Boolean its a function that have the same behavior than the Boolean
 constructor that take a non-empty string and convert it to true.

 aww.

 very weird.

 anyway thank you and the others to help understand what is going on here.
 now i will try to minimize the damages :)

 []'s,

 Luís Eduardo.

 shaun escreveu:

  Hi,
 
  Its not a bug. Note: the Constructor for Boolean in the docs.
  Think about it as if you have the following:
 
  var moo:String = Moo;
  if (moo) {
  // have a cow.
  }else{
  //no cow.
  }
 
  So, Boolean(false) is true!
 
  var y;
  var x:Object;
  var b:Boolean = Boolean(false);
  trace(b1 false is +b.valueOf());
 
  b = 0;
  trace(b2 (0) is +b.valueOf());
 
  b = 1;
  trace(b3 (1) is +b.valueOf());
 
  b = 2;
  trace(b4 (2) is +b.valueOf());
 
  b = -1;
  trace(b5 (-1) is +b.valueOf());
 
  b = null;
  trace(b6 (explicit null) is +b.valueOf());
 
  b = x;
  trace(b7 (unassigned null, undef) is +b.valueOf());
 
  b = y;
  trace(b8 (undef) is +b.valueOf());
 
  b = (new Object() as Boolean);
  trace(b9 (as not a boolean ie, null) is +b.valueOf());
 
  -
  b1 false is true
  b2 (0) is false
  b3 (1) is true
  b4 (2) is true
  b5 (-1) is true
  b6 (explicit null) is false
  b7 (unassigned null, undef) is false
  b8 (undef) is false
  b9 (as not a boolean ie, null) is false
 
  
 
  HTH,
  shaun
 
 

  




[flexcoders] Model and Forms

2007-04-18 Thread Luis Eduardo

  Is there a way to bind the maxChars of a TextInput on an entry of my 
Model?

  the length of the data should be defined in the model, i think.  (not 
on a validator.  perhaps the validator should take this information from 
the model)

 rigth?


[flexcoders] boolean not casting ok from string

2007-04-18 Thread Luis Eduardo

  hi,

  this simple code dont work.

var btest:Boolean = new Boolean();
btest = true;
trace(btest  = +btest);

btest = false;
trace(btest = : +btest);

there are a compile warning telling me that: 3590: String used were a
Boolean value was expected. The expression will be type coerced to Boolean
but it is not.

even if i do typecast it wont work:

btest = Boolean(true);
trace(btest = : +btest);

or if i typecast with as.
btest = (true as Boolean);
btest = (false as Boolean);

so i ask:   how to cast String true to Boolean true ?
what am i missing???


Luís Eduardo.



Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Luis Eduardo

  Gordon and Iko and Hilary,
  thx for your assist but i am thinking i am not being very clear on my 
previous post. (perhaps my bad english ;)
  what i want to do is a typecast from the String true to the boolean 
value true.
  this is why i cannot just throw the quotes on the assignment var 
btest:Boolean = true;
  i really need to convert a String to their correspondent boolean value.

 what you sugest to me is a workaround, rigth?  i mean, all the ways to 
do typecast doesn't work. (so my first post).

  is this a bug? a limitation? or its just me?

 all this is to take a XML attribute (witch comes as String from 
httpservice) and setup a variable in my form. Yeah, there are another 
ways to do this (and i am using they for now) but the class Number() 
works with this kind of typecast...  why not Boolean too?
  see, this typecast do works for numbers:
var numTest:Number = Number(3.5);
trace(numtest = +numTest);

but this not to Boolean:
var numTest:Boolean = Boolean(false);
trace(numtest = +numTest);


  best regards and thank you again for your help!!

  Luís Eduardo.

 

Gordon Smith escreveu:

 how to cast String true to Boolean true ?
  
 The expression s == true evalues to the Boolean value true if the 
 String s is true, and to false otherwise.
  
 BTW, there is no point in writing
  
 var btest:Boolean = new Boolean()
  
 You should just write
  
 var btest:Boolean = false;
  
 or
  
 var btest:Boolean;
  
 - Gordon

 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Luis Eduardo
 *Sent:* Wednesday, April 18, 2007 4:54 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] boolean not casting ok from string


 hi,

 this simple code dont work.

 var btest:Boolean = new Boolean();
 btest = true;
 trace(btest = +btest);

 btest = false;
 trace(btest = : +btest);

 there are a compile warning telling me that: 3590: String used were a
 Boolean value was expected. The expression will be type coerced to 
 Boolean
 but it is not.

 even if i do typecast it wont work:

 btest = Boolean(true);
 trace(btest = : +btest);

 or if i typecast with as.
 btest = (true as Boolean);
 btest = (false as Boolean);

 so i ask: how to cast String true to Boolean true ?
 what am i missing???

 Luís Eduardo.

  




Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Luis Eduardo


  yeah shaun, you are rigth.  After follow your sugestion i searched in 
the docs and found what you mean here:
http://livedocs.adobe.com/flex/201/langref/package.html#Boolean()
Boolean its a function that have the same behavior than the Boolean 
constructor that take a non-empty string and convert it to true.

aww.

very weird.

anyway thank you and the others to help understand what is going on here.
now i will try to minimize the damages  :)

  []'s,

 Luís Eduardo.


shaun escreveu:

 Hi,

 Its not a bug. Note: the Constructor for Boolean in the docs.
 Think about it as if you have the following:

 var moo:String = Moo;
 if (moo) {
 // have a cow.
 }else{
 //no cow.
 }

 So, Boolean(false) is true!

 var y;
 var x:Object;
 var b:Boolean = Boolean(false);
 trace(b1 false is +b.valueOf());

 b = 0;
 trace(b2 (0) is +b.valueOf());

 b = 1;
 trace(b3 (1) is +b.valueOf());

 b = 2;
 trace(b4 (2) is +b.valueOf());

 b = -1;
 trace(b5 (-1) is +b.valueOf());

 b = null;
 trace(b6 (explicit null) is +b.valueOf());

 b = x;
 trace(b7 (unassigned null, undef) is +b.valueOf());

 b = y;
 trace(b8 (undef) is +b.valueOf());

 b = (new Object() as Boolean);
 trace(b9 (as not a boolean ie, null) is +b.valueOf());

 -
 b1 false is true
 b2 (0) is false
 b3 (1) is true
 b4 (2) is true
 b5 (-1) is true
 b6 (explicit null) is false
 b7 (unassigned null, undef) is false
 b8 (undef) is false
 b9 (as not a boolean ie, null) is false

 

 HTH,
 shaun

  




Re: [flexcoders] Coming from Laszlo background - anyone know some migration tips?

2007-04-17 Thread Luis Eduardo


  hehe  sorry Tom, i was in a rush.
  let i try clarify something with code.
  here is a laszlo dataset  (something equivalent to flex HTTPService)

  dataset name=dsRQ type=http src=${'/calamb/Servlets/ServVeiculo'}
request=false querytype=POST/

  it already glue to its parent. With glue i mean it register 
already a lot of data events and all children share the datascope

  on my UI i need just to set an attribute datapath and the UI for 
itself catch a value when a valid node appear on the xpath.
  something like:

  edittext name=edtDescricao  
datapath=local:dsRQ:/root/request/Veiculo/@Descricao /

  where the edittext tag is, in flex, equivalent to mx:TextInput /

  there are also datapointers. These you can bind with some nodes of 
the data you want. They tell you when there are something you are 
interested.
  like:
datapointer name=dpRP xpath=local:dsRQ:/root/response/
  and now i am warned when the reponse node comes from the server, 
ready for handle it.


  of course, flex could do the same thing, but it will necessary some 
coding to create this kind of enviroment.


[]'s 

   - Luís Eduardo.

 

 

Tom Chiverton escreveu:

On Tuesday 17 Apr 2007, Luis Eduardo wrote:
  

  datapointers dont have equivalent in flex. U have to connect it by
hand. (edit.text = datareturned.text or something like that..)



Umm...
mx:Text id=edit text={ datareturned.text }/
?

  




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


Re: [flexcoders] Coming from Laszlo background - anyone know some migration tips?

2007-04-16 Thread Luis Eduardo


  Don't know if its this that u mean,but...
  the name attribute on laszlo is equivalent to idon flex.
  the dataset on laszlo is more or less equivalent than httpservices 
on flex, but the databindings are very diferent. In fact, i do prefer 
the way laszlo handle databinding, but, its my opinion (and probably is 
one of the reason that laszlo is heavier).
  datapointers dont have equivalent in flex. U have to connect it by 
hand. (edit.text = datareturned.text or something like that..)
  animators in laszlo is something like effects on flex. expecially the 
Move effect. In flex you have a set of effects to handle some kind of 
attributes, diferent from laszlo that u can useanimator to handle all 
kind of atributes. (but, i think flex is more powerfull than laszlo 
because there are a lot of effects classes ready to work).
  view in laszlo == canvas in flex.
  Box are exactly the same.
  LzFocus singleton in laszlo is focusmanager in flex.  The other 
singletons do exists too. (keyboard and system)
  command tag in laszlo dont have equivalent in flex. You need to 
implement your own using the keyboard singleton.
  alert is exactly the same.
  debugwindow dont exist, but u can use trace() to throw values on 
console. Also in flexbuilder you have more or less the same funcionality 
than debugwindow.

  well...  in the end my opinion ( *my opinion* ) is that flex is way 
better. Far more stable ( even than laszlo 3.3.4 ), better classes 
organizations, better tools and AS3 is far more powerfull than laszlo 
ecmascript.
  before, i was working jumping from one bug to another.  Today i barely 
find one.

  - Luís Eduardo.

 

Andrew escreveu:

 I've been living in the Laszlo world for a few years now, and coming
 around to Flex has been pretty jarring. While the languages are
 somewhat similar, I keep bumping into differences and am kind lost in
 kinda grokking Flex. Anyone know enough about both to post a comment
 like It's like Laszlo only with namespaces and a stricter scripting
 language or something like that?

  




Re: [flexcoders] Full Screen Projector File for Flex 2 Swf

2007-03-15 Thread Luis Eduardo


  Cool,  that worked for me.  ty!


We Made That design escreveu:

 I just finished building an .exe that launched full screen in flex 2. From
 within flex add fscommands into your initialize function.
 fscommand(fullscreen , true). Now compile your swf.
 Once you have your swf. you launch the swf on its own and there will
 be a menu at the top. Click file  Create Projector.

 This will create an exe file out of your swf which in turn will be able to
 use the fscommand

 I hope this is what you were looking for.

 Cheers
 Jeremy

 
 
  another ideia is to use internet explorer in kiosk mode (iexplore -k
  yourfilehere.swf)
  or perhaps write a very simple app in delphi that have an embedded
  browser and starts fullscreen. (or that start your exe file too)
  or yet make a shortcut link and change de properties to show
  maximized. (but menus still appear :(
 
  i think that if you cannot wait until apollo comes out, you could use
  the delphi idea...
 
  just my 2 cents
 
 
  Luís Eduardo.
 
 
  Luis Casillas escreveu:
 
  I developed an app in Flex 2 and need a way to turn the created swf
  into an exe that automatically goes into full screen without any user
  interaction. Please help.
 
  Luis Casillas
 
  __
  Do You Yahoo!?
  Tired of spam? Yahoo! Mail has the best spam protection around
  http://mail.yahoo.com http://mail.yahoo.com
 
 
 
 
 
  ___
  Yahoo! Mail - Sempre a melhor opção para você!
  Experimente já e veja as novidades.
  http://br.yahoo.com/mailbeta/tudonovo/ 
 http://br.yahoo.com/mailbeta/tudonovo/
 

 Jeremy Tooley
 Creative Director
 We Made That Design Group Inc.
 [EMAIL PROTECTED] mailto:jeremy%40wemadethat.com
 http://www.wemadethat.com http://www.wemadethat.com
 p: 403.668.0857
 c: 403.836.3048

  







___ 
Yahoo! Mail - Sempre a melhor opção para você! 
Experimente já e veja as novidades. 
http://br.yahoo.com/mailbeta/tudonovo/


[flexcoders] webtops ?

2007-03-03 Thread Luis Eduardo


  is there anything like this in flex word?

  http://g.ho.st/

  this one is pre-release (will be publicly launched in april, accord to 
the autors) and is made in OpenLaszlo.
  i found it pretty impressive.

  *in time*  can someone figure out how they could make the fullscreen 
effect AND normal user input?



   []'s


 Luís Eduardo





___ 
Yahoo! Mail - Sempre a melhor opção para você! 
Experimente já e veja as novidades. 
http://br.yahoo.com/mailbeta/tudonovo/
 



[flexcoders] flexcoders == jupiter

2007-01-12 Thread Luis Eduardo


  This list is becomming HUGE!
  it is hard to read all messages.
  just one idea...
  why u guys (admin) dont split it ?   Perhaps one mailist for Flex 
Builder (the IDE for flex related.)  one for Cairgorm one for Charting 
and the flexcoders to the core ?
  (perhaps one for FDS too, dont know)
  here i dont use Cairgorm neither FDS.  Probably when people dont have 
huge project, they dont use too. I guess.

  just an idea...   its because is hard to read 120 email a day just for 
flexcoders...  plus 20 for flexcomponents  (expecially when arpan 
srivastava send all messages with copy to both lists  :)   )

  best regards,

 Luís Eduardo.





___ 
Yahoo! Mail - Sempre a melhor opção para você! 
Experimente já e veja as novidades. 
http://br.yahoo.com/mailbeta/tudonovo/
 



[flexcoders] encodings problem

2006-11-08 Thread Luis Eduardo


  hi,

  my flex app talks to my servlets sending xml with á é õ characters 
using utf-8 and all is ok.
  but when i use the capital version of these characters it fails. Á É 
simple dont work.
  i searched trough the web but cant found a solution...

  can someone give (at least) an idea of how to solv this?

  thx a lot !

  Luís (already without hope) Eduardo


___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] minor bug at combobox

2006-11-07 Thread Luis Eduardo


  hi,

  if you execute this sample app, you will find strange gaps inside the 
dropdwon list of the combobox as you move the scrollbar.
  i really dont know why this but i think that is a bug.

?xml version=1.0?
mx:Applicationxmlns:mx=http://www.adobe.com/2006/mxml; 
width=100% height=100%
   
mx:XMLList id=lista
entry Id=0 Name=/
entry Id=1 Name=name01/
entry Id=2 Name=name02/
entry Id=3 Name=name03/
entry Id=4 Name=name04/
entry Id=5 Name=name05/
entry Id=6 Name=name06/
entry Id=7 Name=name07/
entry Id=8 Name=name08/
entry Id=9 Name=name09/
entry Id=10 Name=name10/
entry Id=11 Name=name11/
entry Id=12 Name=name12/
entry Id=13 Name=name13/
entry Id=14 Name=name14/
entry Id=15 Name=name15/
entry Id=16 Name=name16/
/mx:XMLList
   
mx:Panel width=100% height=100%
mx:VBox width=100% height=100% verticalAlign=middle 
horizontalAlign=center
mx:ComboBox dataProvider={lista} rowCount=5 
labelField=@Name/
/mx:VBox
/mx:Panel
/mx:Application



i said this is minor because the workaround is quite simple. Just trade 
the empty Name= at the first row for a space like Name=  and all 
goes rigth.
well...  i know this is simple but i feel on the duty to report  ;)

 []'s,

 Luís Eduardo




___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Re: DataGrid not displaying nested data

2006-10-31 Thread Luis Eduardo


Tracy,

after some search and tests i found:
- labelFunction indeed works. But it is a implicit workaround for one 
limitation of the actionscript 3 and not the Datagrid itself. (there is 
one line of code inside the datagrid class that take the data using: 
data = data[dataField] and if dataField isn't a leaf of a xml, this 
isn't rigth evaluated )
- if we use the labelFunction, than re-sort with clicking on the 
datagridcolumn doesn't work anymore. So we need to code sorting too.
- another way to solve this problem is to extend datagrid and code the 
proper workaround OR give the data already on a format datagrid likes 
(like greenfishinwaterr made )

i cant use the solution of greenfishinwater because there are already 
too code on the servlets (and i dont want the idea of having a strange 
response xml format without any nested data) so i extend my datagrid and 
coded the labelFunction inside the new class.

it all works... but if data[dataField] evaluates rigth as we expect, too 
much people using datagrids would not need to code labelFunction for 
basic nested data manipulatiuons (i understand this function is great 
and have to be there... but if i would need some column that are 
calculations of another or something like that.. not to fetch nested data).

did you know when they will release a Flex 2.0.1 with some fixes?
did you know if xml evaluator like data[dataField] (when dataField is 
something like [EMAIL PROTECTED]) will be improved 
someday?

[]'s,

Luís Eduardo.



Tracy Spratt escreveu:

 I don’t see where you mentioned or anyone suggested a labelFunction(). 
 Will that not work for you?

 If your dataProvider item is an e4x xml node, then it is easy to use 
 the selection expressions to get data from any nested level you want.

 Tracy

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *greenfishinwater
 *Sent:* Tuesday, October 31, 2006 11:16 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: DataGrid not displaying nested data

 No I did not find any solution.

 I am getting my data via rails, and I added logic to the rails
 controller to create extra fields all at the same level, so I don't
 have to get a nested value. Its a pain in the neck. But I have to try
 and resolve this in a better way soon.

 Andrew

  







___ 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar 
seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] a ghost function

2006-10-30 Thread Luis Eduardo


  Igor,

   I do import mx.validators.*;
   here is my code for test:

  ?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=horizontal
  mx:TextInput id=edt4Test/
  mx:Validator id=mainValidator/
  mx:Button id=btn4Test click=doValidation()/
 
  mx:Array id=myarray
mx:Validator id=val4TestString source={edt4Test} required=true/
mx:Validator id=val4TestEmail source={edt4Test} required=true/
  /mx:Array
 
 
  mx:Script
  ![CDATA[
import mx.validators.*;

public function doValidation():void {
  var valRet:Array = mainValidator.validateAll( myarray );
}
  ]]
  /mx:Script
/mx:Application


on the line of validateAll( myarray ), Flex Builder give me a error 
saing:  Call to a possibly undefined method validateAll through a 
reference with static type mx.validator:Validator.

i suspect that is something wrong with the adobe documentation tools 
the code of validateAll have a static keyword...

public static function validateAll(validators:Array):Array
{   
var result:Array = [];

var n:int = validators.length;
for (var i:int = 0; i  n; i++)
{
var v:Validator = Validator(validators[i]);
   
var resultEvent:ValidationResultEvent = v.validate();
   
if (resultEvent.type != ValidationResultEvent.VALID)
result.push(resultEvent);
}   
   
return result;
}


and after i read more on the actionscript docs i saw that static isnt 
visible outside the class definition...  so i guess something was wrong 
with the doc tools because i should not see this as a common outsider 
developer. (but the function above this, called loadResources(), that 
is static too, dont appear on docs)

  best regards,

 Luís Eduardo.






Igor Costa escreveu:

 Does you have idea on how you used?

 I mean, here I tested with a simple example and works.


 If I'm not wrong maybe that happens you forgot to import the class 
 necessery to do that.

 try this

 import mx.validators.*;



 Regards.

 On 10/30/06, *Luis Eduardo* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:



 while i was looking on documentations i found a strange thing.
 on validator class (
 http://livedocs.macromedia.com/flex/2/langref/mx/validators/Validator.html
 
 http://livedocs.macromedia.com/flex/2/langref/mx/validators/Validator.html

 ) it clearly show us a function called validateAll.
 when u go inside the Validator class, on the Validator.as
 http://Validator.as file, u
 really can find this function there.
 but
 when u try to use it from flex builder, it shows a error telling that
 function doesn't exists.

 why?

 Luís Eduardo.


 ___
 Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu
 celular. Registre seu aparelho agora!
 http://br.mobile.yahoo.com/mailalertas/
 http://br.mobile.yahoo.com/mailalertas/





 -- 
 
 Igor Costa
 www.igorcosta.com http://www.igorcosta.com
  




___ 
O Yahoo! est� de cara nova. Venha conferir! 
http://br.yahoo.com


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] a ghost function

2006-10-29 Thread Luis Eduardo


  while i was looking on documentations i found a strange thing.
  on validator class ( 
http://livedocs.macromedia.com/flex/2/langref/mx/validators/Validator.html 
) it clearly show us a function called  validateAll.
  when u go inside the Validator class, on the Validator.as file, u 
really can find this function there.
  but
  when u try to use it from flex builder, it shows a error telling that 
function doesn't exists.

  why?

   Luís Eduardo.


___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] += operator is changing the encodings

2006-10-28 Thread Luis Eduardo


  wow gordon!
  i am completly newbie on flex but understood perfectly your explanations!

  this should be putted on the help of += operator  :)

  thank you very much dude!


  []'s

   Luís Eduardo



Gordon Smith escreveu:

 You're running into a difference between an XMLList (a built-in E4X 
 type, along with the XML type) and XMLListCollection (a Flex framework 
 type).

  

 If the right-hand-side (RHS) of the E4X += operator is an XML instance 
 or an XMLList instance, it inserts children as you are expecting.

  

 For example, suppose var x:XML = ab//a.

  

 Then x.b += c/ sets x to ab/c//a. (This is the case where 
 RHS is an XML instance.)

  

 And x.b += c/c// sets x to ab/c/c//a. (This is the 
 case where RHS is an XMLList instance.)

  

 (Note that you can't write an XMLList literal as c/c/; it doesn't 
 compile. You  wrap the nodes of the list between  and /.)

  

 However, if the RHS is any other type, then it calls toString() on the 
 RHS and inserts it as text, not as child nodes.

  

 For eample, x.b += foo sets x to abfoo/b/a.

  

 You can't have  and  in XML text, so they get converted to the XML 
 escape entities lt; and gt;

  

 For example, x.b += c/ sets x to ablt;c/gt; /b/a.

  

 Since E4X doesn't know about XMLListCollection, it treats it like any 
 other type and converts your XMLLC to a string and then escapes it. I 
 don't know of any way to directly convert an XMLListCollection to an 
 XMLList without looping over the items, which is similar to what 
 you're doing extract one XML from the XMLListCollection at a time.

  

 - Gordon

  

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Luis Eduardo
 *Sent:* Wednesday, October 25, 2006 12:33 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] += operator is changing the encodings

  



 Igor,

 thx for your answer, but i think something isnt clear...

 my problem is on the += operator in this line of code:

 xgravar.root.request += XMLLC;

 the XMLLC object is declared as:

 mx:XMLListCollection id=XMLLC
 collectionChange=collectionEventHandler(event)/

 and have, at the time this line of code fire, the follow XML

 TipoVeiculo Id=1 Nome=Moto Descricao=desc
 TipoVeiculo Id=2 Nome=Carro Descricao=desc
 TipoVeiculo Id=3 Nome=Caminhao Descricao=desc
 TipoVeiculo Id=4 Nome=Aviao Descricao=desc

 just that. (without a root node).

 the root node is at xgravar.request.

 but, when i do:

 xgravar.root.request += XMLLC;

 and after Alert.show(xgravar.toXMLString()) the code is changed to:

 ds
 root
 request
 ltTipoVeiculo Id=1 Nome=Moto Descricao=descgt
 ltTipoVeiculo Id=2 Nome=Carro Descricao=descgt
 ltTipoVeiculo Id=3 Nome=Caminhao Descricao=descgt
 ltTipoVeiculo Id=4 Nome=Aviao Descricao=descgt
 /request
 /root
 /ds

 i have made a workaround for this with the follow code:

 for each( var item : XML in XMLLC ) {
 XML(xgravar.root.request).appendChild(item);
 }

 but i think that the += operator SHOULD do the same thing WITHOUT
 changing the  and  simbols.

 dont you agree?

 best regards to you!

 Luís Eduardo.

 Igor Costa escreveu:

 Hi Luiz


 Isn't the operator that's wrong, you just missed out how to pass
 String and concatening in both side of wall.

 Check out this heck of how could be done.

 public function myList():void
 {
 var myXML = new
 XMLList(dsRQrootrequest//root/dsRQ);
 szCommand = insert;
 if( [EMAIL PROTECTED] = szCommand == true)
 {
 Alert.show(xgravar.toString());
 }
 else {
 Alert.show(xgravar);
 }
 }


 The problem is, you are trying to convert an object twice in time in
 the same function, that's why the problem happens. if you put anything
 in braces  than you convert to string, the compiler intend to
 undrestand that, ok the users now want to convert that cacharecter.


 Regards.

 szCommand = insert;
 [EMAIL PROTECTED] = szCommand;

 Alert.show(XMLLC.toXMLString()); // OK here. all  and 
 works fine

 xgravar.root.request += XMLLC;

 Alert.show(xgravar.toXMLString()); // ERROR here.  and 
 converted to lt and gt
 }







 On 10/24/06, *Luis Eduardo* [EMAIL PROTECTED] 
 mailto:illogic_code%40yahoo.com.br
 mailto:[EMAIL PROTECTED] 
 mailto:illogic_code%40yahoo.com.br wrote:


 hi,

 In my app, when i use the += operator, the data inside xmls turns
 with
 diferent encoding.
 The  and  caracters become wierds like lt and gt respectively.

 How can i fix this?

 this is the code:

 public function doGravar():void {
 var xgravar:XMLList = new
 XMLList(dsRQrootrequest//root/dsRQ);

 szCommand = insert;
 [EMAIL PROTECTED] = szCommand;

 Alert.show(XMLLC.toXMLString()); // OK here. all  and 
 works fine

 xgravar.root.request += XMLLC;

 Alert.show(xgravar.toXMLString()); // ERROR here.  and 
 converted to lt and gt
 }

 where XMLLC : XMLListCollection and szCommand : String.
 The first Alert will show correct data but the second will show
 caracters converted.

 regards

Re: [flexcoders] Re: datagrid and dataField

2006-10-28 Thread Luis Eduardo


  Michael,

  i subclassed the datagrid and the datagridcolumn because i saw too 
much issues being resolved on this way. (unfortunately).
  i dont know much flex neither actionscript, but i read a lot on 
documentation and tried a lot of tests. Spent 4 hours on this trying to 
do the right thing instead of traversing by hand the datapath of the 
xml...
  but damn !!!  actionscript is too much temperamental! clearly a 
limitation (not a bug) that only root nodes can be evaluated with []s.
  is there any place which we can ask for this feature to adobe?  would 
be great!

  but...  in mean time...  thank you very much for your help bro!

  my code, inside the extendes class become (with proper credit ;)



override public function itemToLabel(data:Object):String {
if (!data)
return  ;
   
if (labelFunction != null)
return labelFunction(data, this);
   
if (owner.labelFunction != null)
return owner.labelFunction(data, this);
   
if (typeof(data) == xml) {
data = deriveComplexColumn( data,  dataField ).toString();
}
   
if (typeof(data) == object) {
try{
data = data[dataField];
}
catch(e:Error) {
data = null;
}
}
   
if (data is String)
return String(data);
   
try {
return data.toString();
}
catch(e:Error) {
}
   
return  ;
}
   
// function from Michael Labriola from Flexcoders mail list
protected function deriveComplexColumn( data:Object, 
complexFieldName:String ):Object {
var dataPtr:Object = data;
var complexName:Array = complexFieldName.split( '.', 10 );
   
for each ( var key:String in complexName )dataPtr = 
dataPtr[ key ];
return dataPtr;
}
---

the bad thing is that now sorting on the datagridcolumn doesn't work 
anymore...  and need to be made by hand again...
argh!
will just wait for the client ask for this.  ;)

  best regards!

Luís Eduardo.



Michael Labriola escreveu:


 You are correct. By default the dataField on DataGridColumn only goes
 to the root level of the structure you are passing.

 If you are feeling a little ambitious, you can subclass dataGridColumn
 and do something like this:

 protected function deriveComplexColumn( data:Object,
 complexFieldName:String ):Object
 {
 var dataPtr:Object;

 dataPtr = data;

 var complexName:Array;
 complexName = complexFieldName.split( '.', 10 );

 for each ( var key:String in complexName )
 {
 dataPtr = dataPtr[ key ];
 }

 return dataPtr;
 }

 Then in your itemToLabel method, you can replace this:

  try
  {
  data = data[dataField];
  }

 with this:
 try
 {
 data = deriveComplexColumn( data, dataField );
 }

 ...If you don't want to make your own subclass of dataField, then you
 could do the same thing with an itemRenderer or a labelFunction.

 So:

 public function myLabelFunc( row:Object, column:DataGridColumn ):String {
 return deriveComplexColumn( row, column.dataField ) as String;
 }

 Have fun,
 Mike

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, Luis Eduardo [EMAIL PROTECTED] 
 wrote:
 
 
  yeah... i guess too that if the xml had another format it should
 work...
  but it can't have another format... :(.
  the servlets are coded already and they return a xml that have the
  format i presented on this sample.
  not the same data, but this is the format.
 
  i search inside the DataGridColumn.as code and find a function named
  itemToLabel that have this portion of code:
 
  if (typeof(data) == object || typeof(data) == xml)
  {
  try
  {
  data = data[dataField];
  }
  catch(e:Error)
  {
  data = null;
  }
  }
 
  so, i guess that this way of getting data from a XML (using brackets)
  only can fetch one level of info on the xml format. Not inside his
  childrens.
  in the end, this line of code will probably be evaluated to this:
 data
  = [EMAIL PROTECTED]
  To me, this is a bug or, being optmistic, a limitation.
 
  can someone confirm that? Tracy? Gordon? anyone?
 
 
 
 
  thunderstumpgesatwork escreveu:
 
   Hi,
  
   my guess is that your dataField cannot support the complex
   [EMAIL PROTECTED]... it should be just a single field name.
  
   To me the XML makes more sense (and is simpler) like this:
  
mx:XMLList id=employees
employee Id=1 gender=female
nameChristina Coenraets/name
/employee
employee Id=2 gender=male
nameMaurice Smith/name
/employee
/mx:XMLList
  
   this makes your dataField just

Re: [flexcoders] Re: datagrid and dataField

2006-10-28 Thread Luis Eduardo


  Would be awesome!
  waiting your replay then.

  see ya!

   Luis




Michael Labriola escreveu:


 Luis,

 I agree it would be a good feature. Just as an FYI, I submitted it
 previously as a feature request to Adobe.

 On a side note, next week I will be back at the office, and I will
 post the solution to the sorting problem you had as well.

 Mike

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, Luis Eduardo [EMAIL PROTECTED] 
 wrote:
 
 
 
  Michael,
 
  i subclassed the datagrid and the datagridcolumn because i saw too
  much issues being resolved on this way. (unfortunately).
  i dont know much flex neither actionscript, but i read a lot on
  documentation and tried a lot of tests. Spent 4 hours on this trying to
  do the right thing instead of traversing by hand the datapath of
 the
  xml...
  but damn !!! actionscript is too much temperamental! clearly a
  limitation (not a bug) that only root nodes can be evaluated with []s.
  is there any place which we can ask for this feature to adobe? would
  be great!
 
  but... in mean time... thank you very much for your help bro!
 
  my code, inside the extendes class become (with proper credit ;)
 
 --
 
 
  override public function itemToLabel(data:Object):String {
  if (!data)
  return  ;
 
  if (labelFunction != null)
  return labelFunction(data, this);
 
  if (owner.labelFunction != null)
  return owner.labelFunction(data, this);
 
  if (typeof(data) == xml) {
  data = deriveComplexColumn( data, dataField
 ).toString();
  }
 
  if (typeof(data) == object) {
  try {
  data = data[dataField];
  }
  catch(e:Error) {
  data = null;
  }
  }
 
  if (data is String)
  return String(data);
 
  try {
  return data.toString();
  }
  catch(e:Error) {
  }
 
  return  ;
  }
 
  // function from Michael Labriola from Flexcoders mail list
  protected function deriveComplexColumn( data:Object,
  complexFieldName:String ):Object {
  var dataPtr:Object = data;
  var complexName:Array = complexFieldName.split( '.', 10 );
 
  for each ( var key:String in complexName ) dataPtr =
  dataPtr[ key ];
  return dataPtr;
  }
 
 --
 
  the bad thing is that now sorting on the datagridcolumn doesn't work
  anymore... and need to be made by hand again...
  argh!
  will just wait for the client ask for this. ;)
 
  best regards!
 
  Luís Eduardo.
 
 
 
  Michael Labriola escreveu:
 
  
   You are correct. By default the dataField on DataGridColumn only goes
   to the root level of the structure you are passing.
  
   If you are feeling a little ambitious, you can subclass dataGridColumn
   and do something like this:
  
   protected function deriveComplexColumn( data:Object,
   complexFieldName:String ):Object
   {
   var dataPtr:Object;
  
   dataPtr = data;
  
   var complexName:Array;
   complexName = complexFieldName.split( '.', 10 );
  
   for each ( var key:String in complexName )
   {
   dataPtr = dataPtr[ key ];
   }
  
   return dataPtr;
   }
  
   Then in your itemToLabel method, you can replace this:
  
try
{
data = data[dataField];
}
  
   with this:
   try
   {
   data = deriveComplexColumn( data, dataField );
   }
  
   ...If you don't want to make your own subclass of dataField, then you
   could do the same thing with an itemRenderer or a labelFunction.
  
   So:
  
   public function myLabelFunc( row:Object, column:DataGridColumn
 ):String {
   return deriveComplexColumn( row, column.dataField ) as String;
   }
  
   Have fun,
   Mike
  
   --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
   mailto:flexcoders%40yahoogroups.com, Luis Eduardo illogic_code@
   wrote:
   
   
yeah... i guess too that if the xml had another format it should
   work...
but it can't have another format... :(.
the servlets are coded already and they return a xml that have the
format i presented on this sample.
not the same data, but this is the format.
   
i search inside the DataGridColumn.as code and find a function named
itemToLabel that have this portion of code:
   
if (typeof(data) == object || typeof(data) == xml)
{
try
{
data = data[dataField];
}
catch(e:Error)
{
data = null;
}
}
   
so, i guess that this way of getting data from a XML (using
 brackets)
only can fetch one level of info on the xml format. Not inside his
childrens.
in the end, this line of code will probably be evaluated to this:
   data
= [EMAIL PROTECTED]
To me, this is a bug or, being optmistic, a limitation.
   
can someone confirm that? Tracy? Gordon? anyone?
   
   
   
   
thunderstumpgesatwork escreveu:
   
 Hi,

 my guess is that your dataField cannot support the complex
 [EMAIL PROTECTED]... it should be just a single field name.

 To me the XML makes more sense (and is simpler) like

Re: [flexcoders] Localizing using different languages

2006-10-27 Thread Luis Eduardo

i dont know how to do this, but when i was searching for another issue 
on the internal of datagridcolumn class i found a comment that perhaps 
ca give you some ideas...
here it is:   (DataGridColumn.as)

//--
//  imeMode
//--

/**
 *  @private
 *  Storage for the imeMode property.
 */
private var _imeMode:String;

[Inspectable(category=Other)]

/**
 *  Specifies the IME (input method editor) mode.
 *  The IME enables users to enter text in Chinese, Japanese, and 
Korean. 
 *  Flex sets the IME mode when the codeitemFocusIn/code event 
occurs,
 *  and sets it back
 *  to the previous value when the codeitemFocusOut/code event 
occurs.
 *  The flash.system.IMEConversionMode class defines constants for
 *  the valid values for this property. 
 *
 *  pThe default value is null, in which case it uses the value of 
the
 *  DataGrid control's codeimeMode/code property./p
 *
 *  @see flash.system.IMEConversionMode
 */
public function get imeMode():String
{
return _imeMode;
}



-
hope this help,

  Luís




Prakaz escreveu:

 Hi Guys,

 I have a textfield and a list beside that which lists out 3 languages:
 japanese, chinese, korean.

 What i'm trying to do is pretty simple:
 When i select japanese and type in the text field, the font should
 appear in japanese
 when i select chinese and start typing the text font should be chinese
 and so on...

 how do i go about doing this ?

 Thnx in advance

  




___ 
O Yahoo! está de cara nova. Venha conferir! 
http://br.yahoo.com


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] datagrid and dataField

2006-10-27 Thread Luis Eduardo


  i could solve part of my problem with a workaround, but not all is 
working ok. (i could display the data but the sorting capability is gone).
  someone have an ideia of how to make this on the rigth path?
  i am using the labelFunction property of the datagrid like this:

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script
![CDATA[
public function getRowLabel(item:Object, 
column:DataGridColumn):String {
return [EMAIL PROTECTED];
}
]]
/mx:Script

mx:XMLList id=employees
employee Id=1
name gender=femaleChristina Coenraets/name
/employee
employee Id=2
name gender=maleMaurice Smith/name
/employee
/mx:XMLList

mx:Panel title=DataGrid Control Example height=100% width=100%
paddingTop=10 paddingLeft=10 paddingRight=10

mx:DataGrid id=dg width=100% height=100% rowCount=5 
dataProvider={employees}
mx:columns
mx:DataGridColumn dataField=@Id headerText=ID/
mx:DataGridColumn dataField=[EMAIL PROTECTED] 
headerText=Gender labelFunction=getRowLabel/
mx:DataGridColumn dataField=name headerText=Name/
/mx:columns
/mx:DataGrid

mx:Form width=100% height=100%
mx:FormItem label=Id
mx:Label text=[EMAIL PROTECTED]/
/mx:FormItem
mx:FormItem label=Name
mx:Label text={dg.selectedItem.name}/
/mx:FormItem
mx:FormItem label=Gender
mx:Label text=[EMAIL PROTECTED]/
/mx:FormItem
/mx:Form
   
/mx:Panel
/mx:Application



---




Luis Eduardo escreveu:


 hi,

 i dont know why but my datagrid cant bind well when the format of one
 XML have childrens.
 i borrow the example on the documentation and make a test to you guys
 see what i am talking about.
 to see the issue, just select one row and watch the Labels get the
 gender property on the right way but, using the same notation, the
 grid can't show the values.

 thx for the help,

 Luís Eduardo.

 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml
 mx:XMLList id=employees
 employee Id=1
 name gender=femaleChristina Coenraets/name
 /employee
 employee Id=2
 name gender=maleMaurice Smith/name
 /employee
 /mx:XMLList

 mx:Panel title=DataGrid Control Example height=100% width=100%
 paddingTop=10 paddingLeft=10 paddingRight=10

 mx:DataGrid id=dg width=100% height=100% rowCount=5
 dataProvider={employees}
 mx:columns
 mx:DataGridColumn dataField=@Id headerText=ID/
 mx:DataGridColumn dataField=[EMAIL PROTECTED]
 headerText=Gender/
 mx:DataGridColumn dataField=name headerText=Name/
 /mx:columns
 /mx:DataGrid

 mx:Form width=100% height=100%
 mx:FormItem label=Id
 mx:Label text=[EMAIL PROTECTED]/
 /mx:FormItem
 mx:FormItem label=Name
 mx:Label text={dg.selectedItem.name}/
 /mx:FormItem
 mx:FormItem label=Gender
 mx:Label text=[EMAIL PROTECTED]/
 /mx:FormItem
 /mx:Form

 /mx:Panel
 /mx:Application


 ___
 O Yahoo! está de cara nova. Venha conferir!
 http://br.yahoo.com http://br.yahoo.com

  




___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Re: datagrid and dataField

2006-10-27 Thread Luis Eduardo

  yeah...  i guess too that if the xml had another format it should work...
  but it can't have another format...  :(.
  the servlets are coded already and they return a xml that have the 
format i presented on this sample.
  not the same data, but this is the format.

  i search inside the DataGridColumn.as code and find a function named 
itemToLabel that have this portion of code:

if (typeof(data) == object || typeof(data) == xml)
{
try
{
data = data[dataField];
}
catch(e:Error)
{
data = null;
}
}

so, i guess that this way of getting data from a XML (using brackets) 
only can fetch one level of info on the xml format. Not inside his 
childrens.
in the end, this line of code will probably be evaluated to this:   data 
= [EMAIL PROTECTED]
To me, this is a bug or, being optmistic, a limitation.

can someone confirm that?Tracy? Gordon? anyone?




thunderstumpgesatwork escreveu:

 Hi,

 my guess is that your dataField cannot support the complex
 [EMAIL PROTECTED]... it should be just a single field name.

 To me the XML makes more sense (and is simpler) like this:

  mx:XMLList id=employees
  employee Id=1 gender=female
  nameChristina Coenraets/name
  /employee
  employee Id=2 gender=male
  nameMaurice Smith/name
  /employee
  /mx:XMLList

 this makes your dataField just @gender which I think should work.

 good luck.

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, Luis Eduardo [EMAIL PROTECTED] 
 wrote:
 
 
 
  i could solve part of my problem with a workaround, but not all is
  working ok. (i could display the data but the sorting capability is
 gone).
  someone have an ideia of how to make this on the rigth path?
  i am using the labelFunction property of the datagrid like this:
 
  ?xml version=1.0?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml
  mx:Script
  ![CDATA[
  public function getRowLabel(item:Object,
  column:DataGridColumn):String {
  return [EMAIL PROTECTED];
  }
  ]]
  /mx:Script
 
  mx:XMLList id=employees
  employee Id=1
  name gender=femaleChristina Coenraets/name
  /employee
  employee Id=2
  name gender=maleMaurice Smith/name
  /employee
  /mx:XMLList
 
  mx:Panel title=DataGrid Control Example height=100%
 width=100%
  paddingTop=10 paddingLeft=10 paddingRight=10
 
  mx:DataGrid id=dg width=100% height=100% rowCount=5
  dataProvider={employees}
  mx:columns
  mx:DataGridColumn dataField=@Id headerText=ID/
  mx:DataGridColumn dataField=[EMAIL PROTECTED]
  headerText=Gender labelFunction=getRowLabel/
  mx:DataGridColumn dataField=name headerText=Name/
  /mx:columns
  /mx:DataGrid
 
  mx:Form width=100% height=100%
  mx:FormItem label=Id
  mx:Label text=[EMAIL PROTECTED]/
  /mx:FormItem
  mx:FormItem label=Name
  mx:Label text={dg.selectedItem.name}/
  /mx:FormItem
  mx:FormItem label=Gender
  mx:Label text=[EMAIL PROTECTED]/
  /mx:FormItem
  /mx:Form
 
  /mx:Panel
  /mx:Application
 
 
 
 
 --
 
 
 
 
  Luis Eduardo escreveu:
 
  
   hi,
  
   i dont know why but my datagrid cant bind well when the format of one
   XML have childrens.
   i borrow the example on the documentation and make a test to you guys
   see what i am talking about.
   to see the issue, just select one row and watch the Labels get the
   gender property on the right way but, using the same notation, the
   grid can't show the values.
  
   thx for the help,
  
   Luís Eduardo.
  
   ?xml version=1.0?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml
   http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
   mx:XMLList id=employees
   employee Id=1
   name gender=femaleChristina Coenraets/name
   /employee
   employee Id=2
   name gender=maleMaurice Smith/name
   /employee
   /mx:XMLList
  
   mx:Panel title=DataGrid Control Example height=100% width=100%
   paddingTop=10 paddingLeft=10 paddingRight=10
  
   mx:DataGrid id=dg width=100% height=100% rowCount=5
   dataProvider={employees}
   mx:columns
   mx:DataGridColumn dataField=@Id headerText=ID/
   mx:DataGridColumn dataField=[EMAIL PROTECTED]
   headerText=Gender/
   mx:DataGridColumn dataField=name headerText=Name/
   /mx:columns
   /mx:DataGrid
  
   mx:Form width=100% height=100%
   mx:FormItem label=Id
   mx:Label text=[EMAIL PROTECTED]/
   /mx:FormItem
   mx:FormItem label=Name
   mx:Label text={dg.selectedItem.name}/
   /mx:FormItem
   mx:FormItem label=Gender
   mx:Label text=[EMAIL PROTECTED]/
   /mx:FormItem
   /mx:Form
  
   /mx:Panel
   /mx:Application
  
  
   ___
   O Yahoo! está de cara nova. Venha conferir!
   http://br.yahoo.com http://br.yahoo.com http://br.yahoo.com 
 http://br.yahoo.com
  
  
 
 
 
 
  ___
  Novidade no Yahoo! Mail

[flexcoders] how to initialize all accordion tabs?

2006-10-26 Thread Luis Eduardo

  i am needing to set up some components of a closed tab on an
accordion, but it appears that only the openned tab is well initialized.
  the components on the closed tabs remain all with NULL values until i
open the tab.

  how can i tell to accordion to initialize all tabs any time before
user can interact with it ?

  []'s

 Luís Eduardo.





___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] how to initialize all accordion tabs?

2006-10-26 Thread Luis Eduardo

  Dave,

   works as a charm !!!

   thank you very much!

  Luís

Dave Carabetta escreveu:

 On 10/25/06, Luis Eduardo [EMAIL PROTECTED] 
 mailto:illogic_code%40yahoo.com.br wrote:
 
  i am needing to set up some components of a closed tab on an
  accordion, but it appears that only the openned tab is well initialized.
  the components on the closed tabs remain all with NULL values until i
  open the tab.
 
  how can i tell to accordion to initialize all tabs any time before
  user can interact with it ?
 

 Look up creationPolicy=all.

 Regards,
 Dave.

  




___ 
O Yahoo! est� de cara nova. Venha conferir! 
http://br.yahoo.com


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] datagrid and dataField

2006-10-26 Thread Luis Eduardo

  hi,

  i dont know why but my datagrid cant bind well when the format of one 
XML have childrens.
  i borrow the example on the documentation and make a test to you guys 
see what i am talking about.
  to see the issue, just select one row and watch the Labels get the 
gender property on the right way but, using the same notation, the 
grid can't show the values.


thx for the help,

   Luís Eduardo.



?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:XMLList id=employees
employee Id=1
name gender=femaleChristina Coenraets/name
/employee
employee Id=2
name gender=maleMaurice Smith/name
/employee
/mx:XMLList

mx:Panel title=DataGrid Control Example height=100% width=100%
paddingTop=10 paddingLeft=10 paddingRight=10

mx:DataGrid id=dg width=100% height=100% rowCount=5 
dataProvider={employees}
mx:columns
mx:DataGridColumn dataField=@Id headerText=ID/
mx:DataGridColumn dataField=[EMAIL PROTECTED] 
headerText=Gender/
mx:DataGridColumn dataField=name headerText=Name/
/mx:columns
/mx:DataGrid

mx:Form width=100% height=100%
mx:FormItem label=Id
mx:Label text=[EMAIL PROTECTED]/
/mx:FormItem
mx:FormItem label=Name
mx:Label text={dg.selectedItem.name}/
/mx:FormItem
mx:FormItem label=Gender
mx:Label text=[EMAIL PROTECTED]/
/mx:FormItem
/mx:Form
   
/mx:Panel
/mx:Application





___ 
O Yahoo! está de cara nova. Venha conferir! 
http://br.yahoo.com


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] += operator is changing the encodings

2006-10-25 Thread Luis Eduardo

  hi,

  In my app, when i use the += operator, the data inside xmls turns with 
diferent encoding.
  The  and  caracters become wierds like lt and gt respectively.

  How can i fix this?

this is the code:


public function doGravar():void {
var xgravar:XMLList = new 
XMLList(dsRQrootrequest//root/dsRQ);

szCommand = insert;
[EMAIL PROTECTED] = szCommand;
   
Alert.show(XMLLC.toXMLString());  // OK here. all  and  
works fine
   
xgravar.root.request += XMLLC;
   
Alert.show(xgravar.toXMLString()); // ERROR here.  and  
converted to lt and gt
}

where XMLLC : XMLListCollection  and szCommand : String.
The first Alert will show correct data but the second will show 
caracters converted.


regards,

 Luís Eduardo.




___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] bug in the XMLListCollection ?

2006-10-25 Thread Luis Eduardo


  hello people,

  i am adding one XML item at one XMLListCollection but the 
collectionChange event dont fire.

  i am using the follow code:

  var xn:XML = new XML();
  xn = TipoVeiculo Id= Nome={edtNome.text} 
Descricao={edtDescricao.text}/;
  XMLLC.addItem(xn);

  the XMLListCollection was defined in this way:

  mx:XMLListCollection id=XMLLC 
collectionChange=Alert.show('collectionChange')/

  any ideas?  is this a bug?  or only the arraycollection can actually 
fire this event?


  []'s,

   Luís Eduardo.





___ 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar 
seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Re: bug in the XMLListCollection ?

2006-10-25 Thread Luis Eduardo


  thx for your answer Bela!

  i found the error and you are rigth about this isnt be a bug.

  in the init() function of my mxml i put a code like this:

  XMLLC = new XMLListCollection( new XMLList( one xml here ) )

  but i couldn't realize that this would override the XMLListCollection 
declared with tags.
  i drop this line and did my xml init with another approach and 
everything works fine.

  not easy at all to learn all this  ;)

  thank you again for the answer!!


   adios  :)

  Luís Eduardo.


Bela Hajzer escreveu:

 see bellow pls

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, Igor Costa [EMAIL PROTECTED] wrote:
 
  Does this compile?
 
 
 
  On 10/24/06, Luis Eduardo [EMAIL PROTECTED] wrote:
  
  
  
   hello people,
  
   i am adding one XML item at one XMLListCollection but the
   collectionChange event dont fire.
  
   i am using the follow code:
  
   var xn:XML = new XML();
   xn = TipoVeiculo Id= Nome={edtNome.text}
   Descricao={edtDescricao.text}/;
   XMLLC.addItem(xn);
  
   the XMLListCollection was defined in this way:
  
   mx:XMLListCollection id=XMLLC
   collectionChange=Alert.show('collectionChange')/
  
   any ideas? is this a bug? or only the arraycollection can actually
   fire this event?
  
   []'s,
  
   Luís Eduardo.
  
  
  
  
  
   ___
   Você quer respostas para suas perguntas? Ou você sabe muito e
 quer
   compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
   http://br.answers.yahoo.com/ http://br.answers.yahoo.com/
  
  
 
 
 
  --
  
  Igor Costa
  www.igorcosta.com
 --
 Hi, well this isn't a bug at all, maybe some more tutorials could
 help folks like you and me.In the meantime read through the ref.
 doc...

 So here is a little working snippet:

 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml

 mx:Script
 ![CDATA[

 import mx.collections.XMLListCollection;
 import mx.controls.Alert;
 ]]
 /mx:Script

 mx:XMLList id=xnList
 TipoVeiculo Id=1 Nome={edtNome.text}
 Descricao={edtDescricao.text}/
 /mx:XMLList

 mx:XMLListCollection id=XMLLC source={xnList} /

 mx:Panel title=XMLListCollection Example height=75% width=75%
 paddingTop=10 paddingLeft=10

 mx:TextInput id=edtNome text=Seat Toledo /
 mx:TextInput id=edtDescricao text=It rocks/

 mx:Button label=send click=Alert.show(XMLLC.toXMLString())/

 /mx:Panel

 /mx:Application

 Bela

  




___ 
O Yahoo! está de cara nova. Venha conferir! 
http://br.yahoo.com


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] += operator is changing the encodings

2006-10-25 Thread Luis Eduardo


  Igor,

  thx for your answer, but i think something isnt clear...

  my problem is on the += operator in this line of code:

   xgravar.root.request += XMLLC;


  the XMLLC object is declared as:

mx:XMLListCollection id=XMLLC 
collectionChange=collectionEventHandler(event)/

and have, at the time this line of code fire, the follow XML

TipoVeiculo Id=1 Nome=Moto Descricao=desc
TipoVeiculo Id=2 Nome=Carro Descricao=desc
TipoVeiculo Id=3 Nome=Caminhao Descricao=desc
TipoVeiculo Id=4 Nome=Aviao Descricao=desc

just that. (without a root node).

the root node is at xgravar.request.

but, when i do:

xgravar.root.request += XMLLC;

and after Alert.show(xgravar.toXMLString()) the code is changed to:

ds
  root
request
  ltTipoVeiculo Id=1 Nome=Moto Descricao=descgt
  ltTipoVeiculo Id=2 Nome=Carro Descricao=descgt
  ltTipoVeiculo Id=3 Nome=Caminhao Descricao=descgt
  ltTipoVeiculo Id=4 Nome=Aviao Descricao=descgt
/request
  /root
/ds

i have made a workaround for this with the follow code:

for each( var item : XML in XMLLC ) {
XML(xgravar.root.request).appendChild(item);
}

but i think that the += operator SHOULD do the same thing WITHOUT 
changing the  and  simbols.

dont you agree?

best regards to you!

 Luís Eduardo.



Igor Costa escreveu:

 Hi Luiz


 Isn't the operator that's wrong, you just missed out how to pass 
 String and concatening in both side of wall.

 Check out this heck of how could be done.

 public function myList():void
 {
var myXML = new 
 XMLList(dsRQrootrequest//root/dsRQ);
szCommand = insert;
if( [EMAIL PROTECTED] = szCommand == true)
   {
   Alert.show(xgravar.toString());
}
  else {
  Alert.show(xgravar);
   }
 }


 The problem is, you are trying to convert an object twice in time in 
 the same function, that's why the problem happens. if you put anything 
 in braces  than you convert to string, the compiler intend to 
 undrestand that, ok the users now want to convert that cacharecter.


 Regards.

 szCommand = insert;
 [EMAIL PROTECTED] = szCommand;

 Alert.show(XMLLC.toXMLString()); // OK here. all  and 
 works fine

 xgravar.root.request += XMLLC;

 Alert.show(xgravar.toXMLString()); // ERROR here.  and 
 converted to lt and gt
 }







 On 10/24/06, *Luis Eduardo* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:


 hi,

 In my app, when i use the += operator, the data inside xmls turns
 with
 diferent encoding.
 The  and  caracters become wierds like lt and gt respectively.

 How can i fix this?

 this is the code:

 public function doGravar():void {
 var xgravar:XMLList = new
 XMLList(dsRQrootrequest//root/dsRQ);

 szCommand = insert;
 [EMAIL PROTECTED] = szCommand;

 Alert.show(XMLLC.toXMLString()); // OK here. all  and 
 works fine

 xgravar.root.request += XMLLC;

 Alert.show(xgravar.toXMLString()); // ERROR here.  and 
 converted to lt and gt
 }

 where XMLLC : XMLListCollection and szCommand : String.
 The first Alert will show correct data but the second will show
 caracters converted.

 regards,

 Luís Eduardo.


 ___
 Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu
 celular. Registre seu aparelho agora!
 http://br.mobile.yahoo.com/mailalertas/
 http://br.mobile.yahoo.com/mailalertas/





 -- 
 
 Igor Costa
 www.igorcosta.com http://www.igorcosta.com
  




___ 
O Yahoo! est� de cara nova. Venha conferir! 
http://br.yahoo.com


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Binding the backgroundColor of a DataGridColumn

2006-10-25 Thread Luis Eduardo


i wonder why this

why i need to extend my datagrid to make this functionality to  work.
so many people asks for this...  it appear to be so obvious that people 
would need it.

will adobe make this issue on the next patch for flex 2.0 ?
(is there some place that we can asks for this?)




Clint Tredway escreveu:

 You will need to extend the datagrid to do this.. The good thing is, 
 someone has already done this, Mike Nimer.

 http://www.mikenimer.com/index.cfm/2006/10/3/BackgroundRowColor-DataGrid-component
  
 http://www.mikenimer.com/index.cfm/2006/10/3/BackgroundRowColor-DataGrid-component

 I have used this and it works great.

 On 10/25/06, *Alexander Lamb* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hello list,


 Here is a wonderfull small datagrid:

 mx:DataGrid id=dg dataProvider= {patients } x=283  y=104 
 editable=false 
 mx:columns
 mx:DataGridColumn headerText=Last name  dataField=lastName /

 mx:DataGridColumn headerText= First name dataField= firstName/
 mx:DataGridColumn headerText= backgroundColor=pColor /

 /mx:columns
 /mx:DataGrid

 Unfortunately, it doesn't like my backgroundColor connexion. My
 dataProvider is an ArrayCollection of Patient objects. The Patient
 class has 3 attributes: firstName, lastName, pColor.
 pColor is a uint.

 Why can't I do this? I would have sought it simple called the
 function on the currentItem when rendering the DataGrid!

 Thanks for any hint,

 Alex
 --
 Alexander Lamb
 Service d'Informatique Médicale
 Hôpitaux Universitaires de Genève
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 +41 22 372 88 62
 +41 79 420 79 73








 -- 
 diabetic? http://www.diabetesforums.com http://www.diabetesforums.com
 Albert Einstein - It's not that I'm so smart, it's just that I stay 
 with problems longer.
  







___ 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar 
seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Re: FlexBuilder refusing to Build newer versions of .mxml files !!!

2006-10-25 Thread Luis Eduardo

  FlexBuilder will not compile if there are, even a minimal error issue.
  to me ensure all compile is really made, i put a label with a number 
that i increase everytime i have some doubt about the compilation.


   []'s,

   Luís Eduardo.



Tom Chiverton escreveu:

On Wednesday 25 October 2006 06:45, Mike Crowe wrote:
  

Is nobody else having this issue?  This is happening almost every
build for me, and it's driving me crazy.  I'm getting sick of
recreating a project, just to compile.



And there's another reason to just use mxmlc yourself.

  







___ 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar 
seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/


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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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