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 / MultiCore Version / How to remove widgets previously loaded dynamically on: April 21, 2008, 01:49:11
I would like to know how would you remove the coolwidget dynamically that has been previously loaded into the WidgetCanvas.mxml when clicking on superwidget button prior to the super widget been loaded into the WidgetCanvas.mxml?

Currently you click the coolwidget button and the coolwidget is loaded into WidgetCanvas.mxml, if you click on the superwiget button a super widget is added to the WidgetCanvas.mxml. The WidgetCanvas nows contains both the cool and super widget buttons.

I want to remove any previous widget that is loaded to the WidgetCanvas.mxml before the new widget is loaded. What actionscript code will remove the previously loaded widget before the new widget is loaded to the WidgetCanvas.mxml.

This code is found on line: 46 of the coolWidgetMediator.as, what would the process be to do this dynamically?

:
// Handle clicks to the buttons added to the widget canvas
protected function onComponentClick( event:MouseEvent ):void
{
var component:DisplayObject = event.target as DisplayObject;
coolWidget.widgetShell.removeComponent( component );
component.removeEventListener( MouseEvent.CLICK, onComponentClick );
coolWidget.widgetShell.setStatusMessage( 'Removed CoolWidget-generated display object from Widget Canvas')
}

Wayne
2  PureMVC Manifold / MultiCore Version / How do I add new custom components? on: April 07, 2008, 04:44:41
I have am really new to AS3 and even more so the Multiton framework.

The CoolWidgetMediator.as files create a button in AS3 code on line number: 33. What I did was add var panel:Panel = new Panel() just below the button script and called coolWidget.widgetShell.addComponent( panel ) to create the object.

This works perfectly as I click the CoolWidget button in the application bar both the button and the panel are added to the widgetshell.

My question is how do I add an mxml file (container canvas) which contains my custom components? I have created  a new mxml file under the Coolwidget view. New to AS3 so I dont know how add this mxml file eg:confirmCanvas.mxml to the shellwidget when the button is clicked. As mentioned above I coded the panel using AS3 which works with my test.

Im going to have numerous components which I will have to add to the shellwidget when the user clicks single a button. The idea was to add confirmCanvas.mxml with its custom components inside the confirmCanvas.mxml to the shellwidget.

Thanks, Wayne
3  PureMVC Manifold / MultiCore Version / Modularity string name on: March 13, 2008, 11:06:33
I would like to know what is the string name=Modularity importance and how they work together?

1. In the Modularity.mxml which is set as a constant .
2. In the ApplicationFacade.as the name "Modularity is set in the startup function. Does the name in the mxml file tie up with this. Is the name Modularity due the the folder name modularity under your org folder?
3. In the starupCommand.as the name Modularity is set in the excute function as well. Does the var app: Modularity name refer from the ApplicationFacade.as. ?

Secondly the root folder names are org and com respectively. I would like to ask how I would setup my project root when I using a domain name as root folder co.za.'myDomain to contain the sub folders for the canvasWidgets (your root folder org). What do I name the the root folder for the multitons when I have already used the co.za.'myDomain name?

Do I have to use a second domain name as you have eg: com.widgetmakers? What would yur advise be?

PS. We are now upgrading a long standing web based enterprise software package built in CF 7 to use the new framework. We congratulate you and your team on a job well done.
Pages: [1]