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  PureMVC Manifold / Standard Version / Custom interfaces and inheritance in PureMVC on: January 08, 2010, 02:03:10
My scenario is the following:

I am extending Mediator with PageMediator.
I am implementing PageMediator with IPageMediator.
IPageMediator extends IMediator.

I dont understand 2 things:

1. If I add a public method to IPageMediator which is not implemented in PageMediator, the compiler warns me, however, if I include a public method to PageMediator which is not declared in IPageMediator, there are no warnings at all.

2. All concrete classes that extend PageMediator and that implement IPageMediator do not seem to need to contain any of the methods that are declared on IPageMediator and I can add as many public methods as I want even if they arent declared in IPageMediator.

Are these questions coming from a lack of understanding of interfaces and inheritance or is PureMVC structured in a way that would cause this behavior?

Thank you!
2  PureMVC Manifold / Standard Version / Startup Manager on: August 25, 2009, 04:09:44
Hi, quick question about startup manager. How come when I specify that a startup proxy resource requires the previously registered startup proxy resource, it simply wont load. Instead of waiting for the one it requires to load, then loading, it simply wont load. If I do not specify the requires variable for any of my proxies, then they all load fine and their notifications are sent perfectly.

Appreciate the help because this is maddening.
3  Announcements and General Discussion / Architecture / Mediators and Components Help to Understand on: August 24, 2009, 03:33:49
Hi. I am very new to puremvc and trying to establish the architecture for an online questionnaire done in flash.

AS in previous iterations I have extended the TextField class to make a CustomTextFieldClass with some predefined properties such as textField.stylesheet = [global class].styles.css; I would then pass in the textField content as a string in the constructor.

In my puremvc version, I feel this would best be done with a TextFieldMediator, which has access to the proxies which contain the text I need (from the xml), the stylesheets, etc.

My questions are as follows:

1. Considering that I need access to those proxies, the best way to do this is to have a mediator for that component right?

2. I will for sure need to have multiple instances of this component within whatever parent viewComponent, so I think its silly to have a mediator for each view component and have to register each one. How does one go about adding multiple instances of a view component that are all children of the same mediator?

I was unable to understand how this should work by reading the best practices PDF so any help is greatly appreciated!

Ted

4  PureMVC Manifold / Standard Version / Beginner's Questions on: July 27, 2009, 01:06:55
Hi, I am new to the forums and new to PureMVC : ) I am fairly familiar with design patterns and try to implement them whenever possible, especially MVC in the vast majority of my projects, but I am trying to get a grasp on PureMVC and I think I understand some of the core concepts but there are still things I am stuck on so I hope this is the right place for me to request some knowledge...

In regards to Notifications I have one question: the getBody() method pulls the body parameter. Is that parameter pretty much just a placeholder to be able to pass any argument you want through a notification? In the examples I see, for Mediators, it is usually used to pass the stage object through. Should I designate this argument for something in particular in most cases?

My second question is about the facade... In the PureMVC world, how would one go about setting/getting a 'global' variable? Before I was using a singleton class I found that stores and instantiates global objects but I feel like with the facade, this should no longer be necessary... any tips for accomplishing this the right way?

Thanks lots for any help or feedback, direction etc you can provide :D
Pages: [1]