[flexcoders] Re: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-10 Thread bhaq1972
some feedback

 
  mx:DataGrid cellPress=cellPressEvt(event);
 
 event is of type DataGridEvent.

i tried 
mx:DataGrid cellPress=cellPressEvt(event:mx.events.DataGridEvent)

but flexbuilder 2 comes up with a compile error
Expecting right parenthesis after colon

I actually have yet to see an example in livedocs/demos/etc where 
the event argument is strongly typed.
Shouldn't ALL the code be strongly typed if we are going to get the 
best performance from flashplayer 8.5.

--
  2) i want dg.focusedCell = {rowIndex:2, columnIndex:2}  no matter
  where the user clicks on the editable datagrid. any ideas?
 
  I think you'll have to dispatch your own event.


Actually, i was trying to migrate some flex 1.5 datagrid code but 
now that i've been playing around with flex 2 dg , I notice alot of 
the functionality i'm looking for has been added. 
So great job adobe.

regards
bod







--
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: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-10 Thread Manish Jethani
On 2/10/06, bhaq1972 [EMAIL PROTECTED] wrote:

  
   mx:DataGrid cellPress=cellPressEvt(event);
 
  event is of type DataGridEvent.

 i tried
 mx:DataGrid cellPress=cellPressEvt(event:mx.events.DataGridEvent)

 but flexbuilder 2 comes up with a compile error
 Expecting right parenthesis after colon

event *is* of type DataGridEvent already.  See the generated AS
code.  What you want instead is to type the argument to the
cellPressEvt method as DataGridEvent:

mx:DataGrid cellPress=cellPressEvt(event)

private function cellPressEvt(event:DataGridEvent):void
{
 ...
}


--
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: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-10 Thread bhaq1972
thanks. i realize my mistake. 

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

 On 2/10/06, bhaq1972 [EMAIL PROTECTED] wrote:
 
   
mx:DataGrid cellPress=cellPressEvt(event);
  
   event is of type DataGridEvent.
 
  i tried
  mx:DataGrid cellPress=cellPressEvt
(event:mx.events.DataGridEvent)
 
  but flexbuilder 2 comes up with a compile error
  Expecting right parenthesis after colon
 
 event *is* of type DataGridEvent already.  See the generated AS
 code.  What you want instead is to type the argument to the
 cellPressEvt method as DataGridEvent:
 
 mx:DataGrid cellPress=cellPressEvt(event)
 
 private function cellPressEvt(event:DataGridEvent):void
 {
  ...
 }







--
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: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-09 Thread bhaq1972
Feedback...and followup questions.

firstly, thanks once again Manish for the suggestion.  The behaviour 
in CellPress event has changed from flex1.5. because before the 
selectedindex was set at the cellpress event stage. 

a couple of follow up questions; 

1) everything is now alot more strictly typed. then why isn't 
the 'event' parameter strictly typed ?(in the 2nd datagrid example in 
livedocs) eg

mx:DataGrid cellPress=cellPressEvt(event);

2) i want dg.focusedCell = {rowIndex:2, columnIndex:2}  no matter 
where the user clicks on the editable datagrid. any ideas?

thanks
bod


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

 On 2/8/06, bhaq1972 [EMAIL PROTECTED] wrote:
 
  If you run my test in flex 1.5 the result is different. the
  selectedIndex and event.itemIndex (aka rowIndex in flex2 beta) are 
the
  same, as long as your dg.selectable=true.
 
  i'm sure this is a bug in flex2 beta.
 
 In Flex 2.0, the cellPress event is dispatched before the selection
 is changed.  If you want to do something after the selection is
 changed, you should do it in the change event.  That works?







--
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: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-09 Thread Manish Jethani
On 2/9/06, bhaq1972 [EMAIL PROTECTED] wrote:

 a couple of follow up questions;

 1) everything is now alot more strictly typed. then why isn't
 the 'event' parameter strictly typed ?(in the 2nd datagrid example in
 livedocs) eg

 mx:DataGrid cellPress=cellPressEvt(event);

event is of type DataGridEvent.

 2) i want dg.focusedCell = {rowIndex:2, columnIndex:2}  no matter
 where the user clicks on the editable datagrid. any ideas?

 I think you'll have to dispatch your own event.


--
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: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-08 Thread bhaq1972
 Yes, because the selectedIndex property is updated only after 
cellPress event.


Hi Manish
If you run my test in flex 1.5 the result is different. the 
selectedIndex and event.itemIndex (aka rowIndex in flex2 beta) are the 
same, as long as your dg.selectable=true.

i'm sure this is a bug in flex2 beta.





--
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: datagrid.selectedIndex not correct in cellPress - flex2

2006-02-08 Thread Manish Jethani
On 2/8/06, bhaq1972 [EMAIL PROTECTED] wrote:

 If you run my test in flex 1.5 the result is different. the
 selectedIndex and event.itemIndex (aka rowIndex in flex2 beta) are the
 same, as long as your dg.selectable=true.

 i'm sure this is a bug in flex2 beta.

In Flex 2.0, the cellPress event is dispatched before the selection
is changed.  If you want to do something after the selection is
changed, you should do it in the change event.  That works?


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