[vwnc] TabControl widget and dependency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] TabControl widget and dependency

Florent Arrignon

Hello,


I have a question about TabControl widget and dependency. I use a TabControl widget to manage two sub application models A and B whose spec are used as subcanvas in the TabControl widget. The two sub application models are stored in an instance variable of the main ApplicationModel as an Array (TabModels at: 1 -> ApplicationModel A and TabModels at:2 -> ApplicationModel B).


Each sub-model consists of one MVC, whose view is a composite view, treated as a viewHolder in the spec. So the M is composed of numerous “unitModels” each one being the model of one of the “unitViews” that compose the compositeView V. The M and the V are stored as instance variables in the Sub Application Model.


My TabsChanged method is :

aBuilder := self builder newSubBuilder.

(self builder componentAt: #TabControl1) widget

                               client: (self tabModels at: index)

                               spec: (self specArray at: index)

                               builder: aBuilder   

          

My problem is that when I tab the TabControl widget, as it constructs the new subcanvas to be displayed, the dependency of the first ApplicationModel are broken. I can restore it as it is rebuilt, when tabbed again, by releasing all dependents of the M and adding the V as a new dependent, but all the dependencies of the CompositeView, between the "unitModels" and the "unitViews", are also broken, and the "unitViews" are no more wrappered. This leads me to re-build completely the compositeView (using the method self add: borderedIn:  for each unitView) so that the dependency is restored (recreated in fact) as the TabControl widget is tabbed. But it produces some delay and strange screen effects ...


What should I do to optimize this? I think I maybe missed something in the way I build the CompositeView but I have not found any insights in the pdf nor online…


Thanks in advance for your help and my apologies if it has been already answered somewhere!


Florent



Discutez sur Messenger où que vous soyez ! Mettez Messenger sur votre mobile !
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc