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

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / Call a Command Every Frame on: July 13, 2009, 12:57:25
Is it ok to call a command every frame? I'm just wondering since the command object is created every time it is called, won't this be a memory problem?
2  Announcements and General Discussion / Getting Started / Loading Module Multiple Times Error on: July 10, 2009, 09:45:25
Hi, I have a module that represents a gui 'window'. Each time I need a new window I was thinking of loading a new window module and adding it to some container. However, I have hit an error. The first module load is fine, however on subsequent module loads of the same file, the getInstance method returns a null value error. I'm guessing because the NAME of the module has already been registered in the instanceMap even though it is actually a different module.

Is there a way around this? Or is the best practice not to load multiple instances of the same module. Maybe I should rewrite the module so instead of being used for just one window instance, it handles ALL window instances of that type. That way when I need a new window I just tell that module to generate a new window view internally and not load a whole new module .swf.

Thanks for any tips,

3  Announcements and General Discussion / Architecture / Windowing Architecture on: July 07, 2009, 11:59:11
Hi, I'm doing my first MVC project as a test of the framework, keeping in mind some projects in the future. I still don't fully understand the flow/where to put everything (especially with pipes) but I'm getting there.

The project I'm starting with is to create a basic windowing setup similar to an OS allowing for dragging, resizing, opening and closing the content of these windows. I want to use the Multicore functionality of PureMVC. At first I was thinking of making a WindowModule, and then the shell would load in a window module every time it needs to create one. This would work fine, however, I then realized I'd need to manage these windows somehow, for instance if the user wanted to cascade, resize, them or something, or just to enforce boundaries and theings on the windows, so I then thought I would need a WindowContainerModule. What I'm having trouble with is the communication between these elements, and if this is actually how it should be done.

This is what I was thinking:
1) The shell would take a button click to open a new window.
2) It would then pipe a message to the WindowContainerModule to create a new window.
3) The WindowContainerModule would load a WindowModule
4) Certain messages in the WindowModule would then be piped to the WindowContainerModule, while other messages would need to be piped all around the application to any possibly interested party ( I guess mainly to the shell which would then handle the logic ).

Does this sound right? I'm separating WindowContainerModule from WindowModule to allow for multiple types of window modules, like a notepad or a traditional window, etc.

Anyway I realize it can be done a number of ways, but I'm currently at a loss for how to setup the piping channels. I've followed the HelloPipes tutorial so I can get the shell to talk to a sub-module, but I'm not sure how to get The windowContainerModule to talk to the other modules. I guess I can just treat the WindowContainerModule as if it is a shell of sorts and have it talk to it's submodules with a TEE-SPLIT and a TEE-MERGE, but then it would also need a pipe that goes back to the main shell.

I'm obviously out of my element, but if there is anything that I'm obviously going astray about, let me know, or maybe there is an example of a pipes windowing system already?
Pages: [1]