RE: [flexcoders] Dynamic tab binding Labels

2005-07-21 Thread Matt Chotin










I think your parameters into createTab don’t
make sense.  First is the class so that’s right.  Then should be an
instance name like “tab”+schoolsTabNav.numChildren.  And then the
last parameter would be schoolName (or event.target.selectedItem.label).

 

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Manuel Saint-Victor, M.D.
Sent: Thursday, July 21, 2005
11:34 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic tab
binding Labels



 

Hi,
I'm trying to have tabs generate when items are
chosen from a List
Component.  So far I am able to get the tabs
to come up and everything but
what I would like to do is have each tab be bound
to the selectedItem such
that the label of the tab will be the same as the
label of the
selectedItem from the list.

This is what I have right now:

}
  function
createSchoolTab(event){
  var
schoolName=event.target.selectedItem.label;
  var
newTab:mx.core.UIObject=mx.core.UIObject(schoolsTabNav.createTab(SchoolView,{event.target.selectedItem.label},'The
Canvas'));
 
schoolsTabNav.selectedChild=newTab;
  }





and this would be the errors that I get back:

line 15 ':" unexpected
line 16 This statement is not permitted in a class
definition
line 21 unexpected '}' encountered

Can anyone help me with this.

Thanks

Mani



--
"Live as if you were to die tomorrow. Learn
as if you were to live forever."
  --  Mahatma Gandhi













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



  











[flexcoders] Dynamic tab binding Labels

2005-07-21 Thread Manuel Saint-Victor, M.D.
Hi,
I'm trying to have tabs generate when items are chosen from a List
Component.  So far I am able to get the tabs to come up and everything but
what I would like to do is have each tab be bound to the selectedItem such
that the label of the tab will be the same as the label of the
selectedItem from the list.

This is what I have right now:

}
function createSchoolTab(event){
var schoolName=event.target.selectedItem.label;
var
newTab:mx.core.UIObject=mx.core.UIObject(schoolsTabNav.createTab(SchoolView,{event.target.selectedItem.label},'The
Canvas'));
schoolsTabNav.selectedChild=newTab;
}





and this would be the errors that I get back:

line 15 ':" unexpected
line 16 This statement is not permitted in a class definition
line 21 unexpected '}' encountered

Can anyone help me with this.

Thanks

Mani



--
"Live as if you were to die tomorrow. Learn as if you were to live forever."
  --  Mahatma Gandhi







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