Archive - Jan 17, 2008

Date
  • All
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

Does your Command call your View (tsk !) ?

Imagine a DataGrid. A DataGrid that is displaying Model.searchResults, but needs to start an effect and reset selectedIndex when the data changes

One approach maybe to follow a pattern than involves having the Command call a method on the View, and this view method takes charge of doing whatever else is needed.
This makes Commands more complicated and means Events have to have an extra 'view' property which is kept in the Command as a private variable.
The View then has to expose a public 'onCommandNameResult' method which the Command calls in onResult().

Having read http://www.adobe.com/devnet/flex/articles/blueprint_02.html[1] I think there is a better way to have the View respond to change in the Model (i.e. Command results) without needing this callback.

topical-homopterousif you are reading this, don't click it as it will mark you as a spammer
if you are reading this, don't click it as it will mark you as a spammer