This is what I had planed. The user can draw many things on the stage a ballon put a image or some text. So I was going to make a ViewHelper for the flex canvas component that would have the methods that create these views on the Canvas. Then a particular view would dispatch a event like CreateNewImageCommand and would invoke the correct Method on the ViewHelper and pass it a VO of the image to add. But don't know if this is the rigth implementation as in the documentation it seams that a ViewHelper is to massage the model and not manipulate the views directly and in this case am creating new views on the view.
 
Omar Ramos
System Developer

 
On 8/22/05, Scott Barnes <[EMAIL PROTECTED]> wrote:
Well personally, when writing components (which is kind of what your
stating you've done), i keep the "views" selfcontained.

An Example was a CustomCalendar

Ingredients:
1xCombobox = month
1xNumericStepper = year
1xCalendar = day

Now my other views rely on the fact that these three controls trigger
a date change (depending on what you manipulate).

So do i write viewHelpers for every single container within my
heirachy? not really (not in my view heheh)

even though they feel like a view, in reality they are probably
considered a "component" and as such, encapsulation rules apply?

So what I do is inside my CustomCalendar.mxml i put the logic in
there, and keep one public variable up-to-date ...
"selectedDate:Date", then I dispatch an "onChange" event.

In doing this my actual view can listen for a change, and then carry
out further instructions via its ViewHelper (ie update model, or
trigger an event broadcast).





On 8/23/05, Omar Ramos <[EMAIL PROTECTED] > wrote:
> Hi again :),
>
> I have a question about ViewHelpers again! I know the ViewHelpers are
> there to massage the Model. But what when I have to invoke difrent
> events of that specific view from other views? For example I am making
> a drawing application and I have difrent methods for creating shapes
> manipulating them ect. These methods need to be called from other
> views that are deaply nested. Does this scenario justifies the
> ViewHelper ? So that I can have difrent commands like DrawShapeCommand
> or DrawRectangleCommand and have each view only dispatch the event to
> draw a shape? Thanks and sorry for the trubles just trying to use your
> framework correctly.
>
>
> Omar Ramos
> System Developer
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>


--
Regards,
Scott Barnes
http://www.mossyblog.com


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Computer software testing Macromedia flex Development
Software developer


YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Computer software testing Macromedia flex Development
Software developer


YAHOO! GROUPS LINKS




Reply via email to