wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

As3 Dynamiclly created Schedule don't display entry #344

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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)

    } 

}

Original issue reported on code.google.com by flexib...@gmail.com on 29 Dec 2010 at 2:07