[flexcoders] Re: One custom component referring to another

2008-06-27 Thread Michael Labriola
Jason,

In an ideal world, component A would throw events up. Those events 
would be caught in the application (in this case) and call 
corresponding methods in component B.

You really, really don't want to start coupling these components 
together by calling the internals of one from the other in this way. 
Especially when they really are peers in your application.

Just my 2 cents,
Mike

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

 I thought this would be simple - having one custom display object 
modify another through a reference:
 
 mx:Application 
   c:MyComponentA /
   c:MyComponentB /
 /mx:Application
 
 I want to have MyComponentA refer to objects/methods inside of 
MyComponentB.  I tried passing a reference in:
 
 mx:Application 
   c:MyComponentA id=myComponentA /
   c:MyComponentB componentToModify={myComponentA}/
 /mx:Application
 
 But I get an error saying, Access of possibly undefined property 
myComponentA through a reference with static type 
flash.display:DisplayObject.
 
 I tried calling parent.myComponentA from actionscript inside of 
MyComponentB.MXML, but it couldn't find the instance 
of myComponentA.  
 
 How do you handle this?  I know this probably isn't ideal 
architecture, but would there have to be scripts that listen for 
events in one component in the main app and then modify the other 
component?  I guess I could do that if it is best practice.  I need 
the two components to be separated because they are two different 
parts of the UI, but need to interact.  One has controls that change 
the view and data in the other.  Does it have to modify the other 
component from actionscript on the main app or can I just pass a 
reference into one component like I have tried?  
 
 Thanks.
 
 
 Jason Merrill 
 Bank of America 
 Global Technology  Operations  Global Risk LLD 
 eTools  Multimedia 
 
 Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default
.aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defau
lt.aspx   subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layo
uts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/P
osts/Archive.aspx .





[flexcoders] Re: book errata

2008-06-02 Thread Michael Labriola

If you find anything specific and it is not yet on the peachpit 
site, feel free to email me directly off-list.


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

 Check the peachpit website.
 
_
__
 
 Joseph Balderson | http://joeflash.ca
 Flex  Flash Platform Developer | Abobe Certified Developer  
Trainer
 Author, Professional Flex 3 (coming Winter 2008)
 Staff Writer, Community MX | http://communitymx.com/author.cfm?
cid=4674
 
 
 
 Mark Volkmann wrote:
  Is there an errata page for the book Adobe Flex 3 - Training 
from the Source?
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.comYahoo! Groups Links
  
  
  
 





[flexcoders] Re: New to flex, wonder why one works and the other doesn't...

2008-06-02 Thread Michael Labriola

Close, but no.

In Flex, parents are responsible for sizing their children. Flex 
Containers (which are just UIComponents with more code) do size 
their children, but you can also create UIComponents that know how 
to size their children. 

Neither a container, nor a component that implements a container 
interface needs to be involved in any way to handle this. That is 
the fallacy I am addressing.

Look at the example I provided and you will not see a Container or 
implementor of that interface.

In other words: 
* UIComponents can contain other UIComponents. 
* Containers are UIComponents which know how to automatically size 
their children through the component lifecycle

Does this make sense?
Mike



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

 In other words, UIComponents /can/ natively contain other 
UIComponents, 
 only the child UIComponent will by default have a 0 width and 
height.
 
 Which it means it won't show up on the stage. Which means, by 
default, 
 you cannot get a native (non-extended) UIComponent to show up when 
you 
 add it to another UIComponent. Which means you cannot 
(successfully) add 
 a native UIComponent to another UIComponent.
 
 Thanks for catching the technicality, as a writer I love that kind 
of 
 precision.
 
 But basically what Charlie was saying is correct: UIComponent's 
can't 
 contain other UIComponents without being a subclass of Container 
or 
 implementing the IContainer interface. -- only he forgot to 
add 'and 
 have them successfully show up on stage'.
 
 So you're both correct IMO. Thanks for the clarity.
 
 
_
__
 
 Joseph Balderson | http://joeflash.ca
 Flex  Flash Platform Developer | Abobe Certified Developer  
Trainer
 Author, Professional Flex 3 (coming Winter 2008)
 Staff Writer, Community MX | http://communitymx.com/author.cfm?
cid=4674
 
 
 
 Michael Labriola wrote:
  Guys, sorry, but that's not quite right. UIComponents can 
contain 
  other UIComponents without being a container. It is a common use 
  case. Take a look at the simple example Adobe includes with 
their 
  docs:
  
  
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.h
  tm?href=1742.html
  
  You will notice that the mocal text component is a UIComponent 
but 
  it contains a button and a text area... both UIComponents.
  
  The difference is that containers like Canvas have the logic to 
size 
  and position any child they contain by default. UIComponent does 
  not. So, in a UIComponent descendant, you need to write code to 
size 
  and position every child or they will exist as 0 width and 0 
height 
  component.
  
  HTH,
  Labriola
  
  
  --- In flexcoders@yahoogroups.com, Charlie Hubbard 
  charlie.hubbard@ wrote:
  Right.  Image is a UIComponent, and TextArea is a UIComponent.
  UIComponent's can't contain other UIComponents without being a
  subclass of Container or implementing the IContainer 
interface.  
  Not a
  simple task.
 
  addChild() is defined in DisplayObject which apart of the Flash 
API
  not the Flex API.  BitmapAsset is a sublcass of DisplayObject 
and 
  not
  UIComponent.  So you can add it to the text area directly using 
  this
  code:
 
 var img : BitmapAsset = new imgCls() as BitmapAsset;
 img.x = txtArea.mouseX;
 img.y = txtArea.mouseY;
 txtArea.addChild( img );
 
  Now, try that out, and you'll start to see some issues that 
you'll
  have to asess if this is going to work for what you're trying 
to 
  do.
  Since the bitmap is not apart of the document in the TextArea 
you 
  are
  going to get clipping or scrolling.  If you want to do that 
you'll
  have to get really dirty with the TextArea API.  Probably even
  ditching TextArea altogether and writing your own, or modifying 
  rich
  text editor.
 
  Charlie
 
 
  On Thu, May 29, 2008 at 5:37 PM, aarhac aaronh@ wrote:
  Hello,
 
  I have figured out how to work around my problem, but I do 
  wonder why
  one of the following methods works, and the other doesn't. I 
  would be
  grateful if someone could explain the error in the failing 
  method.
  The code is pasted below (Below the line of dashes) in it's 
  entirety,
  and is commented as to which works and which doesn't.
 
  The image referenced in this case is a 32x32 pixel png file on 
my
  local system. I am attempting to display the image on a text 
  area.
  Using the default example from the flex documentation to embed 
an
  image, I cannot get the image to show up when added to the 
text 
  area's
  display list, but it does show just fine when added to the root
  display list. I also added the image to the textArea using
  addChildAt(txtIcon, txtArea.numChildren) with no change in 
  effect.
  The second method works just fine. I imagine that the problem 
has
  something to do with applying the image as a byte array to
  image.source, but I wonder why exactly

[flexcoders] Re: New to flex, wonder why one works and the other doesn't...

2008-06-01 Thread Michael Labriola
Guys, sorry, but that's not quite right. UIComponents can contain 
other UIComponents without being a container. It is a common use 
case. Take a look at the simple example Adobe includes with their 
docs:

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.h
tm?href=1742.html

You will notice that the mocal text component is a UIComponent but 
it contains a button and a text area... both UIComponents.

The difference is that containers like Canvas have the logic to size 
and position any child they contain by default. UIComponent does 
not. So, in a UIComponent descendant, you need to write code to size 
and position every child or they will exist as 0 width and 0 height 
component.

HTH,
Labriola


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

 Right.  Image is a UIComponent, and TextArea is a UIComponent.
 UIComponent's can't contain other UIComponents without being a
 subclass of Container or implementing the IContainer interface.  
Not a
 simple task.
 
 addChild() is defined in DisplayObject which apart of the Flash API
 not the Flex API.  BitmapAsset is a sublcass of DisplayObject and 
not
 UIComponent.  So you can add it to the text area directly using 
this
 code:
 
   var img : BitmapAsset = new imgCls() as BitmapAsset;
   img.x = txtArea.mouseX;
   img.y = txtArea.mouseY;
   txtArea.addChild( img );
 
 Now, try that out, and you'll start to see some issues that you'll
 have to asess if this is going to work for what you're trying to 
do.
 Since the bitmap is not apart of the document in the TextArea you 
are
 going to get clipping or scrolling.  If you want to do that you'll
 have to get really dirty with the TextArea API.  Probably even
 ditching TextArea altogether and writing your own, or modifying 
rich
 text editor.
 
 Charlie
 
 
 On Thu, May 29, 2008 at 5:37 PM, aarhac [EMAIL PROTECTED] wrote:
  Hello,
 
  I have figured out how to work around my problem, but I do 
wonder why
  one of the following methods works, and the other doesn't. I 
would be
  grateful if someone could explain the error in the failing 
method.
 
  The code is pasted below (Below the line of dashes) in it's 
entirety,
  and is commented as to which works and which doesn't.
 
  The image referenced in this case is a 32x32 pixel png file on my
  local system. I am attempting to display the image on a text 
area.
 
  Using the default example from the flex documentation to embed an
  image, I cannot get the image to show up when added to the text 
area's
  display list, but it does show just fine when added to the root
  display list. I also added the image to the textArea using
  addChildAt(txtIcon, txtArea.numChildren) with no change in 
effect.
 
  The second method works just fine. I imagine that the problem has
  something to do with applying the image as a byte array to
  image.source, but I wonder why exactly? Is this a bug?
 
  Thanks in advance,
 
  --Aaron
 
  
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute
 
  !--Works--
  mx:Image id=txtIcon source=@Embed(source='c:/icon.png')/
 
  mx:TextArea id=txtArea width=400 height=200 
click=addImage()/
 
  mx:Script
  ![CDATA[
  import mx.controls.Image;
  import mx.core.BitmapAsset;
 
  // Doesn't work
  [Embed(source=c:/icon.png)]
  [Bindable]
  public var imgCls:Class;
 
  public function addImage():void
  {
  // Doesn't work
  var loadedImg:Image = new Image();
  loadedImg.source = new imgCls() as BitmapAsset;
 
  loadedImg.x = 10;
  loadedImg.y = 10;
  txtArea.addChild(loadedImg);
 
  // Note: While the above doesn't work, adding the
  // image to the root display list does work:
  //addChild(loadedImg);
 
  // Works
  txtIcon.x = 50;
  txtIcon.y = 10;
  txtArea.addChild(txtIcon);
  }
  ]]
  /mx:Script
 
  /mx:Application
 
 





[flexcoders] Re: Air App - Check connection

2008-06-01 Thread Michael Labriola

Indra,

Look in the AIR help files for the presence API. 

I think this article also covers it, but not sure how up to date it 
is:

http://www.adobe.com/devnet/air/flex/articles/flickr_floater_06.html

HTH,
Labriola

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

 Hi Guys,
 
 I'm creating an Air Application that has to check the connections 
to a
 server.
 So when there's connection to the server, it retrieves XMLs through
 HTTPservice from my backend
 and if there's no connection , it should retrieve XMLs from local 
disk.
 Reading xml is no problem in both ways, but whats the best way to 
create
 the connection checking logic.??
 
 Thanks
 - Indra





[flexcoders] Re: getting authenticating error

2008-03-26 Thread Michael Labriola

Parag,

Send me the code offline and I will help you debug. I am not sure I 
understand the issue currently.

Mike

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

 Hi All, 
 
 I have written multiple login testcases using dpunit and using 
sequence as
 per sample example. In this sequence whether we do login or logout 
server
 trip is made and required processing is done on server. 
 
 The testcase structure is as follows: 
 
 TestCase1.as   |
 
 setup() | 
 tescase1() {login is called on server}  ==| 
 teradown() {logout called on server}  | 

 | 
 TestCase2.as  | 
 setup()  | 
 tescase2() {login is called on server}  ==| TestSuite 
=
 TestRunner
 teradown() {logout called on server}  | 

 | 
 TestCase3.as  | 
 setup()  | 
 tescase3() {login is called on server}  ==| 
 teradown() {logout called on server}  | 
 
 As per my knowledge after completion of teardown() of testcase1 
then it
 should go for 2nd test setup() and this works fine. But what is 
happening
 that UIComponent maintains list of function to be called. 
 UIComponent is not calling individual functions. So login is called
 perfectly but logout is not being called. So 1st testcase it is 
working but
 for 2nd testcase it's giving error. This error is due to logout 
has not
 happen on 1st testcase and 2nd testcase is trying to login on 
server. 
 
 The error is as follows: 
 
 Error: Credentials cannot be set while authenticating or logging 
out.
 
   at
 mx.messaging::Channel/setCredentials()
[C:\dev\depot\flex\branches\flex_201_b
 orneo\sdk\frameworks\mx\messaging\Channel.as:841]
 
   at
 mx.messaging::ChannelSet/setCredentials()
[C:\dev\depot\flex\branches\flex_20
 1_borneo\sdk\frameworks\mx\messaging\ChannelSet.as:960]
 
   at
 mx.messaging::MessageAgent/setCredentials()
[C:\dev\depot\flex\branches\flex_
 201_borneo\sdk\frameworks\mx\messaging\MessageAgent.as:840]
 
   at
 mx.rpc::AbstractService/setCredentials()
[C:\dev\depot\flex\branches\flex_201
 _borneo\sdk\frameworks\mx\rpc\AbstractService.as:379]
 
   at
 
com.adobe.cairngorm.business::SecureDestinationLocator/setCredentials
OnServi
 ce()
[E:\PerforceClient\dev\www\src\com\adobe\cairngorm\business\SecureDes
tin
 ationLocator.as:263]
 
   at
 
com.adobe.cairngorm.business::SecureDestinationLocator/setServiceCred
entials
 ()
[E:\PerforceClient\dev\www\src\com\adobe\cairngorm\business\SecureDes
tinat
 ionLocator.as:104]
 
   at
 
com.adobe.cairngorm.business::SecureDestinationLocator/setCredentials
()[E:\P
 
erforceClient\dev\www\src\com\adobe\cairngorm\business\SecureDestinat
ionLoca
 tor.as:71]
 
   at
 
com.cognos.obi.ria.authentication.business::LoginBusinessDelegate/log
in()[E:
 
\PerforceClient\dev\www\src\com\cognos\obi\ria\authentication\busines
s\Login
 BusinessDelegate.as:35]
 
   at
 com.cognos.obi.ria.authentication.commands::LoginCommand/execute()
[E:\Perfor
 
ceClient\dev\www\src\com\cognos\obi\ria\authentication\commands\Login
Command
 .as:28]
 
   at
 com.adobe.cairngorm.control::FrontController/executeCommand()
[C:\dev\swat\pr
 
ojects\ac_emea\Cairngorm\com\adobe\cairngorm\control\FrontController.
as:212]
 
   at flash.events::EventDispatcher/dispatchEventFunction()
 
   at flash.events::EventDispatcher/dispatchEvent()
 
   at
 com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent
()[C:\dev
 
\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\Cairngor
mEventD
 ispatcher.as:113]
 
   at
 com.cognos.obi.ria.authentication.view::LoginForm/login()
[E:\PerforceClient\
 
dev\www\src\com\cognos\obi\ria\authentication\view\LoginForm.mxml:60]
 
   at
 com.cognos.obi.ria.authentication.view::LoginForm/__b_submit_click
()[E:\Perf
 
orceClient\dev\www\src\com\cognos\obi\ria\authentication\view\LoginFo
rm.mxml
 :88]
 
   at flash.events::EventDispatcher/dispatchEventFunction()
 
   at flash.events::EventDispatcher/dispatchEvent()
 
   at
 mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta3
\sdk\frameworks\proj
 ects\framework\src\mx\core\UIComponent.as:9041]
 
   at
 
net.digitalprimates.flex2.uint.sequence::SequenceEventDispatcher/exec
ute()[C
 :\Documents and
 
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalp
rimates
 \flex2\uint\sequence\SequenceEventDispatcher.as:67]
 
   at
 

[flexcoders] Re: Defining a dynamic UI

2007-05-29 Thread Michael Labriola

To add to what Tracy was saying..

Let's say you have a component in the comps directory called MyComp. 
It could be in MXML or in Actionscript, it doesn't matter.

First you would need to import that component definition by saying 
import comps.MyComp;

Then, at anytime, for instance in response to a button click, you can 
say:

var someVar:MyComp = new MyComp();
someVar.property1 = 3;
someVar.property2 = 7;
this.addChild( someVar );
 
or myViewStack.addChild( someVar );

You could make a series of functions which create these components 
and set them, calling the appropriate function when needed. Or you 
could dig a little further and learn about factories... is this 
basically what you were trying to do or are we missing your point?

Mike



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

 You understand that if you use navigation containers, like 
viewStack and
 TabNavigator, that much of this is done for you automatically?
 
  
 
 Also, separate mxml files is a fine way to make re-useable 
components.
 Their size is not significant.  Make them generic so that you can 
set
 properties and event listeners.
 
  
 
 I don't know if the mx:Component tag can be used anywhere other 
than
 in an item renderer(state?), but you might check.
 
  
 
 And you can instantiate controls at will using container.addChild().
 
  
 
 There are also RSLs and modules.
 
  
 
 Mxml is just another way to write AS classes, use it if you like it.
 
  
 
 There are lots of options.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of gary_mangum
 Sent: Tuesday, May 29, 2007 6:30 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Defining a dynamic UI
 
  
 
 Is it possible to pre-define a set of MXML components but not 
create
 them or add them to a Container in the application until a later 
time.
 In other words, I want to define some components, complete with
 properties, events, etc. that will not be part of my UI until I
 dynamically add them as the application runs. I will decide whether
 or not to add them based on runtime criteria.
 
 I know that I can use states to add and remove components. If I use
 states, is there a way to define a component only once in MXML and
 then add it in 3-4 different states? I do not wish to define my
 component over and over inside of AddChild tags, and my components 
are
 not really specialized enough to warrant their own MXML files since
 there are many of them and the only real differences are their
 properties, events, etc.
 
 I've also thought that I could manually define my components in AS 
and
 keep them in memory until needed, but would rather define them in 
MXML
 if possible. I would also like to create the components
 just-in'time instead of creating them up front when they may never
 be needed.
 
 Anyway, thanks for any thoughts on this topic!





[flexcoders] Re: Problem with loading xml file using HTTPService or URLLoader

2007-05-29 Thread Michael Labriola

Maciek,

You may want to read up on crossdomain files. You should be able to 
google this term and find information. Here is a link to explore, but 
there are probably easier to understand resources.

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213

Mike


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

 Hi,
 
 I'm struggling with strange problem.
 I'm trying to load XML file in my code which containst data about 
 images but thats nor really relevant.
 
 Lets assume i have remote server where i run my code (domain 
 x.net).
 
 When i point both httpservice or urlloader to http://mydomain.net/
 photos.xml it does work on my local machine but DOES NOT when i 
copy 
 the file to that mydomain server.
 
 This is only one configuration it works on. 
 
 Different scenario i tried and does not work is:
 loader pointing to http://mylocalmachineIP/photos.xml (which is 
 accessible from the internet) and application neither on local 
 machine nor server works.
 
 Did anyone encountered similar problem before? I would expect 
 httpservice to be able to access file regardless of its location if 
 the url is valid...
 
 Thanks for help as i'm really stuck on this one.





[flexcoders] Re: Adding rows to dataGrid programatically

2006-11-02 Thread Michael Labriola

I am not sure this is going to answer your question, but you could
clone one of the other rows and just change the contents. That way you
would not need to know specifically what the root tag of the
particular node is..

--Mike

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

 
 Trying to add rows to a datagrid programmatically. Works ok using the
 dataProvider.addItem function, however it requires a named row-node -
 see below. I would like to make this more generic. Is there a way to do
 this without knowing each rows element name?
 
  private function addRow() : void
  {
   this.dg.dataProvider.addItem(XML(row/row));
  }
 
 
 Thanks.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: TextArea in Grid - too big

2006-11-02 Thread Michael Labriola

Precia,

Just need to ask the question, does it absolutely have to be a
TextArea?  The TextField class (and descendants) have an autoSize
property and more control over some of these aspects. 

--Mike

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

 When creating a grid, I have textArea in the gridItems of the first 
 row for headers.  If I don't give them a height they default to 
 100%.  I need the textArea to default to the size of the text within 
 them or somehow get the text within the textArea to valign=bottom, 
 which I haven't been able to produce.  Anyone have any ideas?
 
 I create a grid on the fly with AS.  The following is part of the 
 code creating the headers of the grid. 
 
 //Create the Grid
 grid1 = new Grid();
 grid1.id = griddy;
 grid1.y=35;
 grid1.percentWidth=100;
 grid1.setStyle(backgroundColor,0xf1c616);
 grid1.setStyle(verticalGap,1);
 grid1.setStyle(horizontalGap,1);
 addChild(grid1);
   
 //Create the first Row with the Role labels
 grid1row = new GridRow();
 grid1row.id = gRow;
 grid1row.percentWidth=100;
 grid1.addChild(grid1row);
   
 //Create the first GridItem as a blank first cell
 grid1Item = new GridItem();
 grid1Item.id = gItem0;
 grid1Item.setStyle(horizontalAlign,center);
 grid1row.addChild(grid1Item);
   
 label1 = new TextArea();
 label1.name = gLabel0;
 label1.width=90;
 label1.text =  
 label1.alpha = 0;
 grid1Item.addChild(label1);
 
 
 //Loop through results,creating the headers to each column in the grid
 for ( var i:Number=0;ievent.result.length;i++){
 
   grid1Item = new GridItem();
   grid1Item.id = gItem+i;
   grid1Item.setStyle(horizontalAlign,center);
   grid1Item.setStyle(verticalAlign,bottom);
   grid1row.addChild(grid1Item);
   
   label1 = new TextArea();
   label1.name = gLabel+i;
   label1.alpha = 0;   
   label1.width = 90;
   if (event.result.list.source[i].roleName.length  20){
   label1.height = 35;
   }else{
   label1.height = 70;
   }
   label1.text = event.result.list.source[i].roleName
   grid1Item.addChild(label1);
   
 }
 
 
 
 Thanks,
 Precia






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: How do I expand a tree through Action Scripts

2006-11-02 Thread Michael Labriola

Hara,

Take a look at the expandChildrenOf () method of the tree class.

public function expandChildrenOf(item:Object, open:Boolean):void
Opens or closes all the tree items below the specified item. 

Parameters  item:Object — the starting item  
  
 open:Boolean — toggles an open or close operation  

--Mike

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

 Hi,
 
 How can I expand a tree dynamically r atleast when the application has 
 loaded.
 
 Thanks
 Hara






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Installing FDS As Win2003 WebService

2006-11-01 Thread Michael Labriola

Check out fireDaemon, it is handy for this type of situation:

http://www.firedaemon.com/

It will let you run the command line integrated jrun fds as a service.

--Mike

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

 But there's no version of JRun that is free, and for a production
 environment, correct?
  
 It kind of defeats the purpose of FDS Express... a free, limited
production
 license that requires you to buy a JRun license?
  
 Hopefully I'm mis-understanding, and you'll point me to some
FDS-specific,
 production version of JRun:)
  
 Shan
 
_  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Cathy Reilly
 Sent: Wednesday, November 01, 2006 8:38 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Installing FDS As Win2003 WebService
 
 
 
 
 The development version of JRun included with FDS does not include the
 Windows Service functionality.  If you require this functionality,
you may
 download JRun from the Adobe web site and deploy the FDS wars.
  
 - Cathy
 
_  
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Shannon Hicks
 Sent: Tuesday, October 31, 2006 4:36 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [flexcoders] Installing FDS As Win2003 WebService
 
 
 
 
 I wasn't able to get jrunsvc to work with what came with FDS 2
Express, so I
 ended up installing Tomcat instead. It took awhile to figure out, having
 never used Tomcat before, but I pieced together the install process
form a
 few different resources, and put it in one handy step-by-step guide:
  
 HYPERLINK

http://www.webapper.net/index.cfm/2006/10/31/Installing-Flex-Data-Services-

2-Express-on-Tomcat-for-Dummieshttp://www.webapper-.net/index.-cfm/2006/-10
 /31/Installing--Flex-Data--Services--2-Express--on-Tomcat--for-Dummies
  
 Shan
 
_  
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of João Fernandes
 Sent: Monday, October 02, 2006 7:27 AM
 To: [EMAIL PROTECTED]
 Subject: [Junk E-Mail - LOW] RE: [flexcoders] Installing FDS As Win2003
 WebService
 
 
 
 
 What is your server called? 
 
 If your java server instance is called fds and located inside
 drive:\{jrun.-home}\servers\ run the command from the bin folder
 drive:\{jrun.-home}\bin :
 
 jrunsvc -install fds Flex Data Service Flex Data Service 
 
 João Fernandes
 
_  
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Francois Dejardin
 Sent: segunda-feira, 2 de Outubro de 2006 12:51
 To: [EMAIL PROTECTED]
 Subject: [flexcoders] Installing FDS As Win2003 WebService
 
 Hi all,
 
 I'm trying to install fds as service on Win2003.. i've read that it was 
 possible with jrunsvc but it doesn't work with the following command 
 line : 
 jrunsvc.exe -install jrun-server Flex data service Flex Data Service
 
 (I find the jrunsvc from Coldfusion installation directory)
 
 Is it something wrong ? 
 
 regards
 
 
 --
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.407 / Virus Database: 268.12.11/460 - Release Date:
10/1/2006
 
 
 
 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 
 
 
  
 
 
 --
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 
 
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Tree not updating with correct XML

2006-11-01 Thread Michael Labriola

Aaron,

Need to clarify something:

When you say : The XML is changes, do you mean that the XML data
retrieved from http://Path/To/XML.aspx changes or that you change the
XMl after loading at the client?

I don't want to answer the wrong question, but the 
mx:XML tag includes data at compile time, not runtime. So, the
application is going to grab a copy of this data when it compiles and
build it in.

If you are looking to grab data at runtime, you need to look at
something like an HTTP service tag to go and grab the data on command.

Let me know if this answers your question,
--Mike



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

 Hi all,
 
 I'm at a loss here.  I've got a tree set up to retrieve XML data.  
 It works fine until the data in the XML changes.  Then the tree 
 won't reflect the new data until my flex application is recompiled.  
 I believe when the application is being recomplied it's grabbing the 
 XML and setting it somehow.  Here is some code.  
 
 CODE***
 mx:Script
 ![CDATA[
   import mx.events.ListEvent;
   import mx.controls.Alert;
   import mx.collections.*;
   
   [Bindable]
   public var myXLC:XMLListCollection;
   
   public function afterComp():void
   {
  myXLC = new XMLListCollection(TreeXML.children());
  tvwProjects.invalidateList();
   }
   ]]
   /mx:Script
   
   mx:XML source=http://Path/To/XML.aspx; id=TreeXML/
   
   mx:Tree id=tvwProjects width=100% height=100% 
 dataProvider={myXLC} labelField=@label itemClick=treeClickEvent
 (event); y=10
/mx:Tree
 END OF CODE***
 I've also tried the above without the XMLListCollection and just 
 putting the TreeXML straight into the Tree object dataProvider.  The 
 afterComp function is called in the application createCompletion 
 event.  I've also tried with and without invalidateList.  
 
 Basically, How can I get the Tree control to grab the latest and 
 greatest from the XML?  
 
 Thanks,
 Aaron






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: using a linkbar with a viewstack... how can you indicate current selection

2006-11-01 Thread Michael Labriola

Hank,

If you are setting the dataProvider of the linkBar to the viewStack,
the LinkBar will indicate the selectedChild of the viewStack as a
disabled button on the bar.

The linkbar responds to the viewStack. When you say you are setting
the selectedIndex to 0, do you mean you are setting it on the
viewStack and the linkbar is not responding?

As far as the styles, the linkbar has a fair amount of style
customization all defined in the LinkBar help docs.

Mike

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

 a linkbar is a recommended way to control a viewstack. But I want to
 be able to show the user the currently selected view. I am not clear
 whether the linkbar is supposed to allow this. When I try to initially
 set the selectedIndex to 0 I get an error indicating that it is out of
 range.
 
 I know I could use a tabBar, but I like the simple blocks of text
 without the tabby look and feel.
 
 So I guess my question is, is it possible to use the linkbar where one
 item is, for example, a different color than the others, indicating
 that that is the currently selected item?
 
 Hank






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Filtering a Datagrid

2006-10-31 Thread Michael Labriola
Rick,

Check out the filter capabilities of the list collections. Basically,
the dataProvider of the datagrid can be filtered as you requested.

--Mike

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

 Let's say I've got a datagrid containing a persons gifts to the 
 University.  Each item has a gift id, pledge id, legal and soft credit 
 amounts, a fund code to which the gift is being credited, etc.
 
 By default, the grid loads all of a persons gifts.
 
 I'd like to be able to filter the data by fund - A simple way is to
just 
 use the sort functionality of the columns themselves, and then just 
 havee them scroll down to find what they're looking for.
 
 But is there a simple way to filter the contents of a datagrid without 
 going back to the server to re-retrieve the results?
 
 I could probably put the dataProvider into memory, then loop through
it, 
 creating a filtered dataprovider and assign it to the grid..  but I'm 
 kind of hoping for a simpler solution :)
 
 rick






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: filterFunction between ViewStack MXML components

2006-10-31 Thread Michael Labriola
 source=assets/world_link.png autoLoad=true
height=100% 
 verticalAlign=middle scaleContent=false id=image1/
   mx:LinkButton label=Internet width=63
click=internetClick(event); 
 textAlign=left toolTip=Klicka här om du befinner dig utanför hemmet 
 id=linkbutton1/
   /mx:HBox
   /mx:VBox
 /mx:Canvas
 
 
 --- In flexcoders@yahoogroups.com, Michael Labriola labriola@ wrote:
 
  
  If I understand your question correctly (and I am not sure that I do),
  I would personally put your filter function in the file that currently
  calls the HTTPService and gets the result. Unless you are using one of
  the, or your own, common frameworks, most people seem to put this in
  their main application file. 
  
  Depending a lot on how your code is constructed, you can probably
  apply this filter function in the result handler for your
HTTPService.  
  
  If I am missing the point, or your setup is more complex, let me know.
  
  As an aside, please take a look at the refresh method of the
  ListCollectionView. If you are not actually replacing the whole
  collection, you could use this to simply apply the filter.
  
  --Mike
  
  --- In flexcoders@yahoogroups.com, pioplacz icep87@ wrote:
  
   Hi! 
   
   I was just wondering is it possible to make a filterfunction work
  between ViewStack 
   components. What i mean is i'm calling the HTTP service in my
  main.mxml but showing 
   the results in MovieView.mxml passing the data works fine. But i
  can't figure out where i 
   should write the filter function:
   
 // Filter function 
 public function movieFilter(item:Object):Boolean
 {
 var result:Boolean=false;
 if (!item.title.length
   ||
  item.title.toUpperCase().indexOf(filterInput.text.toUpperCase()) = 0)
   if (!item.genres.length
   ||
 
item.genres.toUpperCase().indexOf(genresInput.selectedItem.data.toUpperCase
   ()) = 0)
 result=true;
   
 return result;
  }
   
   and where i should put:
   
   movieCollection.filterFunction=movieFilter;
   
   From the beginning i had all that in my Main.mxml and it worked
  fine. Can somebody help 
   me, if you even get what i mean ?
  
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Custom datagridcolumns

2006-10-31 Thread Michael Labriola

Rick,

Just one more comment on your labelFunction versus subclass of
DataGridColumn. There are times to subclass, but, what you are doing
here really seems like a good argument for a labelFunction.

You don't have to build a function for every column, so, if you
rewrote your labelFunction like this:

mx:CurrencyFormatter id=currency precision=2 rounding=nearest/

mx:DataGridColumn width=80 headerText=Legal Credit
labelFunction=formatLegalCredit dataField=LEGCRAMT/

public function formatLegalCredit(data:Object, column:DataGridColumn
):String {
  return currency.format(data[ column.dataField ]);
}

You would now have one function that would format any dataGrid column
because it uses the dataField to know where to grab the data. Does
this make sense?

--Mike


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

 ping...
 
 Rick Root wrote:
  
  
  I'm working on a datagrid that has various formatted items in it..
  several currency columns, a data column, etc.
  
  Using a label function for each seems somewhat overkill.
  
  Ie...
  
  mx:DataGridColumn width=80 headerText=Legal Credit
  labelFunction=formatLegalCredit/
  
  And here's my function:
  
  public function formatLegalCredit(data, col):String {
  var currency = new CurrencyFormatter();
  currency.precision = 2;
  currency.rounding = nearest;
  return currency.format(data.LEGCRAMT);
  }
  
  But I'd have to build this function for every column with a number in
  it. Bleagh. Gotta be a better way.
  
  Can I build a datagridcolumn that automatically has a
currencyFormatter
  - or a dataFormatter - built into it?
  
  Is there a better way?
  
  Rick
  
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Training from the Source - Can't find my error

2006-10-31 Thread Michael Labriola

Glad you are enjoying it.

We have occasionally seen the same thing. The flex compiler seems to
get confused with the inline renderer and the valueObject.

This line is the cause:

outerDocument.removeItem(valueObjects.ShoppingCartItem(data));

You can literally go an modify this line by adding a space before the
word valueObject. Then remove the space and all will work next time
your compile. 

It doesn't happen everytime on every computer. If it becomes
problematic, just remove the entire click event from the delete in the
shopping cart. My guess is that by this point in the book, you
understand how that is supposed to work.

--Mike

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

 I am working through the Adobe Flex 2 - Training from the Source book.
 (Excellent book, BTW). I am in chapter 11 on the section Create an
 inline MXML Item Renderer for Displaying the Remove Button. I can't
 get beyond this section, because my code won't compile with the
 following error:
 
 1120: Access of undefined property
 valueObjects. FlexGrocer/views/ecomm  Cart.mxml
/FlexGrocer/views/ecomm/Cart.mxml   1162264545587   243
 
 Here's my data grid:
 
   mx:DataGrid
   id=cartView
   dataProvider={cart.aItems} width=100% height=100%
   editable=true draggableColumns=false
   variableRowHeight=true
   mx:columns
   mx:DataGridColumn dataField=product 
 headerText=Product
   itemRenderer=renderer.ecomm.ProductName 
 editable=false/
   mx:DataGridColumn dataField=quantity
   itemEditor=mx.controls.NumericStepper
   editorDataField=value editable=true 
 headerText=Quantity /
   mx:DataGridColumn dataField=subtotal 
 headerText=Amount
 labelFunction=renderPriceLabel editable=false /
   mx:DataGridColumn editable=false
   mx:itemRenderer
   mx:Component
   mx:VBox
   mx:Button
   label=Remove
   
click=outerDocument.removeItem(valueObjects.ShoppingCartItem(data));/
   /mx:VBox
   /mx:Component
   /mx:itemRenderer
   /mx:DataGridColumn
   /mx:columns
   /mx:DataGrid
 
 It's choking on the click event of the inner Button component.
 
 I've even copied the code from the CD into my project but I get the
same error.
 
 Anyone see what I'm doing wrong?
 
 Thanks!
 
 Todd






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: filterFunction between ViewStack MXML components

2006-10-31 Thread Michael Labriola

If you have a moment, send me the code off the list ..
[EMAIL PROTECTED] and I will be glad to work with you to get this running.

--Mike

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

 Still not working it says it cannot connect to the filterInput and
genresInput and those 
 two are located in MovieView.mxml
 
 
 --- In flexcoders@yahoogroups.com, Michael Labriola labriola@ wrote:
 
  
  In your result handler, call the refresh method after you set the
  filterFunction.
  
  --Mike
  
  --- In flexcoders@yahoogroups.com, pioplacz icep87@ wrote:
  
   Yes, i want to put my filter function in the main mxml file where
  all my HTTPServices are 
   locates. I have already apply my filterfunction in the result
  handler in the HTTPService the 
   problem is that i cannot get it to connect with the textinput
  located in a MXML ViewStack 
   component. 
   
   I pass my code here for both Main.MXML and MovieView.MXML. 
   
   Hopes this help you all to help me.
   
   Main.MXML:
   
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* 
   layout=absolute
 horizontalAlign=center verticalAlign=middle 
   backgroundGradientColors=[#00, #00] 
 width=100% height=100%  creationComplete=initApp() 
   viewSourceURL=srcview/index.html 
 
 mx:HTTPService id=movieService
  url=http://192.168.25.200/PHP/katalog.php; 
   useProxy=false
result=srv_results(event) fault=msFaultHandler(event);
  invoke=msInvokeHandler
   (event);/
   !-- HTTPSerivce for the tv-shows starts here --
   mx:HTTPService id=tvService
  url=http://192.168.25.200/PHP/tvshows.php; 
   useProxy=false result=tv_results(event)/
   mx:HTTPService id=epService
  url=http://192.168.25.200/PHP/tvepisodes.php; 
   useProxy=false result=ep_results(event)/
   !-- END --
   !--mx:Model id=ipService source=data/ip.xml/--
 mx:Style source=katalog2main.css/
   mx:Script
 ![CDATA[
 import mx.managers.CursorManager;
 import mx.collections.IViewCursor;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.InvokeEvent;
 import mx.collections.ArrayCollection;
 import mx.events.ItemClickEvent;
 import mx.controls.Alert; 
 import mx.events.CloseEvent;
   import flash.events.Event;
   
   private function initApp():void
 {
 movieService.send(); 
 tvService.send(); 
 epService.send();
 }
 
 private function msFaultHandler(event:FaultEvent):void
   {
   
   // There was an error in loading the XML
   Alert.show (event.fault.message);
   
   // Hide the busy cursor
   CursorManager.removeBusyCursor();
   }
   
   // Gets called when HTTPService is invoked to
   // request the XML.
   private function msInvokeHandler(event:InvokeEvent):void
   
   {
   // Display the busy cursor
   CursorManager.setBusyCursor();
   }

 public function srv_results(event:ResultEvent):void
 {
 movieCollection = 
   event.result.helakatalog.katalog as
  ArrayCollection;
 movieCollection.filterFunction=movieFilter;
 //Hide the busy cursor
   CursorManager.removeBusyCursor();
 }
 
 public function tv_results(event:ResultEvent):void
 {
 tvCollection = event.result.helakatalog.katalog as
ArrayCollection;
 //tvCollection.filterFunction=tvshowsFilter;
 }
 
 public function ep_results(event:ResultEvent):void
 {
 epCollection = event.result.helakatalog.katalog as
ArrayCollection;
 //epCollection.filterFunction=episodeFilter;
 }
 
 [Bindable]
 private var movieCollection:ArrayCollection;
 
 [Bindable]
 private var tvCollection:ArrayCollection;
 
 [Bindable]
 private var epCollection:ArrayCollection;
 
 // Filter function 
 public function movieFilter(item:Object):Boolean
 {
 var result:Boolean=false

[flexcoders] Re: e4x expression passed as string

2006-10-31 Thread Michael Labriola

Diego,

Stay tuned. I will post my version of the UI as soon as it is complete.

Mike

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

 Hi Mike,
 Many thanks, that was exactly what I was looking for.
 I didnt have the chance to see the code but I did some test and it
seems  
 to be working fine. At least it returns what it is expected.
 I have in mind to build some user interface to evaluate e4x
expression,  
 I'll back to the list as soon as I have something to show.
 
 BTW did Alex post anything regarding this topic in his blog?
 
 Cheers, Diego.
 
 
 On Tue, 31 Oct 2006 16:47:11 +1300, Michael Labriola [EMAIL PROTECTED]  
 wrote:
 
 
  Diego,
 
  Here is a starting point. There are probably bugs, it is bloated,
  and it is not completely tested, however, it is a starting point.
 
  A final version of this, along with some actual example code, error
  handling and other dynamic tools will eventually be available in a
  devnet article.
 
  Used as follows:
 
  import net.digitalprimates.utils.E4XParser;
  var parser:E4XParser;
  parser = new E4XParser();
 
  var returnXML:XMLList;
  //Use parser.evaluate( data:XML, expression:String );
  returnXML = parser.evaluate( myXML, '..item.(@id==2)..price' );
 
  If you find a bug, let me know off list.
 
  BTW, thanks on this and future releases also go to Alex Harui who
  started this pet project before I. (Although none of the blame for
  the bad code that currently permeates it)
 
  http://www.digitalprimates.net/src/e4x.zip
 
  --Mike
 
 
  --- In flexcoders@yahoogroups.com, Diego Guebel
  dguebel.subscription@ wrote:
 
  Hi all,
  I'm wondering if there is any method to apply an e4x expression
  passed
  as a string to an xml.
  For example I have this variable:
  private var sourceXML:XML = order
   book ISBN=0942407296
   titleBaking Extravagant Pastries with
  Kumquats/title
   author
   lastNameContino/lastName
   firstNameChuck/firstName
   /author
   pageCount238/pageCount
   /book
   book ISBN=0865436401
   titleEmu Care and Breeding/title
   editor
   lastNameCase/lastName
   firstNameJustin/firstName
   /editor
   pageCount115/pageCount
   /book
   /order
 
  and a method like this:
 
  private  function testExpression(s:String):void
  {
 // somehow, I want to apply that string as e4x expression to
  the xml
 result_txt.text = sourceXML.apply(s);
  }
 
  Any clue?
  Thanks in advance.
  Diego.
 
 
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Isn´t there any release of Adobe Apollo yet? Alpha maybe....

2006-10-31 Thread Michael Labriola

1) HTML as a DisplayObject
2) Getting rid of the browser where people believe the back button is
there only source of navigation
3) Generating desktop apps with all of the framework we have written
for flex :)

--Mike



 
 Just wondering, since I'm working on it... what features of Apollo
are people most excited about?
 
  
 
 - Gordon
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Andrew D. Goodfellow
 Sent: Tuesday, October 31, 2006 6:15 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Isn´t there any release of Adobe Apollo
yet? Alpha maybe
 
  
 
 Yep, I know how you feel. The suspense is brutal. I could have
already built and sold like 8 products built on it.
 
 There are probably too many holes in it still, or at least that's
what I keep telling myself. :o)
 
 -Andy
 
 On 10/31/06, arianrechia [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:
 
 Hi people,
 I´m very exciting about Adobe Apollo, and I´ve been looking for some
 download to try the Apollo SDK, but with no success =(
 
 anyone already have a apollo alpha realease??
 
 thanxs






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Use a Popup as itemEditor in Datagrids

2006-10-30 Thread Michael Labriola

My first thought:

I would probably write a simple component that serves as an 
itemRenderer. From within that component I would be to launch a 
modal popup window from the itemEditBeginning event. Ensure that you 
pass the row and the dataGridColumn (much like a labelFunction) to 
the new popup. Have it do whatever it is that needs to be done.

Then listen for the popup to close and manually handle the update to 
the collection through the renderer by listening to itemEditEnd.

This is just a high level thought. There are some other details, but 
the concept would probably work with a bit of tweaking.

--mike

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

 Hi!
 I'm searching for a solution, to use e.g. a popup-window as 
itemEditor
 in a flex datagrid. Using a Textinput, NumericStepper, 
Checkbox, ...
 is quite easy, but I want to have a little bigger (in size)
 component. Now I have the problem that, when I use a custom Panel
 component as itemEditor, that it will be trapped within the 
datagrid's
 dimensions.
 
 Is there another way (which I haven't found by now) to use a popup 
as
 datagrid item editor?
 
 Thanks!
 Fritz






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Accordion initialization problem

2006-10-30 Thread Michael Labriola

In flex, children are generally not created until they are actually
needed, which generally translates to: when they are displayed on the
screen. This keeps startup time and memory use down as, on average,
most users do not navigate to every corner of an app.

As suggested, you could set the creationPolicy to all, which would
cause all of the children to be created in that container on startup,
altough your app will startup slightly slower.

Understanding the creation order, combined with some testing, for example:

if ( foo ) {
  Alert.show(foo.text, 'test', Alert.OK);
}

will get you through without changing the creationPolicy.

--Mike

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

 
 You're right. The children aren't being created until they're added to
 the display list. Set your creationPolicy on the Accordion to 'all' to
 create them all as soon as the accordion is created.
 
 --- In flexcoders@yahoogroups.com, Rick Root rick.root@ wrote:
 
  I'm building an application with an accordion pane, and I'm having 
  problems accessing objects declared within a child panel.
  
  For example, look at the code I've attached to the end of this
email...
  
  When you click any of the buttons, you get the following error:
  
  TypeError: Error #1009: Cannot access a property or method of a null 
  object reference.
  at testProject/::toggleAccordion()
  at testProject/___Button1_click()
  
  
  ONLY AFTER VIEWING the second accordion pane does this go away.
  
  It's as if the children of the accordion pane aren't initialized
until 
  they are displayed.
  
  What's up with that?
  
  Here's the sample code:
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  mx:Script
  ![CDATA[
  import mx.controls.Alert;
  private function toggleAccordion(idx:int)
  {
  acdMain.selectedIndex = idx-1;
  Alert.show(foo.text, 'test', Alert.OK);
  }
  ]]
  /mx:Script
  mx:Accordion left=10 right=10 top=40 bottom=10 id=acdMain
  mx:Canvas label=Pane 1 width=100% height=100%
  /mx:Canvas
  mx:Canvas label=Pane 2 width=100% height=100%
  mx:Label id=foo text=foo/
  /mx:Canvas
  mx:Canvas label=Pane 3 width=100% height=100%
  /mx:Canvas
  /mx:Accordion
  mx:Button x=10 y=10 label=Button 1
click=toggleAccordion(1);/
  mx:Button x=83 y=10 label=Button 2
click=toggleAccordion(2);/
  mx:Button x=156 y=10 label=Button 3
 click=toggleAccordion(3);/ 
  /mx:Application
  
  rick
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: JUST SAY NO to creationPolicy=all !

2006-10-30 Thread Michael Labriola

Thank you. Thank you. Thank you.

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

 rant
 
  
 
 Several times a week someone complains that they can't seem to set data
 into controls on the second, third, etc. pane of a ViewStack, Accordion,
 or TabNavigator because these controls don't get created until the user
 navigates to the pane they're on.
 
  
 
 Inevitably there are multiple replies solving this problem by setting
 creationPolicy=all. Inevitably I reply that Adobe doesn't recommend
 doing this because it defeats the entire purpose of the deferred
 instantiation feature, which is to minimize startup time by not creating
 visual components until they need to be seen.
 
  
 
 A much better technique is to use event handlers to get the appropriate
 data into the controls after they get created. For example, you can use
 the 'initialize' event on each pane, which won't get dispatched until
 after that pane's controls exist.
 
  
 
 mx:Accordion
 
 mx:VBox initialize=textInput1.text='Hello'
 
 mx:TextInput id=textInput1/
 
 /mx:VBox
 
 mx:VBox initialize=textInput2.text='World'
 
 mx:TextInput id=textInput2/
 
 /mx:VBox
 
 /mx:Accordion
 
  
 
 Using databinding is another good technique. The bindings will occur
 after the controls get created.
 
  
 
 I've never seen a case where it is necessary to push data into the
 controls before they exist. If you must put the data somewhere in the
 meantime, store it in data vars, which have none of the startup cost of
 a visual component, and then move it into the controls after they get
 created.
 
  
 
 /rant
 
  
 
 - Gordon, the Flex framework engineer who designed and implemented the
 deferred instantiation feature, so listen to me on this one!






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: A web survey based on Flex

2006-10-30 Thread Michael Labriola

Okay, so a few things. A Shared Object can store things that are more
complicated than name value pairs. In fact, it can store complex data
structures, but not things like methods or typed value objects.

That said: You could store your data in a value object in the
application. That value object could be written to disk in a shared
object. 

Then you could load that shared object later and convert it back to a
value object using something like :

http://www.darronschall.com/weblog/archives/000247.cfm - by Darron Schall

If this doesn't make sense, email me off the list and I will be glad
to help walk you through it.

--Mike


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

 --- In flexcoders@yahoogroups.com, Michael Labriola labriola@ 
 wrote:
 
  
  Overall it is not a bad way to proceed. The only place I might 
 direct
  you some place different is where you save to the local drive if the
  server is unavailable.
  
  For this part, I would suggest you take a look at a concept called
  'Local Shared Objects'
  
  Without knowing all of the details of your setup, I would suggest 
 that
  saving an XML file to their system without the help of a server is
  going to be tricky if not impossible.
  
  --Mike
  
 
 Thanks Mike... I did a bunch of Googling on Local Shared Objects, 
 and I think I understand a little bit better now what I might do.  
 However, it sounds like this 100% replaces the mxml file that I had 
 created that was to represent my survey object... is that correct?  
 Essentially I'll just be creating this empty object with it's own 
 name, and stuffing key-value pairs into it upon each submit of a 
 ViewStack Canvas?
 
 After storing all that in this generic empty object, how do I get it 
 to the server for proper storage in a database, and what would be the 
 best way to split out the data for later analysis?
 
 I really need some help here - I think I'm really missing something 
 important, and I'm getting desperate to deliver this survey soon... 
 any help or direct contact with me would be fantastic, if someone's 
 willing to help out a newbie.
 
 Thanks,
 
 m






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: filterFunction between ViewStack MXML components

2006-10-30 Thread Michael Labriola

If I understand your question correctly (and I am not sure that I do),
I would personally put your filter function in the file that currently
calls the HTTPService and gets the result. Unless you are using one of
the, or your own, common frameworks, most people seem to put this in
their main application file. 

Depending a lot on how your code is constructed, you can probably
apply this filter function in the result handler for your HTTPService.  

If I am missing the point, or your setup is more complex, let me know.

As an aside, please take a look at the refresh method of the
ListCollectionView. If you are not actually replacing the whole
collection, you could use this to simply apply the filter.

--Mike

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

 Hi! 
 
 I was just wondering is it possible to make a filterfunction work
between ViewStack 
 components. What i mean is i'm calling the HTTP service in my
main.mxml but showing 
 the results in MovieView.mxml passing the data works fine. But i
can't figure out where i 
 should write the filter function:
 
   // Filter function 
   public function movieFilter(item:Object):Boolean
   {
   var result:Boolean=false;
   if (!item.title.length
 ||
item.title.toUpperCase().indexOf(filterInput.text.toUpperCase()) = 0)
 if (!item.genres.length
 ||
item.genres.toUpperCase().indexOf(genresInput.selectedItem.data.toUpperCase
 ()) = 0)
   result=true;
 
   return result;
}
 
 and where i should put:
 
 movieCollection.filterFunction=movieFilter;
 
 From the beginning i had all that in my Main.mxml and it worked
fine. Can somebody help 
 me, if you even get what i mean ?






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: ViewStack.addChild() / createChild()

2006-10-30 Thread Michael Labriola

Libby,

Like this:

var newClass:DisplayObject = new MyClassToAdd();
var newChild:DisplayObject = viewStack.addChild(newClass);

--Mike


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

 Hello
 In 1.5 I was adding complex components to a viewstack by doing
 addChild(nameOfMXMLObject). This of course does not work in Flex 2.0.
 I have been trying unsuccessfully to do
 viewStack.createChild(nameOfMXMLObject). Should this be working or
 what is the correct method to dynamically add children to a
 viewstack in 2.0?
 
 Thanks,
 Libby






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: e4x expression passed as string

2006-10-30 Thread Michael Labriola

Diego,

Here is a starting point. There are probably bugs, it is bloated, 
and it is not completely tested, however, it is a starting point.

A final version of this, along with some actual example code, error 
handling and other dynamic tools will eventually be available in a 
devnet article. 

Used as follows:

import net.digitalprimates.utils.E4XParser;
var parser:E4XParser;
parser = new E4XParser();

var returnXML:XMLList;
//Use parser.evaluate( data:XML, expression:String );
returnXML = parser.evaluate( myXML, '..item.(@id==2)..price' );

If you find a bug, let me know off list. 

BTW, thanks on this and future releases also go to Alex Harui who 
started this pet project before I. (Although none of the blame for 
the bad code that currently permeates it)

http://www.digitalprimates.net/src/e4x.zip

--Mike


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

 Hi all,
 I'm wondering if there is any method to apply an e4x expression 
passed  
 as a string to an xml.
 For example I have this variable:
 private var sourceXML:XML = order
  book ISBN=0942407296
  titleBaking Extravagant Pastries with 
Kumquats/title
  author
  lastNameContino/lastName
  firstNameChuck/firstName
  /author
  pageCount238/pageCount
  /book
  book ISBN=0865436401
  titleEmu Care and Breeding/title
  editor
  lastNameCase/lastName
  firstNameJustin/firstName
  /editor
  pageCount115/pageCount
  /book
  /order
 
 and a method like this:
 
 private  function testExpression(s:String):void
 {
   // somehow, I want to apply that string as e4x expression to 
the xml
   result_txt.text = sourceXML.apply(s);
 }
 
 Any clue?
 Thanks in advance.
 Diego.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Data in ViewStack Component

2006-10-29 Thread Michael Labriola

Can you explain more about what you are trying to do?

I see that you have 3 arrayCollections.

Only 1 of them seems to be used in the code, and, in that one, you are
only using the length property.

Please provide details about what you are trying to accomplish.

Thanks,
--Mike

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

 I have a question about how to bind data in a viewstack component.
How can i make my 
 ArrayCollection to work in the viewstack component? 
 
 Here is my code...
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
   horizontalAlign=center verticalAlign=middle 
 backgroundGradientColors=[#00, #00] 
   width=100% height=100%  creationComplete=initApp() 
 viewSourceURL=srcview/index.html xmlns=*
   mx:HTTPService id=movieService
url=http://192.168.25.200/PHP/katalog.php; 
 useProxy=false
  result=srv_results(event)/
 !-- HTTPSerivce for the tv-shows starts here --
 mx:HTTPService id=tvService
url=http://192.168.25.200/PHP/tvshows.php; 
 useProxy=false result=tv_results(event)/
 mx:HTTPService id=epService
url=http://192.168.25.200/PHP/tvepisodes.php; 
 useProxy=false result=ep_results(event)/
 !-- END --
 mx:Model id=ipService source=data/ip.xml/
   mx:Style source=katalog2main.css/
 mx:Script
   ![CDATA[
import mx.collections.IViewCursor;
   import mx.rpc.events.ResultEvent;
   import mx.collections.ArrayCollection;
   import mx.events.ItemClickEvent;
   import mx.controls.Alert; 
   import mx.events.CloseEvent;
 import flash.events.Event;
 
 private function initApp():void
   {
   movieService.send(); 
   tvService.send(); 
   epService.send();
   }
  
   public function srv_results(event:ResultEvent):void
   {
   //Alert.show(ObjectUtil.toString(event.result) );
   movieCollection = event.result.helakatalog.katalog as
ArrayCollection;
   //movieCollection.filterFunction=movieFilter;
   }
   
   public function tv_results(event:ResultEvent):void
   {
   tvCollection = event.result.helakatalog.katalog as 
 ArrayCollection;
   //tvCollection.filterFunction=tvshowsFilter;
   }
   
   public function ep_results(event:ResultEvent):void
   {
   epCollection = event.result.helakatalog.katalog as 
 ArrayCollection;
   //epCollection.filterFunction=episodeFilter;
   }
   
   [Bindable]
   private var movieCollection:ArrayCollection;
   
   [Bindable]
   private var tvCollection:ArrayCollection;
   
   [Bindable]
   private var epCollection:ArrayCollection;
   ]]
 /mx:Script
 mx:VBox width=85% height=100% verticalCenter=20
id=mainVbox 
 horizontalCenter=0 horizontalAlign=center verticalAlign=middle
 mx:ViewStack width=100% height=80% creationPolicy=all
   TvView id=tvView label=TV/ 
   /mx:ViewStack
   mx:ApplicationControlBar id=dockedBar dock=true 
 width=100%
 mx:HBox horizontalAlign=right paddingBottom=5
paddingTop=5
 mx:Image source=assets/zoom.png autoLoad=true
height=100% 
 verticalAlign=middle scaleContent=false/
 mx:TextInput id=filterInput text=
change=movieCollection.refresh(); 
 width=166 toolTip=Skriv../
 mx:Spacer width=100% id=spacer1/
 mx:Image source=assets/color_swatch.png
autoLoad=true height=100% 
 verticalAlign=middle scaleContent=false/
 mx:Text text=Kategori color=#ff fontSize=12
fontFamily=Arial 
 fontWeight=bold textAlign=left selectable=false/
 /mx:HBox
 mx:HBox horizontalAlign=right width=100% paddingBottom=5 
 paddingTop=5
 mx:Image source=assets/application_cascade.png
autoLoad=true 
 height=100% verticalAlign=middle scaleContent=false id=image2/
 mx:LinkButton id=stchange label=Byta läge
textAlign=left width=69 
 click=currentState='Grid'/
 mx:Image source=assets/film.png autoLoad=true
height=100% 
 verticalAlign=middle scaleContent=false id=image3/
 mx:Text id=counterText
text={movieCollection.length} paddingTop=2 
 color=#ff fontWeight=bold textAlign=left width=30
height=20 
 selectable=false toolTip=Antal filmer som visas/
   !--mx:LinkButton id=intlink label=Download /--
 /mx:HBox
 /mx:ApplicationControlBar
   mx:HBox id=footer width=100%
   mx:LinkButton id=tvchange label=TvShows/

[flexcoders] Re: Data in ViewStack Component

2006-10-29 Thread Michael Labriola

Okay,

So, a few things:

#1) your TvView component must have either a property or a
getter/setter method to hold the data from the collection. So, for
example, you might have a bindable public property inside of TvView
called 

[Bindable]
var myDataProvider:ArrayCollection;

Then inside of the TvView component, your horizontal list would use
this variable as its dataprovider.

So

mx:HorizontalList dataProvider={myDataProvider}/

Then, inside of the MXML file that you posted, your TvView component
would be called like this:

mx:ViewStack width=100% height=80% creationPolicy=all
  TvView id=tvView label=TV myDataProvider={epCollection}/ 
/mx:ViewStack

Does that make sense?
Mike


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

 If you look at my ViewStack code i have a component name TvView.
That is a MXML file 
 with a horizontalList and for that list i wan the epCollection to be
a dataprovider. With 
 simpel words what i'm trying to do is to make epCollection result to
work in a diffrent 
 MXML file. 
 
 Is is a better explenation? 
 --- In flexcoders@yahoogroups.com, Michael Labriola labriola@ wrote:
 
  
  Can you explain more about what you are trying to do?
  
  I see that you have 3 arrayCollections.
  
  Only 1 of them seems to be used in the code, and, in that one, you are
  only using the length property.
  
  Please provide details about what you are trying to accomplish.
  
  Thanks,
  --Mike
  
  --- In flexcoders@yahoogroups.com, pioplacz icep87@ wrote:
  
   I have a question about how to bind data in a viewstack component.
  How can i make my 
   ArrayCollection to work in the viewstack component? 
   
   Here is my code...
   
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute
 horizontalAlign=center verticalAlign=middle 
   backgroundGradientColors=[#00, #00] 
 width=100% height=100%  creationComplete=initApp() 
   viewSourceURL=srcview/index.html xmlns=*
 mx:HTTPService id=movieService
  url=http://192.168.25.200/PHP/katalog.php; 
   useProxy=false
result=srv_results(event)/
   !-- HTTPSerivce for the tv-shows starts here --
   mx:HTTPService id=tvService
  url=http://192.168.25.200/PHP/tvshows.php; 
   useProxy=false result=tv_results(event)/
   mx:HTTPService id=epService
  url=http://192.168.25.200/PHP/tvepisodes.php; 
   useProxy=false result=ep_results(event)/
   !-- END --
   mx:Model id=ipService source=data/ip.xml/
 mx:Style source=katalog2main.css/
   mx:Script
 ![CDATA[
  import mx.collections.IViewCursor;
 import mx.rpc.events.ResultEvent;
 import mx.collections.ArrayCollection;
 import mx.events.ItemClickEvent;
 import mx.controls.Alert; 
 import mx.events.CloseEvent;
   import flash.events.Event;
   
   private function initApp():void
 {
 movieService.send(); 
 tvService.send(); 
 epService.send();
 }

 public function srv_results(event:ResultEvent):void
 {
 //Alert.show(ObjectUtil.toString(event.result) 
   );
 movieCollection = 
   event.result.helakatalog.katalog as
  ArrayCollection;
 //movieCollection.filterFunction=movieFilter;
 }
 
 public function tv_results(event:ResultEvent):void
 {
 tvCollection = event.result.helakatalog.katalog as
ArrayCollection;
 //tvCollection.filterFunction=tvshowsFilter;
 }
 
 public function ep_results(event:ResultEvent):void
 {
 epCollection = event.result.helakatalog.katalog as
ArrayCollection;
 //epCollection.filterFunction=episodeFilter;
 }
 
 [Bindable]
 private var movieCollection:ArrayCollection;
 
 [Bindable]
 private var tvCollection:ArrayCollection;
 
 [Bindable]
 private var epCollection:ArrayCollection;
 ]]
   /mx:Script
   mx:VBox width=85% height=100% verticalCenter=20
  id=mainVbox 
   horizontalCenter=0 horizontalAlign=center
verticalAlign=middle
   mx:ViewStack width=100% height=80% creationPolicy=all
 TvView id=tvView label=TV/ 
 /mx:ViewStack
 mx:ApplicationControlBar id=dockedBar dock=true 
   width=100%
   mx:HBox horizontalAlign=right paddingBottom=5
  paddingTop=5
   mx:Image source=assets/zoom.png autoLoad

[flexcoders] Re: Convert Object to a Value Object

2006-10-29 Thread Michael Labriola

nicely done

--- In flexcoders@yahoogroups.com, Darron J. Schall [EMAIL PROTECTED] wrote:

 Interesting, Yahoo garbled most of the content of that message.  Here's 
 what I actually sent:
 
 For those having trouble converting generic objects into class
instances 
 (Value Objects), I've created an ObjectTranslator.objectToInstance 
 method to take care of the problem: 
 http://www.darronschall.com/weblog/archives/000247.cfm
 
 Essentially, it allows you to convert any plain old object into a class 
 instance.  Usage is as follows:
 
 import com.darronschall.examples.vo.Book;
 import com.darronschall.serialization.ObjectTranslator;
 
 // Define an object with properties that mimic the variable names
 // inside of the Book class
 var bookObj:Object = { title: My Book title, pageCount: 10,
inLibrary: true };
 
 // Convert the generic object into an instance of the Book class
 var book:Book = ObjectTranslator.objectToInstance( bookObj, Book )
as Book;
 
 
 Originally it was written so that JSON behaved more like RemoteObject 
 (returning class instances from the server instead of just plain 
 objects), but the method is generic enough to be useful in a lot of 
 situations.
 
 Hope that helps...
 
 -d
 
 Darron J. Schall wrote:
 
  Originally it was written so that JSON behaved more like RemoteObject 
  (returning class instances from the server instead of just plain 
  objects), but the method is generic enough to be useful in a lot of 
  situations.
 
  Hope that helps...
 
  -d
 
  mvbaffa wrote:
 
 
  - Type Coercion failed: cannot convert [EMAIL PROTECTED] to
  com.mvb.boe.vo.UserAccountVO.
 
 
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Changing mx:Application's width during runtime

2006-10-29 Thread Michael Labriola

I know this is not actually the answer to the question, however, is it
necessary to specifically set the width and height to literals, or
could they just be set to 100%?

--Mike

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

 When I run my application where mx:Application's width is 640x480, by 
 default, it shows a gradient blue square depicting those screen 
 dimensions.
 
 I then try to dynamically change the width to 1024 in actionscript when 
 a button is clicked. I had trace'd the application width after 
 changing it, and it does say the width is now 1024, but the screen 
 still shows 640x480. How can I make the application refresh to reflect 
 this new change in width? I tried invalidateSize(), 
 invalidateProperties, but neither works.
 
 Thanks.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: A web survey based on Flex

2006-10-28 Thread Michael Labriola

Overall it is not a bad way to proceed. The only place I might direct
you some place different is where you save to the local drive if the
server is unavailable.

For this part, I would suggest you take a look at a concept called
'Local Shared Objects'

Without knowing all of the details of your setup, I would suggest that
saving an XML file to their system without the help of a server is
going to be tricky if not impossible.

--Mike

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

 I posted this on the Adobe web forum, but I think I'll have better 
 luck posting here.
 
 I am a newbie to flex... using flex 2 builder and cfmx 7.0.2.  I have 
 my first project to be done in flex --  a fairly large web survey.
 
 So far I've built the UI using a ViewStack... each canvas has one or 
 more related questions.  There's a previous/next button row at the 
 bottom, and I eventually need it to work in such a way as to not 
 allow NEXT to be clicked unless all fields on the canvas are filled 
 in.
 
 My MXML file is huge, but one design goal I had was to have the 
 entire survey be loaded by the user, and not communicate with the 
 server again until the user has made choices on all fields and is 
 ready to submit.  This way, I'm hoping I can try to capture the data 
 in the event that the user has an internet problem and let them try 
 again or save their choices to an XML file and either email it or 
 upload it later when they are back online.  This is a nice thing to 
 do for the user, since the survey is so long.  I just want to prevent 
 the survey from being interrupted, since it's so long. If the entire 
 survey is loaded when the person loads the swf, and I can just 
 attempt to send one survey object back to the server at the end, I 
 can trap errors and provide another route to go.
 
 I was going to use mx:Form to build the forms on each ViewStack 
 Canvas... one form for each canvas, but still all bound to a single 
 Survey object, as follows...
 
 So then I created a Survey.xml file that I was going to use with 
 mx:Model, and try to simply create an xml tree representing a Survey 
 object, it's metadata (startDateTime, endDateTime, IP address, 
 etc.), and it's questions and answers.  My thought was that I could 
 populate this Survey object as the user progressed through the 
 ViewStack, and then send the entire object to the server when 
 complete, and if that failed, ask them to try again or offer to save 
 the XML file to their system for later upload or emailing.
 
 Is this a reasonable way to proceed?  What are the pitfalls?  Is 
 there something different I should be considering?
 
 Thanks,
 
 M






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Convert Object to a Value Object

2006-10-28 Thread Michael Labriola

2 more things to consider.

Not sure of your particular setup, but, you may want to look at the
[Managed] metadata tag. Setup dependent, it may be what you are
looking for.

Second, and more generally, casts fail when the system cannot convert
one type to another. So, take a look at your objects. You mentioned
setting the params one by one, a common technique is to build a static
method which accepts an Object and returns (by internally assigning
the properties) your value object.

Just a couple of thoughts,
--Mike




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

 Try assigning it via the preferred method:
  
 userAccount = event.result as UserAccountVO;
  
 Shan
 
_  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of mvbaffa
 Sent: Saturday, October 28, 2006 2:36 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Convert Object to a Value Object
 
 
 
 Hi All,
 
 This is pretty basic but I cannot find the problem. I have service 
 that returns a userAccountVO. When I receive the result I am trying 
 to convert the event.result, that is an Object, to UserAccountVO and 
 I receive an error:
 
 - Type Coercion failed: cannot convert [EMAIL PROTECTED] to 
 com.mvb.boe.-vo.UserAccountVO-.
 
 Well the code is very simple like this:
 
 var userAccount: UserAccountVO = new UserAccountVO(-);
 userAccount = UserAccountVO(-event.result)-;
 
 In another application I had the same problem but solved it 
 assigning the properties one by one.
 
 What is the problem 
 
 Thanks in advance.
 
 
 
  
 
 
 --
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.408 / Virus Database: 268.13.17/505 - Release Date:
10/27/2006
 
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.408 / Virus Database: 268.13.17/505 - Release Date:
10/27/2006






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: datagrid and dataField

2006-10-28 Thread Michael Labriola

Luis,

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

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

Mike


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

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


 
 
 override public function itemToLabel(data:Object):String {
 if (!data)
 return  ;

 if (labelFunction != null)
 return labelFunction(data, this);

 if (owner.labelFunction != null)
 return owner.labelFunction(data, this);

 if (typeof(data) == xml) {
 data = deriveComplexColumn( data,  dataField
).toString();
 }

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

 if (data is String)
 return String(data);

 try {
 return data.toString();
 }
 catch(e:Error) {
 }

 return  ;
 }

 // function from Michael Labriola from Flexcoders mail list
 protected function deriveComplexColumn( data:Object, 
 complexFieldName:String ):Object {
 var dataPtr:Object = data;
 var complexName:Array = complexFieldName.split( '.', 10 );

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

---
 
 the bad thing is that now sorting on the datagridcolumn doesn't work 
 anymore...  and need to be made by hand again...
 argh!
 will just wait for the client ask for this.  ;)
 
   best regards!
 
 Luís Eduardo.
 
 
 
 Michael Labriola escreveu:
 
 
  You are correct. By default the dataField on DataGridColumn only goes
  to the root level of the structure you are passing.
 
  If you are feeling a little ambitious, you can subclass dataGridColumn
  and do something like this:
 
  protected function deriveComplexColumn( data:Object,
  complexFieldName:String ):Object
  {
  var dataPtr:Object;
 
  dataPtr = data;
 
  var complexName:Array;
  complexName = complexFieldName.split( '.', 10 );
 
  for each ( var key:String in complexName )
  {
  dataPtr = dataPtr[ key ];
  }
 
  return dataPtr;
  }
 
  Then in your itemToLabel method, you can replace this:
 
   try
   {
   data = data[dataField];
   }
 
  with this:
  try
  {
  data = deriveComplexColumn( data, dataField );
  }
 
  ...If you don't want to make your own subclass of dataField, then you
  could do the same thing with an itemRenderer or a labelFunction.
 
  So:
 
  public function myLabelFunc( row:Object, column:DataGridColumn
):String {
  return deriveComplexColumn( row, column.dataField ) as String;
  }
 
  Have fun,
  Mike
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, Luis Eduardo illogic_code@ 
  wrote:
  
  
   yeah... i guess too that if the xml had another format it should
  work...
   but it can't have another format... :(.
   the servlets are coded already and they return a xml that have the
   format i presented on this sample.
   not the same data, but this is the format.
  
   i search inside the DataGridColumn.as code and find a function named
   itemToLabel that have this portion of code:
  
   if (typeof(data) == object || typeof(data) == xml)
   {
   try
   {
   data = data[dataField];
   }
   catch(e:Error)
   {
   data = null;
   }
   }
  
   so, i guess that this way of getting data from a XML (using
brackets)
   only can fetch one level of info on the xml format. Not inside his
   childrens.
   in the end, this line of code will probably be evaluated to this:
  data
   = [EMAIL PROTECTED]
   To me, this is a bug or, being optmistic, a limitation.
  
   can someone confirm that? Tracy? Gordon

[flexcoders] Re: Undocumented AS2 - AS3 migration issues

2006-10-27 Thread Michael Labriola


Link just became LinkButton in 2.0

Best luck,
Mike

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

 While I've been porting a huge application from Flex 1.5 to Flex 2.0,
 every now and then I come across things that just weren't mentioned
 anywhere in the migration docs.  I'm sure lots of other folks have
 been doing such ports and have come across undocumented issues that
 they had to figure out on their own; it would be nice if there were
 somewhere to collect these issues to save others time in the future.
 
 Here's one:
 
 mx:Link / - doesn't exist in Flex 2.0.  I would've thought that was
 a basic one, maybe I missed something?  But run a search in the
 migration doc for that tag and it doens't even come up.
 
 Cheers.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: datagrid and dataField

2006-10-27 Thread Michael Labriola

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

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

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

dataPtr = data;

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

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

return dataPtr;
}

Then in your itemToLabel method, you can replace this:

 try
 {
 data = data[dataField];
 }

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

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

So: 

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

Have fun,
Mike


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

 
   yeah...  i guess too that if the xml had another format it should
work...
   but it can't have another format...  :(.
   the servlets are coded already and they return a xml that have the 
 format i presented on this sample.
   not the same data, but this is the format.
 
   i search inside the DataGridColumn.as code and find a function named 
 itemToLabel that have this portion of code:
 
 if (typeof(data) == object || typeof(data) == xml)
 {
 try
 {
 data = data[dataField];
 }
 catch(e:Error)
 {
 data = null;
 }
 }
 
 so, i guess that this way of getting data from a XML (using brackets) 
 only can fetch one level of info on the xml format. Not inside his 
 childrens.
 in the end, this line of code will probably be evaluated to this:  
data 
 = [EMAIL PROTECTED]
 To me, this is a bug or, being optmistic, a limitation.
 
 can someone confirm that?Tracy? Gordon? anyone?
 
 
 
 
 thunderstumpgesatwork escreveu:
 
  Hi,
 
  my guess is that your dataField cannot support the complex
  [EMAIL PROTECTED]... it should be just a single field name.
 
  To me the XML makes more sense (and is simpler) like this:
 
   mx:XMLList id=employees
   employee Id=1 gender=female
   nameChristina Coenraets/name
   /employee
   employee Id=2 gender=male
   nameMaurice Smith/name
   /employee
   /mx:XMLList
 
  this makes your dataField just @gender which I think should work.
 
  good luck.
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, Luis Eduardo illogic_code@ 
  wrote:
  
  
  
   i could solve part of my problem with a workaround, but not all is
   working ok. (i could display the data but the sorting capability is
  gone).
   someone have an ideia of how to make this on the rigth path?
   i am using the labelFunction property of the datagrid like this:
  
   ?xml version=1.0?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
  http://www.adobe.com/2006/mxml
   mx:Script
   ![CDATA[
   public function getRowLabel(item:Object,
   column:DataGridColumn):String {
   return [EMAIL PROTECTED];
   }
   ]]
   /mx:Script
  
   mx:XMLList id=employees
   employee Id=1
   name gender=femaleChristina Coenraets/name
   /employee
   employee Id=2
   name gender=maleMaurice Smith/name
   /employee
   /mx:XMLList
  
   mx:Panel title=DataGrid Control Example height=100%
  width=100%
   paddingTop=10 paddingLeft=10 paddingRight=10
  
   mx:DataGrid id=dg width=100% height=100% rowCount=5
   dataProvider={employees}
   mx:columns
   mx:DataGridColumn dataField=@Id headerText=ID/
   mx:DataGridColumn dataField=[EMAIL PROTECTED]
   headerText=Gender labelFunction=getRowLabel/
   mx:DataGridColumn dataField=name headerText=Name/
   /mx:columns
   /mx:DataGrid
  
   mx:Form width=100% height=100%
   mx:FormItem label=Id
   mx:Label text=[EMAIL PROTECTED]/
   /mx:FormItem
   mx:FormItem label=Name
   mx:Label text={dg.selectedItem.name}/
   /mx:FormItem
   mx:FormItem label=Gender
   mx:Label text=[EMAIL PROTECTED]/
   /mx:FormItem
   /mx:Form
  
   /mx:Panel
   /mx:Application
  
  
  
  
  --
  
  
  
  
   Luis Eduardo escreveu:
  
   
hi,
   
i dont know why but my datagrid cant bind well when the format
of one
XML have childrens.
i borrow the example on the documentation and make a test to
you guys
see what i am talking about.
to see the issue, just select one row and watch the Labels get the
gender property on the right way but, using the same
notation, the
grid can't show the values.
   
thx for the help,
   
Luís Eduardo.
   
?xml 

[flexcoders] Re: TextInput control (displaying CurrencyFormatted data) question

2006-10-20 Thread Michael Labriola
Mike,

There are a bunch of ways you can approach this some more elegant than
others.

Let me give you a few hints:

#1) There is a method of the NumberBase class called parseNumberString
which will parse apart a formatted number string and give you back
something you could work with...It is used within the
CurrencyFormatter to convert what the user enter into a number so that
it can be formatted. So, one approach, you could format on a focus out
and populate your value object by parsing the number first... This
might be the route of least resistance

#2) You could create an extension of the TextInput called, let's say
CurrencyInput. You could add a property to that class for an
unformatted version of the text property. So, on valueCommit or
focusOut you could convert the string to a number and save it in the
new property. This property could then be configured as bindable and
used instead of the text property in your databinding.

The latter is the approach I would prefer, as it makes the setup
reusable. However, your mileage will vary depending on type/size of
project.

There might be another way that I am not familiar with, however, this
should work.

Let me know if you have additional questions or need to see a code
snippet,
Mike



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

 Yes, Michael - that is PRECISELY what I am asking -
 
 In my App, I have a TextInput that is bound to a ValueObject (using the
 Curly Braces method) - and this TextInput needs to display numbers
 entered by the user, as Currency once that field loses focus.
 
 Is it possible to have the user enter a number, and once the TextInput
 loses focus, have the number turn into a $00.00 format (while still
 keeping the original intact, when sending back to the server)?  I am
 sure this is quite easy to do, BUT will this get hosed up, if this value
 gets sent back to the server?
 
 This is why I mentioned, having an interim Variable hold the contents of
 the Number.
 
 Even know my DataType on the SQL Server is SmallMoney, it's still a
 Number within my VO Class File.
 
 Will this cause an error, since a String Var is required, in order to
 keep the $ format?
 
 This is where I could use some guidance...
 
 Thanks in advance for your help,
 
 Mike
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Michael Labriola
 Sent: Thursday, October 19, 2006 8:19 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: TextInput control (displaying
 CurrencyFormatted data) question
 
 
 Mike,
 
 I might need some more explanation, as I think I am missing something.
 I have a lot of textInputs that format on focus out. Is your concern
 that the data in the field is now 'formatted' so it will be useless for
 sending back to some server.
 
 Let me know and I will be glad to help more, Mike
 
 --- In flexcoders@yahoogroups.com, Mike Anderson mike@ wrote:
 
  Hello All,
  
  In all the examples I've seen for the CurrencyFormatter when it comes 
  to using a TextInput for displaying the data, it requires TWO 
  TextInputs - one that contains the value to be formatted, and one that
 
  displays the finally formatted data.
  
  Isn't there a way, where the same TextInput can be used twice?  The 
  holder of the data, and the displayer of the formatted data?  Or is 
  this simply not possible?
  
  Or is my best bet (since 2 controls would look stupid), to declare a 
  Variable that acts as the Value Holder (as well as the item being 
  bound to my DataSet), and then the actual TextInput strictly for 
  displaying to the user, the CurrencyFormatted value?
  
  As far as I can tell, this is THE way to do it - but I just wanted to 
  throw this question out there.
  
  Any comments regarding this, would be greatly appreciated!
  
  Thanks,
  
  Mike
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: E4X Help

2006-10-20 Thread Michael Labriola

Tangent,

Remove the {} from around selected :

var counties:XMLList = _myXml.state.(@label=selected).county;

Mike

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

 I try writing two comboboxes to facilitate selection of the
following XML,
 
 data
   state label=Texas data=Texas
   county label=Jones data=123 /
   county label=Taylor data=124 /
   ...
   /state
   state label=Virginia data=Virginia
   county label=Alexandria data=223 /
   county label=Arlington data=224 /
   ...
   /state
   ...
 
 
 The first combo box is named _combo1 that is populated by state
data, and I
 want to get an XML or XMLList of the counties using AS3, I wonder
whether I
 can write it in E4X syntax that looks somewhat like
 
   var selected:String = _combo1.selectedItem.toString();
   var counties:XMLList = _myXml.state.(@label = {selected}).county;
 
 I get a compiler error for the last line, and I have searched
through some
 E4X samples, didn't seem to find any help.  Any advice?
 
 Thanks!
 
 - Tangent
 
 P.S.  Or should I use XmlViewCollection, Descriptor or things like that?






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: TextInput control (displaying CurrencyFormatted data) question

2006-10-19 Thread Michael Labriola

Mike,

I might need some more explanation, as I think I am missing something.
I have a lot of textInputs that format on focus out. Is your concern
that the data in the field is now 'formatted' so it will be useless
for sending back to some server.

Let me know and I will be glad to help more,
Mike

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

 Hello All,
 
 In all the examples I've seen for the CurrencyFormatter when it comes to
 using a TextInput for displaying the data, it requires TWO TextInputs -
 one that contains the value to be formatted, and one that displays the
 finally formatted data.
 
 Isn't there a way, where the same TextInput can be used twice?  The
 holder of the data, and the displayer of the formatted data?  Or is this
 simply not possible?
 
 Or is my best bet (since 2 controls would look stupid), to declare a
 Variable that acts as the Value Holder (as well as the item being bound
 to my DataSet), and then the actual TextInput strictly for displaying to
 the user, the CurrencyFormatted value?
 
 As far as I can tell, this is THE way to do it - but I just wanted to
 throw this question out there.
 
 Any comments regarding this, would be greatly appreciated!
 
 Thanks,
 
 Mike






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: writing and using classes

2006-10-19 Thread Michael Labriola

There are many, try googling Object Oriented Tutorials

Here is a quick overview from the Flex 2 docs:
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1837.html

--Mike

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

 Thanks a lot, Mike
 
 used public static function String2Date
 and CommonFunctions.String2Date(...)
 
 I'm a search-trialanderror-and-search-again type of programmer. Just
 learning as I need something :-)
 
 Any suggestions on good OO-related basic learning sites ?
 
 --- In flexcoders@yahoogroups.com, Michael Labriola labriola@
 wrote:
 
  
  Frank,
  
  I think you might be approaching this from the wrong perspective. In
  particular, if you don't have object oriented programming experience,
  you may want to take a few minutes and read some of the many tutorials
  available online.
  
  As Flex is a pretty OO heavy environment, without this knowledge, I
  think you are going to get stuck on a lot of issues.
  
  That said, you have two choices in the code you wrote below:
  
  You could make your method static:
  
  public function String2Date becomes-
  public static function String2Date
  
  Then you could access it as:
  dfShipping.selectedDate =
  CommonFunctions.String2Date(x.result[0].shipdatum[0].toString());
  
  Or you need to create an instance of this class first.
  
  var cf:CommonFunctions = new CommonFunctions();
  dfShipping.selectedDate =
  cf.String2Date(x.result[0].shipdatum[0].toString());
  
  I do encourage you to spend a little time reading about Object
  Oriented programming, either from an Adobe resource or just an online
  tutorial. It will help you immensly.
  
  --Mike
  
  --- In flexcoders@yahoogroups.com, amigo_fd frank@ wrote:
  
   Hello,
   
   I want to make a class with a function I want to reuse in my
   application. This is new for me, so I need some help ...
   
   I've created a file CommonFunctions.as in the root of my
application
   with this code:
   
   package {
 public class CommonFunctions {
 public function String2Date(doString:String):Date {
 var doYear:int = Number(doString.substr(0,4));
 var doMonth:int = Number(doString.substr(5,2));
 var doDay:int = Number(doString.substr(8,2));
 var doHour:int = Number(doString.substr(11,2));
 var doMin:int = Number(doString.substr(14,2));
 var doSec:int = Number(doString.substr(17,2));  
 
 var myDate:Date = new Date(doYear, doMonth, doDay, 
   doHour, doMin,
   doSec);
 // showErrorDialog(doString + + + doYear + + + 
   doMonth +
+ +
   doDay + + + doHour + + + doMin + + + doSec);
 
 return myDate;
 }
 }
   }
   
   Now, how do I use in it on an other mxml-file in that application ?
   This does not work:
   
   dfShipping.selectedDate =
   String2Date(x.result[0].shipdatum[0].toString());
   
   Thanks a lot,
   Frank
  
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Validator Error Message Position

2006-10-19 Thread Michael Labriola

Not sure if this helps in your particular situation, however, the
validation error messages are really nothing more than styled tooltips. 

You have some control over tips, such as their maximum width.

Look in the Flex Help under Setting the width of ToolTips

-Mike

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

 I was having the same problem and couldn't find a solution other than
 to  insert line breaks #13; in the validator message so that they
 aren't so wide, but instead wrap to multiple lines.
 
 Paul C
 WinCorp Software, Inc.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: does FLEX2 support text direction right to left?

2006-10-17 Thread Michael Labriola

Unfortunately, no.

This is an area where I have spent countless hours trying to work
around. Flash player has absolutely no support for right to left
natively. Further, while you can manually do *some* things to fix
this, ultimately none of the text components (input, area, etc) allow
editing in RTL. So, you can *display* RTL text, however, you can not
actually edit it.

Adobe has some suggestions for workarounds. However, they all require
a significant amount of work and none can be accomplished directly in
flash player in a real-time environment.

Sorry. This is an issue which has been the subject of countless
debates and is really limiting the ability to use Flash as a serious
development platform for true international solutions. Adobe is aware
and we are all hoping that this can be resolved within the next few
releases.

--Mike

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

 hello,
 can someone tell me if flex2 have an option of RTL text?
 
 i need to use hebrew and arabic in my flex app but i know the flash
 player do not have support for RTL text. or does it?
 
 is there any way to work with RTL texts ?






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: writing and using classes

2006-10-17 Thread Michael Labriola

Frank,

I think you might be approaching this from the wrong perspective. In
particular, if you don't have object oriented programming experience,
you may want to take a few minutes and read some of the many tutorials
available online.

As Flex is a pretty OO heavy environment, without this knowledge, I
think you are going to get stuck on a lot of issues.

That said, you have two choices in the code you wrote below:

You could make your method static:

public function String2Date becomes-
public static function String2Date

Then you could access it as:
dfShipping.selectedDate =
CommonFunctions.String2Date(x.result[0].shipdatum[0].toString());

Or you need to create an instance of this class first.

var cf:CommonFunctions = new CommonFunctions();
dfShipping.selectedDate =
cf.String2Date(x.result[0].shipdatum[0].toString());

I do encourage you to spend a little time reading about Object
Oriented programming, either from an Adobe resource or just an online
tutorial. It will help you immensly.

--Mike

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

 Hello,
 
 I want to make a class with a function I want to reuse in my
 application. This is new for me, so I need some help ...
 
 I've created a file CommonFunctions.as in the root of my application
 with this code:
 
 package {
   public class CommonFunctions {
   public function String2Date(doString:String):Date {
   var doYear:int = Number(doString.substr(0,4));
   var doMonth:int = Number(doString.substr(5,2));
   var doDay:int = Number(doString.substr(8,2));
   var doHour:int = Number(doString.substr(11,2));
   var doMin:int = Number(doString.substr(14,2));
   var doSec:int = Number(doString.substr(17,2));  
   
   var myDate:Date = new Date(doYear, doMonth, doDay, 
 doHour, doMin,
 doSec);
   // showErrorDialog(doString + + + doYear + + + 
 doMonth + + +
 doDay + + + doHour + + + doMin + + + doSec);
   
   return myDate;
   }
   }
 }
 
 Now, how do I use in it on an other mxml-file in that application ?
 This does not work:
 
 dfShipping.selectedDate =
 String2Date(x.result[0].shipdatum[0].toString());
 
 Thanks a lot,
 Frank






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Binding a List to an Array

2006-10-17 Thread Michael Labriola

Steve,

Do me a favor and test something out. Make the items Array an
ArrayCollection on your own.

Here is the gist: When you pass an Array to either ComboBox or List it
makes an ArrayCollection out of it for the purposes of binding. List
does something slightly different in that it stops listening to the
existing collection first. This may mean nothing at all.

However, I am concerned that you are getting lucky on the timing of
the ComboBox. This is just a guess, but try it and post back some code
if it does not work, I will be glad to look at it.

Mike

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

 I have a binding problem that seems simple, but I can't figure it out.
  Here's the deal:
 
 I have a class that I'm using as my model.  It looks like this:
 
   [Bindable]
   public class MyModel
   {
 public var items:Array = new Array();
   }
 
 I have a class whose objects populate the array:
 
   [Bindable]
   public class MyItem
   {
 public var name:String;
   }
 
 I declare an appModel variable in the MXML (with the appropriate
 xmlns:local=* to make it work):
 
   local:ChoreAppModel id=appModel/
 
 When the app starts up I put a few test items in the array:
 
   var anItem:MyItem = new MyItem();
   anItem.name = Test 1;
   appModel.items.push(anItem);
 
   anItem:MyItem = new MyItem();
   anItem.name = Test 2;
   appModel.items.push(anItem);
 
 Now, if I create a ComboBox and bind it thusly:
 
   mx:ComboBox labelField=name
dataProvider={appModel.items}/
 
 It works:  I see Test 1 and Test 2 in my ComboBox.  But if I bind it
 to a List:
 
   mx:List dataProvider={appModel.items} labelField=name/
 
 I see nothing.  Funny thing is, if I create a global array and bind
 the list to that, it works.  So it seems to have something to do with
 the fact that the array is a property of appModel.
 
 What am I missing?
 
 Thanks.
 --
 Steve Tibbett
 [EMAIL PROTECTED]






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: ComboBox itemEditor example inside of DataGrid??

2006-10-16 Thread Michael Labriola
Mike,

I apologize in advance if this is now what you are asking, but, have
you looked at the editorDataField property?

If this isn't what you are looking for, I can post an example of a
ComboBox renderer in a DataGrid.

--Mike


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

 Hello All,
 
 I am WAY beyond frustrated at the moment, and am ready to throw this
 computer out the window right now.
 
 I've been able to get this to work in the most simple of examples - BUT,
 here is what I need to do that may be considered unique in my case
 (although, not at all uncommon in most other typical programming
 environments).
 
 In my case, my OrderDetails DataGrid contains a 'ProductID' Field from
 the 'Products' Table.  It would be redundant to create an additional
 field called ProductName within my OrderDetails Table - since it
 already exists in my Products Table.
 
 I know for a fact, that there is a way for the ComboBox itemEditor, to
 display the Label property of the Product (in this case, ProductName),
 but still leave intact, the Numeric Data property of the Product (in
 this case, ProductID) - so that part gets written back to the DataBase.
 
 I am having a TERRIBLE time, finding an example of how to have the
 ComboBox display one thing, but set the value in the DataGrid, to some
 OTHER thing - 
 
 Could any of you help me in this regard?
 
 Thanks in advance,
 
 Mike







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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Multiline ComboBox

2006-10-16 Thread Michael Labriola

Michael,

Problem is that ComboBase uses a textInput control to display the
currently selected item. The TextInput is limited to displaying a
single line of text.

You could certianly change this, but, it seems as though it will
require extending ComboBox, not just making an itemRenderer.

--Mike

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

 Does anyone know how I can get my combobox to display 2 lines as
opposed to
 only one line.  I can display 2 lines in the dropdown area, but not
in the
 main combobox display.
 
  
 
 Here is what I have so far:
 
  
 
 public function initRenderer():void
 
 {
 
 var myRenderer:ClassFactory = new ClassFactory(mx.controls.Text);
 
 myRenderer.properties = {maxHeight:60};
 
 this.cb.itemRenderer = myRenderer;
 
 }
 
  
 
 mx:ComboBox id=cb fontSize=18 maxWidth={this.width} 
 
 dataProvider={cbData}
 
 labelField={cbLabelField}
 
 selectedIndex={getSelectedIndex()}
 
 change=comboBoxChange(cb.selectedItem)/
 
  
 
 Thanks in advance,
 
  
 
 Michael






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: pop up a new window behind

2006-10-16 Thread Michael Labriola

The PopUpManager.createPopUp method calls addPopUp which, as part of
the method seems to ensure that the new Popup is on top. 

After it is created, you could manually move it around using
setChildIndex... a good place to look is at PopUpManager.bringToFront 

Hope that help a little,
Mike




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

 Anyone know how to pop up a new window behind the one currently in
 focus?






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: ComboBox itemEditor example inside of DataGrid??

2006-10-16 Thread Michael Labriola

Mike,

Take a look at this and see if it clears things up. Sorry for the long
code post... 

mx:Model id=myModel
  products
product
  ProductID1/ProductID
  ProductCategory3/ProductCategory
  ProductNameBob/ProductName
  ProductDescriptionIts Bob/ProductDescription
/product
product
  ProductID2/ProductID
  ProductCategory2/ProductCategory
  ProductNameGary/ProductName
  ProductDescriptionIts Gary/ProductDescription
/product
  /products
/mx:Model

mx:Model id=myCats
  categories
category
  CategoryID2/CategoryID
  CategoryNameNot the name of the ID/CategoryName
/category
category
  CategoryID3/CategoryID
  CategoryNamereally, not an ID/CategoryName
/category
  /categories
/mx:Model

mx:Script
  ![CDATA[
import mx.controls.ComboBox;
import mx.controls.dataGridClasses.DataGridColumn;

protected function displayProductCategoryName( row:Object,
column:DataGridColumn ):String {
  //Do anything you would like here, but, at the end of the day,
return a String
  var categoryName:String = ;

  //There exist better ways to do this part
  for ( var i:Number=0; imyCats.category.length; i++ ) {
if ( row[ column.dataField ] == myCats.category[i].CategoryID ) {
  categoryName = myCats.category[i].CategoryName;
  break;
}
  }

  return categoryName;
}
  ]]
/mx:Script

mx:DataGrid id=grid dataProvider={myModel.product} editable=true
  mx:columns
mx:DataGridColumn dataField=ProductName/
mx:DataGridColumn dataField=ProductCategory
editorDataField=selectedCategoryID
labelFunction=displayProductCategoryName
mx:itemEditor
mx:Component
mx:ComboBox
dataProvider={outerDocument.myCats.category} labelField=CategoryName
mx:Script
  ![CDATA[
public function get selectedCategoryID():String {
  return selectedItem.CategoryID;
}
  ]]
/mx:Script
  /mx:ComboBox
/mx:Component
/mx:itemEditor
/mx:DataGridColumn
mx:DataGridColumn dataField=ProductDescription/
  /mx:columns
/mx:DataGrid


--Mike

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

 Yes, I've been exploring that property all day long -
 
 There must be something else I am doing wrong here -
 
 So with that said, YES, if you could please post an example, I'd be
 grateful -
 
 Right now, I have a ComboBox Component I created - and I am binding the
 dataProvider property of it, to my Apps model.produstList property.
 And yes, this is a Cairngorm based application - but I don't think this
 should affect anything.
 
 My OrderDetails DataGrid, is populated using ValueObjects - and the
 ProductID Column initially displays only numbers.  Of course, this is
 great - since that column should only display Integer values anyway
 (this is previous to applying the itemRenderer and itemEditor).
 
 BUT, now that I want the ProductName value to display all the time, do
 I also need to declare an itemRenderer as well?  I ask this because,
 only the ComboBox populated with ProductID and ProductName, contains the
 associated information - where the underlying ProductID value contained
 behind the scenes, drives what is displayed to the user.  The issue is
 though, the itemEditor only becomes active, whenever the Cell is active
 correct?
 
 Well, bottom line is, I am so frazzled by this incident, that I am sick
 and tired of racking my brain trying to figure this out.  I wasted 2
 incredibly valuable days on this darn problem, with absolutely nothing
 to show for it.
 
 If you could please post some code and examples, I would be grateful.
 
 Thanks in advance,
 
 Mike
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Michael Labriola
 Sent: Monday, October 16, 2006 3:13 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ComboBox itemEditor example inside of
 DataGrid??
 
 Mike,
 
 I apologize in advance if this is now what you are asking, but, have you
 looked at the editorDataField property?
 
 If this isn't what you are looking for, I can post an example of a
 ComboBox renderer in a DataGrid.
 
 --Mike
 
 
 --- In flexcoders@yahoogroups.com, Mike Anderson mike@ wrote:
 
  Hello All,
  
  I am WAY beyond frustrated at the moment, and am ready to throw this 
  computer out the window right now.
  
  I've been able to get this to work in the most simple of examples - 
  BUT, here is what I need to do that may be considered unique in my 
  case (although, not at all uncommon in most other typical programming 
  environments).
  
  In my case, my OrderDetails DataGrid contains a 'ProductID' Field from
 
  the 'Products' Table.  It would be redundant to create an additional 
  field called ProductName within my OrderDetails Table - since

[flexcoders] Re: xml question

2006-10-16 Thread Michael Labriola

In your result handler, function that is called once the read is
complete, you can access this data as follows:

if ( event.result.record.category == 4 ){
}
else{
}

You can also include XML at compile time using the mx:XML tag,
however, you should not do this if the contents of the XML may change.

--Mike

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

 Hi guys
 
  
 
 I'm new to Flex...
 
 I've created a HTTPService which reads an XML file and once done calls a
 function
 
 I want this function to perform different actions based on the data
 received. How to do it?
 
  
 
 The xml looks like
 
 data
 record
   id131/id 
   category4/category 
   matc2/mat 
   nameTeste Cyro Neto/name 
 /record
 /data
 
  
 
 and for example, I want to execute some code if the category is 4,
and other
 code if it's not 4.
 
  
 
 Any other way not using HTTPService?
 
  
 
 Thanks!!






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: load date for DateField from database in correct format

2006-10-16 Thread Michael Labriola
Frank,

The problem is that the dateField is looking for a Flex Date object.
Guessing from the conversion to XML, the x.result[0].arrivaldate[0] is
an XML node which contains a String. This String needs to be made into
a Flex Date Object.

There are a few ways to do this: var myDate:Date = new Date( y, m, d,
h, m, s ); and parse it manually. Many people have spun there own code
to do this, however, this might also be a resource for you:

http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries

There are a few methods in DateUtil for parsing a string into dates.

--Mike

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

 Hello,
 
 I have a webservice which loads from a database with ASP.NET C#. Dates
 are converted into the following format:
 
 ToString(/MM/dd HH:mm:ss)
 For instance: 2002/09/01 00:00:00
 
 Within Flex they are assigned to a DateField with: 
 
 var x:XML = new XML(WsImports.WsGetImportData.lastResult);
 dfArrival.selectedDate = x.result[0].arrivaldate[0];
 
 But I get the error:
 cannot convert [EMAIL PROTECTED] element arrivaldate to Date
 
 Any ideas what would be the correct dateformat to use them in Flex ?
 
 Thanks a lot,
 Frank






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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




[flexcoders] Re: Is there a way to find an object if you know the name

2006-10-16 Thread Michael Labriola

..one more note..

You may want to also check out Referencing repeated child components
in the help docs, which is specifically about components within a
repeater.

--Mike

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

 sorry, I didn't phrase the question correctly.  I have the name of a
 component in a string variable (e.g. I've named a component
 'name=repeater_state_{divisionRepeater.currentItem.id}) and now I
want to
 be able to refer to that component dynamically.
 
 
 On 10/16/06, Gordon Smith [EMAIL PROTECTED] wrote:
 
 You simply refer to components by their id. You don't have to look
  them up by it. For example, if you have
 
 
 
  MyApp.mxml:
 
 
 
  mx:Application
 
  mx::Canvas id=c1
 
  mx:Button id=b1
 
 ...
 
 
 
  then in the Application's mx:Script methods you can write
expressions
  like b1.label.
 
 
 
  Technically, what is happening is that the MXML compiler autogenerates
 
 
 
  var c1:Canvas;
 
  var b1:Button;
 
 
 
  as instance vars of a MyApp class which extends Application. The
methods
  you write in the mx:Script become methods of this MyApp class,
so they can
  acess these instance vars.
 
 
 
  To access components inside components, you simply use the dot
operator.
 
 
 
  - Gordon
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Marlon Moyer
  *Sent:* Sunday, October 15, 2006 7:03 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Is there a way to find an object if you
know the
  name
 
 
 
  What's the equivalent of javascript's getElementById in Flex? I've
  searched the help files numerous times and can't seem to find it.
 
  Thanks
 
  --
  Marlon
 
   
 
 
 
 
 -- 
 Marlon







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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Is there a way to find an object if you know the name

2006-10-16 Thread Michael Labriola

Marlon,

So long as you know the container where the child exists, you can say:

container.getChildByName(name:String):DisplayObject 

or 

container.getChildIndex(child:DisplayObject):int 

Hope that helps,
Mike


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

 sorry, I didn't phrase the question correctly.  I have the name of a
 component in a string variable (e.g. I've named a component
 'name=repeater_state_{divisionRepeater.currentItem.id}) and now I
want to
 be able to refer to that component dynamically.
 
 
 On 10/16/06, Gordon Smith [EMAIL PROTECTED] wrote:
 
 You simply refer to components by their id. You don't have to look
  them up by it. For example, if you have
 
 
 
  MyApp.mxml:
 
 
 
  mx:Application
 
  mx::Canvas id=c1
 
  mx:Button id=b1
 
 ...
 
 
 
  then in the Application's mx:Script methods you can write
expressions
  like b1.label.
 
 
 
  Technically, what is happening is that the MXML compiler autogenerates
 
 
 
  var c1:Canvas;
 
  var b1:Button;
 
 
 
  as instance vars of a MyApp class which extends Application. The
methods
  you write in the mx:Script become methods of this MyApp class,
so they can
  acess these instance vars.
 
 
 
  To access components inside components, you simply use the dot
operator.
 
 
 
  - Gordon
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Marlon Moyer
  *Sent:* Sunday, October 15, 2006 7:03 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Is there a way to find an object if you
know the
  name
 
 
 
  What's the equivalent of javascript's getElementById in Flex? I've
  searched the help files numerous times and can't seem to find it.
 
  Thanks
 
  --
  Marlon
 
   
 
 
 
 
 -- 
 Marlon







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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: ComboBox itemEditor example inside of DataGrid??

2006-10-16 Thread Michael Labriola

Mike,

A custom class is the right way. It is just a lot harder to post.

Best luck,
Mike

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

 Thank You Michael!!
 
 It really didn't hit me, to oversimplify my original design like that...
 
 Since I am a pretty experienced programmer, I immediately jumped into
 the more advanced methods of performing this type of task -
 
 I had written custom classes, one for the itemRenderer and one for the
 itemEditor - and I had lots of code/listeners setup to react to the
 proper events.  Specifically, the DataGrid_ItemEditEnd event - which is
 used extensively for this type of thing.
 
 My guess, is that I got things so over complicated, that I was unable to
 track down what the true problem was.
 
 I will use your example though, and then re-write all my Classes, so it
 performs the exact same functions.  Hopefully, I will then get it to
 work MY way.
 
 There is absolutely nothing wrong with your methods - in fact, I
 wouldn't have been able to figure it out without your help - BUT, I
 write code in a very specific way, and I LOVE writing Packages and
 Classes - it keeps things so nice and tight - not to mention, the
 reusability factor...
 
 Well, thanks again - I truly appreciate your help on this :)
 
 Mike 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Michael Labriola
 Sent: Monday, October 16, 2006 4:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ComboBox itemEditor example inside of
 DataGrid??
 
 
 Mike,
 
 Take a look at this and see if it clears things up. Sorry for the long
 code post... 
 
 mx:Model id=myModel
   products
 product
   ProductID1/ProductID
   ProductCategory3/ProductCategory
   ProductNameBob/ProductName
   ProductDescriptionIts Bob/ProductDescription
 /product
 product
   ProductID2/ProductID
   ProductCategory2/ProductCategory
   ProductNameGary/ProductName
   ProductDescriptionIts Gary/ProductDescription
 /product
   /products
 /mx:Model
 
 mx:Model id=myCats
   categories
 category
   CategoryID2/CategoryID
   CategoryNameNot the name of the ID/CategoryName
 /category
 category
   CategoryID3/CategoryID
   CategoryNamereally, not an ID/CategoryName
 /category
   /categories
 /mx:Model
 
 mx:Script
   ![CDATA[
 import mx.controls.ComboBox;
 import mx.controls.dataGridClasses.DataGridColumn;
 
 protected function displayProductCategoryName( row:Object,
 column:DataGridColumn ):String {
   //Do anything you would like here, but, at the end of the day,
 return a String
   var categoryName:String = ;
 
   //There exist better ways to do this part
   for ( var i:Number=0; imyCats.category.length; i++ ) {
 if ( row[ column.dataField ] == myCats.category[i].CategoryID )
 {
   categoryName = myCats.category[i].CategoryName;
   break;
 }
   }
 
   return categoryName;
 }
   ]]
 /mx:Script
 
 mx:DataGrid id=grid dataProvider={myModel.product} editable=true
   mx:columns
 mx:DataGridColumn dataField=ProductName/
 mx:DataGridColumn dataField=ProductCategory
 editorDataField=selectedCategoryID
 labelFunction=displayProductCategoryName
 mx:itemEditor
 mx:Component
 mx:ComboBox
 dataProvider={outerDocument.myCats.category}
 labelField=CategoryName
 mx:Script
   ![CDATA[
 public function get selectedCategoryID():String {
   return selectedItem.CategoryID;
 }
   ]]
 /mx:Script
   /mx:ComboBox
 /mx:Component
 /mx:itemEditor
 /mx:DataGridColumn
 mx:DataGridColumn dataField=ProductDescription/
   /mx:columns
 /mx:DataGrid
 
 
 --Mike
 
 --- In flexcoders@yahoogroups.com, Mike Anderson mike@ wrote:
 
  Yes, I've been exploring that property all day long -
  
  There must be something else I am doing wrong here -
  
  So with that said, YES, if you could please post an example, I'd be 
  grateful -
  
  Right now, I have a ComboBox Component I created - and I am binding 
  the dataProvider property of it, to my Apps model.produstList
 property.
  And yes, this is a Cairngorm based application - but I don't think 
  this should affect anything.
  
  My OrderDetails DataGrid, is populated using ValueObjects - and the 
  ProductID Column initially displays only numbers.  Of course, this is 
  great - since that column should only display Integer values anyway 
  (this is previous to applying the itemRenderer and itemEditor).
  
  BUT, now that I want the ProductName value to display all the time, 
  do I also need to declare an itemRenderer as well?  I ask this 
  because, only the ComboBox populated with ProductID and ProductName, 
  contains the associated information - where