#viewModel ok to use?

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

#viewModel ok to use?

Bill Schwab-2
Andy and Blair,

I created an object that generates graphics by coordinating efforts of a few
different objects.  Among other evolving duties, it produces a Bitmap for
display on the screen.  Since Blair pointed me to ImageView, I can display
the images with a standard ImagePresenter rather than a home-grown view,
but, things seem to work out better with attention focused on the rendering
object rather than a single image that it produces.

My first cut at such a presenter was a composite with a single ImageView in
a proportional layout.  A few tweaks of an existing UI later, I realized
that the ImageView was the interesting part, and the rest was really just
putting an aspect value adapter in the right place to make the view work.

Subclassing Presenter and defining #viewModel to create the adapter (so the
view gets the #image from the renderer) seems to work, and a without the
extra view and layout overhead.  Does that seem like a reasonable use of
#viewModel?

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]