Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Dynamically created mediators and proxies?  (Read 6381 times)
jon.opus
Newbie
*
Posts: 4


View Profile Email
« on: March 09, 2009, 02:58:39 »

I'm making a type of image editor with layers and the like that can move, scale and rotate. They will need to created or loaded, edited and saved. A problem I'm running into is that I don't know how to manage the layers.

The editor could be viewed in at least two ways:

1. "model data" that describes the "view components" that needs to be displayed.
2. "view components" that need to be recorded as "model data"

Ether way I feel like the two are tightly coupled. And It feels like I'll need to dynamically create mediators and proxies. Any sort of direction would be of great help.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: March 10, 2009, 04:22:38 »

It sounds like yor model does need to track the layout metrics. That doesn't mean it should actually know about the view components that use those metrics for laying themselves out. Not that it is an specific guide for your implementation, but check out the AIR demos that use the DesktopCitizen utility, which persists the window metrics for your app. Also check out the HelloFlash demo which has some dynamically created mediators for self-directed sprites.   

Also search these forums for the topic 'Document-based app' where I responded with thoughts about the pairing of dynamically generated mediators and proxies that represent and manage documents.

-=Cliff>
Logged
Pages: [1]
Print