flex-users / flexlib

Open Source Flex components library.
github.com/flex-users/flexlib
MIT License
204 stars 91 forks source link

As3 Dynamiclly created Schedule don't display entry #344

Open nicoulaj opened 13 years ago

nicoulaj commented 13 years ago

Originally filed by flexib...@gmail.com on 2010-12-29T14:07:15

What steps will reproduce the problem?

  1. Create (trougth a loop)Array that contain SimpleScheduleEntry (startDate,endDate,label).
  2. Create (trough a loop) ScheduleViewer.
  3. Assigne Array[n] to ScheduleViewer[n] via ScheduleViewer.dataProvider = new ArrayCollection(array).

What is the expected output? What do you see instead? Output is n scheduleViewer with entry. Instead: Nothing Appear inside any schedule.

What version of the product are you using? On what operating system? Flexib Schedule 2.5 for flex3 on Windows XP

Please provide any additional information below. I've tried exactlly the same code with list instead of ScheduleViewer and all data are displayed in there respective list.

The logic is :

private function render ():void {

/*_scheduleStack contains object that old scheduleViewer(obj.view) and Array with entries (obj.data)*/

 for each (var obj:Object in _scheduleStack){

     /*Don't work but when tracing dataProvider.length it display the right value*/
      (obj.view as ScheduleViewer).dataProvider = new ArrayCollection(obj.data);
      _scheduleContainer.addChild(obj.view as DisplayObject);

      //Work exactlly as expected
      var l:List = new List()
      l.dataProvider = new ArrayCollection(obj.data);
      _scheduleContainer.addChild   (l)

} 

}