PureMVC
Home
About
Code
Docs
FAQ
Forums
News
Showcase
Contact
Jobs
Welcome,
Guest
. Please
login
or
register
.
May 20, 2013, 09:04:42 AM
News:
ATTENTION: Spambots must die! Humans must visit
http://contact.futurescale.com
to request forum access.
PureMVC Architects Lounge
Announcements and General Discussion
Architecture
Mediator with multiple views, toolbar stack ?
Pages: [
1
]
« previous
next »
Author
Topic: Mediator with multiple views, toolbar stack ? (Read 1948 times)
coulix
Full Member
Posts: 23
Mediator with multiple views, toolbar stack ?
«
on:
November 25, 2008, 04:40:16 AM »
Hi guys,
I am facing a design problem i havent encountered before.
I have a BoardView with a boardMediator
a boardToolbarView with boardToolbarMediator, the toolbar it a tile of several Shapes.
Each Shape should be associated to a toolbar for its type (rectangle, circle, etc).
Instead of creating a RectangeToolbarMediator, CircleToolbarMediator etc ...
for each type can i create just one ShapeToolbarMediator registering several views CircleToolbarView, RectangeToolbarView etc.
Then when my boardToolMediator send a toolchange notification, ShapeToolbarMediator will listen for it and display the appropriate shapeToolbarView.
How would you do such a thing ?
-------------------
| H | H: boardToolBar
| H | x: shapeToolBar
| xxx H |
-------------------
Thanks
Logged
puremvc
Global Moderator
Hero Member
Posts: 2790
Re: Mediator with multiple views, toolbar stack ?
«
Reply #1 on:
November 25, 2008, 06:50:44 AM »
Depends on haw much granularity you actually need. Will each shape toolbar be dispatching a bunch of events that could bubble and have the board toolbar mediator handle? Perhaps it hears the shape type and which toolbar function and triggers a different command?
-=Cliff>
Logged
coulix
Full Member
Posts: 23
Re: Mediator with multiple views, toolbar stack ?
«
Reply #2 on:
November 25, 2008, 07:03:02 AM »
Each Shape property toolbar will be dispatching events to be handle by the Property Toolbar mediator (fill color, line color) which in turn sends a notification to the BoardMediator.
Board Mediator being responsible for creating the shapes on the board.
The BoardToolBar mediator only handles the tool choices: select, pen, rectangle, circle ...
The PropertyToolbar mediator will take care of the property details of the current tool (fill ...)
I am trying to use a view stack as the propertyToolbarView for now.
I dont think i need a mediator for each property toolbar.
Logged
Jason MacDonald
Sr. Member
Posts: 243
Re: Mediator with multiple views, toolbar stack ?
«
Reply #3 on:
November 25, 2008, 07:07:08 AM »
If you are using Flex, why not make one toolbar and use States to to manage the different types of toolbars? This works particularly well if you have common buttons that span all the different toolbars. Use your selected shape type (circle, square, etc) as the state name, dispatching it to the toolbar component to change states.
«
Last Edit: November 25, 2008, 07:08:50 AM by jasonmac
»
Logged
coulix
Full Member
Posts: 23
Re: Mediator with multiple views, toolbar stack ?
«
Reply #4 on:
November 25, 2008, 07:19:25 AM »
I did not know about states looking at it right now,
Thanks
«
Last Edit: November 25, 2008, 07:22:25 AM by coulix
»
Logged
Jason MacDonald
Sr. Member
Posts: 243
Re: Mediator with multiple views, toolbar stack ?
«
Reply #5 on:
November 25, 2008, 07:32:28 AM »
Quote from: coulix on November 25, 2008, 07:19:25 AM
I did not know about states looking at it right now,
Thanks
Glad I could help
Logged
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements and General Discussion
-----------------------------
=> General Discussion
=> Getting Started
=> Architecture
=> Public Demos, Tools and Applications
===> Fabrication
-----------------------------
PureMVC Manifold
-----------------------------
=> Port Authority
===> Contributor Central
===> Client Side
===> Server Side
=> Port to AS2
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to AS3
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to ColdFusion
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to C++
===> MultiCore Version
=====> Demos and Utils
=====> Bug Report
=> Port to CSharp
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Dart
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Haxe
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Java
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to JavaScript
===> Demos and Utils
===> Native JS Branch
=====> Bug Report
===> PrototypeJS Branch
=====> Bug Report
===> Objs Branch
=====> Bug Report
===> MooTools Branch
=====> Bug Report
===> ExtJS Branch
=====> Bug Report
=> Port to Objective C
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Perl
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to PHP
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Python
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Ruby
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to TypeScript
===> Standard Version
=====> Bug Report
=====> Demos and Utilities
===> MultiCore Version
=====> Bug Report
=====> Demos and Utilities
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.11
|
SMF © 2006-2007, Simple Machines LLC
Loading...
Copyright © 2006-2008 Futurescale, Inc.