[flexcoders] Best way to create such type of DataGrid?

2005-12-30 Thread Stanislav Zayarsky
Hello FlexCoders,

I'm wondering what is the best way to create such type of DataGrid in Flex 1.5?

here is image with datagrid that was created in html:
http://www.go4flash.com/Table.gif

Does DataGrid component suits the best in this case?

Best regards
Stanislav


 Yahoo! Groups Sponsor ~-- 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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

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

* 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] Resize container to the size of its largest child

2005-12-30 Thread Sergey Kovalyov
Hi All!

What is the best way to resize container (e. g. Accordion) to the size of
its largest child?

Sergey.



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




RE: [flexcoders] Best way to create such type of DataGrid?

2005-12-30 Thread Sergey Kovalyov
I consider it's better to create some AbstractTable class inherited from
UIObject and then some specific table classes for your particular needs. :)

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stanislav Zayarsky
Sent: Friday, December 30, 2005 10:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Best way to create such type of DataGrid?

Hello FlexCoders,

I'm wondering what is the best way to create such type of DataGrid in Flex
1.5?

here is image with datagrid that was created in html:
http://www.go4flash.com/Table.gif

Does DataGrid component suits the best in this case?

Best regards
Stanislav


 Yahoo! Groups Sponsor ~-- Most
low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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



 




 Yahoo! Groups Sponsor ~-- 
AIDS in India: A lurking bomb. Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/nhFolB/TM
~- 

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

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

* 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] Custom initial sort on datagrid

2005-12-30 Thread Clifford Hall



Hello all, I'm trying to get a datagrid to use a custom sortCompareFunction for its initial sort order.The custom sortCompareFunction works when you click the column header, however attempts to sort the dataprovider before it is assigned or the grid itself after the dataprovider is assigned all fail. The sortCompareFunction has been written so that it can sort either be passed objects as it would on an Array.sort (from which it will retrieve the string for comparison), or strings which the table will pass when the header is clicked.I have reproduced the various attempts to get it to work in a small mxml file included below. There are plenty of comments that show the various places that we may try to effect the sort. If you run this mxml, you'll see the table, and if you click the 'Age' column header, you'll see the sort work. If you are able to shed light on the error of my ways here and make this sort happen, I myself, my children and my children's children shall speak your name in the most reverant tones for generations to come, perhaps performing a little bedside ritual each night, ordering our pocket change from large to small around the base of the lamp before sleeping as a way of meditating upon the momentous occasion when The Answer was posted and the Great Difficulty passed.Thanks, -=Cliff?xml version="1.0" encoding="utf-8"?!-- Attempt to order the rows of a DataGrid by a column which requires a special sortCompareFunction --!-- This demo shows that the column (Age) sorts properly when the column header is clicked, --!-- but attempts to sort the dataprovider or the grid automatically at startup all fail --!-- Try assigning the dataprovider via binding, and tying a sort at creationComplete --mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" creationComplete="sortAtCreationComplete()"!-- Try assigning the dataprovider manually at startup, giving the opportunity to force a sort --!-- mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" creationComplete="manuallyAssignDP()" -- mx:Script ![CDATA[  import mx.utils.ArrayUtil;  import mx.utils.Delegate;   // sort order lookup hash  public var sortOrder:Array;public function sortAtCreationComplete()  {   // populate the sort order lookup hash   sortOrder=getSortOrder();// try to sort the datagrid   // dg1.sortItems(sortByAge,Array.ASCENDING) // try to sort the datagrid's dataprovider   dg1.dataProvider.sortItems(sortByAge, Array.ASCENDING)   }   public function manuallyAssignDP()  {   // populate the sort order lookup hash   sortOrder=getSortOrder();  var da:Array = filterData();// try sorting the dataprovider before assigning // should work but doesn't   // da.sortItems( sortByAge, Array.DESCENDING );   dg1.dataProvider = da;// try sorting the grid // should work but doesn't   // dg1.sortItems( sortByAge, Array.DESCENDING ); // ok, grasping at straws, here,// try passing the sort function via delegate doesn't work   // var d = new Delegate.create(this, sortByAge);   // dg1.sortItems( d, Array.DESCENDING ); // should   // would be lovely if we could do this,// since the age column has a sortCompareFunction,   // but alas, it never gets called, and the field   // is string sorted   // dg1.sortItemsBy('age', Array.DESCENDING); }  public function filterData():Array   {   var dp:Array = new Array;   dp.addItem( {hi:'abcd',  bye:'goodbye',  age:'young'} );   dp.addItem( {hi:'efgh',  bye:'zoob',  age:'younger still'} );   dp.addItem( {hi:'ijkl',  bye:'wappa',  age:'old'} );   dp.addItem( {hi:'mnop',  bye:'grrm',  age:'older'} );   dp.addItem( {hi:'qrst',  bye:'fluu',  age:'young'} );   dp.addItem( {hi:'uvwx',  bye:'norb',  age:'middle aged'} );   dp.addItem( {hi:'yyzz',  bye:'tepid',  age:'older yet'} );   dp.addItem( {hi:'AbCd',  bye:'wrrr',  age:'young'} );   dp.addItem( {hi:'eFgH',  bye:'grum',  age:'middle aged'} );   dp.addItem( {hi:'IjKl',  bye:'quixital', age:'young'} );   dp.addItem( {hi:'mNoP',  bye:'snorg',  age:'younger'} );  // try sorting the dataprovider here   // none of these work, though they should   //   // dp.sort(sortByAge);   // dp.sortItems(sortByAge);   // dp.sortItems(sortByAge, Array.DESCENDING);return dp; }   private function getSortOrder():Array  {   var so:Array = new Array();   so['younger still']   = 0;   so['younger'] = 1;   so['young'] = 2;   so['middle aged']= 3;   so['old']  = 4;   so['older'] = 5;   so['older yet']= 6;return so;}public function sortByAge( obj1bject, obj2bject, colIndex:Number ):Number  {   // depending on whether the method is being called as the// sortCompareFunction of a datagrid column, or as a call from   // sortItems on the table or array, it may be passed strings to   // compare, or objects from which we get the string, respectively  var o1:String;   var o2:String;   if (obj1.age != undefined) { o1 = obj1.age;o2 = obj2.age;   } else {o1 = 

Re[2]: [flexcoders] Best way to create such type of DataGrid?

2005-12-30 Thread Andriy Panas
Hello Sergey,

I agree with Sergey. You must draw the diffence between Table and
DataGrid mentally.

---
DataGrid displays tabular data, allows sorting in columns, support
paging.

Example is mx:datagrid component.

---
Table displays any data in tabular format, no sorting, very similar to
table /table HTML tag

One of the possible realization example of Table is 
http://www.flash-db.com/FlashTable/
Another approach is to use Tab delimiters: 
http://www.emllabs.com/article.php?articleId=104


---

 I consider it's better to create some AbstractTable class inherited from
 UIObject and then some specific table classes for your particular needs. :)

-- 
Best regards,
 Andriymailto:[EMAIL PROTECTED]



 Yahoo! Groups Sponsor ~-- 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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

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

* 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] Flex 2: Component inheritance?

2005-12-30 Thread Jason Y. Kwong



I'm relatively new to Flex 2 and what I'm trying to do is to create a set of custom MXML components that share the same AS base class. So I start with the base component, an empty container to which I add properties/methods via AS. Call it 
Base.mxml:?xml version=1.0 encoding=utf-8?mx:Canvas xmlns:mx=http://www.macromedia.com/2005/mxml xmlns=*
mx:Script source=Base_inc.as/ !-- Declare base properties/methods --/mx:CanvasThen I create a component based on Base. I add a Button and a TextInput. Call it ComponentA.mxml
:?xml version=1.0 encoding=utf-8?Base xmlns:mx=http://www.macromedia.com/2005/mxml xmlns=* mx:Script source=ComponentA_inc.as/ !-- Component-specific code --
 mx:Button x=5 y=41 label=Button/ mx:TextInput x=2 y=12 text=hello id=MyText//BaseThen I add ComponentA to an application. Everything looks fine in the design view. However, when the app is run, the controls added by ComponentA do not show up. I put in a creationComplete handler for ComponentA and traced the value of MyText and it came out null, so it looks like it never got created. 
Am I missing something? If this isn't how you do component inheritance, then how can it be done while still taking advantage of the easy layout offered by MXML?






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] Resize container to the size of its largest child

2005-12-30 Thread Andriy Panas
Hello Sergey,

Friday, December 30, 2005, 11:50:50 AM, you wrote:

 What is the best way to resize container (e. g. Accordion) to the size of
 its largest child?

Use mx:Accordition resizeToContent=true minHeight=720

-- 
Best regards,
 Andriymailto:[EMAIL PROTECTED]



 Yahoo! Groups Sponsor ~-- 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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

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

* 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] Setting effect via AS

2005-12-30 Thread Karl
I need to set an effect (hideEffect) on a new object 
(mx.controls.Image) that I am creating via AS and the effect does not 
seem to be playing when expected (hiding of image).

What is the correct way of adding an effect to an object 
programatically? Is it treated like a property and takes a string of 
the name of the effect? 

object.hideEffect = effectName;

I have not had success with any of the ways I have tried. Thanks in 
advance for your help!

Karl





 Yahoo! Groups Sponsor ~-- 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




Re: [flexcoders] Setting effect via AS

2005-12-30 Thread JesterXL
Pass the image's ID into the effect's contructor:

var e:Dissolve = new mx.effects.Dissolve(imageID);

- Original Message - 
From: Karl [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, December 30, 2005 11:46 AM
Subject: [flexcoders] Setting effect via AS


I need to set an effect (hideEffect) on a new object
(mx.controls.Image) that I am creating via AS and the effect does not
seem to be playing when expected (hiding of image).

What is the correct way of adding an effect to an object
programatically? Is it treated like a property and takes a string of
the name of the effect?

object.hideEffect = effectName;

I have not had success with any of the ways I have tried. Thanks in
advance for your help!

Karl






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







 Yahoo! Groups Sponsor ~-- 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




RE: [flexcoders] CheckCellRenderer

2005-12-30 Thread Tracy Spratt
Yeah, thanks Jesse.
Use editField(), not the method I made up.
Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Thursday, December 29, 2005 8:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] CheckCellRenderer

Example:

dataGrid.dataProvider[i].cbSelect = newState;

becomes:

dataGrid.dataProvider.editField(i, cbSelect, newState);

- Original Message - 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, December 29, 2005 8:57 PM
Subject: RE: [flexcoders] CheckCellRenderer


This form of update:
dataGrid.dataProvider[i].cbSelect = newState
does not cause the dataProvider to emit the modelChanged event to update
the control.

Instead, use the dataProvider API, like editItemAt().

Or, probably better in your case, when you are done updating the
dataProvider, re-assign it to the control:
Datagrid.DataProvider = DataGrid.dataProvider;

This should cause the proper events to fire and update the screen.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rb_dickey
Sent: Thursday, December 29, 2005 7:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CheckCellRenderer

Hi,

I'm trying to do a simple loop through a datagrid to set a column 
that's using the CheckCellRenderer to be checked or unchecked but 
the following code does not work, well sort of.  What happens is 
that if I mouseover each row, viola, the checks in the checkbox 
appear or disappear depending on my choice to select all or not. 
Here is the function I call to set the checkboxes in the grid:

private function selectAll(newState:Boolean):Void
{
for( var i in dataGrid.dataProvider )
dataGrid.dataProvider[i].cbSelect = newState;
}

The datagrid column is defined as:
mx:DataGridColumn headerText= width=40 columnName=cbSelect 
cellRenderer=CheckCellRenderer resizable=true  /

The dataprovider for the grid is an RO...

TIA for any info.
Rob







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



 





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



 






 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




RE: [flexcoders] CheckCellRenderer

2005-12-30 Thread Tracy Spratt










The difference is that edit field will
update the UI immediately every time you call it. This is fine with small data
sets. If you update many items, then there might be a performance issue with
so many ui refreshes.



Also, you might be able manually dispatch
the modelChanged event instead of re-assigning the dataProvider, but I have not
tried this.



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Rob Dickey
Sent: Thursday, December 29, 2005
11:13 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
CheckCellRenderer





Hi Tracy, JesterXL,



Thanks for both replies and suggestions.
Both worked great, although I think Ill stick to the last
suggestion (editField) as 

It would take more comments then code to
explain why I am reassigning the data provider to the grid that its
already assigned to J



Regards,

Rob









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Thursday, December 29, 2005
5:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders]
CheckCellRenderer





Example:

dataGrid.dataProvider[i].cbSelect = newState;

becomes:

dataGrid.dataProvider.editField(i,
cbSelect, newState);

- Original Message - 
From: Tracy Spratt
[EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, December 29, 2005 8:57 PM
Subject: RE: [flexcoders] CheckCellRenderer


This form of update:
dataGrid.dataProvider[i].cbSelect = newState
does not cause the dataProvider to emit the
modelChanged event to update
the control.

Instead, use the dataProvider API, like
editItemAt().

Or, probably better in your case, when you are
done updating the
dataProvider, re-assign it to the control:
Datagrid.DataProvider = DataGrid.dataProvider;

This should cause the proper events to fire and
update the screen.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of rb_dickey
Sent: Thursday, December 29, 2005 7:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CheckCellRenderer

Hi,

I'm trying to do a simple loop through a datagrid
to set a column 
that's using the CheckCellRenderer to be checked
or unchecked but 
the following code does not work, well sort
of. What happens is 
that if I mouseover each row, viola,
the checks in the checkbox 
appear or disappear depending on my choice to
select all or not. 
Here is the function I call to set the checkboxes
in the grid:

private function selectAll(newState:Boolean):Void
{
for( var i in dataGrid.dataProvider )
dataGrid.dataProvider[i].cbSelect = newState;
}

The datagrid column is defined as:
mx:DataGridColumn headerText=
width=40 columnName=cbSelect 
cellRenderer=CheckCellRenderer
resizable=true /

The dataprovider for the grid is an RO...

TIA for any info.
Rob







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















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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] CheckCellRenderer

2005-12-30 Thread JesterXL
You were thinking of setItemAt from Flex 2.  No worries, you're just ahead 
of the curve.

- Original Message - 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, December 30, 2005 1:21 PM
Subject: RE: [flexcoders] CheckCellRenderer


Yeah, thanks Jesse.
Use editField(), not the method I made up.
Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Thursday, December 29, 2005 8:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] CheckCellRenderer

Example:

dataGrid.dataProvider[i].cbSelect = newState;

becomes:

dataGrid.dataProvider.editField(i, cbSelect, newState);

- Original Message - 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, December 29, 2005 8:57 PM
Subject: RE: [flexcoders] CheckCellRenderer


This form of update:
dataGrid.dataProvider[i].cbSelect = newState
does not cause the dataProvider to emit the modelChanged event to update
the control.

Instead, use the dataProvider API, like editItemAt().

Or, probably better in your case, when you are done updating the
dataProvider, re-assign it to the control:
Datagrid.DataProvider = DataGrid.dataProvider;

This should cause the proper events to fire and update the screen.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rb_dickey
Sent: Thursday, December 29, 2005 7:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CheckCellRenderer

Hi,

I'm trying to do a simple loop through a datagrid to set a column
that's using the CheckCellRenderer to be checked or unchecked but
the following code does not work, well sort of.  What happens is
that if I mouseover each row, viola, the checks in the checkbox
appear or disappear depending on my choice to select all or not.
Here is the function I call to set the checkboxes in the grid:

private function selectAll(newState:Boolean):Void
{
for( var i in dataGrid.dataProvider )
dataGrid.dataProvider[i].cbSelect = newState;
}

The datagrid column is defined as:
mx:DataGridColumn headerText= width=40 columnName=cbSelect
cellRenderer=CheckCellRenderer resizable=true  /

The dataprovider for the grid is an RO...

TIA for any info.
Rob







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









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







 Yahoo! Groups Sponsor ~-- 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




Re: [flexcoders] CheckCellRenderer

2005-12-30 Thread JesterXL





Naw, it actually calls invalidate each time, so 
it's only updated once per frame, whether you call it 1, or 1000 times. 
That's the beauty of DataProvider API!

However, the manual dispatch isn't so bad because 
for thousands of records, this:

my_array[i].cow = "foo";
+ dispatch modelChanged()

is faster than editField on thousands of 
records. Don't have benchmarks, though.

- Original Message - 
From: Tracy Spratt 

To: flexcoders@yahoogroups.com 
Sent: Friday, December 30, 2005 1:24 PM
Subject: RE: [flexcoders] CheckCellRenderer


The difference is that 
edit field will update the UI immediately every time you call it. This is 
fine with small data sets. If you update many items, then there might be a 
performance issue with so many ui refreshes.

Also, you might be able 
manually dispatch the modelChanged event instead of re-assigning the 
dataProvider, but I have not tried this.

Tracy





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Rob 
DickeySent: Thursday, December 
29, 2005 11:13 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] 
CheckCellRenderer

Hi Tracy, 
JesterXL,

Thanks for both replies 
and suggestions. Both worked great, although I think I’ll stick to the 
last suggestion (editField) as 
It would take more 
comments then code to explain why I am reassigning the data provider to the grid 
that it’s already assigned to J

Regards,
Rob




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of JesterXLSent: Thursday, December 29, 2005 5:56 
PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] 
CheckCellRenderer

Example:dataGrid.dataProvider[i].cbSelect = 
newState;becomes:dataGrid.dataProvider.editField(i, "cbSelect", 
newState);- Original 
Message - From: 
"Tracy Spratt" 
[EMAIL PROTECTED]To: 
flexcoders@yahoogroups.comSent: Thursday, December 29, 2005 8:57 
PMSubject: RE: [flexcoders] 
CheckCellRendererThis form 
of update:dataGrid.dataProvider[i].cbSelect = 
newStatedoes not cause the 
dataProvider to emit the modelChanged event to updatethe control.Instead, use the dataProvider API, like 
editItemAt().Or, probably 
better in your case, when you are done updating thedataProvider, re-assign it to the 
control:Datagrid.DataProvider = 
DataGrid.dataProvider;This 
should cause the proper events to fire and update the 
screen.Tracy-Original Message-From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
OnBehalf Of 
rb_dickeySent: Thursday, December 
29, 2005 7:50 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] 
CheckCellRendererHi,I'm 
trying to do a simple loop through a datagrid to set a column 
that's using the CheckCellRenderer 
to be checked or unchecked but the 
following code does not work, well sort of. What happens is 
that if I "mouseover" each row, 
viola, the checks in the checkbox appear or disappear depending on my choice to select all or 
not. Here is the function I call to 
set the checkboxes in the grid:private function 
selectAll(newState:Boolean):Void{for( var i in 
dataGrid.dataProvider )dataGrid.dataProvider[i].cbSelect = 
newState;}The 
datagrid column is defined as:mx:DataGridColumn headerText="" width="40" 
columnName="cbSelect" cellRenderer="CheckCellRenderer" resizable="true" 
/The dataprovider for the 
grid is an RO...TIA for any 
info.Rob--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives:http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups 
Links--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] CheckCellRenderer

2005-12-30 Thread Tracy Spratt










Ah, cool. So all that Flash frame stuff
might actually be good to know about!











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Friday, December 30, 2005
1:31 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders]
CheckCellRenderer







Naw, it actually calls invalidate each time, so it's only
updated once per frame, whether you call it 1, or 1000 times. That's the
beauty of DataProvider API!











However, the manual dispatch isn't so bad because for
thousands of records, this:











my_array[i].cow = foo;





+ dispatch modelChanged()











is faster than editField on thousands of records.
Don't have benchmarks, though.











- Original Message - 



From: Tracy Spratt






To: flexcoders@yahoogroups.com






Sent: Friday, December
30, 2005 1:24 PM





Subject: RE: [flexcoders]
CheckCellRenderer











The difference is that edit field will
update the UI immediately every time you call it. This is fine with small
data sets. If you update many items, then there might be a performance
issue with so many ui refreshes.



Also, you might be able manually dispatch
the modelChanged event instead of re-assigning the dataProvider, but I have not
tried this.



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Rob Dickey
Sent: Thursday, December 29, 2005
11:13 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] CheckCellRenderer





Hi Tracy, JesterXL,



Thanks for both replies and suggestions.
Both worked great, although I think Ill stick to the last
suggestion (editField) as 

It would take more comments then code to
explain why I am reassigning the data provider to the grid that its
already assigned to J



Regards,

Rob









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Thursday, December 29, 2005
5:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] CheckCellRenderer





Example:

dataGrid.dataProvider[i].cbSelect = newState;

becomes:

dataGrid.dataProvider.editField(i,
cbSelect, newState);

- Original Message - 
From: Tracy Spratt
[EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, December 29, 2005 8:57 PM
Subject: RE: [flexcoders] CheckCellRenderer


This form of update:
dataGrid.dataProvider[i].cbSelect = newState
does not cause the dataProvider to emit the
modelChanged event to update
the control.

Instead, use the dataProvider API, like
editItemAt().

Or, probably better in your case, when you are
done updating the
dataProvider, re-assign it to the control:
Datagrid.DataProvider = DataGrid.dataProvider;

This should cause the proper events to fire and
update the screen.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of rb_dickey
Sent: Thursday, December 29, 2005 7:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CheckCellRenderer

Hi,

I'm trying to do a simple loop through a datagrid
to set a column 
that's using the CheckCellRenderer to be checked
or unchecked but 
the following code does not work, well sort
of. What happens is 
that if I mouseover each row, viola,
the checks in the checkbox 
appear or disappear depending on my choice to
select all or not. 
Here is the function I call to set the checkboxes
in the grid:

private function selectAll(newState:Boolean):Void
{
for( var i in dataGrid.dataProvider )
dataGrid.dataProvider[i].cbSelect = newState;
}

The datagrid column is defined as:
mx:DataGridColumn headerText=
width=40 columnName=cbSelect 
cellRenderer=CheckCellRenderer
resizable=true /

The dataprovider for the grid is an RO...

TIA for any info.
Rob







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

















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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] CheckCellRenderer

2005-12-30 Thread JesterXL





Hehe, naw, because then Flex people think you're a 
g00b if you talk about Flash.

You say "next frame", and you're considered to be a 
14 year-old who likes punk rock.

You say "invalidate", and you're considered to a 
Fortune 500 developer.


- Original Message - 
From: Tracy Spratt 

To: flexcoders@yahoogroups.com 
Sent: Friday, December 30, 2005 1:39 PM
Subject: RE: [flexcoders] CheckCellRenderer


Ah, cool. So all 
that Flash frame stuff might actually be good to know 
about!





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of JesterXLSent: Friday, December 30, 2005 1:31 
PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] 
CheckCellRenderer


Naw, it actually calls invalidate 
each time, so it's only updated once per frame, whether you call it 1, or 1000 
times. That's the beauty of DataProvider 
API!



However, the manual dispatch isn't 
so bad because for thousands of records, 
this:



my_array[i].cow = 
"foo";

+ dispatch 
modelChanged()



is faster than editField on 
thousands of records. Don't have benchmarks, 
though.



- Original Message - 


From: Tracy Spratt 


To: flexcoders@yahoogroups.com 


Sent: Friday, 
December 30, 2005 1:24 PM

Subject: RE: 
[flexcoders] CheckCellRenderer


The difference is that 
edit field will update the UI immediately every time you call it. This is 
fine with small data sets. If you update many items, then there might be a 
performance issue with so many ui refreshes.

Also, you might be able 
manually dispatch the modelChanged event instead of re-assigning the 
dataProvider, but I have not tried this.

Tracy





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Rob 
DickeySent: Thursday, December 
29, 2005 11:13 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] 
CheckCellRenderer

Hi Tracy, 
JesterXL,

Thanks for both replies 
and suggestions. Both worked great, although I think I’ll stick to the 
last suggestion (editField) as 
It would take more 
comments then code to explain why I am reassigning the data provider to the grid 
that it’s already assigned to J

Regards,
Rob




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of JesterXLSent: Thursday, December 29, 2005 5:56 
PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] 
CheckCellRenderer

Example:dataGrid.dataProvider[i].cbSelect = 
newState;becomes:dataGrid.dataProvider.editField(i, "cbSelect", 
newState);- Original 
Message - From: 
"Tracy Spratt" 
[EMAIL PROTECTED]To: 
flexcoders@yahoogroups.comSent: Thursday, December 29, 2005 8:57 
PMSubject: RE: [flexcoders] 
CheckCellRendererThis form 
of update:dataGrid.dataProvider[i].cbSelect = 
newStatedoes not cause the 
dataProvider to emit the modelChanged event to updatethe control.Instead, use the dataProvider API, like 
editItemAt().Or, probably 
better in your case, when you are done updating thedataProvider, re-assign it to the 
control:Datagrid.DataProvider = 
DataGrid.dataProvider;This 
should cause the proper events to fire and update the 
screen.Tracy-Original Message-From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
OnBehalf Of 
rb_dickeySent: Thursday, December 
29, 2005 7:50 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] 
CheckCellRendererHi,I'm 
trying to do a simple loop through a datagrid to set a column 
that's using the CheckCellRenderer 
to be checked or unchecked but the 
following code does not work, well sort of. What happens is 
that if I "mouseover" each row, 
viola, the checks in the checkbox appear or disappear depending on my choice to select all or 
not. Here is the function I call to 
set the checkboxes in the grid:private function 
selectAll(newState:Boolean):Void{for( var i in 
dataGrid.dataProvider )dataGrid.dataProvider[i].cbSelect = 
newState;}The 
datagrid column is defined as:mx:DataGridColumn headerText="" width="40" 
columnName="cbSelect" cellRenderer="CheckCellRenderer" resizable="true" 
/The dataprovider for the 
grid is an RO...TIA for any 
info.Rob--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives:http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups 
Links--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: Re[2]: [flexcoders] Best way to create such type of DataGrid?

2005-12-30 Thread Tracy Spratt
And for complexly formatted, repeated items, the mx:Repeater is very
effective.

It can be slow with larger data sets, but this can be mitigated.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andriy Panas
Sent: Friday, December 30, 2005 10:44 AM
To: Sergey Kovalyov
Subject: Re[2]: [flexcoders] Best way to create such type of DataGrid?

Hello Sergey,

I agree with Sergey. You must draw the diffence between Table and
DataGrid mentally.

---
DataGrid displays tabular data, allows sorting in columns, support
paging.

Example is mx:datagrid component.

---
Table displays any data in tabular format, no sorting, very similar to
table /table HTML tag

One of the possible realization example of Table is
http://www.flash-db.com/FlashTable/
Another approach is to use Tab delimiters:
http://www.emllabs.com/article.php?articleId=104


---

 I consider it's better to create some AbstractTable class inherited
from
 UIObject and then some specific table classes for your particular
needs. :)

-- 
Best regards,
 Andriymailto:[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



 






 Yahoo! Groups Sponsor ~-- 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/nhFolB/TM
~- 

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

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

* 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: Setting effect via AS

2005-12-30 Thread Karl
Thanks for the reply. Is there anyway to set an effect on an object 
dynamically without having to create a new effect for each image 
that is added? Won't this method result in a new effect being 
created in memory for each image, as opposed to having one already 
created effect that you attach each image to? My effect is a 
sequence too, so it would actually be multiple effects for each 
image.

If I am thinking about this incorrectly, just let me know.

Thanks for your help.
Karl


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

 Pass the image's ID into the effect's contructor:
 
 var e:Dissolve = new mx.effects.Dissolve(imageID);
 
 - Original Message - 
 From: Karl [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, December 30, 2005 11:46 AM
 Subject: [flexcoders] Setting effect via AS
 
 
 I need to set an effect (hideEffect) on a new object
 (mx.controls.Image) that I am creating via AS and the effect does 
not
 seem to be playing when expected (hiding of image).
 
 What is the correct way of adding an effect to an object
 programatically? Is it treated like a property and takes a string 
of
 the name of the effect?
 
 object.hideEffect = effectName;
 
 I have not had success with any of the ways I have tried. Thanks in
 advance for your help!
 
 Karl
 
 
 
 
 
 
 --
 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







 Yahoo! Groups Sponsor ~-- 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




Re: [flexcoders] Re: Setting effect via AS

2005-12-30 Thread JesterXL
Sure, make it a member variable and set it's target property.

import mx.core.UIObject;
import mx.effects.Dissolve;

var dissolve_effect:Dissolve;

// called from initialize
function onCreationComplete()
{
dissolve = new Dissolve();
dissolve.duration = 3 * 1000;
dissolve.alphaFrom = 100;
dissolve.alphaTo = 0;
dissolve.suspendBackgroundProcessing = true;
}

function fadeSomething(o:UIObject):Void
{
dissolve.target = o;
dissolve.playEffect();
}

fadeSomething(yourButton);
fadeSomething(yourCow);

- Original Message - 
From: Karl [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, December 30, 2005 2:11 PM
Subject: [flexcoders] Re: Setting effect via AS


Thanks for the reply. Is there anyway to set an effect on an object 
dynamically without having to create a new effect for each image 
that is added? Won't this method result in a new effect being 
created in memory for each image, as opposed to having one already 
created effect that you attach each image to? My effect is a 
sequence too, so it would actually be multiple effects for each 
image.

If I am thinking about this incorrectly, just let me know.

Thanks for your help.
Karl


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

 Pass the image's ID into the effect's contructor:
 
 var e:Dissolve = new mx.effects.Dissolve(imageID);
 
 - Original Message - 
 From: Karl [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, December 30, 2005 11:46 AM
 Subject: [flexcoders] Setting effect via AS
 
 
 I need to set an effect (hideEffect) on a new object
 (mx.controls.Image) that I am creating via AS and the effect does 
not
 seem to be playing when expected (hiding of image).
 
 What is the correct way of adding an effect to an object
 programatically? Is it treated like a property and takes a string 
of
 the name of the effect?
 
 object.hideEffect = effectName;
 
 I have not had success with any of the ways I have tried. Thanks in
 advance for your help!
 
 Karl
 
 
 
 
 
 
 --
 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



 



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




Re: [flexcoders] Flex 1.5 HTTPService Fault: An XML element was malformed

2005-12-30 Thread Andrew D. Goodfellow



Thanks Tracy, that did help. Now I'm getting a wierd fault back that says it can't parse the HTTP response, but everything is posting ok. I'll just catch the fault for now. Thanks again!-Andy
On 12/30/05, Tracy Spratt [EMAIL PROTECTED] wrote:



















Probably the returned xml is malformed. ;)



Seriously, call the HTTPService url
directly from a browser. What you get back will probably show the problem.



Ah, also, I am not sure that adding
querystring data to the url is supported. Instead, put your data into a
request object and then call the naked url. This way you can use POST, which
can carry more data, more securely, and with less issues with escaping.



It is partially supported. I found this
in the docs:

url

url
:
String 

Location of the service. The specified URL should not contain any query
parameters (? followed by name/value pairs), unless the HTTP method is GET and
the mx:HTTPService
 tag contains no request parameters.
Currently you can only add parameters to the URL if you set it through
ActionScript, not the tag. Use either the url
 property or the serviceName
 property, not both.



Still, it is an ugly way to do it. Use
the request Object.

var sReqParam:String = "SEL_EVENT"
+ sWhatever;

var oRequest:Object = new Object({sql: sReqParam
})

eventHTTP.send(oRequest
);



Tracy












From: 
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
On Behalf Of Andrew D, Goodfellow
Sent: Friday, December 30, 2005
1:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 1.5
HTTPService Fault: An XML element was malformed





Does anyone know why when I run this code I get an error that says:
HTTPService Fault: An XML element was malformed.? It seems to only
happen when I escape things like  and # into the URL.


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

 mx:HTTPService id=eventHTTP
url="" 
 mx:Script
 ![CDATA[
 
  function HTTPServiceErrorTest():Void {
   var
myEscapedStuff:String = escape();
   eventHTTP.url = "" href="http://127.0.0.1/intranet?sql=SEL_EVENT" target="_blank" >
http://127.0.0.1/intranet?sql=SEL_EVENT +myEscapedStuff;
   eventHTTP.send();
  }
  
  ]]
 /mx:Script
 mx:Button label=Button
click=HTTPServiceErrorTest()/ 
/mx:Application

TIA

-Andy








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com









  
  
SPONSORED LINKS
  
  
  


Web site design development
  
  

Computer software development
  
  

Software design and development
  
  



Macromedia flex
  
  

Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group flexcoders on the web.

  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
.



  

















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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Flex 2 Flash Communication Server Admin API

2005-12-30 Thread Curtis Hermann



So far I have successfully connection to Flash Communication Server using Flex 2.0 Alpha Standalone, but when I try to call an Admin API method, I get no response. Here is what I am doing:mx:Script  ![CDATA[  import flash.net.*;public var adminConnection:NetConnection;  public var serverStatsResponder:Responder;  public function init()
 {adminConnection = new NetConnection();  configureListeners(adminConnection);adminConnection.connect(null,"127.0.0.1:", "myusername", "mypass");   }  public function
 configureListeners(dispatcher:IEventDispatcher):Void {dispatcher.addEventListener(NetStatusEventType.NET_STATUS, onNetStatus);dispatcher.addEventListener(SecurityErrorEventType.SECURITY_ERROR, onSecurityError);  }public function onNetStatus(event:NetStatusEvent):Void {switch(event.info.code) {  case "NetConnection.Connect.Success" : 
 trace("connected");  monitorServer();  break;   }  trace("onNetStatus: " + event);var info:Object = event.info;  for(var i:String in info) {trace(i + " : " + info[i]);  }  }public function handleServerStatsResult(event:NetStatusEvent) {trace("handleServerStatsResult: " + event);  var info:Object = event.info;  for(var i:String in info) {trace(i + " : " + info[i]);  }  }  public function handleServerStatsStatus(event:NetStatusEvent) {trace("handleServerStatsStatus: " + event);  var info:Object =
 event.info;  for(var i:String in info) {trace(i + " : " + info[i]);  }  }  public function monitorServer() {  serverStatsResponder = new Responder(handleServerStatsResult, handleServerStatsStatus);   
 adminConnection.call("getServerStats", serverStatsResponder);  }  public function onSecurityError(event:SecurityErrorEvent):Void {trace("onSecurityError: " + event);  }]]  /mx:Script
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Custom initial sort on datagrid

2005-12-30 Thread Matt Chotin










I think dg1.sortItems(sortByAge, asc)
should have worked (or desc), not Array.ASCENDING and
Array.DESCENDING because being consistent with array options would have been
too obvious ;-)



Havent tried it though. This will
be easier in Flex 2 because sorting will be done through Sort objects and
SortFields which the DG will recognize.



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clifford Hall
Sent: Friday, December 30, 2005
10:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom
initial sort on datagrid





Hello all, 

I'm trying to get a datagrid to use a custom sortCompareFunction for its
initial sort order.

The custom sortCompareFunction works when you click the column header, however
attempts to sort the dataprovider before it is assigned or the grid itself
after the dataprovider is assigned all fail. The sortCompareFunction has been
written so that it can sort either be passed objects as it would on an
Array.sort (from which it will retrieve the string for comparison), or strings
which the table will pass when the header is clicked.

I have reproduced the various attempts to get it to work in a small mxml file
included below. There are plenty of comments that show the various places that
we may try to effect the sort. If you run this mxml, you'll see the table, and
if you click the 'Age' column header, you'll see the sort work. 

If you are able to shed light on the error of my ways here and make this sort
happen, I myself, my children and my chil! dren's children shall speak your
name in the most reverant tones for generations to come, perhaps performing a
little bedside ritual each night, ordering our pocket change from large to
small around the base of the lamp before sleeping as a way of meditating upon
the momentous occasion when The Answer was posted and the Great Difficulty
passed.

Thanks, 
-=Cliff

?xml version=1.0
encoding=utf-8?

!-- Attempt to order the rows of a DataGrid
by a column which requires a special sortCompareFunction --
!-- This demo shows that the column (Age)
sorts properly when the column header is clicked, --
!-- but attempts to sort the dataprovider or
the grid automatically at startup all fail --

!-- Try assigning the dataprovider via
binding, and tying a sort at creationComplete --
mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml creationComp!
lete=sortAtCreationComplete()

!-- Try assigni! ng the d ataprovider
manually at startup, giving the opportunity to force a sort --
!-- mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml
creationComplete=manuallyAssignDP() --

 mx:Script
 ![CDATA[
  import
mx.utils.ArrayUtil;
  import
mx.utils.Delegate;
 
  // sort
order lookup hash
  public var
sortOrder:Array;
  
  public
function sortAtCreationComplete()
  {
 
 // populate the sort order lookup hash
 
 sortOrder=getSortOrder();
 
  nb!
sp; // try to sort the datagrid
 
 //
dg1.sortItems(sortByAge,Array.ASCENDING) 
 
 
 // try to sort the datagrid's dataprovider
 
 dg1.dataProvider.sortItems(sortByAge,
Array.ASCENDING) 
  }
 
  public
function manuallyAssignDP()
  {
 
 // populate the sort order lookup hash
 
 sortOrder=getSortOrder();
 
 
 
 var da:Array = filterData();
 
nb! sp; 
 // try sorting the d! ataprovi der before
assigning  
 
 // should work but doesn't
 
 // da.sortItems( sortByAge, Array.DESCENDING ); 
 
 
 
 dg1.dataProvider = da;
 
 
 // try sorting the grid 

 
 // should work but doesn't
 
 // dg1.sortItems( sortByAge, Array.DESCENDING ); 
 
 
 // ok, grasping at straws, here, 
 
 // try passing the sort function via delegate doesn't work
nb! sp; 
 // var d = new Delegate.create(this, sortByAge);
 
 // dg1.sortItems( d, Array.DESCENDING ); // should 
 
 
 
 // would be lovely if we could do this, 
 
 // since the age column has a sortCompareFunction,
 
 // but alas, it never gets called, and the field
 
 // is string sorted
 
 // dg1.sortItemsBy('age', Array.DESCENDING);
 
 
  }
 
  
 !  public
function filterData():Arraynb! sp; 
  {
 
 var dp:Array = new Array;
 
 dp.addItem( {hi:'abcd',  bye:'goodbye',
 age:'young'} );
 
 dp.addItem( {hi:'efgh',  bye:'zoob',
 age:'younger still'} );
 
 dp.addItem( {hi:'ijkl',  bye:'wappa',
 age:'old'} );
 
 dp.addItem( {hi:'mnop',  bye:'grrm',
 age:'older'} );
 
 dp.addItem( {hi:'qrst',  bye:'fluu',
 age:'young'} );
 
 dp.addItem( {hi:'uvwx',  ! bye:'norb',
 age:'middle aged'} );
 
 dp.addItem( {hi:'yyzz',  bye:'tepid',
 age:'older yet'} );
 
 dp.addItem( {hi:'AbCd',  bye:'wrrr',
 age:'young'} );
 
 dp.addItem( {hi:'eFgH',  bye:'grum',
 age:'middle aged'} );
 
 dp.addItem( {hi:'IjKl',  bye:'quixital',
age:'young'} );
 
 dp.addItem( {hi:'mNoP',  bye:'snorg',
 age:'younger'} );
 
 
 
 // try sorting the dataprovider here
 ! 
 // none of these work, though ! they sho uld
 
 //
 
 // dp.sort(sortByAge);
 
 // dp.sortItems(sortByAge);
 
 // dp.sortItems(sortByAge, Array.DESCENDING);
 
 
 return dp;
 
 
 
}   
  
  private
function 

RE: [flexcoders] Flex 2: Component inheritance?

2005-12-30 Thread Matt Chotin










Did you put any visual children in Base?
If you did its not going to work because you cant have declared
children in a parent component and subcomponent (though we may describe how to
simulate that in some of our docs with other features).



You can try rewriting Base.mxml to be
Base.as if there werent visual children



Public class Base extends Canvas

{

 //declare properties and methods

}



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason Y. Kwong
Sent: Friday, December 30, 2005
10:44 AM
To: Flashcoders mailing list;
flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2:
Component inheritance?





I'm relatively new to
Flex 2 and what I'm trying to do is to create a set of custom MXML components
that share the same AS base class. So I start with the base component, an
empty container to which I add properties/methods via AS. Call it Base.mxml:

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.macromedia.com/2005/mxml
xmlns=* 
mx:Script source=Base_inc.as/ !-- Declare
base properties/methods --
/mx:Canvas

Then I create a component based on Base. I add a Button and a
TextInput. Call it ComponentA.mxml :

?xml version=1.0 encoding=utf-8?
Base xmlns:mx=http://www.macromedia.com/2005/mxml
xmlns=*
 mx:Script
source=ComponentA_inc.as/ !--
Component-specific code -- 
 mx:Button x=5 y=41
label=Button/
 mx:TextInput x=2 y=12
text=hello id=MyText/
/Base

Then I add ComponentA to an application. Everything looks fine in the
design view. However, when the app is run, the controls added by
ComponentA do not show up. I put in a creationComplete handler for
ComponentA and traced the value of MyText and it came out null, so
it looks like it never got created. 

Am I missing something? If this isn't how you do component inheritance,
then how can it be done while still taking advantage of the easy layout offered
by MXML?









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.