RE: [flexcoders] Code not executing in Popup Window

2005-06-17 Thread Mike Anderson





It's not just RemoteObject -

TRACE doesn't even work - which means, the code isn't even 
executing -

Is there any reason, why the code isn't executing 
properly?

Thanks again,

Mike


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: Friday, June 17, 2005 12:03 AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Code not 
executing in Popup Window


I dont see a problem 
but I know that others have run into issues when the RemoteObject has been 
contained in a popup. It seems to work better if its hung off the 
Application or something thats a little more permanent 
instead.

Matt





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike AndersonSent: Thursday, June 16, 2005 4:37 
PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Code not executing in 
Popup Window

Hello All,I have "known to be working" code, contained inside of a 
Custom CreatedTitleWindow 
component. The code handles all the RemoteObjectdeclarations, and populates a List Control, upon the Result 
Event.The Popup Window is 
launched from a Button residing in my MainApplication.After clicking the launch Button, the Window pops up 
perfectly and allthe controls are 
there, but nothing happens. In fact, the function 
thatretrieves the data, also sends 
a trace() message to the debug window -and nothing even happens when I do 
that.It's almost as if the code 
contained in my custom control, doesn't evenexist. Is my problem, the way in which I am creating my 
Popup Window?There must be 
something simple I am doing wrong...Here is the code in my main application that launches the 
window:public 
function launchWindow(){ var pop = 
mx.managers.PopUpManager.createPopUp(this, Categories,false, null, true);}Here 
is the code, inside my custom component called 
"Categories.mxml":?xml 
version="1.0" encoding="utf-8"?mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml"title="Manage Categories" closeButton="true" 
click="deletePopUp()"creationComplete="getCategoriesOnly();"mx:RemoteObject id="remoteService" 
source="services.InfoNexus"endpoint="http://www.mysite.com/flashgateway.aspx"showBusyCursor="true" mx:method 
name="getCategoriesOnly"result="getCategoriesOnly_Handler(event.result)"fault="getCategoriesOnly_Fault(event.fault)"//mx:RemoteObject 
mx:Script  
![CDATA[  
 
  //=== 
CATEGORIES ===//  
 function 
getCategoriesOnly()  
 {  
  
trace("getCategories just kicked off");  
  
remoteService.getCategoriesOnly();  
 }  
   
 function 
getCategoriesOnly_Handler(result)  
 {  
  
trace("getCategories_Handler just kickedoff");  
  
categories_List.dataProvider = result;  
 }  
   
 function 
getCategoriesOnly_Fault(result)  
 {  
  
 
  
} 
  
 
 ]] 
/mx:Script 
mx:VBox  
mx:Label text="Categories:"/  
mx:List id="categories_List" width="250" 
height="200"/ 
/mx:VBox 
mx:ControlBar  
mx:Button label="Get Categories"click="getCategoriesOnly()"/  
mx:Button label="Delete"/ 
/mx:ControlBar/mx:TitleWindowCould 
you all shed some light, as to why this isn't 
working?Thanks in 
advance,Mike







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] Re: Validation errortip placement

2005-06-17 Thread rockmoyosa
Ok iknow what the problem is, Is not errorTipBottom, but errorTipAbove
and errorTipBelow.

But the problem is that it still on right side of my textfield and not
on above or below. the only thing that changed is the fact that the
arrow is now pointing down or up.

Somebody?




--- In flexcoders@yahoogroups.com, rockmoyosa [EMAIL PROTECTED] wrote:
 It is something like that. But it doesnt do the trick...
 
 I tried also but without success
 StyleManager.styles.ErrorTip.setStyle(borderStyle,errorTipBottom);
 
 
 --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:
  Try this, I haven't tried it myself though.  Of course this might
apply
  it to all ErrorTips, I'm not sure how you'd set it just for TextInput.
  
   
  
  mx:Style
  
  ErrorTip {
  
borderStyle: errorTipBottom
  
  }
  
  /mx:Style
  
   
  
  Matt
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of rockmoyosa
  Sent: Thursday, June 16, 2005 7:28 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Validation errortip placement
  
   
  
  I want an errortip on or on bottom of my textfield, instead of on the
  rightside.
  
  
  
  
  
  
  
  Yahoo! Groups Links
  
  *   To visit your group on the web, go to:
  http://groups.yahoo.com/group/flexcoders/

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

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





 
Yahoo! Groups Links

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

* 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] HTTPService Fails

2005-06-17 Thread digital_eyezed
Hi,

I'm doing something really simple,

Calling an HTTPservice and showing it in a grid. The code for the 
mxml is:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
creationComplete=myService.send();
mx:HTTPService id=myService url=http://tiger:8080/simple/props; 
showBusyCursor=true/
mx:DataGrid id=myGrid dataProvider={myService.result.props}/
/mx:Application

The Servlet returns this:

?xml version=1.0 encoding=utf-8 ? 
- props
  propjava.vendor=Sun Microsystems Inc./prop 
  propcatalina.base=C:\ProgramFiles\jboss\jboss-3.2.7
\server\default/prop 
  propcatalina.useNaming=false/prop 
  propos.name=Windows XP/prop 
  propsun.boot.class.path=C:\ProgramFiles\jboss\jboss-3.2.7
\bin\\..\lib\endorsed\xercesImpl.jar;C:\ProgramFiles\jboss\jboss-
3.2.7\bin\\..\lib\endorsed\xml-
apis.jar;c:\programfiles\j2se\jre\lib\rt.jar;c:\programfiles\j2se\jre
\lib\i18n.jar;c:\programfiles\j2se\jre\lib\sunrsasign.jar;c:\programf
iles\j2se\jre\lib\jsse.jar;c:\programfiles\j2se\jre\lib\jce.jar;c:\pr
ogramfiles\j2se\jre\lib\charsets.jar;c:\programfiles\j2se\jre\classes
/prop 
  propsun.java2d.fontpath=/prop 
  propjava.vm.specification.vendor=Sun Microsystems Inc./prop 
/props

But it wont show in the dataGrid!

What am I doing wrong?

Redards,

Iain




 
Yahoo! Groups Links

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

* 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] Using XML Format Result From WebService

2005-06-17 Thread Tony Rozario



Hi,
 If i change the result format from a web service as XML  then do data binding of the result to a data grid, i dont get the expected results.
 I get numerous column headers which i cant read, some of them are getChildNode, NextChild, something like that.
The webservice result what i get when i see from the network monitor is different from that of the result which i get when i test the web service from anative server. i.e, when i check the network monitor,it gives only the first 2 nodes  its not getting the other nodes.
Can anyoneexplain to me the reason behind these odd behaviours,
tony__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] backingObject???

2005-06-17 Thread pilotdvr
Please forgive me if this is a simplistic problem, but here goes...

I have a Tree that is populated via a HTTPService call that returns 
XML containing a 'label' attribute and a 'data' attribute.

I need the 'data' attribute to act as an identifier for a subsiquent 
and different HTTPService (billList) call.

The absolute only way I have been able to get this to work is to use 
the following code snippet as the Tree's change event handler:

function treeItemSelected(node) {
var treeData:Object;
treeData=node.backingObject;
if (treeData.data!=null) {
selectedQueue=treeData.data;
billList.send();
}
}

The 'selectedQueue is an Application level variable that is used as a 
piece of the billList request tag.

Conceptionally this is what I expected to do, with the exception of 
having to use the 'backingObject' object property (especially since I 
can't find it mentioned anywhere).

I would have thought that the following snippet should have worked, 
but it didn't:

function treeItemSelected(node) {
if (node.data!=null) {
selectedQueue=node.data;
billList.send();
}
}

Can anyone help a befuddled guy out here?  Thanks




 
Yahoo! Groups Links

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

* 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] CFMX7, Flex 1.5, IIS 6

2005-06-17 Thread Jeff Steiner










There is a great write-up by Jack Minster
on Flex Authority. Check out: 

http://www.flexauthority.com/articlesArchive/FlexCF7Merge.cfm







Jeff

Founder

Flex Authority

http://www.flexauthority.com



We are actively seeking contributors for
the site. Have a sample that you want to share with the world? Send
it to us!











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tim Whitehead
Sent: Thursday, June 16, 2005 4:25
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CFMX7, Flex
1.5, IIS 6





I little while ago, I got Flex and CFMX7 working with IIS 6 seperatly.

But now I just went to try and install them
together so a CFMX
integrated with Flex,

I installed JRun, and created a server called
CFMX7.

I then installed CF as a EAR, deployed it on the
server. and I can
access it by

http://ip:8102/cfmx/CFIDE/administrator/

I then installed Flex 1.5 as a WAR samples and
all, deployed them so
that it has a structor of

.\JRun4\servers\CFMX7\cfusion-ear\

\cfusion-war

\flex-war

\profiler-war

\samples-war

I've moddified the application.xml to include new
IDs for the WARs
such as http://ip:8102/flex
or http://ip:8102/flexSamples.

is this the right way to go about doing this? any
advice would be
greatful.

I then want to tunnel it to IIS6 but when I do
this, nether cfm or
mxml files work. I receive a The page cannot
be found

Thank You
Tim Whitehead














Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] createChild with custom components

2005-06-17 Thread m00n_de
hi there, a rookie needs some help ;)

My Goal is to create custom Components dynamicly. Its no problem to
generate components with createChild(), but i dont know how to adress
custom components and what has to be imported in actionscript first.

tnx for your help..





 
Yahoo! Groups Links

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

* 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] SSL Flex

2005-06-17 Thread dd_trilobyte
Hey all,

Our application uses a HTTPService to comunicate with the server
back-end. Now I want to use SSL to secure the communication.

I have configured my iis  tomcat server to use SSL. The flex
application is served correct using https.

In the 'Developing Flex Applications' documentation it says on page
832: Security of data transport:

'Thus, by playing a SWF file within an SSL-enabled browser through an
HTTPS connection with the server, you can ensure that the
communication between Flash Player and the server is encrypted and
secure.'

My HTTPService properties:
protocol = https
url = http://localhost/server.php;

My question is:
Is the communication secure? or does the url have to be:
https://localhost/server.php;?

Thanks in advance,
Bert Willems
Trilobyte-Solutions.nl





 
Yahoo! Groups Links

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

* 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] Adding and removing Components at runtime

2005-06-17 Thread r_woess
Hi,

I've a problem, after removing and adding components at runtime. After
that, I can't see the content of TextInput-Fields, ...

I wrote a short example:

components.mxml
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns=*
mx:Script
![CDATA[
private function AddComp1():Void
{
myVBox.destroyChildAt(0);
myVBox.createChild(component_1, comp, {firstName: 
Geir,
lastName: Frigard})
}

private function RemoveAll():Void
{
myVBox.destroyAllChildren();
}
]]
/mx:Script
mx:HBox
mx:Button label=Add Component click=AddComp1();/
mx:Button label=Remove All click=RemoveAll();/
/mx:HBox
mx:HRule width=100%/
mx:VBox id=myVBox
component_1/
/mx:VBox
/mx:Application

component_1.mxml
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Script
![CDATA[
public var firstName:String;
public var lastName:String;

private function Save():Void
{
mx.core.Application.alert(firstName_ti.text);
}
]]
/mx:Script
mx:Form
mx:FormItem label=First Name
mx:TextInput id=firstName_ti text={firstName}/
/mx:FormItem
mx:FormItem label=Last Name
mx:TextInput id=lastName_ti text={lastName}/
/mx:FormItem
/mx:Form
mx:Button label=Save click=Save();/
/mx:VBox



After clickon on Add Component the old component will be deletet and
a new component will be show. This works correctly. But why can't I
see the text in den TextInputs? After clicking on the Save-Button in
the component, an alert-box with the correct values is shown.

When I use the Button remove all and then add component the text
is show correctly.


Has anybody an idea, what I did wrong?

best regards
reini




 
Yahoo! Groups Links

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

* 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] createChild with custom components

2005-06-17 Thread Abdul Qabiz
Hi,

If your component class extends from mx.core.View or any of its
subclasses (container class) like Box, HBox, VBox etc, your component
would have this method automatically.



Following is custom mxml component, which extends form Hbox and you can
call createChild(..) on its intstances. For example, see the code below.

1) ##HBoxEx.mxml##

mx:Hbox xmlns:mx=http://www.macromedia.com/2003/mxml;

//your code

/mx:HBox


2) ##testHBoxEx.mxml##

mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns=*
mx:Script
function onHBoxInit()
{
_hb.createChild(mx.controls.Label, ,
{text:Hello World!});
}
/mx:Script
local:HBoxEx id=_hb /
/mx:Application


Hope that helps..

-abdul


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of m00n_de
Sent: Friday, June 17, 2005 5:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] createChild with custom components

hi there, a rookie needs some help ;)

My Goal is to create custom Components dynamicly. Its no problem to
generate components with createChild(), but i dont know how to adress
custom components and what has to be imported in actionscript first.

tnx for your help..





 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

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

* 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] Re: createChild with custom components

2005-06-17 Thread m00n_de
ah, easier than i thought, tnx :)




 
Yahoo! Groups Links

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

* 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] Adding and removing Components at runtime

2005-06-17 Thread Abdul Qabiz
Hi,

This is a known issue. It has been discussed before also, I guess Scott
Barnes brought up similar issue.

The workaround suggested was to have a little delay between
destroyChild(..) and createChild(..) operations. This can be done using:

- doLater(..)
- setInterval(..)

doLater(..) is clean api but it takes a frame to fresh, a frame won't be
more than few milliseconds. Where as setInterval(..) can do it quickly,
but kind of unreliable when compared to doLater(..)

So I have modified your components.mxml code, look the code below for
difference. 

Hope that helps.

-abdul

##components.mxml##

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns=*
mx:Script
![CDATA[
private function AddComp1():Void
{
myVBox.destroyChildAt(0);
//added little delay.
doLater(myVBox, createChild, [component_1,
comp, {firstName: Geir,lastName: Frigard}]);
}

private function RemoveAll():Void
{
myVBox.destroyAllChildren();
}
]]
/mx:Script
mx:HBox
mx:Button label=Add Component click=AddComp1();/
mx:Button label=Remove All click=RemoveAll();/
/mx:HBox
mx:HRule width=100%/
mx:VBox id=myVBox
component_1/
/mx:VBox
/mx:Application

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of r_woess
Sent: Friday, June 17, 2005 5:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Adding and removing Components at runtime

Hi,

I've a problem, after removing and adding components at runtime. After
that, I can't see the content of TextInput-Fields, ...

I wrote a short example:

components.mxml
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns=*
mx:Script
![CDATA[
private function AddComp1():Void
{
myVBox.destroyChildAt(0);
myVBox.createChild(component_1, comp,
{firstName: Geir,
lastName: Frigard})
}

private function RemoveAll():Void
{
myVBox.destroyAllChildren();
}
]]
/mx:Script
mx:HBox
mx:Button label=Add Component click=AddComp1();/
mx:Button label=Remove All click=RemoveAll();/
/mx:HBox
mx:HRule width=100%/
mx:VBox id=myVBox
component_1/
/mx:VBox
/mx:Application

component_1.mxml
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Script
![CDATA[
public var firstName:String;
public var lastName:String;

private function Save():Void
{
mx.core.Application.alert(firstName_ti.text);
}
]]
/mx:Script
mx:Form
mx:FormItem label=First Name
mx:TextInput id=firstName_ti
text={firstName}/
/mx:FormItem
mx:FormItem label=Last Name
mx:TextInput id=lastName_ti
text={lastName}/
/mx:FormItem
/mx:Form
mx:Button label=Save click=Save();/
/mx:VBox



After clickon on Add Component the old component will be deletet and
a new component will be show. This works correctly. But why can't I
see the text in den TextInputs? After clicking on the Save-Button in
the component, an alert-box with the correct values is shown.

When I use the Button remove all and then add component the text
is show correctly.


Has anybody an idea, what I did wrong?

best regards
reini




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

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

* 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] SSL Flex

2005-06-17 Thread Kerry
Ive tried this in flash, and the communication was not secure.
You could use a packet sniffer to check - http://www.ethereal.com/

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of dd_trilobyte
Sent: 17 June 2005 12:49
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SSL  Flex


Hey all,

Our application uses a HTTPService to comunicate with the server
back-end. Now I want to use SSL to secure the communication.

I have configured my iis  tomcat server to use SSL. The flex
application is served correct using https.

In the 'Developing Flex Applications' documentation it says on page
832: Security of data transport:

'Thus, by playing a SWF file within an SSL-enabled browser through an
HTTPS connection with the server, you can ensure that the
communication between Flash Player and the server is encrypted and
secure.'

My HTTPService properties:
protocol = https
url = http://localhost/server.php;

My question is:
Is the communication secure? or does the url have to be:
https://localhost/server.php;?

Thanks in advance,
Bert Willems
Trilobyte-Solutions.nl





 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

* 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] Re: Adding and removing Components at runtime

2005-06-17 Thread r_woess
Hi,

it works fine. But I have a new problem with this solution.

In my real application I need to save the created component in a varible.

newComp=myVBox.createChild(component_1, comp,{firstName: Geir, 
lastName: Frigard})

I found no way to get the return value of a function, which is called
via doLater. Is there a way to get the return value?

best regards
reini


--- In flexcoders@yahoogroups.com, Abdul Qabiz [EMAIL PROTECTED] wrote:
 Hi,
 
 This is a known issue. It has been discussed before also, I guess Scott
 Barnes brought up similar issue.
 
 The workaround suggested was to have a little delay between
 destroyChild(..) and createChild(..) operations. This can be done using:
 
 - doLater(..)
 - setInterval(..)
 
 doLater(..) is clean api but it takes a frame to fresh, a frame won't be
 more than few milliseconds. Where as setInterval(..) can do it quickly,
 but kind of unreliable when compared to doLater(..)
 
 So I have modified your components.mxml code, look the code below for
 difference. 
 
 Hope that helps.
 
 -abdul
 
 ##components.mxml##
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 xmlns=*
   mx:Script
   ![CDATA[
   private function AddComp1():Void
   {
   myVBox.destroyChildAt(0);
   //added little delay.
   doLater(myVBox, createChild, [component_1,
 comp, {firstName: Geir,lastName: Frigard}]);
   }
   
   private function RemoveAll():Void
   {
   myVBox.destroyAllChildren();
   }
   ]]
   /mx:Script
   mx:HBox
   mx:Button label=Add Component click=AddComp1();/
   mx:Button label=Remove All click=RemoveAll();/
   /mx:HBox
   mx:HRule width=100%/
   mx:VBox id=myVBox
 component_1/
   /mx:VBox
 /mx:Application
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of r_woess
 Sent: Friday, June 17, 2005 5:25 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Adding and removing Components at runtime
 
 Hi,
 
 I've a problem, after removing and adding components at runtime. After
 that, I can't see the content of TextInput-Fields, ...
 
 I wrote a short example:
 
 components.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 xmlns=*
   mx:Script
   ![CDATA[
   private function AddComp1():Void
   {
   myVBox.destroyChildAt(0);
   myVBox.createChild(component_1, comp,
 {firstName: Geir,
 lastName: Frigard})
   }
   
   private function RemoveAll():Void
   {
   myVBox.destroyAllChildren();
   }
   ]]
   /mx:Script
   mx:HBox
   mx:Button label=Add Component click=AddComp1();/
   mx:Button label=Remove All click=RemoveAll();/
   /mx:HBox
   mx:HRule width=100%/
   mx:VBox id=myVBox
 component_1/
   /mx:VBox
 /mx:Application
 
 component_1.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
   mx:Script
   ![CDATA[
   public var firstName:String;
   public var lastName:String;
   
   private function Save():Void
   {
   mx.core.Application.alert(firstName_ti.text);
   }
   ]]
   /mx:Script
   mx:Form
   mx:FormItem label=First Name
   mx:TextInput id=firstName_ti
 text={firstName}/
   /mx:FormItem
   mx:FormItem label=Last Name
   mx:TextInput id=lastName_ti
 text={lastName}/
   /mx:FormItem
   /mx:Form
   mx:Button label=Save click=Save();/
 /mx:VBox
 
 
 
 After clickon on Add Component the old component will be deletet and
 a new component will be show. This works correctly. But why can't I
 see the text in den TextInputs? After clicking on the Save-Button in
 the component, an alert-box with the correct values is shown.
 
 When I use the Button remove all and then add component the text
 is show correctly.
 
 
 Has anybody an idea, what I did wrong?
 
 best regards
 reini
 
 
 
 
  
 Yahoo! Groups Links




 
Yahoo! Groups Links

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

* 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] SSL Flex

2005-06-17 Thread Peter Farland
I believe you need to do the latter:

https://localhost/server.php;

The protocol attribute is used to decide which proxy URL to use (http or
https). If you're not using the proxy you should get a compile time
warning that the protocol attribute is only for when useProxy=true
(the default).
 


 
Yahoo! Groups Links

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

* 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] SSL Flex

2005-06-17 Thread Abdul Qabiz
Kerry,

Can you please provide the test-case where you found that communication
was not secure? It would help us to fill any loop holes. 

FYI! Macromedia Flash Player uses the browsers SSL capabilities for
secure communication. So if you found that packets were not secure, I am
sure that applies to any non-flash web applications running in browser.

Ok, coming to back to original question.

I am sure specifying protocol=https should be enough but I will
suggest you to use https://locahost/server.php. Someone who knows more
about it, might confirm.

-abdul
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kerry
Sent: Friday, June 17, 2005 7:01 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] SSL  Flex

Ive tried this in flash, and the communication was not secure.
You could use a packet sniffer to check - http://www.ethereal.com/

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of dd_trilobyte
Sent: 17 June 2005 12:49
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SSL  Flex


Hey all,

Our application uses a HTTPService to comunicate with the server
back-end. Now I want to use SSL to secure the communication.

I have configured my iis  tomcat server to use SSL. The flex
application is served correct using https.

In the 'Developing Flex Applications' documentation it says on page
832: Security of data transport:

'Thus, by playing a SWF file within an SSL-enabled browser through an
HTTPS connection with the server, you can ensure that the
communication between Flash Player and the server is encrypted and
secure.'

My HTTPService properties:
protocol = https
url = http://localhost/server.php;

My question is:
Is the communication secure? or does the url have to be:
https://localhost/server.php;?

Thanks in advance,
Bert Willems
Trilobyte-Solutions.nl





 
Yahoo! Groups Links



 






 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

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

* 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: Adding and removing Components at runtime

2005-06-17 Thread Abdul Qabiz
Hi,

I am sure, you can do that. You can refactor your code by breaking
AddComp1(..) function in two separate functions. First function would
remove the at 0 and invoke the other function using doLater(..); Other
function would add a new child and save the reference in some global
variable.

For example, see the modified code. I have created two functions
AddComp1 and AddComp2, you can do something similar with function name
of your choice. This is just for an example.

-abdul

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns=*
mx:Script
![CDATA[

var refLastChild;

private function AddComp1():Void
{

myVBox.destroyChildAt(0);
doLater(this, AddComp2);
}

private function AddComp2():Void
{
refLastChild = myVBox.createChild(component_1,
comp, {firstName: Geir,lastName: Frigard});
}

private function RemoveAll():Void
{
myVBox.destroyAllChildren();
}
]]
/mx:Script
mx:HBox
mx:Button label=Add Component click=AddComp1();/
mx:Button label=Remove All click=RemoveAll();/
/mx:HBox
mx:HRule width=100%/
mx:VBox id=myVBox
component_1/
/mx:VBox
/mx:Application

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of r_woess
Sent: Friday, June 17, 2005 7:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Adding and removing Components at runtime

Hi,

it works fine. But I have a new problem with this solution.

In my real application I need to save the created component in a
varible.

newComp=myVBox.createChild(component_1, comp,{firstName: Geir, 
lastName: Frigard})

I found no way to get the return value of a function, which is called
via doLater. Is there a way to get the return value?

best regards
reini


--- In flexcoders@yahoogroups.com, Abdul Qabiz [EMAIL PROTECTED] wrote:
 Hi,
 
 This is a known issue. It has been discussed before also, I guess
Scott
 Barnes brought up similar issue.
 
 The workaround suggested was to have a little delay between
 destroyChild(..) and createChild(..) operations. This can be done
using:
 
 - doLater(..)
 - setInterval(..)
 
 doLater(..) is clean api but it takes a frame to fresh, a frame won't
be
 more than few milliseconds. Where as setInterval(..) can do it
quickly,
 but kind of unreliable when compared to doLater(..)
 
 So I have modified your components.mxml code, look the code below for
 difference. 
 
 Hope that helps.
 
 -abdul
 
 ##components.mxml##
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 xmlns=*
   mx:Script
   ![CDATA[
   private function AddComp1():Void
   {
   myVBox.destroyChildAt(0);
   //added little delay.
   doLater(myVBox, createChild, [component_1,
 comp, {firstName: Geir,lastName: Frigard}]);
   }
   
   private function RemoveAll():Void
   {
   myVBox.destroyAllChildren();
   }
   ]]
   /mx:Script
   mx:HBox
   mx:Button label=Add Component click=AddComp1();/
   mx:Button label=Remove All click=RemoveAll();/
   /mx:HBox
   mx:HRule width=100%/
   mx:VBox id=myVBox
 component_1/
   /mx:VBox
 /mx:Application
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of r_woess
 Sent: Friday, June 17, 2005 5:25 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Adding and removing Components at runtime
 
 Hi,
 
 I've a problem, after removing and adding components at runtime. After
 that, I can't see the content of TextInput-Fields, ...
 
 I wrote a short example:
 
 components.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 xmlns=*
   mx:Script
   ![CDATA[
   private function AddComp1():Void
   {
   myVBox.destroyChildAt(0);
   myVBox.createChild(component_1, comp,
 {firstName: Geir,
 lastName: Frigard})
   }
   
   private function RemoveAll():Void
   {
   myVBox.destroyAllChildren();
   }
   ]]
   /mx:Script
   mx:HBox
   mx:Button label=Add Component click=AddComp1();/
   mx:Button label=Remove All click=RemoveAll();/
   /mx:HBox
   mx:HRule width=100%/
   mx:VBox id=myVBox
 component_1/
   /mx:VBox
 /mx:Application
 

[flexcoders] Sequence Diagram for Cairngorm 0.99

2005-06-17 Thread Shahnavaz Alware










How can I get the sequence diagram for cairngorm 0.99? Thanks
in advance



Shahn



It is our company policy not to accept email of any data controlled by
the International Traffic in Arms Regulations (ITAR). Please contact our
Security Officer, Alexander Houtzeel, for instructions and authorization to
transmit such data.













Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] HTTPService Fails

2005-06-17 Thread Longley, Andrew (N-Aviture)
In my experience, Flex prefers XML to use the label attribute, i.e., 

props
  prop label=java.vendor value=Sun Microsystems Inc. /
  prop ... /
/props

if you want Flex to be able to automatically parse the XML.  If you
can't change the XML source, you may have to manually parse it using
code:

XML:
state name=California
   city
  San Francisco
   /city
/state

var xmlString:String = state name=CaliforniacitySan
Francisco/city/state

Then:
   var myXML:XML = new XML();
   myXML.parseXML(xmlString);
   myXML.firstChild.nodeName = state
   myXML.firstChild.attributes[name] = California
   myXML.firstChild.firstChild.nodeName = city
   myXML.firstChild.firstChild.firstChild.nodeValue = San Francisco 

Andrew

 -Original Message-
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of digital_eyezed
 Sent: Friday, June 17, 2005 3:09 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] HTTPService Fails
 
 Hi,
 
 I'm doing something really simple,
 
 Calling an HTTPservice and showing it in a grid. The code for 
 the mxml is:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
 creationComplete=myService.send();
 mx:HTTPService id=myService url=http://tiger:8080/simple/props; 
 showBusyCursor=true/
 mx:DataGrid id=myGrid dataProvider={myService.result.props}/
 /mx:Application
 
 The Servlet returns this:
 
 ?xml version=1.0 encoding=utf-8 ?
 - props
   propjava.vendor=Sun Microsystems Inc./prop
   propcatalina.base=C:\ProgramFiles\jboss\jboss-3.2.7
 \server\default/prop
   propcatalina.useNaming=false/prop
   propos.name=Windows XP/prop
   propsun.boot.class.path=C:\ProgramFiles\jboss\jboss-3.2.7
 \bin\\..\lib\endorsed\xercesImpl.jar;C:\ProgramFiles\jboss\jboss-
 3.2.7\bin\\..\lib\endorsed\xml-
 apis.jar;c:\programfiles\j2se\jre\lib\rt.jar;c:\programfiles\j2se\jre
 \lib\i18n.jar;c:\programfiles\j2se\jre\lib\sunrsasign.jar;c:\programf
 iles\j2se\jre\lib\jsse.jar;c:\programfiles\j2se\jre\lib\jce.jar;c:\pr
 ogramfiles\j2se\jre\lib\charsets.jar;c:\programfiles\j2se\jre\classes
 /prop
   propsun.java2d.fontpath=/prop
   propjava.vm.specification.vendor=Sun Microsystems 
 Inc./prop /props
 
 But it wont show in the dataGrid!
 
 What am I doing wrong?
 
 Redards,
 
 Iain
 
 
 
 
  
 Yahoo! Groups Links
 
 
 
  
 
 
 
 


 
Yahoo! Groups Links

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

* 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] REPEATER : Index

2005-06-17 Thread david_gal-reyniez





Hi 
everybody,

I need your help 
tomanage myincapacity of usingcorrectly the 
repeater.
In my repeater I 
define an TextInput , a List , aButton and a CheckBox.
I would like to 
clear the text property of my TextInput by clicking the corresponding Button and 
to make visible my List by selecting the corresponding 
CheckBox.

Do I have to use the 
currentIndex property of my repeater? If yes how? Something 
else?

Thank you for yours 
suggestions!
Have fun during the 
week-end!

David
** 

Coface facilite les echanges entre les entreprises partout dans le monde. Pour cela, elle offre a toutes les entreprises des solutions pour gerer, financer et proteger leur poste client, en leur permettant d'externaliser tout ou partie de la gestion et des risques lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et Aa3 par Moody's. 

Pour en savoir plus, http://www.coface.fr 

 

Coface facilitates business-to-business commerce worldwide. It offers all size companies an array of solutions to manage, finance, and protect their accounts receivables affording them the option of fully or partly outsourcing trade relationship management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by Moody's. 

More about Coface, http://www.coface.com 

 

WARNING :  

- Soyez conscient que notre systeme Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete identifie correctement. 

- Be aware that from time to time our Anti-Spam system may reject mails either because some words and types of files are not allowed or because mails are misidentified.  

**  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.













[flexcoders] custome controls-How?

2005-06-17 Thread Doodi, Hari - BLS CTR
Hi All,
I have a situation with TabNavigator - where in before user navigate
to next tab I have to do some validations on data they entered and if no
errors then only I let the user go to next tab. In order to achieve this I
need to trap some event before change event can occure. From my previous
posting I think the only way I can achieve this functionality is extend the
TabNavigator and override corresponding methos(?).
Can any one guide me to locations where I can find enough info How
to extend mx controls and use them in my mxml files? Thanks in advance for
your help. I really appreciate if any one can post already working code for
both extending and using in mxml file .

Thanks!
Hari



 
Yahoo! Groups Links

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

* 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] Link as a CellRenderer

2005-06-17 Thread isidrolv










Hello everybody!





Does anyone have an example using Link control as a
CellRenderer?

Thanks for your help.



-

Isidro.













Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] Link control as a CellRenderer

2005-06-17 Thread isidrolv










Hello everybody!





Does anyone have an example using Link control as a
CellRenderer?

Thanks for your help.



-

Isidro.













Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] Charting - Conditionally Controlling Horz Axis Labels

2005-06-17 Thread Dave
I'm rendering a chart that displays data over a period of time 
(trend). Each day equals a 'tick' on the horz axis and the 
corresponding date displays as the label.

The problem - when going past '90' days or so, the labels become 
unreadable because they're too small and stacked so closely together. 

Is there a way to create a condition (e.g.  daysBack = 90) where 
the labels will NOT display??

Thanks,

-Dave





 
Yahoo! Groups Links

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

* 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] Re: Collections between Flex and Web services

2005-06-17 Thread cgobble
I thought I had resolved the problem by creating classes in 
ActionScript where the collections are specifically designed as 
Arrays.  The problem seems to be how Flex determines if an object is 
an array or not when it reads the message from the web service. 
Depending on how I set it up, the problem can appear to be on either 
the Flex side, or the .Net side.  It's interesting that I can set up 
a complex class structure that works in Flex with all of the 
appropriate methods, properties and arrays and it translates to the 
web service just fine.  But, when I try to fill my classes with the 
result from the web service, it doesn't recognize the elements and 
instantiate the appropriate class.  I must be missing something 
fundamental.

Cliff


--- In flexcoders@yahoogroups.com, Clint Modien [EMAIL PROTECTED] wrote:
 Is your problem on the flex side or on the .NET side?
 
 
 On 6/16/05, Matt Chotin [EMAIL PROTECTED] wrote:
  
   Hmm, seems odd. Can you take a look at the object in a debugger 
and see 
  if it's constructed the way you'd expect? Also turn on debugging 
  (web-service-proxy) and check if we're even sending the phone 
number across 
  the wire. If not you may need to re-process the contact before 
executing 
  the send to make sure that things are what the web service 
expects.
  
   Matt
  
--
   
  *From:* flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] *On 
  Behalf Of *cgobble
  *Sent:* Wednesday, June 15, 2005 9:51 AM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Re: Collections between Flex and Web 
services
   
   I am using the mx.utils.ArrayUtil.toArray to bind to a 
datagrid. 
  This makes sure that Flex sees it when there is only 1 item in 
the 
  array. However, going back to the service with the entire object 
is 
  causing the problem. I've been experimenting with defining 
classes 
  for these objects and I get the same problem when I use an array.
  
  
  
  --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] 
  wrote:
   Check out mx.utils.ArrayUtil.toArray(). You may need to call 
that 
  to
   make sure that when you pass a single item it still gets 
treated 
  as an
   array.
   
   
   
   Matt
   
   
   
   
   
   From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On
   Behalf Of cgobble
   Sent: Wednesday, June 15, 2005 7:36 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Collections between Flex and Web services
   
   
   
   Hello,
   
   I'm trying to return complex types with collections from a web 
   service and everything seems to work fine. But, when I send 
the 
   type as the input parameter for the web service, if there is 
only 
  1 
   item in the collection it does not get back to the web service.
   
   For instance, you have a Contact object in a dotnet web 
service. 
   The Contact has a collection of phone numbers. I simply want 
to 
   pass the entire Contact object back and forth between the web 
   service and Flex.
   I create a method on the web service such as: (VB)
   
   Public Sub SaveContact(Contact as Contact)
   
   End Sub
   
   However, it seems that if I only have 1 phone number, the 
phone 
   number gets lost in translation, even though the Contact info 
  comes 
   back correctly. I was able to partially fix this by making 
sure 
  my 
   collections were instantiated in the constructor, but if I 
nest a 
   collection, it doesn't seem to work right.
   
   Any ideas??
   
   
   
   
   
   
   
   
   
   Yahoo! Groups Links
   
   * To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/
   
   * To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
  subject=Unsubscribe 
   
   * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
   Service http://docs.yahoo.com/info/terms/ .
  
  
  
   
  --
  *Yahoo! Groups Links*
  
 - To visit your group on the web, go to:
 http://groups.yahoo.com/group/flexcoders/
 - To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]flexcoders-
[EMAIL PROTECTED]
 - Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
 Service http://docs.yahoo.com/info/terms/. 
  
 





 
Yahoo! Groups Links

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

* 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] Link as a CellRender for a DataGrid

2005-06-17 Thread isidrolv










Hi, everybody!



I traed to build a CellRenderer using Link control, for use
in a DataGrid, but i dont know how to broadcast the click event of the
Link, and to be listened in the app using the DataGrid. In other words, I
need to catch the click event of the renderer, inside my app. What I must do?



This is a section of the code using my renderer:



mx:DataGrid id=dgBalance
dataProvider={balanceGeneral} width=100%
height=100% sortableColumns=false
cellPress=doCellPress(event);


mx:columns


mx:Array


mx:DataGridColumn headerText=CONCEPT
columnName=CONCEPT width=350 resizable=true
/


mx:DataGridColumn headerText=TOTAL columnName=t1
textAlign=right cellRenderer=MyRenderer /



..--..



The code of the CellRenderer:


?xml version=1.0 encoding=utf-8?

mx:Link
xmlns:mx=http://www.macromedia.com/2003/mxml
click=mx.controls.Alert.show('Drill Down Cell') 

mx:Script

 ![CDATA[

 

 

 

 var
listOwner : MovieClip; 

 var
getCellIndex : Function; 

 var getDataLabel
: Function;



 function
setValue( str:String, item:Object, sel:Boolean ) : Void

 { 

 var
value = item[getDataLabel()];

 this.label
= value;

 var
num:Number = parseFloat(value);

 trace(num)

 if
(num0) {

 this.setStyle(color,#FF);

 this.setStyle(fontWeight,);

 }
else {

 this.setStyle(color,);

 this.setStyle(fontWeight,);

 }

 }

 

 ]]

/mx:Script

/mx:Link











Thanks for your help



Isidro.











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] Horizontal Axis Label Headaches

2005-06-17 Thread Battershall, Jeff
I've got a line chart of daily data starting in Jan 2004 - there are
several series and the data displays very well.

I'm having real problems with the horizontal axis labels - they are
displaying way way too small and nothing I do seems to address it.

I have a label function which allows only one label to appear for each
month, and returns a zero length string the rest of the time.

It appears that the sizing algorthim is using the total number of items
in the data provider array to compute the size of the label - but I need
it to be computed based on 1/30th of the number of days.

How the heck do I override this behavior?

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


 
Yahoo! Groups Links

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

* 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] Link control as a CellRenderer

2005-06-17 Thread JesterXL





Not quite, but close?

http://www.jessewarden.com/archives/2005/01/datagrid_hyperl.html


- Original Message - 
From: isidrolv 

To: flexcoders@yahoogroups.com 
Sent: Friday, June 17, 2005 12:31 PM
Subject: [flexcoders] Link control as a CellRenderer


Hello 
everybody!


Does anyone have an example using 
Link control as a CellRenderer?Thanks for your 
help.

-
Isidro.








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] Creating Custom Component

2005-06-17 Thread Jitesh
Hi Guyz...

Can anyone help me out?

I have two buttons in my panel...add and remove.On clicking the add the 
combobox(editable) components are added at runtime to the panel and on 
cliking the remove button the components are removed.I have achieved 
this functionality..

I would like to store the history of the values that the user has typed 
within the combobox..How can we do this?

As I have just started working on flex, I am not too much familiar with 
the syntax..

Can anyone suggest me a solution?

Jitesh




 
Yahoo! Groups Links

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

* 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] sorting formatted fields in a datagrid

2005-06-17 Thread Drew Falkman










Hey-



I have a DataGrid component that contains
a date that I am formatting using a DateFormatter. However, if a user clicks on
the column header, it sorts incorrectly. I suspect it is sorting on the raw
data and not the formatted data (the formatted data is mm/dd/ so
alphabetical should put it in correct order).



Any tips on what I could do as a
workaround?



Thanks,



Drew Falkman 











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] Cell Rendering

2005-06-17 Thread Joe
I have a data grid that is using a check boc cellrender in on of the 
colums. I need to know how to change the color of the text in that row 
when the check box is checked.   





 
Yahoo! Groups Links

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

* 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] AMFPHP Flex

2005-06-17 Thread JesterXL
In case anyone needs an example, it was amazingly simple to do; hooking up 
Flex' RemoteObject to AMFPHP.  Flex rules.

Example files here:
http://www.jessewarden.com/archives/2005/06/flash_flex_amfp.html

--JesterXL 




 
Yahoo! Groups Links

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

* 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] Cell Rendering

2005-06-17 Thread Joe
I have a data grid that is using a check boc cellrender in on of the 
colums. I need to know how to change the color of the text in that row 
when the check box is checked.   





 
Yahoo! Groups Links

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

* 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] HTTPService Fails

2005-06-17 Thread Ronald Kinion





I would suggest changing your dataProvider to 
'{myService.result.props.prop}'

You might also want to consider mx:List for your component 
instead of mx:DataGrid. the component is probably better for single column 
data like this. (datagrid's are actually made of multiple List 
components.)

-- Ronald Kinion 253-205-3000 
x5162 [EMAIL PROTECTED] 



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of 
digital_eyezedSent: Friday, June 17, 2005 1:09 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] HTTPService 
Fails
Hi,I'm doing something really simple,Calling an 
HTTPservice and showing it in a grid. The code for the mxml 
is:?xml version="1.0" encoding="utf-8"?mx:Application 
xmlns:mx="http://www.macromedia.com/2003/mxml" 
creationComplete="myService.send();"mx:HTTPService 
id="myService" url=""http://tiger:8080/simple/props">http://tiger:8080/simple/props" 
showBusyCursor="true"/mx:DataGrid id="myGrid" 
dataProvider="{myService.result.props}"//mx:ApplicationThe 
Servlet returns this:?xml version="1.0" encoding="utf-8" ? - 
props propjava.vendor=Sun Microsystems 
Inc./prop  
propcatalina.base=C:\ProgramFiles\jboss\jboss-3.2.7\server\default/prop 
 propcatalina.useNaming=false/prop  
propos.name=Windows XP/prop  
propsun.boot.class.path=C:\ProgramFiles\jboss\jboss-3.2.7\bin\\..\lib\endorsed\xercesImpl.jar;C:\ProgramFiles\jboss\jboss-3.2.7\bin\\..\lib\endorsed\xml-apis.jar;c:\programfiles\j2se\jre\lib\rt.jar;c:\programfiles\j2se\jre\lib\i18n.jar;c:\programfiles\j2se\jre\lib\sunrsasign.jar;c:\programfiles\j2se\jre\lib\jsse.jar;c:\programfiles\j2se\jre\lib\jce.jar;c:\programfiles\j2se\jre\lib\charsets.jar;c:\programfiles\j2se\jre\classes/prop 
 propsun.java2d.fontpath=/prop  
propjava.vm.specification.vendor=Sun Microsystems Inc./prop 
/propsBut it wont show in the dataGrid!What am I 
doing wrong?Redards,Iain







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] Link as a CellRender for a DataGrid

2005-06-17 Thread JesterXL





Dude, my emails are slow as nuts to this 
list...

*ahem*

Try this for your click event:

listOwner.dispatchEvent({type: "hyperlinkClick", 
target: listOwner,cell: this, text: cellData});

That way, if anyone subscribes to the DataGrid's 
"hyperlinkClick" event, they'll get that event, with all the needed 
data.


- Original Message - 
From: isidrolv 

To: flexcoders@yahoogroups.com 
Sent: Friday, June 17, 2005 1:16 PM
Subject: [flexcoders] Link as a CellRender for a 
DataGrid


Hi, 
everybody!

I traed to build a CellRenderer 
using Link control, for use in a DataGrid, but i don?t know how to broadcast the 
click event of the Link, and to be listened in the app using the DataGrid. 
In other words, I need to catch the click event of the renderer, inside my app. 
What I must do?

This is a section of the code using 
my renderer:
mx:DataGrid id="dgBalance" 
dataProvider="{balanceGeneral}" width="100%" height="100%" 
sortableColumns="false" 
cellPress="doCellPress(event);"
 
mx:columns
 
mx:Array
 
mx:DataGridColumn headerText="CONCEPT" columnName="CONCEPT" width="350" 
resizable="true" /
 
mx:DataGridColumn headerText="TOTAL" columnName="t1" textAlign="right" 
cellRenderer="MyRenderer" /

?..--..

The code of the 
CellRenderer:
?xml version="1.0" 
encoding="utf-8"?
mx:Link 
xmlns:mx="http://www.macromedia.com/2003/mxml" 
click="mx.controls.Alert.show('Drill Down Cell')" 

mx:Script
 
![CDATA[
 

 

 

 
var listOwner : MovieClip; 
 
var getCellIndex : Function; 
 
var getDataLabel : 
Function;

 
function setValue( str:String, item:Object, sel:Boolean ) : 
Void
 
{ 

 
var value = item[getDataLabel()];
 
this.label = value;
 
var num:Number = parseFloat(value);
 
trace(num)
 
if (num0) {
 
this.setStyle("color","#FF");
 
this.setStyle("fontWeight","");
 
} else {
 
this.setStyle("color","");
 
this.setStyle("fontWeight","");
 
}
 
}
 

 
]]
/mx:Script
/mx:Link




Thanks for your 
help

Isidro.







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] REPEATER : Index

2005-06-17 Thread Tracy Spratt










You cant use currentIndex or
currentItem in an event handler because they only exist while the repeater is
rendering.



The sample app below uses getChildAt and
getRepeater item to modify a controls visibility and the underlying
dataProvider. There may be a better way, but this works.



Tracy



?xml version=1.0
encoding=utf-8?

mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml
horizontalAlign=left

mx:Script![CDATA[

 //sets
the visibility of a child control based on the checkbox selected value

 private
function setControlVisible(oEvent:Object):Void

 {

 var
tiTextControl = oEvent.target.parent.getChildAt(2); //get a reference to the
control

 tiTextControl.visible
= oEvent.target.selected; //set the visibility

 oEvent.target.parent.getChildAt(0).label
= (oEvent.target.selected == true) ? Hide : Show ;
//modify the checkbox label

 }

 

 //updates
the dataProvider item for the appropriate repeater item

 private
function clearText(oEvent:Object):Void

 {

 var
oItem:Object = oEvent.target.getRepeaterItem(); //get
the dataProvider item

 oItem.data
= "" //set the dataProvider value

 } 

]]/mx:Script

 mx:VBox
id=vbox1 

 mx:Repeater
id=repeater1 count=3
dataProvider={[{data:'1'},{data:'2'},{data:'3'}]}

 mx:HBox

 mx:CheckBox
label=Hide click=setControlVisible(event)
selected=true/

 mx:Button
label=Clear click=clearText(event) /

 mx:TextInput
id=tiText text={repeater1.currentItem.data}
width=50/

 /mx:HBox

 /mx:Repeater

 /mx:VBox

/mx:Application











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of david_gal-reyniez
Sent: Friday, June 17, 2005 11:55
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] REPEATER :
Index







Hi everybody,











I need your help tomanage myincapacity of
usingcorrectly the repeater.





In my repeater I define an TextInput , a List ,
aButton and a CheckBox.





I would like to clear the text property of my TextInput by
clicking the corresponding Button and to make visible my List by selecting the
corresponding CheckBox.











Do I have to use the currentIndex property of my repeater?
If yes how? Something else?











Thank you for yours suggestions!





Have fun during the week-end!











David



**


Coface facilite les echanges entre
les entreprises partout dans le monde. Pour cela, elle offre a toutes les
entreprises des solutions pour gerer, financer et proteger leur poste client,
en leur permettant d'externaliser tout ou partie de la gestion et des risques
lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et
Aa3 par Moody's. 

Pour en savoir plus, http://www.coface.fr


Coface facilitates
business-to-business commerce worldwide. It offers all size companies an array
of solutions to manage, finance, and protect their accounts receivables
affording them the option of fully or partly outsourcing trade relationship
management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by
Moody's. 

More about Coface,
http://www.coface.com 

WARNING : 

- Soyez conscient que notre systeme
Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et
types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete
identifie correctement. 

- Be aware that from time to time our
Anti-Spam system may reject mails either because some words and types of files
are not allowed or because mails are misidentified. 

**













Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












Re: [flexcoders] Re: Collections between Flex and Web services

2005-06-17 Thread Clint Modien



ya basically... flex deseirializes the soap objects an untyped AS2 Object tree.

load the tree manually into you class heirachy with a load function in your as2 objects

here's an example of what i mean... just look @ the load func

might want to ignore all the event code you probably won't need it


import mx.events.*;
class com.ibm.g3.model.bo.Team
{ 
 public var vo:Object = undefined;
 private var origVO:Object = undefined; //concurenccy (future)
   
 // - this code is to dispatch events -
 public function Team()
 {  
  EventDispatcher.initialize(this);
  this.vo = new Object();  
  this.origVO = new Object();
 }
 
 public var addEventListener:Function;
 public var removeEventListener:Function;
 private var dispatchEvent:Function;
 
 // -- end event dispatch code -- 
 
 [ChangeEvent(change)]
 public function get teamId():Number{return vo.teamId;}
 public function set teamId(v:Number){vo.teamId = v; dispatchEvent({ type: change });}
 [ChangeEvent(change)]
 public function get dashBoard():Boolean{return vo.dashBoard;}
 public function set dashBoard(v:Boolean){vo.dashBoard = v; dispatchEvent({ type: change });}
 [ChangeEvent(change)]
 public function get ibmRfpName():String{return vo.ibmRfpName;}
 public function set ibmRfpName(v:String){vo.ibmRfpName = v; dispatchEvent({ type: change });}
 [ChangeEvent(change)]
 public function get gmRfpName():String{return vo.gmRfpName;}
 public function set gmRfpName(v:String){vo.gmRfpName = v; dispatchEvent({ type: change });}
 [ChangeEvent(change)]
 public function get UserDetailTree():Array{return vo.UserDetailTree;}
 public function set UserDetailTree(v:Array){vo.UserDetailTree = v; dispatchEvent({ type: change });}
   
 public var hasData:Boolean = false;
 
 // the reason for this load()
function is to extract the webservice result into this object because
 // we can't assign the webservice
result directly to any instance of this class (it will over-write it)
 
 public function load(u:Object)
 {
 //for concurency later
 this.oldVO = u;

 //load the
object
you could use mx.utils.ObjectUtil.copyProperties here
  this.teamId   = u.teamId;
  this.dashBoard  = u.dashBoard;
  this.ibmRfpName  = u.ibmRfpName;
  this.gmRfpName  = u.gmRfpName;
  this.gmRfpName  = u.gmRfpName;
 // the line below isn't really what i want to do here with this data
  //this.UserDetailTree = u.UserDetailTree;
 //this is what we should do
 for(var i = 0; i  u.UserDetailTree.length)
 {
  var userDetail:UserDetail = new UserDetail();
 userDetail.load(u.UserDetailTree[i]);
 }
 //not very pretty i realise but it works
 hasData = true;
 }
 
 public function toString():String
 {
  return this.ibmRfpName +  -  + this.gmRfpName;
 }}




On 6/17/05, cgobble [EMAIL PROTECTED] wrote:
I thought I had resolved the problem by creating classes inActionScript where the collections are specifically designed asArrays.The problem seems to be how Flex determines if an object isan array or not when it reads the message from the web service.
Depending on how I set it up, the problem can appear to be on eitherthe Flex side, or the .Net side.It's interesting that I can set upa complex class structure that works in Flex with all of theappropriate methods, properties and arrays and it translates to the
web service just fine.But, when I try to fill my classes with theresult from the web service, it doesn't recognize the elements andinstantiate the appropriate class.I must be missing somethingfundamental.
Cliff--- In flexcoders@yahoogroups.com, Clint Modien [EMAIL PROTECTED] wrote: Is your problem on the flex side or on the .NET side?
 On 6/16/05, Matt Chotin [EMAIL PROTECTED] wrote:  Hmm, seems odd. Can you take a look at the object in a debuggerand see  if it's constructed the way you'd expect? Also turn on debugging
  (web-service-proxy) and check if we're even sending the phonenumber across  the wire. If not you may need to re-process the contact beforeexecuting  the send to make sure that things are what the web service
expects.  Matt   --   *From:* flexcoders@yahoogroups.com[mailto:
flexcoders@yahoogroups.com] *On  Behalf Of *cgobble  *Sent:* Wednesday, June 15, 2005 9:51 AM  *To:* 
flexcoders@yahoogroups.com  *Subject:* [flexcoders] Re: Collections between Flex and Webservices  I am using the mx.utils.ArrayUtil.toArray to bind to adatagrid.  This makes sure that Flex sees it when there is only 1 item in
the  array. However, going back to the service with the entire objectis  causing the problem. I've been experimenting with definingclasses  for these objects and I get the same problem when I use an array.
 --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED]  wrote:   Check out 
mx.utils.ArrayUtil.toArray(). You may need to callthat  to   make sure that when you pass a single item it still getstreated  as an   array.  
   Matt  From: 

RE: [flexcoders] Code not executing in Popup Window

2005-06-17 Thread Tracy Spratt










Rip out everything but the creationComplete
handler with the trace. See what happens.

Tracy











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Friday, June 17, 2005 2:47
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Code not
executing in Popup Window





It's not just RemoteObject -



TRACE doesn't even work - which means, the
code isn't even executing -



Is there any reason, why the code isn't
executing properly?



Thanks again,



Mike









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin
Sent: Friday, June 17, 2005 12:03
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Code not
executing in Popup Window

I dont see a problem but I know
that others have run into issues when the RemoteObject has been contained in a
popup. It seems to work better if its hung off the Application or
something thats a little more permanent instead.



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Thursday, June 16, 2005 4:37
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Code not
executing in Popup Window





Hello All,

I have known to be working code,
contained inside of a Custom Created
TitleWindow component. The code handles all
the RemoteObject
declarations, and populates a List Control, upon
the Result Event.

The Popup Window is launched from a Button
residing in my Main
Application.

After clicking the launch Button, the Window pops
up perfectly and all
the controls are there, but nothing happens.
In fact, the function that
retrieves the data, also sends a trace() message
to the debug window -
and nothing even happens when I do that.

It's almost as if the code contained in my custom
control, doesn't even
exist. Is my problem, the way in which I am
creating my Popup Window?
There must be something simple I am doing wrong...


Here is the code in my main application that
launches the window:


public function launchWindow()
{
 var pop =
mx.managers.PopUpManager.createPopUp(this, Categories,
false, null, true);
}




Here is the code, inside my custom component
called Categories.mxml:


?xml version=1.0
encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.macromedia.com/2003/mxml
title=Manage Categories
closeButton=true click=deletePopUp()
creationComplete=getCategoriesOnly();

mx:RemoteObject id=remoteService
source=services.InfoNexus
endpoint=http://www.mysite.com/flashgateway.aspx
showBusyCursor=true
 mx:method
name=getCategoriesOnly
result=getCategoriesOnly_Handler(event.result)
fault=getCategoriesOnly_Fault(event.fault)/
/mx:RemoteObject

 mx:Script

 ![CDATA[

 

  //===
CATEGORIES ===//

  function
getCategoriesOnly()

  {

 
 trace(getCategories just kicked
off);

 
 remoteService.getCategoriesOnly();

  }

  

  function
getCategoriesOnly_Handler(result)

  {

 
 trace(getCategories_Handler just kicked
off);

 
 categories_List.dataProvider = result;

  }

  

  function
getCategoriesOnly_Fault(result)

  {

 
 

  }

  

 ]]
 /mx:Script

 mx:VBox

 mx:Label text=Categories:/

 mx:List id=categories_List
width=250 height=200/
 /mx:VBox


mx:ControlBar

 mx:Button label=Get Categories
click=getCategoriesOnly()/

 mx:Button label=Delete/
 /mx:ControlBar

/mx:TitleWindow



Could you all shed some light, as to why this
isn't working?

Thanks in advance,

Mike














Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] Datagrid, custom cell renderer, horizontal alignment

2005-06-17 Thread Cliff Meyers
I am trying to set up a Datagrid that uses a custom cell renderer to
display an image based on the value of a property for the object bound
to each row of the grid.  I have the image working fine, however I
can't seem to affect the horizontal alignment of the cell.  If I use
textAlign on the mx:DataGridColumn itself that doesn't work.  If I
try to wrap the mx:Image in a mx:VBox or mx:Canvas I get this error
when the MXML tries to compile:

There is no property with the name 'source'.

It seems like nesting tags within the cell renderer won't work.  I've
inherited this code so I'm not sure if it's the best way of going
about it, but I've attached it below.  Thanks to anyone who might be
able to give me a push.


-Cliff


 
Yahoo! Groups Links

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

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


StatusImageCellRenderer.mxml
Description: Binary data


[flexcoders] Cell Rendering with click event

2005-06-17 Thread Joe
I have a data grid that is a component for another page. In one of 
the columns in the data grid I am providing a check box. The plan is 
for the user to click the check box and have the text in that row 
turn red. How to get that event to happen and is the fact that the 
data grid is component going to matter or not. I have provided te 
code below and suggestions would be great. Thank you.

 data grid -

?xml version=1.0 encoding=utf-8?
mxataGrid xmlns:mx=http://www.macromedia.com/2003/mxml; 
rowHeight=35 width=800 height=302 
alternatingRowColors=[#fafafa,#ff] useRollOver=false 
selectable=false 
mx:Model id=DXList source=dxlist.xml/
mxataProvider{DXList.dxinfo}/mxataProvider
mx:columns
mx:Array
mxataGridColumn headerText=Dx Code columnName=dxcode 
textAlign=center width=75 sortable=true /
mxataGridColumn headerText=Dx columnName=dxdesc 
textAlign=center width=455 sortable=true/
mxataGridColumn headerText=Dx Source columnName=dxsource 
textAlign=center width=85 sortable=true/
mxataGridColumn headerText=Delete columnName=deleterx 
cellRenderer=CheckCellRenderer textAlign=center width=55 
sortable=false /
mxataGridColumn headerText=Reason columnName=deletereason 
cellRenderer=reasonlist textAlign=center width=90 
sortable=false /
/mx:Array
/mx:columns
/mxataGrid

 rendering file -

//

//Copyright (C) 2003 Macromedia, Inc. All Rights Reserved.
//The following is Sample Code and is subject to all restrictions on
//such code as contained in the End User License Agreement 
accompanying
//this product.
//


import mx.core.UIComponent
import mx.controls.CheckBox

class CheckCellRenderer extends UIComponent
{

var check : MovieClip;
var listOwner : MovieClip; // the reference we receive to the list
var getCellIndex : Function; // the function we receive from the list
var getDataLabel : Function; // the function we receive from the list

function CheckCellRenderer()
{
}

function createChildren(Void) : Void
{
check = createClassObject(CheckBox, check, 1, {styleName:this, 
owner:this});
check.addEventListener(click, this);
size();
}

// note that setSize is implemented by UIComponent and calls size(), 
after setting
// __width and __height
function size(Void) : Void
{
check.setSize(20, layoutHeight); 
check._x = (layoutWidth-20)/2;
check._y = (layoutHeight-16)/2;
}

function setValue(str:String, itembject, sel:Boolean) : Void
{
check._visible = (item!=undefined);
check.selected = item[getDataLabel()];
}

function getPreferredHeight(Void) : Number
{
return 16;
}

function getPreferredWidth(Void) : Number
{
return 20;
}


function click()
{
listOwner.editField(getCellIndex().itemIndex, getDataLabel(), 
check.selected);
}

}






 
Yahoo! Groups Links

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

* 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] Modifying Panel and Text Input

2005-06-17 Thread Kent Henneuse
I have a couple of cases where I would like to modify the default components
to display differently, beyond what I can do in the CSS.  I would like to
avoid building all new components but I will if I have to.

The first is that I would like to create TextInputs that are required but do
not show the star next to the field.  Think of a form where everything is
required.  Having the star next to each component is distracting rather then
valuable.  

The second case is that I would like to be able to put in an icon next to
the title on a panel.  I see that there is an icon property for container
but it has no effect on the panel.(maybe I just don't have it set up
correctly.)  Control over the placement of the icon in relation to the title
would be nice, but not critical.

So what does the group have to say?

Thanks,

-Kent 

Black holes are where God divided by zero.
- Steven Wright
 



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Creating Custom Component

2005-06-17 Thread Steven Webster
Jitesh,

There's a solution that achieves this in the book Developing Rich Clients
with Macromedia Flex.  If you're lucky, it's one of the chapters that
appeared on www.macromedia.com/devnet/flex, if you're not lucky, you'll need
to grab a copy of the book.

Best,

Steven 

--
Steven Webster
Technical Director
iteration::two
 
This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.
 
Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jitesh
Sent: 17 June 2005 18:14
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Creating Custom Component

Hi Guyz...

Can anyone help me out?

I have two buttons in my panel...add and remove.On clicking the add the
combobox(editable) components are added at runtime to the panel and on
cliking the remove button the components are removed.I have achieved this
functionality..

I would like to store the history of the values that the user has typed
within the combobox..How can we do this?

As I have just started working on flex, I am not too much familiar with the
syntax..

Can anyone suggest me a solution?

Jitesh




 
Yahoo! Groups Links



 



 
Yahoo! Groups Links

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

* 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] custome controls-How?

2005-06-17 Thread Stephen Gilson
There are several documents on the Flex Documentation page that describe
this process:

http://www.macromedia.com/support/documentation/en/flex/1_5/createcompon
ents/index.html

http://www.macromedia.com/devnet/flex/articles/creating_comp.html 

Stephen



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Doodi, Hari - BLS CTR
Sent: Friday, June 17, 2005 12:31 PM
To: 'flexcoders@yahoogroups.com'
Subject: [flexcoders] custome controls-How?

Hi All,
I have a situation with TabNavigator - where in before user
navigate to next tab I have to do some validations on data they entered
and if no errors then only I let the user go to next tab. In order to
achieve this I need to trap some event before change event can occure.
From my previous posting I think the only way I can achieve this
functionality is extend the TabNavigator and override corresponding
methos(?).
Can any one guide me to locations where I can find enough info
How to extend mx controls and use them in my mxml files? Thanks in
advance for your help. I really appreciate if any one can post already
working code for both extending and using in mxml file .

Thanks!
Hari



 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

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

* 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] REPEATER : Index

2005-06-17 Thread Gordon Smith










Here's the way to do it using instanceIndex.
The ideas are:



1. Each repeated instance of a component has
an instanceIndex property: 0, 1, 2, etc. So when one of the buttons is clicked,
you can find out that its index is, say, 1.



2. The id assigned to a repeated component
becomes the name of an array which you can index into to get the nth instance
of it. So you can find the TextInput that corresponds to the Button you clicked
using textInput[1]. Bingo!



Unlike Tracy's example, this technique goes from a repeated
component directly to a related sibling component; it doesn't involve going up
into the parent and then down with getChildAt(2) to get from the a Button to
its associated TextInput. Using getChildAt() would be more fragile because you
might change the contents of the HBox so that the child index (not to be
confused with the instance index) you have to pass to getChildAt() would be different.



Unlike Tracy, I didn't change the dataProvider as
I'm not sure that's what you want to do. Also, if I did this I would have to go
into the difference between using instanceIndex and repeaterIndex, which is
another topic.



- Gordon



?xml version=1.0
encoding=utf-8?

mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml



 mx:Script![CDATA[



 function
button_click(event:Object):Void

 {

 var
index:Number = event.target.instanceIndex;

 textInput[index].text
= ;

 }



 function
checkBox_click(event:Object):Void

 {

 var
index:Number = event.target.instanceIndex;

 list[index].visible
= checkBox[index].selected;

 checkBox[index].label
= checkBox[index].selected ? Hide : Show;

 }

 

 ]]/mx:Script



 mx:VBox
id=vbox1 

 mx:Repeater
id=repeater1 dataProvider={[ 1, 2, 3 ]}

 mx:HBox

 mx:TextInput
id=textInput text={repeater1.currentItem} width=50/

 mx:Button
id=button label=Clear
click=button_click(event)/

 mx:List
id=list/

 mx:CheckBox
id=checkBox label=Hide selected=true
click=checkBox_click(event)/

 /mx:HBox

 /mx:Repeater

 /mx:VBox



/mx:Application











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt
Sent: Friday, June 17, 2005 10:53
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] REPEATER
: Index





You cant use currentIndex or
currentItem in an event handler because they only exist while the repeater is
rendering.



The sample app below uses getChildAt and
getRepeater item to modify a controls visibility and the underlying
dataProvider. There may be a better way, but this works.



Tracy



?xml version=1.0
encoding=utf-8?

mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml
horizontalAlign=left

mx:Script![CDATA[


//sets the visibility of a child control based on the checkbox selected value


private function setControlVisible(oEvent:Object):Void


{


var tiTextControl = oEvent.target.parent.getChildAt(2); //get a reference to
the control


tiTextControl.visible = oEvent.target.selected; //set the visibility


oEvent.target.parent.getChildAt(0).label = (oEvent.target.selected == true) ?
Hide : Show ; //modify the checkbox label


}





//updates the dataProvider item for the appropriate repeater item


private function clearText(oEvent:Object):Void


{


var oItem:Object =
oEvent.target.getRepeaterItem();
//get the dataProvider item


oItem.data = "" //set the dataProvider value


} 

]]/mx:Script


mx:VBox id=vbox1 


mx:Repeater id=repeater1 count=3
dataProvider={[{data:'1'},{data:'2'},{data:'3'}]}


mx:HBox


mx:CheckBox label=Hide
click=setControlVisible(event) selected=true/


mx:Button label=Clear click=clearText(event) /


mx:TextInput id=tiText
text={repeater1.currentItem.data} width=50/


/mx:HBox


/mx:Repeater


/mx:VBox

/mx:Application











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of david_gal-reyniez
Sent: Friday, June 17, 2005 11:55
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] REPEATER :
Index







Hi everybody,











I need your help tomanage myincapacity of
usingcorrectly the repeater.





In my repeater I define an TextInput , a List ,
aButton and a CheckBox.





I would like to clear the text property of my TextInput by
clicking the corresponding Button and to make visible my List by selecting the
corresponding CheckBox.











Do I have to use the currentIndex property of my repeater?
If yes how? Something else?











Thank you for yours suggestions!





Have fun during the week-end!











David



**


Coface facilite les echanges entre
les entreprises partout dans le monde. Pour cela, elle offre a toutes les
entreprises des solutions pour gerer, financer et proteger leur poste client,
en leur permettant d'externaliser tout ou partie de la gestion et des risques
lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et
Aa3 par Moody's. 

Pour en savoir plus,
http://www.coface.fr 

Coface facilitates
business-to-business 

[flexcoders] AS Array vs. MXML Array

2005-06-17 Thread JesterXL
How do you get fine grained control in MXML arrays?  Like, how do I 
represent this in MXML?

var type_array:Array = [];
  type_array.push({label: d4, data: 4});
  type_array.push({label: d6, data: 6});
  type_array.push({label: d8, data: 8});
  type_array.push({label: d10, data: 10});
  type_array.push({label: d100, data: 100});
  type_array.push({label: d12, data: 12});
  type_array.push({label: d20, data: 20});

I tried:

mx:Array
  mx:Object
mx:Stringd4/mx:String
mx:Number4/mx:Number
  /mx:Object
/mx:Array

And nested that in a dataProvider nested in a ComboBox.  That fails for my 
cellRenderer, however, because he expects a label and data property name. 
Since you can't get nested tags attributes, must I use code for such models?

--JesterXL 




 
Yahoo! Groups Links

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

* 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] AS Array vs. MXML Array

2005-06-17 Thread Matt Chotin










mx:Array

 mx:Object

 labeld4/label

 data4/data

 /mx:Object

/mx:Array



Alternatively:



mx:Array

 mx:Object label=d4
data="" /

/mx:Array



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Friday, June 17, 2005 12:44
PM
To: Flexcoders
Subject: [flexcoders] AS Array vs.
MXML Array





How do you get fine grained control in MXML arrays? Like, how do
I 
represent this in MXML?

var type_array:Array = [];
 type_array.push({label: d4,
data: 4});
 type_array.push({label: d6,
data: 6});
 type_array.push({label: d8,
data: 8});
 type_array.push({label: d10,
data: 10});
 type_array.push({label: d100,
data: 100});
 type_array.push({label: d12,
data: 12});
 type_array.push({label: d20,
data: 20});

I tried:

mx:Array
 mx:Object

mx:Stringd4/mx:String

mx:Number4/mx:Number
 /mx:Object
/mx:Array

And nested that in a dataProvider nested in a
ComboBox. That fails for my 
cellRenderer, however, because he expects a label
and data property name. 
Since you can't get nested tags attributes, must I
use code for such models?

--JesterXL 














Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Datagrid, custom cell renderer, horizontal alignment

2005-06-17 Thread Abdul Qabiz
Hi,

You can nest tags in custom components. That should not be problem. Look
at the following code, its modified version of your code. 

##StatusImageCellRenderer.mxml##
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml; marginBottom=0
marginLeft=0 marginRight=0 marginTop=0 horizontalAlign=center
mx:Script
![CDATA[

[Embed(source=images/status_icon_red.png)]
var redSymbol:String;
[Embed(source=images/status_icon_yellow.png)]
var yellowSymbol:String;
[Embed(source=images/status_icon_green.png)]
var greenSymbol:String;

function setValue( str:String, item:Object,
sel:Boolean ) : Void
{
var newImage;
if ( item.status == undefined )
newImage = undefined;
if ( item.status == 0 )
newImage = redSymbol;
else if ( item.status == 1 )
newImage = yellowSymbol;
else if ( item.status == 2 )
newImage = greenSymbol;

image.source = newImage;
}

function getPreferredWidth(Void) : Number
{
return 24;
}
]]
/mx:Script
mx:Image id=image /
/mx:VBox


I have not tested it and it seems, it might require some changes in
preferredWidth/preferredHeight to show the icon properly.

-abdul

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Cliff Meyers
Sent: Friday, June 17, 2005 11:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid, custom cell renderer, horizontal
alignment

I am trying to set up a Datagrid that uses a custom cell renderer to
display an image based on the value of a property for the object bound
to each row of the grid.  I have the image working fine, however I
can't seem to affect the horizontal alignment of the cell.  If I use
textAlign on the mx:DataGridColumn itself that doesn't work.  If I
try to wrap the mx:Image in a mx:VBox or mx:Canvas I get this error
when the MXML tries to compile:

There is no property with the name 'source'.

It seems like nesting tags within the cell renderer won't work.  I've
inherited this code so I'm not sure if it's the best way of going
about it, but I've attached it below.  Thanks to anyone who might be
able to give me a push.


-Cliff


 
Yahoo! Groups Links



 


 
Yahoo! Groups Links

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

* 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] Flex and JSP forwarding

2005-06-17 Thread Jordan Snyder
Yes, the idea is that the HTTPService returns HTTP data to Flex
without reloading of the current page.  You need to write a handler
for the return of the HTTPService, and you should get a String
containing the output of your S.O.println().  But that redirect does
nothing for Flex.  You can redirect based on the result you get from
the login page, but that redirection must be done in the JSP that
contains your original login MXML.

On 6/17/05, Abdul Qabiz [EMAIL PROTECTED] wrote:
 Hi,
 
 2) It looks like HTTPService is waiting for the response to come to it
 directly, so doing a forward is useless because the browser does not
 process the returned data.  Does this mean if I want to do something
 like this, then I should pass the forwarding address as the result and
 have mxml application issue a getUrl(url, _top).  
 
 Yes. But you can think of something where you don't have forward. I
 mean, RIA have different UI patterns, where you load different Views in
 same place.
 So instead of forward, you can load a welcome View in same place, a view
 could be custom component, a .swf etc.
 
 But I am sure, you can come up something better that forwards. RIA gurus
 around would suggest you many available ways. Look at the available RIA
 frameworks like Cairngorm, ARP etc.
 
 
 -abdul
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of pat_ryan_99
 Sent: Friday, June 17, 2005 11:12 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex and JSP forwarding
 
 Hello Everyone,
 
 I hate being the newbie to Flex, but I guess at some stage we are all
 newbies.  I am hoping someone here can help correct my thought process
 on how to use Flex.  BTW:  I have developed many a J2EE application
 with  Struts, JSP, Velocity, etc.
 
 What I am trying to do is introduce Flex slowly into our Struts/JSP
 application.
 
 I wrote a login page to post to a JSP to validate the login, and in
 the JSP I wanted to foward to an html/jsp/mxml page to test the flow.
 
 Here are my very simple files:
 
 MXML:
 ?xml version=1.0 encoding=utf-8?
 
 mx:Application
 xmlns:mx=http://www.macromedia.com/2003/mxml;
 verticalGap=20
 
 mx:HTTPService id=loginSrv url=login.jsp
 mx:request
 loginName{loginName.text}/loginName
 password{password.text}/password
 /mx:request
 /mx:HTTPService
 
 mx:HBox
 
 mx:Label text=Welcome/
 mx:Label text=Please login:/
 
 mx:Form
  mx:FormItem label=Login required=true
 mx:TextInput id=loginName width=200/
  /mx:FormItem
 
  mx:FormItem label=Password required=true
 mx:TextInput id=password width=200/
  /mx:FormItem
 
  mx:Button label=Login click=loginSrv.send();/
 
/mx:Form
 /mx:HBox
 
 
 /mx:Application
 
 My test jsp looks like:
 %
 String loginName=request.getParameter(loginName);
 String password=request.getParameter(password);
 System.out.println(LoginName:  + loginName);
 System.out.println(Password:  + password);
 
 
 %
 
 jsp:forward page=/loginservice/welcome.html /
 
 
 However when I run this, the login page just sits there.  
 
 some of my questions are:
 1) Am I thinking about a Flex application incorrectly in that I viewed
 the mxml pages in a similar way as JSP pages?  Each mxml page would
 render, potentially interact with the server and get data, BUT
 sometimes the server would forward to another page to get rendered. 
 Can / should I be able to do this?
 
 2) It looks like HTTPService is waiting for the response to come to it
 directly, so doing a forward is useless because the browser does not
 process the returned data.  Does this mean if I want to do something
 like this, then I should pass the forwarding address as the result and
 have mxml application issue a getUrl(url, _top). 
 
 3) If I can do what I am thinking of with the forwards, how do I do
 that.
 
 Thanks in advance for any help and guidance.  I did just buy the
 Developing Rich Clients with Macromedia Flex and it arrived today!
 
 Pat
 
 
 
 
 
 Yahoo! Groups Links
 
 
 
 
 
 
 
 
 Yahoo! Groups Links
 
 To visit your group on the web, go to:
 http://groups.yahoo.com/group/flexcoders/
   
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
   
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


-- 
Jordan Snyder
Applications Developer
ImageAction, USA
http://www.imageaction.com


 
Yahoo! Groups Links

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

* 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] Emitting Events in MXML Components

2005-06-17 Thread JesterXL
It seems I can use the meta-tags used for ActionScript components in MXML?\

[Event(clear)]

I've put that everywhere, and Flex always refuses to compile it.  Must my 
MXML component be fully AS?

--JesterXL 




 
Yahoo! Groups Links

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

* 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] Emitting Events in MXML Components

2005-06-17 Thread Abdul Qabiz
Hi Jesse,

No you can do it in MXML components also using Metadata tag. For
example:



##MyComponent.mxml##

mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Metadata

[Event(clear)]

/mx:Metadata

!-- Rest of code //--
/mx:VBox 


-abdul

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Saturday, June 18, 2005 1:25 AM
To: Flexcoders
Subject: [flexcoders] Emitting Events in MXML Components

It seems I can use the meta-tags used for ActionScript components in
MXML?\

[Event(clear)]

I've put that everywhere, and Flex always refuses to compile it.  Must
my 
MXML component be fully AS?

--JesterXL 




 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

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

* 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] Emitting Events in MXML Components

2005-06-17 Thread JesterXL
Dar dar... thanks, btw!

- Original Message - 
From: Abdul Qabiz [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 17, 2005 4:11 PM
Subject: RE: [flexcoders] Emitting Events in MXML Components


Hi Jesse,

No you can do it in MXML components also using Metadata tag. For
example:



##MyComponent.mxml##

mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Metadata

[Event(clear)]

/mx:Metadata

!-- Rest of code //--
/mx:VBox 


-abdul

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Saturday, June 18, 2005 1:25 AM
To: Flexcoders
Subject: [flexcoders] Emitting Events in MXML Components

It seems I can use the meta-tags used for ActionScript components in
MXML?\

[Event(clear)]

I've put that everywhere, and Flex always refuses to compile it.  Must
my 
MXML component be fully AS?

--JesterXL 




 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

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

* 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] Emitting Events in MXML Components

2005-06-17 Thread JesterXL
Awe man... just tested and it works like a charm; this binding stuff is too 
easy.  I guess I owe Roger a beer now...!


- Original Message - 
From: Abdul Qabiz [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 17, 2005 4:11 PM
Subject: RE: [flexcoders] Emitting Events in MXML Components


Hi Jesse,

No you can do it in MXML components also using Metadata tag. For
example:



##MyComponent.mxml##

mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Metadata

[Event(clear)]

/mx:Metadata

!-- Rest of code //--
/mx:VBox


-abdul

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Saturday, June 18, 2005 1:25 AM
To: Flexcoders
Subject: [flexcoders] Emitting Events in MXML Components

It seems I can use the meta-tags used for ActionScript components in
MXML?\

[Event(clear)]

I've put that everywhere, and Flex always refuses to compile it.  Must
my
MXML component be fully AS?

--JesterXL





Yahoo! Groups Links









Yahoo! Groups Links









 
Yahoo! Groups Links

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

* 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] sorting formatted fields in a datagrid

2005-06-17 Thread Abdul Qabiz





Hi,

Mike Chembers recently wrote some code to do that. Check 
out following link, 

http://weblogs.macromedia.com/mesh/archives/2005/04/sorting_date_fi.cfm

hope that helps...

-abdul


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Drew 
FalkmanSent: Friday, June 17, 2005 10:37 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] sorting formatted 
fields in a datagrid


Hey-

I have a DataGrid 
component that contains a date that I am formatting using a DateFormatter. 
However, if a user clicks on the column header, it sorts incorrectly. I suspect 
it is sorting on the raw data and not the formatted data (the formatted data is 
mm/dd/ so alphabetical should put it in correct 
order).

Any tips on what I 
could do as a workaround?

Thanks,

Drew Falkman 








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Thijs Triemstra | Collab


Hehe..And would this work?var theLabel:String = "d4";var theData:Number = 4;var theBoolean:Boolean = true;mx:Array mx:Object label={String(theLabel)} data="" flag="{Boolean(theBoolean)}" //mx:ArrayAnd if it doesn't work, does that mean that Flex always recognize 'true' as a Boolean and not as a String?I can't think of a case where it would matter that your 'best-guess' is wrong but just interested..ThijsOp 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:We make a best-guess as to whether it should be a string or a number or a boolean. Sometimes people get frustrated because we guess number and they wanted string JFrom: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Thijs Triemstra | CollabSent: Friday, June 17, 2005 1:06 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML ArrayWhat about the :Number and :String difference in his Array, aren't the label and data properties both Strings now..?ThijsOp 17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:mx:Array mx:Object labeld4/label data4/data /mx:Object/mx:ArrayAlternatively:mx:Array mx:Object label=d4 data="" boolean="{Boolean(true)}" //mx:ArrayMattFrom: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXLSent: Friday, June 17, 2005 12:44 PMTo: FlexcodersSubject: [flexcoders] AS Array vs. MXML ArrayHow do you get fine grained control in MXML arrays? Like, how do I [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.Yahoo! Groups LinksTo visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/To unsubscribe from this group, send an email to:[EMAIL PROTECTED]Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.









RE: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Mercer, Dustin










You may want to try this instead. I didnt
test this, but I think I have used it before.



mx:Array

 mx:Object

 mx:Stringd4/mx:String

 mx:Numberd4/mx:Number

 mx:Booleand4/mx:Boolean

 /mx:Object

/mx:Array











From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Thijs Triemstra | Collab
Sent: Friday, June 17, 2005 1:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS Array
vs. MXML Array





Hehe..









And would this work?











var theLabel:String = d4;





var theData:Number = 4;





var theBoolean:Boolean = true;









mx:Array




mx:Object label={String(theLabel)} data=""
flag={Boolean(theBoolean)} /



/mx:Array



And if it doesn't work, does that mean that Flex always recognize
'true' as a Boolean and not as a String?











I can't think of a case where it would matter that your 'best-guess' is
wrong but just interested..

















Thijs























Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:









We make a
best-guess as to whether it should be a string or a number or a
boolean. Sometimes people get frustrated because we guess number and they
wanted string J











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Thijs Triemstra |
Collab
Sent:
Friday, June 17, 2005 1:06 PM
To: flexcoders@yahoogroups.com
Subject:
Re: [flexcoders] AS Array vs. MXML Array





What about
the :Number and :String difference in his Array, aren't the label and data
properties both Strings now..?









Thijs

















Op
17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:












mx:Array


mx:Object


labeld4/label


data4/data


/mx:Object

/mx:Array



Alternatively:



mx:Array


mx:Object label=d4 data="" boolean={Boolean(true)}
/

/mx:Array



Matt











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of JesterXL
Sent:
Friday, June 17, 2005 12:44 PM
To:
Flexcoders
Subject:
[flexcoders] AS Array vs. MXML Array





[EMAIL PROTECTED] Your use
of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[EMAIL PROTECTED]


 Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
























Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Emitting Events in MXML Components

2005-06-17 Thread Matt Chotin










Wait a sec, for data binding all beers go
to me I think! Roger gets beer for shared libraries and the compiler actually
finding your classes.



J



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Friday, June 17, 2005 1:18
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Emitting
Events in MXML Components





Awe man... just tested and it works like a charm; this binding stuff is
too 
easy.
I guess I owe Roger a beer now...!















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












Re: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Thijs Triemstra | Collab


That is what JesterXL tried, and it didn't work:mx:Array  mx:Object  mx:Stringd4/mx:String  mx:Number4/mx:Number  /mx:Object /mx:ArrayOp 17-jun-2005, om 22:32 heeft Mercer, Dustin het volgende geschreven:You may want to try this instead. I didnt test this, but I think I have used it before.mx:Array mx:Object mx:Stringd4/mx:String mx:Numberd4/mx:Number mx:Booleand4/mx:Boolean /mx:Object/mx:ArrayFrom: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Thijs Triemstra | CollabSent: Friday, June 17, 2005 1:26 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML ArrayHehe..And would this work?var theLabel:String = "d4";var theData:Number = 4;var theBoolean:Boolean = true;mx:Array mx:Object label={String(theLabel)} data="" flag="{Boolean(theBoolean)}" //mx:ArrayAnd if it doesn't work, does that mean that Flex always recognize 'true' as a Boolean and not as a String?I can't think of a case where it would matter that your 'best-guess' is wrong but just interested..ThijsOp 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:We make a best-guess as to whether it should be a string or a number or a boolean. Sometimes people get frustrated because we guess number and they wanted string JFrom: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Thijs Triemstra | CollabSent: Friday, June 17, 2005 1:06 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML ArrayWhat about the :Number and :String difference in his Array, aren't the label and data properties both Strings now..?ThijsOp 17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:mx:Array mx:Object labeld4/label data4/data /mx:Object/mx:ArrayAlternatively:mx:Array mx:Object label=d4 data="" boolean="{Boolean(true)}" //mx:ArrayMattFrom: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXLSent: Friday, June 17, 2005 12:44 PMTo: FlexcodersSubject: [flexcoders] AS Array vs. MXML Array[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.Yahoo! Groups LinksTo visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/To unsubscribe from this group, send an email to:[EMAIL PROTECTED]Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.









RE: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Abdul Qabiz





I guess, that intelligent guess also does the data type 
check. For example, if compiler finds flag is Boolean type it would look for 
possible values, i.e. true or false. If compiler 
doesn't find it, it would throw compile time error

If flag is string type, it would take any assigned value as 
string without any further checks

my intelligent guess ;)


-abdul




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Thijs Triemstra | 
CollabSent: Saturday, June 18, 2005 1:56 AMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML 
Array
Hehe..

And would this work?

var theLabel:String = "d4";
var theData:Number = 4;
var theBoolean:Boolean = true;
mx:Array
 mx:Object 
label={String(theLabel)} data="" flag="{Boolean(theBoolean)}" 
/
/mx:Array

And if it doesn't work, does that mean that Flex always recognize 'true' as 
a Boolean and not as a String?

I can't think of a case where it would matter that your 'best-guess' is 
wrong but just interested..


Thijs




Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende 
geschreven:

  
  We make a 
  best-guess as to whether it should be a string or a number or a 
  boolean. Sometimes people get frustrated because we guess number and 
  they wanted string J
  
  
  
  
  
  From: 
  flexcoders@yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of 
  Thijs Triemstra | 
  CollabSent: Friday, 
  June 17, 2005 1:06 PMTo: 
  flexcoders@yahoogroups.comSubject: Re: 
  [flexcoders] AS Array vs. MXML Array
  
  What about the :Number 
  and :String difference in his Array, aren't the label and data properties both 
  Strings now..?
  
  
  
  Thijs
  
  
  
  
  
  
  Op 17-jun-2005, om 21:51 
  heeft Matt Chotin het volgende geschreven:
  
  
  mx:Array
   
  mx:Object
   
  labeld4/label
   
  data4/data
   
  /mx:Object
  /mx:Array
  
  Alternatively:
  
  mx:Array
   
  mx:Object label=d4 data="" boolean="{Boolean(true)}" 
  /
  /mx:Array
  
  Matt
  
  
  
  
  
  From: flexcoders@yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of 
  JesterXLSent: Friday, 
  June 17, 2005 12:44 PMTo: 
  FlexcodersSubject: 
  [flexcoders] AS Array vs. MXML Array
  
  How do you get fine grained 
  control in MXML arrays? Like, how do I [EMAIL PROTECTED]
   Your use of Yahoo! Groups is 
  subject to the Yahoo! 
  Terms of Service.
  
  
  
  
  
  Yahoo! 
  Groups Links
  
To 
visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To 
unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups 
is subject to the Yahoo! 
Terms of Service.
  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread JesterXL





You can do that, but those are unamed properties, 
hence my question about how to name them. For instance, what if you need 
to get the to boolean; how do you access it? A for in loop utilizing 
instanceof to determine if it's a Boolean? What if I had more than 
one?

- Original Message - 
From: Mercer, Dustin 
To: flexcoders@yahoogroups.com 
Sent: Friday, June 17, 2005 4:32 PM
Subject: RE: [flexcoders] AS Array vs. MXML Array


You may want to try 
this instead. I didn?t test this, but I think I have used it 
before.

mx:Array
 
mx:Object
 
mx:Stringd4/mx:String
 
mx:Numberd4/mx:Number
 
mx:Booleand4/mx:Boolean
 
/mx:Object
/mx:Array





From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Thijs Triemstra | CollabSent: Friday, June 17, 2005 1:26 
PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML 
Array

Hehe..



And would this work?



var theLabel:String = "d4";

var theData:Number = 4;

var theBoolean:Boolean = true;


mx:Array
 
mx:Object label=?{String(theLabel)}? data="" 
flag="{Boolean(theBoolean)}" 
/
/mx:Array

And if it doesn't work, does that mean that Flex always 
recognize 'true' as a Boolean and not as a String?



I can't think of a case where it would matter that your 
'best-guess' is wrong but just interested..





Thijs








Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende 
geschreven:


We 
make a ?best-guess? as to whether it should be a string or a number or a 
boolean. Sometimes people get frustrated because we guess number and they 
wanted string J





From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Thijs Triemstra | 
CollabSent: 
Friday, June 17, 2005 1:06 PMTo: flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] AS Array vs. MXML Array

What about the 
:Number and :String difference in his Array, aren't the label and data 
properties both Strings now..?



Thijs






Op 17-jun-2005, 
om 21:51 heeft Matt Chotin het volgende geschreven:


mx:Array
 
mx:Object
 
labeld4/label
 
data4/data
 
/mx:Object
/mx:Array

Alternatively:

mx:Array
 
mx:Object label=?d4? data="" boolean="{Boolean(true)}" /
/mx:Array

Matt





From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of 
JesterXLSent: 
Friday, June 17, 2005 12:44 PMTo: FlexcodersSubject: 
[flexcoders] AS Array vs. MXML Array

[EMAIL PROTECTED] Your 
use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.

[EMAIL PROTECTED]
 
Your use of 
Yahoo! Groups is subject to the Yahoo! Terms of 
Service.











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Mercer, Dustin










Oops, that wont work at all L I am not sure if this
will work either, but it doesnt throw any compiler errors (but neither
did the wrong one) . There are other ways also depending on what you
are trying to do. Are you trying to avoid AS altogether or just trying the
different options?



mx:Array

 mx:Object


labelmx:Stringd4/mx:String/label


datamx:Number4/mx:Number/data


boolmx:Booleantrue/mx:Boolean/bool

 /mx:Object

/mx:Array











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mercer, Dustin
Sent: Friday, June 17, 2005 1:33
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS Array
vs. MXML Array





You may want to try this instead. I
didnt test this, but I think I have used it before.



mx:Array

 mx:Object


mx:Stringd4/mx:String


mx:Numberd4/mx:Number


mx:Booleand4/mx:Boolean

 /mx:Object

/mx:Array











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Thijs Triemstra | Collab
Sent: Friday, June 17, 2005 1:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS Array
vs. MXML Array





Hehe..









And would this work?











var theLabel:String = d4;





var theData:Number = 4;





var theBoolean:Boolean = true;









mx:Array




mx:Object label={String(theLabel)}
data="" flag={Boolean(theBoolean)}
/



/mx:Array



And if it doesn't work, does that mean that Flex always recognize
'true' as a Boolean and not as a String?











I can't think of a case where it would matter that your 'best-guess' is
wrong but just interested..

















Thijs























Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:







We make a
best-guess as to whether it should be a string or a number or a
boolean. Sometimes people get frustrated because we guess number and they
wanted string J













From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Thijs Triemstra |
Collab
Sent:
Friday, June 17, 2005 1:06 PM
To: flexcoders@yahoogroups.com
Subject:
Re: [flexcoders] AS Array vs. MXML Array





What about
the :Number and :String difference in his Array, aren't the label and data
properties both Strings now..?









Thijs

















Op
17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:









mx:Array




mx:Object




labeld4/label




data4/data




/mx:Object



/mx:Array







Alternatively:







mx:Array




mx:Object label=d4 data=""
boolean={Boolean(true)} /



/mx:Array







Matt















From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of JesterXL
Sent:
Friday, June 17, 2005 12:44 PM
To:
Flexcoders
Subject:
[flexcoders] AS Array vs. MXML Array









[EMAIL PROTECTED] Your use
of Yahoo! Groups is subject to the Yahoo! Terms of Service.







[EMAIL PROTECTED]


 Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.






















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Mercer, Dustin










Another way is to create an AS class to
encapsulate the repeating object Like so:



Class YourItem

{

 public var label : String;

 public var data : Number;

 public var bool : Boolean;



 public function YourItem()

 {

 //blank constructor

 }

}



Add xmlns=*



mx:Array

 YourItem

 label/label

 data/data

 bool/bool 

 /YourItem

/mx:Array











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Friday, June 17, 2005 1:36
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS Array
vs. MXML Array







You can do that, but those are unamed properties, hence my
question about how to name them. For instance, what if you need to get
the to boolean; how do you access it? A for in loop utilizing instanceof
to determine if it's a Boolean? What if I had more than one?











- Original Message - 



From: Mercer,
Dustin 





To: flexcoders@yahoogroups.com






Sent: Friday, June 17,
2005 4:32 PM





Subject: RE: [flexcoders]
AS Array vs. MXML Array











You may want to try this instead. I
didnt test this, but I think I have used it before.



mx:Array

 mx:Object


mx:Stringd4/mx:String


mx:Numberd4/mx:Number


mx:Booleand4/mx:Boolean

 /mx:Object

/mx:Array











From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Thijs Triemstra | Collab
Sent: Friday, June 17, 2005 1:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS Array
vs. MXML Array





Hehe..









And would this work?











var theLabel:String = d4;





var theData:Number = 4;





var theBoolean:Boolean = true;









mx:Array




mx:Object label={String(theLabel)}
data="" flag={Boolean(theBoolean)}
/



/mx:Array



And if it doesn't work, does that mean that Flex always recognize
'true' as a Boolean and not as a String?











I can't think of a case where it would matter that your 'best-guess' is
wrong but just interested..

















Thijs























Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:







We make a
best-guess as to whether it should be a string or a number or a
boolean. Sometimes people get frustrated because we guess number and they
wanted string J











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Thijs Triemstra |
Collab
Sent:
Friday, June 17, 2005 1:06 PM
To: flexcoders@yahoogroups.com
Subject:
Re: [flexcoders] AS Array vs. MXML Array



What about the :Number and :String difference in his Array,
aren't the label and data properties both Strings now..?



Thijs









Op
17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:









mx:Array




mx:Object




labeld4/label




data4/data




/mx:Object



/mx:Array



Alternatively:



mx:Array




mx:Object label=d4 data=""
boolean={Boolean(true)} /



/mx:Array



Matt








From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL Sent: Friday, June 17, 2005 12:44 PM To: Flexcoders Subject: [flexcoders] AS Array vs. MXML Array [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

RE: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Abdul Qabiz





[snip]

mx:Array
 
mx:Object
 
mx:Stringd4/mx:String
 
mx:Numberd4/mx:Number
 
mx:Booleand4/mx:Boolean
 
/mx:Object
/mx:Array

[/snip]

that works, a array with an object would be 
created with three properties with these names:

String, Boolean and Number with values d4, d4 and d4 
respectively.

If you add one more mx:String / node, you will 
see compiler error.

mx:Array
 
mx:Object
 
mx:Stringd4/mx:String
 
mx:Numberd4/mx:Number
 
mx:Booleand4/mx:Boolean
 mx:Stringd5/mx:String
 
/mx:Object
/mx:Array


But why would want to do this way, it doesn't look 
logically correct to me. 

-abdul




From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mercer, DustinSent: Saturday, June 18, 2005 2:10 AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] AS Array vs. MXML 
Array


Oops, that wont work 
at all L I am not sure if 
this will work either, but it doesnt throw any compiler errors (but neither did 
the wrong one) . There are other ways also depending on what you are 
trying to do. Are you trying to avoid AS altogether or just trying the 
different options?

mx:Array
 
mx:Object
 
labelmx:Stringd4/mx:String/label
 
datamx:Number4/mx:Number/data
 
boolmx:Booleantrue/mx:Boolean/bool
 
/mx:Object
/mx:Array





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mercer, DustinSent: Friday, June 17, 2005 1:33 
PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] AS Array vs. MXML 
Array

You may want to try 
this instead. I didnt test this, but I think I have used it 
before.

mx:Array
 
mx:Object
 
mx:Stringd4/mx:String
 
mx:Numberd4/mx:Number
 
mx:Booleand4/mx:Boolean
 
/mx:Object
/mx:Array





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Thijs Triemstra | 
CollabSent: Friday, June 17, 
2005 1:26 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML 
Array

Hehe..



And would this work?



var theLabel:String = "d4";

var theData:Number = 4;

var theBoolean:Boolean = true;


mx:Array
 
mx:Object label={String(theLabel)} data="" 
flag="{Boolean(theBoolean)}" 
/
/mx:Array

And if it doesn't work, does that mean that Flex always 
recognize 'true' as a Boolean and not as a String?



I can't think of a case where it would matter that your 
'best-guess' is wrong but just interested..





Thijs








Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende 
geschreven:


We 
make a best-guess as to whether it should be a string or a number or a 
boolean. Sometimes people get frustrated because we guess number and they 
wanted string J





From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Thijs Triemstra | 
CollabSent: 
Friday, June 17, 2005 1:06 PMTo: flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] AS Array vs. MXML Array

What about the 
:Number and :String difference in his Array, aren't the label and data 
properties both Strings now..?



Thijs






Op 17-jun-2005, 
om 21:51 heeft Matt Chotin het volgende geschreven:


mx:Array
 
mx:Object
 
labeld4/label
 
data4/data
 
/mx:Object
/mx:Array

Alternatively:

mx:Array
 
mx:Object label=d4 data="" boolean="{Boolean(true)}" /
/mx:Array

Matt





From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of 
JesterXLSent: 
Friday, June 17, 2005 12:44 PMTo: FlexcodersSubject: 
[flexcoders] AS Array vs. MXML Array

[EMAIL PROTECTED] Your 
use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.

[EMAIL PROTECTED]
 
Your use of 
Yahoo! Groups is subject to the Yahoo! Terms of 
Service.











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread JesterXL





Trying to avoid AS, hehe!

- Original Message - 
From: Mercer, Dustin 
To: flexcoders@yahoogroups.com 
Sent: Friday, June 17, 2005 4:39 PM
Subject: RE: [flexcoders] AS Array vs. MXML Array


Oops, that won?t work 
at all L I am not sure if 
this will work either, but it doesn?t throw any compiler errors (but neither did 
the wrong one?) . There are other ways also depending on what you are 
trying to do. Are you trying to avoid AS altogether or just trying the 
different options?

mx:Array
 
mx:Object
 
labelmx:Stringd4/mx:String/label
 
datamx:Number4/mx:Number/data
 
boolmx:Booleantrue/mx:Boolean/bool
 
/mx:Object
/mx:Array





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mercer, DustinSent: Friday, June 17, 2005 1:33 
PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] AS Array vs. MXML 
Array

You may want to try 
this instead. I didn?t test this, but I think I have used it 
before.

mx:Array
 
mx:Object
 
mx:Stringd4/mx:String
 
mx:Numberd4/mx:Number
 
mx:Booleand4/mx:Boolean
 
/mx:Object
/mx:Array





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Thijs Triemstra | 
CollabSent: Friday, June 17, 
2005 1:26 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS Array vs. MXML 
Array

Hehe..



And would this work?



var theLabel:String = "d4";

var theData:Number = 4;

var theBoolean:Boolean = true;


mx:Array
 
mx:Object label=?{String(theLabel)}? data="" 
flag="{Boolean(theBoolean)}" 
/
/mx:Array

And if it doesn't work, does that mean that Flex always 
recognize 'true' as a Boolean and not as a String?



I can't think of a case where it would matter that your 
'best-guess' is wrong but just interested..





Thijs








Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende 
geschreven:


We 
make a ?best-guess? as to whether it should be a string or a number or a 
boolean. Sometimes people get frustrated because we guess number and they 
wanted string J





From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Thijs Triemstra | 
CollabSent: 
Friday, June 17, 2005 1:06 PMTo: flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] AS Array vs. MXML Array

What about the 
:Number and :String difference in his Array, aren't the label and data 
properties both Strings now..?



Thijs






Op 17-jun-2005, 
om 21:51 heeft Matt Chotin het volgende geschreven:


mx:Array
 
mx:Object
 
labeld4/label
 
data4/data
 
/mx:Object
/mx:Array

Alternatively:

mx:Array
 
mx:Object label=?d4? data="" boolean="{Boolean(true)}" /
/mx:Array

Matt





From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of 
JesterXLSent: 
Friday, June 17, 2005 12:44 PMTo: FlexcodersSubject: 
[flexcoders] AS Array vs. MXML Array

[EMAIL PROTECTED] Your 
use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.

[EMAIL PROTECTED]
 
Your use of 
Yahoo! Groups is subject to the Yahoo! Terms of 
Service.











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] AS Array vs. MXML Array

2005-06-17 Thread Gordon Smith
There's been a long thread about the MXML representation of this.

But I want to point out that, in ActionScript, all those pushes are
inefficient. You should just write

var type_array:Array =
[
{ label: d4, data: 4 },
{ label: d6, data: 6 },
...
];

- Gordon

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Friday, June 17, 2005 12:44 PM
To: Flexcoders
Subject: [flexcoders] AS Array vs. MXML Array

How do you get fine grained control in MXML arrays?  Like, how do I 
represent this in MXML?

var type_array:Array = [];
  type_array.push({label: d4, data: 4});
  type_array.push({label: d6, data: 6});
  type_array.push({label: d8, data: 8});
  type_array.push({label: d10, data: 10});
  type_array.push({label: d100, data: 100});
  type_array.push({label: d12, data: 12});
  type_array.push({label: d20, data: 20});

I tried:

mx:Array
  mx:Object
mx:Stringd4/mx:String
mx:Number4/mx:Number
  /mx:Object
/mx:Array

And nested that in a dataProvider nested in a ComboBox.  That fails for
my 
cellRenderer, however, because he expects a label and data property
name. 
Since you can't get nested tags attributes, must I use code for such
models?

--JesterXL 




 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

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

* 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] AS Array vs. MXML Array

2005-06-17 Thread Mercer, Dustin










Because mx:String under an object
makes it a property. You cannot have to properties on an object with the same
name.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Thijs Triemstra | Collab
Sent: Friday, June 17, 2005 1:51
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS Array
vs. MXML Array





So why does adding the mx:String/ node give a compiler error?









Thijs

















Op 17-jun-2005, om 22:45 heeft Abdul Qabiz het volgende geschreven:







[snip]

mx:Array


mx:Object


mx:Stringd4/mx:String


mx:Numberd4/mx:Number


mx:Booleand4/mx:Boolean


/mx:Object

/mx:Array







[/snip]







that works, a array
with an object would be created with three properties with these names:







String, Boolean and Number
with values d4, d4 and d4 respectively.







If you add one more
mx:String / node, you will see compiler error.







mx:Array


mx:Object


mx:Stringd4/mx:String


mx:Numberd4/mx:Number


mx:Booleand4/mx:Boolean


mx:Stringd5/mx:String


/mx:Object

/mx:Array













But why would want to do this way, it doesn't look logically
correct to me.







-abdul













From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]
On Behalf Of Mercer, Dustin
Sent: Saturday, June 18, 2005 2:10 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS Array vs. MXML Array





Oops,
that wont work at all L I am not sure if this will work either, but it doesnt throw
any compiler errors (but neither did the wrong one) . There are other
ways also depending on what you are trying to do. Are you trying to avoid
AS altogether or just trying the different options?







mx:Array


mx:Object


labelmx:Stringd4/mx:String/label


datamx:Number4/mx:Number/data


boolmx:Booleantrue/mx:Boolean/bool


/mx:Object

/mx:Array















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]
On Behalf Of Mercer, Dustin
Sent:
Friday, June 17, 2005 1:33 PM
To: flexcoders@yahoogroups.com
Subject:
RE: [flexcoders] AS Array vs. MXML Array









You may
want to try this instead. I didnt test this, but I think I have used it
before.







mx:Array


mx:Object


mx:Stringd4/mx:String


mx:Numberd4/mx:Number


mx:Booleand4/mx:Boolean


/mx:Object

/mx:Array















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]
On Behalf Of Thijs Triemstra |
Collab
Sent:
Friday, June 17, 2005 1:26 PM
To: flexcoders@yahoogroups.com
Subject:
Re: [flexcoders] AS Array vs. MXML Array









Hehe..













And would
this work?















var
theLabel:String = d4;





var
theData:Number = 4;





var
theBoolean:Boolean = true;













mx:Array




mx:Object label={String(theLabel)} data=""
flag={Boolean(theBoolean)} /



/mx:Array



And if it
doesn't work, does that mean that Flex always recognize 'true' as a Boolean and
not as a String?















I can't think
of a case where it would matter that your 'best-guess' is wrong but just
interested..

























Thijs



































Op
17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:











We make a
best-guess as to whether it should be a string or a number or a
boolean. Sometimes people get frustrated because we guess number and they
wanted string J











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Thijs Triemstra |
Collab
Sent:
Friday, June 17, 2005 1:06 PM
To: flexcoders@yahoogroups.com
Subject:
Re: [flexcoders] AS Array vs. MXML Array



What about the :Number and :String difference in his Array,
aren't the label and data properties both Strings now..?



Thijs









Op
17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:







mx:Array




mx:Object




labeld4/label




data4/data




/mx:Object



/mx:Array



Alternatively:



mx:Array




mx:Object label=d4 data="" boolean={Boolean(true)}
/



/mx:Array



Matt











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of JesterXL
Sent:
Friday, June 17, 2005 12:44 PM
To:
Flexcoders
Subject:
[flexcoders] AS Array vs. MXML Array





[EMAIL PROTECTED] Your use of Yahoo! Groups
is subject to the Yahoo!
Terms of Service.








[EMAIL PROTECTED]


 Your use of
Yahoo! Groups is subject to the Yahoo!
Terms of Service.







































Yahoo! Groups Links


 To visit your group on the web, go to:
 http://groups.yahoo.com/group/flexcoders/
 
 To unsubscribe from this group, send an email
 to:
 [EMAIL PROTECTED]
 
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service.

























Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












[flexcoders] Call Popup via string var

2005-06-17 Thread Fernando Lobos



i try call pop via : var popup12 = mx.managers.PopUpManager.createPopUp(_root,frm_matriculas, modal, {deferred: true});all ok !But this way var popup12 = mx.managers.PopUpManager.createPopUp
(_root,frm_matriculas, modal, {deferred: true});function llama_popup (pop_1:object ){ var popup12 = mx.managers.PopUpManager.createPopUp(_root, pop_1,modal, {deferred: true});}
nuevopopup:objectnuevopopup = frm_matriculasllama_popup(nuevopopup)-nothing, can i do for call popup function with 
string ?








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] backingObject???

2005-06-17 Thread Tracy Spratt
You should never need to use backingObject.
You want to use: 
treeData=node.getData();
and for label: 
sLabel = node.getProperty(label);

Remember that data is an object and can contain as much data as you
want:
treenodeNew = treenodeParent.addTreeNode(myNewNodeLabel,
{myProp1:myVal1, myProp2:myVal2})

So:
Trace( treenodeNew.getData().myProp1 ); //traces myVal1

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pilotdvr
Sent: Thursday, June 16, 2005 7:31 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] backingObject???

Please forgive me if this is a simplistic problem, but here goes...

I have a Tree that is populated via a HTTPService call that returns 
XML containing a 'label' attribute and a 'data' attribute.

I need the 'data' attribute to act as an identifier for a subsiquent 
and different HTTPService (billList) call.

The absolute only way I have been able to get this to work is to use 
the following code snippet as the Tree's change event handler:

function treeItemSelected(node) {
var treeData:Object;
treeData=node.backingObject;
if (treeData.data!=null) {
selectedQueue=treeData.data;
billList.send();
}
}

The 'selectedQueue is an Application level variable that is used as a 
piece of the billList request tag.

Conceptionally this is what I expected to do, with the exception of 
having to use the 'backingObject' object property (especially since I 
can't find it mentioned anywhere).

I would have thought that the following snippet should have worked, 
but it didn't:

function treeItemSelected(node) {
if (node.data!=null) {
selectedQueue=node.data;
billList.send();
}
}

Can anyone help a befuddled guy out here?  Thanks




 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

* 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] Using XML Format Result From WebService

2005-06-17 Thread Tracy Spratt










When you use XML, you must use the XML
class methods to nav to a node, such as childNodes[0].childNodes[1], and to
specify the array for the dataProvider (childNodes).



You cannot dot down., like
node1.node2.node3.



Also, except in special circumstances, you
cannot use columnName, or labelField, and must use a labelFunction.



Tracy











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tony Rozario
Sent: Friday, June 17, 2005 1:38
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using XML
Format Result From WebService







Hi,





 If i change the result format from a web service as XML 
then do data binding of the result to a data grid, i dont get the expected
results.





 I get numerous column headers which i cant read, some of them
are getChildNode, NextChild, something like that.





The webservice result what i get when i see from the network
monitor is different from that of the result which i get when i test the web service
from anative server. i.e, when i check the network monitor,it gives only
the first 2 nodes  its not getting the other nodes.





Can anyoneexplain to me the reason behind these odd
behaviours,





tony



__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Link as a CellRender for a DataGrid

2005-06-17 Thread isidrolv










Thanks JesterXL, that works great,
is just what i need. Sometimes i need to open a new explorer window, another I need
to execute an AS action or MXML , other I need to open an html page inside IFrame
component hyperlinkClick event is the key great!! Thanks a
lot!





Isidro

















De:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de JesterXL
Enviado el: Viernes, 17 de Junio
de 2005 12:35 p.m.
Para: flexcoders@yahoogroups.com
Asunto: Re: [flexcoders] Link as a
CellRender for a DataGrid







Dude, my emails are slow as nuts to this list...











*ahem*











Try this for your click event:











listOwner.dispatchEvent({type: hyperlinkClick,
target: listOwner,cell: this, text: cellData});











That way, if anyone subscribes to the DataGrid's hyperlinkClick
event, they'll get that event, with all the needed data.

















- Original Message - 



From: isidrolv 





To: flexcoders@yahoogroups.com






Sent: Friday, June 17,
2005 1:16 PM





Subject: [flexcoders] Link
as a CellRender for a DataGrid











Hi, everybody!



I traed to build a CellRenderer using Link control, for use
in a DataGrid, but i dont know how to broadcast the click event of the
Link, and to be listened in the app using the DataGrid. In other words, I
need to catch the click event of the renderer, inside my app. What I must do?



This is a section of the code using
my renderer:

mx:DataGrid id=dgBalance
dataProvider={balanceGeneral} width=100%
height=100% sortableColumns=false
cellPress=doCellPress(event);


mx:columns


mx:Array


mx:DataGridColumn headerText=CONCEPT columnName=CONCEPT
width=350 resizable=true /


mx:DataGridColumn headerText=TOTAL
columnName=t1 textAlign=right
cellRenderer=MyRenderer /



..--..



The code of the CellRenderer:


?xml version=1.0 encoding=utf-8?

mx:Link
xmlns:mx=http://www.macromedia.com/2003/mxml
click=mx.controls.Alert.show('Drill Down Cell') 

mx:Script


![CDATA[











var listOwner : MovieClip; 


var getCellIndex : Function; 


var getDataLabel : Function;




function setValue( str:String, item:Object, sel:Boolean ) : Void


{ 


var value = item[getDataLabel()];


this.label = value;


var num:Number = parseFloat(value);


trace(num)


if (num0) {


this.setStyle(color,#FF);


this.setStyle(fontWeight,);


} else {


this.setStyle(color,);


this.setStyle(fontWeight,);


}


}





]]

/mx:Script

/mx:Link











Thanks for your help



Isidro.












Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Modifying Panel and Text Input

2005-06-17 Thread Kent Henneuse
Ok.  Now I feel a bit sheepish.  It states in the Action Script Docs for
FormItem that 'required' property just shows or hides the asterix(star)
in the UI.  Nothing more.  I got myself totally confused by looking at
the Flex Store example that sneaks in their own validator,
RequiredFieldValidator.  I assumed that this was part of either the
StringValidator, if you applied it to a field, or it was tied into the
'required' field.

Could somebody at Macromedia please make a simple addition of a required
field to the StringValidator or just make it so that if you apply it to
a field it becomes a required field.  This would be similar to how the
EmailValidator behaves.  (you input a character, remove the character,
the move to another field, the email field will be marked as required.)

Thanks,

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Henneuse
Sent: Saturday, June 18, 2005 12:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Modifying Panel and Text Input

I have a couple of cases where I would like to modify the default
components
to display differently, beyond what I can do in the CSS.  I would like
to
avoid building all new components but I will if I have to.

The first is that I would like to create TextInputs that are required
but do
not show the star next to the field.  Think of a form where everything
is
required.  Having the star next to each component is distracting rather
then
valuable.  

The second case is that I would like to be able to put in an icon next
to
the title on a panel.  I see that there is an icon property for
container
but it has no effect on the panel.(maybe I just don't have it set up
correctly.)  Control over the placement of the icon in relation to the
title
would be nice, but not critical.

So what does the group have to say?

Thanks,

-Kent 

Black holes are where God divided by zero.
- Steven Wright
 



 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

* 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] AS Array vs. MXML Array

2005-06-17 Thread Matt Chotin










When you do binding the type will be
maintained. So all of those will be of the type you specified.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Thijs Triemstra | Collab
Sent: Friday, June 17, 2005 1:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS Array
vs. MXML Array





Hehe..









And would this work?











var theLabel:String = d4;





var theData:Number = 4;





var theBoolean:Boolean = true;









mx:Array



 mx:Object
label={String(theLabel)} data=""
flag={Boolean(theBoolean)} /



/mx:Array



And if it doesn't work, does that mean that Flex always recognize
'true' as a Boolean and not as a String?











I can't think of a case where it would matter that your 'best-guess' is
wrong but just interested..

















Thijs























Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:









We make a
best-guess as to whether it should be a string or a number or a
boolean. Sometimes people get frustrated because we guess number and they
wanted string J











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Thijs Triemstra |
Collab
Sent:
Friday, June 17, 2005 1:06 PM
To: flexcoders@yahoogroups.com
Subject:
Re: [flexcoders] AS Array vs. MXML Array





What about the :Number and :String
difference in his Array, aren't the label and data properties both Strings
now..?









Thijs

















Op 17-jun-2005, om 21:51 heeft Matt Chotin
het volgende geschreven:












mx:Array

 mx:Object


labeld4/label


data4/data

 /mx:Object

/mx:Array



Alternatively:



mx:Array

 mx:Object
label=d4 data="" boolean={Boolean(true)} /

/mx:Array



Matt











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of JesterXL
Sent:
Friday, June 17, 2005 12:44 PM
To:
Flexcoders
Subject:
[flexcoders] AS Array vs. MXML Array





[EMAIL PROTECTED] Your use
of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[EMAIL PROTECTED]


 Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
























Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Modifying Panel and Text Input

2005-06-17 Thread Matt Chotin










It does support required but it doesnt
seem to be raising an error if you dont type in the field and call
isValid directly. If you do type in the field, backspace, and tab out you will
see the error. Well file for it not working automatically on the
isValid call.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Kent Henneuse
Sent: Friday, June 17, 2005 3:57
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
Modifying Panel and Text Input





Ok. Now I feel a bit sheepish. It states in the Action
Script Docs for
FormItem that 'required' property just shows or
hides the asterix(star)
in the UI. Nothing more. I got myself
totally confused by looking at
the Flex Store example that sneaks in their own
validator,
RequiredFieldValidator. I assumed that this
was part of either the
StringValidator, if you applied it to a field, or
it was tied into the
'required' field.

Could somebody at Macromedia please make a simple
addition of a required
field to the StringValidator or just make it so
that if you apply it to
a field it becomes a required field. This
would be similar to how the
EmailValidator behaves. (you input a
character, remove the character,
the move to another field, the email field will be
marked as required.)

 Thanks,

 -Kent

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Kent Henneuse
Sent: Saturday, June 18, 2005 12:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Modifying Panel and Text
Input

I have a couple of cases where I would like to
modify the default
components
to display differently, beyond what I can do in
the CSS. I would like
to
avoid building all new components but I will if I
have to.

The first is that I would like to create
TextInputs that are required
but do
not show the star next to the field. Think
of a form where everything
is
required. Having the star next to each
component is distracting rather
then
valuable. 

The second case is that I would like to be able to
put in an icon next
to
the title on a panel. I see that there is an
icon property for
container
but it has no effect on the panel.(maybe I just
don't have it set up
correctly.) Control over the placement of
the icon in relation to the
title
would be nice, but not critical.

So what does the group have to say?

 Thanks,

 -Kent 

Black holes are where God divided by
zero.
 - Steven Wright





Yahoo! Groups Links




















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Modifying Panel and Text Input

2005-06-17 Thread Matt Chotin










Actually I lied since I was calling
isValid incorrectly. Just setting required to true on the StringValidator should
be fine. And in fact required is set to true by default



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Friday, June 17, 2005 6:01
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
Modifying Panel and Text Input





It does support required but it
doesnt seem to be raising an error if you dont type in the field
and call isValid directly. If you do type in the field, backspace, and
tab out you will see the error. Well file for it not working automatically
on the isValid call.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Kent Henneuse
Sent: Friday, June 17, 2005 3:57
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
Modifying Panel and Text Input





Ok. Now I feel a bit
sheepish. It states in the Action Script Docs for
FormItem that 'required' property just shows or
hides the asterix(star)
in the UI. Nothing more. I got myself
totally confused by looking at
the Flex Store example that sneaks in their own
validator,
RequiredFieldValidator. I assumed that this
was part of either the
StringValidator, if you applied it to a field, or
it was tied into the
'required' field.

Could somebody at Macromedia please make a simple
addition of a required
field to the StringValidator or just make it so
that if you apply it to
a field it becomes a required field. This
would be similar to how the
EmailValidator behaves. (you input a
character, remove the character,
the move to another field, the email field will be
marked as required.)

 Thanks,

 -Kent

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Kent Henneuse
Sent: Saturday, June 18, 2005 12:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Modifying Panel and Text
Input

I have a couple of cases where I would like to
modify the default
components
to display differently, beyond what I can do in
the CSS. I would like
to
avoid building all new components but I will if I
have to.

The first is that I would like to create
TextInputs that are required
but do
not show the star next to the field. Think
of a form where everything
is
required. Having the star next to each
component is distracting rather
then
valuable. 

The second case is that I would like to be able to
put in an icon next
to
the title on a panel. I see that there is an
icon property for
container
but it has no effect on the panel.(maybe I just
don't have it set up
correctly.) Control over the placement of the
icon in relation to the
title
would be nice, but not critical.

So what does the group have to say?

 Thanks,

 -Kent 

Black holes are where God divided by
zero.
 - Steven Wright





Yahoo! Groups Links






















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Call Popup via string var

2005-06-17 Thread Matt Chotin










You need to make sure that frm_matriculas
is still linked into your application. If Flex does not see a reference to
that class it will not put it in the SWF for you.



Add something like this line to your
Application:

var dependency : frm_matriculas; 



HTH,

Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Fernando Lobos
Sent: Friday, June 17, 2005 2:21
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Call Popup
via string var





i try call pop via :


 var popup12 = mx.managers.PopUpManager.createPopUp(_root,
frm_matriculas, modal, {deferred: true});


all ok !


But this way


 var popup12 = mx.managers.PopUpManager.createPopUp (_root,
frm_matriculas, modal, {deferred: true});


function llama_popup (pop_1:object ){

 var popup12 = mx.managers.PopUpManager.createPopUp(_root, pop_1,
modal, {deferred: true});

}

nuevopopup:object

nuevopopup = frm_matriculas
llama_popup(nuevopopup)

-
nothing, can i do for call popup
function with string ? 










Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Re: Validation errortip placement

2005-06-17 Thread Matt Chotin










OK, I looked into the code. Looks like we
force it to the right automatically if theres enough room. If the tip
would be off the stage to the right then we either go up or down. This isnt
configurable in 1.5. You should file an enhancement request at http://www.macromedia.com/go/wish for
consideration in Mistral.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of rockmoyosa
Sent: Thursday, June 16, 2005
11:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
Validation errortip placement





Ok iknow what the problem is, Is not errorTipBottom, but errorTipAbove
and errorTipBelow.

But the problem is that it still on right side of
my textfield and not
on above or below. the only thing that changed is
the fact that the
arrow is now pointing down or up.

Somebody?




--- In flexcoders@yahoogroups.com,
rockmoyosa [EMAIL PROTECTED] wrote:
 It is something like that. But it doesnt do
the trick...
 
 I tried also but without success

StyleManager.styles.ErrorTip.setStyle(borderStyle,errorTipBottom);
 
 
 --- In flexcoders@yahoogroups.com,
Matt Chotin [EMAIL PROTECTED] wrote:
  Try this, I haven't tried it myself
though. Of course this might
apply
  it to all ErrorTips, I'm not sure how
you'd set it just for TextInput.
  
  
  
  mx:Style
  
  ErrorTip {
  
  borderStyle:
errorTipBottom
  
  }
  
  /mx:Style
  
  
  
  Matt
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
  Behalf Of rockmoyosa
  Sent: Thursday, June 16, 2005 7:28 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Validation
errortip placement
  
  
  
  I want an errortip on or on bottom of my
textfield, instead of on the
  rightside.
  
  
  
  
  
  
  
  Yahoo! Groups Links
  
  * To visit
your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/

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

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















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Cell Rendering with click event

2005-06-17 Thread Matt Chotin










Youre going to need to write a cell
renderer for the columns where you want the text to turn red. Watch the property
of the object with the checkbox (deleterx) and if it is set turn your color
red.



Your cell renderer could be something like
this maybe:

mx:Label

 mx:Script

 Function set deleted(d:Boolean):Void

 {

 if (d) setColor(red);

 else setColor(black);

 }



 Var itemObj : Object;



 Function setValue(str:String,
itemobject, sel:Boolean) : Void

 {

 itemObj =itemobject;

 this.text = str;

 }

 /mx:Script



mx:Binding source=itemObj.deleterx
destination=deleted /



/mx:Label



I havent tested any of this but it
will hopefully give you some ideas.



Matt



 











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Joe
Sent: Friday, June 17, 2005 11:25
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cell
Rendering with click event





I have a data grid that is a component for another page. In one of 
the columns in the data grid I am providing a
check box. The plan is 
for the user to click the check box and have the
text in that row 
turn red. How to get that event to happen and is
the fact that the 
data grid is component going to matter or not. I
have provided te 
code below and suggestions would be great. Thank
you.

 data grid -

?xml version=1.0 encoding=utf-8?
mxataGrid xmlns:mx=http://www.macromedia.com/2003/mxml

rowHeight=35 width=800
height=302 
alternatingRowColors=[#fafafa,#ff]
useRollOver=false 
selectable=false 
mx:Model id=DXList
source=dxlist.xml/
mxataProvider{DXList.dxinfo}/mxataProvider
mx:columns
mx:Array
mxataGridColumn headerText=Dx Code
columnName=dxcode 
textAlign=center width=75
sortable=true /
mxataGridColumn headerText=Dx
columnName=dxdesc 
textAlign=center width=455
sortable=true/
mxataGridColumn headerText=Dx
Source columnName=dxsource 
textAlign=center width=85
sortable=true/
mxataGridColumn headerText=Delete
columnName=deleterx 
cellRenderer=CheckCellRenderer
textAlign=center width=55 
sortable=false /
mxataGridColumn headerText=Reason
columnName=deletereason 
cellRenderer=reasonlist
textAlign=center width=90 
sortable=false /
/mx:Array
/mx:columns
/mxataGrid

 rendering file -

//

//Copyright (C) 2003 Macromedia, Inc. All Rights
Reserved.
//The following is Sample Code and is subject to
all restrictions on
//such code as contained in the End User License
Agreement 
accompanying
//this product.
//


import mx.core.UIComponent
import mx.controls.CheckBox

class CheckCellRenderer extends UIComponent
{

var check : MovieClip;
var listOwner : MovieClip; // the reference we
receive to the list
var getCellIndex : Function; // the function we
receive from the list
var getDataLabel : Function; // the function we
receive from the list

function CheckCellRenderer()
{
}

function createChildren(Void) : Void
{
check = createClassObject(CheckBox,
check, 1, {styleName:this, 
owner:this});
check.addEventListener(click, this);
size();
}

// note that setSize is implemented by UIComponent
and calls size(), 
after setting
// __width and __height
function size(Void) : Void
{
check.setSize(20, layoutHeight); 
check._x = (layoutWidth-20)/2;
check._y = (layoutHeight-16)/2;
}

function setValue(str:String, itembject,
sel:Boolean) : Void
{
check._visible = (item!=undefined);
check.selected = item[getDataLabel()];
}

function getPreferredHeight(Void) : Number
{
return 16;
}

function getPreferredWidth(Void) : Number
{
return 20;
}


function click()
{
listOwner.editField(getCellIndex().itemIndex,
getDataLabel(), 
check.selected);
}

}
















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Code not executing in Popup Window

2005-06-17 Thread Mike Anderson





Wow! - Tracy, that actually worked! 
-I did as you suggested, and removed everything exceptmy 
TitleWindow tags, and an ActionScript function - that sends Trace() text 
to my debug window (triggered by the creationComplete 
event).

So, where do you think my previous code is 
failing?There is a radically small amount of code from my first 
example - so I am really baffled and frustrated that Flex is getting tripped up 
this easily...I will try to tweak 
where I put certain pieces of code, etc. but I gotta 
say, this is really odd - since this SAMEcode, works fine when it's in an 
Application tag.

Typically, immediately after the main container code, is 
where I put my ActionScript Code.Like in the Root Application, I put 
my ActionScript functions just after the "Application" tag - or if it's a Custom 
Component, I put my ActionScript functions just after the Tags that define the 
component.

Are there any rules I need to follow, regarding WHERE I 
should declare my ActionScript Variables, Functions or Objects? 
Also, are there any specific rules, as to where I should put my 
RemoteObject declarations - so my code executes reliably?

It's a little disappointing to have this many problems, so 
close to the beginning of learning this new language... I understand what 
it means (and what it takes) to learn  take on a new language - but to have 
all these goofy problems, really takes the fun out of 
things...

Well, if you could shed more light on these problems I am 
having, I would greatly appreciate it :)

Mike


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Tracy 
SprattSent: Friday, June 17, 2005 1:21 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Code not 
executing in Popup Window


Rip out everything but 
the creationComplete handler with the trace. See what 
happens.
Tracy





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike AndersonSent: Friday, June 17, 2005 2:47 
AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Code not 
executing in Popup Window

It's not just 
RemoteObject -

TRACE doesn't even work 
- which means, the code isn't even executing -

Is there any reason, 
why the code isn't executing properly?

Thanks 
again,

Mike




From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt ChotinSent: Friday, June 17, 2005 12:03 
AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Code not 
executing in Popup Window
I dont see a problem 
but I know that others have run into issues when the RemoteObject has been 
contained in a popup. It seems to work better if its hung off the 
Application or something thats a little more permanent 
instead.

Matt





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike AndersonSent: Thursday, June 16, 2005 4:37 
PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Code not executing in 
Popup Window

Hello All,I have "known to be working" code, contained inside of a 
Custom CreatedTitleWindow 
component. The code handles all the RemoteObjectdeclarations, and populates a List Control, upon the Result 
Event.The Popup Window is 
launched from a Button residing in my MainApplication.After clicking the launch Button, the Window pops up 
perfectly and allthe controls are 
there, but nothing happens. In fact, the function 
thatretrieves the data, also sends 
a trace() message to the debug window -and nothing even happens when I do 
that.It's almost as if the code 
contained in my custom control, doesn't evenexist. Is my problem, the way in which I am creating my 
Popup Window?There must be 
something simple I am doing wrong...Here is the code in my main application that launches the 
window:public 
function launchWindow(){ var pop = 
mx.managers.PopUpManager.createPopUp(this, Categories,false, null, true);}Here 
is the code, inside my custom component called 
"Categories.mxml":?xml 
version="1.0" encoding="utf-8"?mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml"title="Manage Categories" closeButton="true" 
click="deletePopUp()"creationComplete="getCategoriesOnly();"mx:RemoteObject id="remoteService" 
source="services.InfoNexus"endpoint="http://www.mysite.com/flashgateway.aspx"showBusyCursor="true" mx:method 
name="getCategoriesOnly"result="getCategoriesOnly_Handler(event.result)"fault="getCategoriesOnly_Fault(event.fault)"//mx:RemoteObject 
mx:Script  
![CDATA[  
 
  //=== 
CATEGORIES ===//  
 function 
getCategoriesOnly()  
 {  
  
trace("getCategories just kicked off");  
  
remoteService.getCategoriesOnly();  
 }  
   
 function 
getCategoriesOnly_Handler(result)  
 {  
  
trace("getCategories_Handler just kickedoff");  
  
categories_List.dataProvider = result;  
 }  
   
 function 

RE: [flexcoders] Code not executing in Popup Window

2005-06-17 Thread Matt Chotin










Try putting the RemoteObject outside the
popup but leave the other code in. Start there. Weve seen RemoteObject
have problems before.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mike Anderson
Sent: Friday, June 17, 2005 7:45
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Code not
executing in Popup Window





Wow! - Tracy, that actually worked!
-I did as you suggested, and removed everything exceptmy
TitleWindow tags, and an ActionScript function - that sends Trace()
text to my debug window (triggered by the creationComplete event).



So, where do you think my previous code is
failing?There is a radically small amount of code from my first
example - so I am really baffled and frustrated that Flex is getting tripped up
this easily...I will try to tweak where I
put certain pieces of code, etc. but I gotta say, this is really odd - since
this SAMEcode, works fine when it's in an Application tag.



Typically, immediately after the main
container code, is where I put my ActionScript Code.Like in the
Root Application, I put my ActionScript functions just after the
Application tag - or if it's a Custom Component, I put my
ActionScript functions just after the Tags that define the component.



Are there any rules I need to follow,
regarding WHERE I should declare my ActionScript Variables, Functions or
Objects? Also, are there any specific rules, as to where I should put my
RemoteObject declarations - so my code executes reliably?



It's a little disappointing to have this
many problems, so close to the beginning of learning this new language...
I understand what it means (and what it takes) to learn  take on a new
language - but to have all these goofy problems, really takes the fun out of
things...



Well, if you could shed more light on
these problems I am having, I would greatly appreciate it :)



Mike









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Friday, June 17, 2005 1:21
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Code not
executing in Popup Window

Rip out everything but the
creationComplete handler with the trace. See what happens.

Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mike Anderson
Sent: Friday, June 17, 2005 2:47
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Code not
executing in Popup Window





It's not just RemoteObject -



TRACE doesn't even work - which means, the
code isn't even executing -



Is there any reason, why the code isn't
executing properly?



Thanks again,



Mike









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Friday, June 17, 2005 12:03
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Code not
executing in Popup Window

I dont see a problem but I know
that others have run into issues when the RemoteObject has been contained in a
popup. It seems to work better if its hung off the Application or
something thats a little more permanent instead.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mike Anderson
Sent: Thursday, June 16, 2005 4:37
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Code not
executing in Popup Window





Hello All,

I have known to be working code,
contained inside of a Custom Created
TitleWindow component. The code handles all
the RemoteObject
declarations, and populates a List Control, upon
the Result Event.

The Popup Window is launched from a Button
residing in my Main
Application.

After clicking the launch Button, the Window pops
up perfectly and all
the controls are there, but nothing happens.
In fact, the function that
retrieves the data, also sends a trace() message
to the debug window -
and nothing even happens when I do that.

It's almost as if the code contained in my custom
control, doesn't even
exist. Is my problem, the way in which I am
creating my Popup Window?
There must be something simple I am doing wrong...


Here is the code in my main application that
launches the window:


public function launchWindow()
{
 var pop =
mx.managers.PopUpManager.createPopUp(this, Categories,
false, null, true);
}




Here is the code, inside my custom component
called Categories.mxml:


?xml version=1.0
encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.macromedia.com/2003/mxml
title=Manage Categories
closeButton=true click=deletePopUp()
creationComplete=getCategoriesOnly();

mx:RemoteObject id=remoteService
source=services.InfoNexus
endpoint=http://www.mysite.com/flashgateway.aspx
showBusyCursor=true
 mx:method
name=getCategoriesOnly

[flexcoders] Re: Collections between Flex and Web services

2005-06-17 Thread cgobble
Clint,

Your solution was very useful.  This resolves the issue at least 
until Flex learns to deserialize xml to strongly typed classes.

Thanks very much!!

Cliff


--- In flexcoders@yahoogroups.com, Clint Modien [EMAIL PROTECTED] wrote:
 ya basically... flex deseirializes the soap objects an untyped AS2 
Object 
 tree.
 
 load the tree manually into you class heirachy with a load 
function in your 
 as2 objects
 
 here's an example of what i mean... just look @ the load func
 
 might want to ignore all the event code you probably won't need it
 
 
 import mx.events.*;
 class com.ibm.g3.model.bo.Team
 { 
 public var vo:Object = undefined;
 private var origVO:Object = undefined; //concurenccy (future)
 
 // - this code is to dispatch events --
---
 public function Team()
 { 
 EventDispatcher.initialize(this);
 this.vo = new Object(); 
 this.origVO = new Object();
 }
 
 public var addEventListener:Function;
 public var removeEventListener:Function;
 private var dispatchEvent:Function;
 
 // -- end event dispatch code -- 
 
 [ChangeEvent(change)]
 public function get teamId():Number{return vo.teamId;}
 public function set teamId(v:Number){vo.teamId = v; dispatchEvent
({ type: 
 change });}
 [ChangeEvent(change)]
 public function get dashBoard():Boolean{return vo.dashBoard;}
 public function set dashBoard(v:Boolean){vo.dashBoard = v; 
dispatchEvent({ 
 type: change });}
 [ChangeEvent(change)]
 public function get ibmRfpName():String{return vo.ibmRfpName;}
 public function set ibmRfpName(v:String){vo.ibmRfpName = v; 
dispatchEvent({ 
 type: change });}
 [ChangeEvent(change)]
 public function get gmRfpName():String{return vo.gmRfpName;}
 public function set gmRfpName(v:String){vo.gmRfpName = v; 
dispatchEvent({ 
 type: change });}
 [ChangeEvent(change)]
 public function get UserDetailTree():Array{return 
vo.UserDetailTree;}
 public function set UserDetailTree(v:Array){vo.UserDetailTree = v; 
 dispatchEvent({ type: change });}
 
 public var hasData:Boolean = false;
 
 // the reason for this load() function is to extract the 
webservice result 
 into this object because
 // we can't assign the webservice result directly to any instance 
of this 
 class (it will over-write it)
 
 public function load(u:Object)
 {
 //for concurency later
 this.oldVO = u;
 
 //load the object you could use mx.utils.ObjectUtil.copyProperties 
here
 this.teamId = u.teamId;
 this.dashBoard = u.dashBoard;
 this.ibmRfpName = u.ibmRfpName;
 this.gmRfpName = u.gmRfpName;
 this.gmRfpName = u.gmRfpName;
 // the line below isn't really what i want to do here with this 
data
 //this.UserDetailTree = u.UserDetailTree;
 //this is what we should do
 for(var i = 0; i  u.UserDetailTree.length)
 {
 var userDetail:UserDetail = new UserDetail();
 userDetail.load(u.UserDetailTree[i]);
 }
 //not very pretty i realise but it works
 hasData = true;
 }
 
 public function toString():String
 {
 return this.ibmRfpName +  -  + this.gmRfpName;
 }
 }
 
 
 
 
 
 On 6/17/05, cgobble [EMAIL PROTECTED] wrote:
  
  I thought I had resolved the problem by creating classes in
  ActionScript where the collections are specifically designed as
  Arrays. The problem seems to be how Flex determines if an object 
is
  an array or not when it reads the message from the web service.
  Depending on how I set it up, the problem can appear to be on 
either
  the Flex side, or the .Net side. It's interesting that I can set 
up
  a complex class structure that works in Flex with all of the
  appropriate methods, properties and arrays and it translates to 
the
  web service just fine. But, when I try to fill my classes with 
the
  result from the web service, it doesn't recognize the elements 
and
  instantiate the appropriate class. I must be missing something
  fundamental.
  
  Cliff
  
  
  --- In flexcoders@yahoogroups.com, Clint Modien [EMAIL PROTECTED] 
wrote:
   Is your problem on the flex side or on the .NET side?
  
  
   On 6/16/05, Matt Chotin [EMAIL PROTECTED] wrote:
   
Hmm, seems odd. Can you take a look at the object in a 
debugger
  and see
if it's constructed the way you'd expect? Also turn on 
debugging
(web-service-proxy) and check if we're even sending the phone
  number across
the wire. If not you may need to re-process the contact 
before
  executing
the send to make sure that things are what the web service
  expects.
   
Matt
   
--
   
*From:* flexcoders@yahoogroups.com
  [mailto:[EMAIL PROTECTED] *On
Behalf Of *cgobble
*Sent:* Wednesday, June 15, 2005 9:51 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Collections between Flex and Web
  services
   
I am using the mx.utils.ArrayUtil.toArray to bind to a
  datagrid.
This makes sure that Flex sees it when there is only 1 item 
in
  the
array. However, going back to the service with the entire 
object
  is
causing the problem. I've been