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] 2 3 4
1  PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo on: July 11, 2008, 04:18:20
Thankx for the wishes of luck. I'm considering planting a sign at the top exit of my driveway so that as they leave, contractors will be reminded to do the same since i've caught a few of them muttering the phrase under their breath. Foundation's poured and curing a few hundred feet away. Bad luck of near biblical proportions are all that separate me from a major sigh of relief scheduled for early next week.
.
.
.

plus asyncstub (as) changed for multicore,

I'd missed this step first (and 2nd) time around.

The latest sao is required for the latest sm.

Yep...i missed that too. After adjusting for multi-core-ness all sm/stub/sao-related errors are eliminated. Hope this message finds you in time to resume some umbrellaed drink relaxation!

tx

2  PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo on: July 09, 2008, 03:53:23

Unfortunately. I am on holidays this week and next.  Internet access is not readily available.  And anyway, I'm supposed to be relaxing and so on....

I look forward to seeing info on any progress you make.
----Philip


You put me in a tough spot here....i don't want to be the source of unrelaxment by putting my problems in front of you - otoh, i don't want to cause stress by not updating on my 'progress'. ;) So in the spirit of 'not my brother's keeper' perhaps you can balance the stress of this puzzle against one of them fancy drinks with the umbrella in 'em.


Using the posted, current version of StartupAsOrdered, multicore, and StartupManager (pulling /scr from the svn trunks rather than the swc) I use a utility that globally searches and replaces text in all the projects files to change:

import org.puremvc.as3.
to:
import org.puremvc.as3.multicore

That requires changing back references to AsynchStub from:
import org.puremvc.as3.multicore.utilities.asyncstub.

back to:
import org.puremvc.as3.utilities.asyncstub.

I'm inclined to trust this method of refactoring (global search/replace) because I'm trusting FlexBuilder to flag any incorrectness, and in fact, if I try to compile at this point i get a complaint about number of arguments for ApplicationFacade.getInstance() - no message about 'type was not found'.

After I correct the signature for calling the AppFacade:

   public static const NAME:String = 'StartupAsOrdered';
   protected var facade:ApplicationFacade = ApplicationFacade.getInstance( NAME );      

The compiler tosses these errors.
:
Severity and Description Path Resource Location Creation Time Id
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy. StartupAsOrdered Unknown 1215599616171 7216
1061: Call to a possibly undefined method retryLoadResources through a reference with static type org.puremvc.as3.multicore.utilities.startupmanager.model:StartupMonitorProxy. StartupAsOrdered/src/org/puremvc/as3/demos/flex/startupasordered/view ApplicationMediator.as line 43 1215599616203 7217
1119: Access of possibly undefined property LOAD_RESOURCES_REJECTED through a reference with static type Class. StartupAsOrdered/src/org/puremvc/as3/demos/flex/startupasordered/view ApplicationMediator.as line 54 1215599616203 7218
1119: Access of possibly undefined property LOAD_RESOURCES_REJECTED through a reference with static type Class. StartupAsOrdered/src/org/puremvc/as3/demos/flex/startupasordered/view ApplicationMediator.as line 75 1215599616203 7219

And now, in lieu of my own relaxation, I have a few tons of concrete being air lifting to a new foundation I'm preparing for my new house to get ready for. Come to think of it, you may find the fact that you are (presumably) thousands of miles from my building site/circumstance much more relaxing than a umbrellaed drink!

http://picasaweb.google.com/Am.Steve


3  PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo on: July 07, 2008, 12:31:54
Using the MultiCore version:

Severity and Description   Path   Resource   Location   Creation Time   Id
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy.      StartupAsOrdered   Unknown   1215456244359   7070
1136: Incorrect number of arguments.  Expected 0.   StartupAsOrdered/src/org/puremvc/as3/demos/flex/startupasordered   ApplicationFacade.as   line 48   1215456244359   7068
1203: No default constructor found in base class org.puremvc.as3.multicore.patterns.facade:Facade.   StartupAsOrdered/src/org/puremvc/as3/demos/flex/startupasordered   ApplicationFacade.as   line 1   1215456244359   7069
4  PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo on: July 07, 2008, 09:07:30
Opps....that'd be the problem. Sry.
5  PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo on: July 07, 2008, 03:09:34
I'm trying to implement StartUpAsOrdered under the MultiCore model...I've swapped out the 2_0_1.swc for the MultiCore_1_0.swc and updated all imports so they point to the correct package.

I've also updated the getInstance method to use the multicore version:
        public static function getInstance( key:String ) : ApplicationFacade
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ] = new ApplicationFacade( key );
            return instanceMap[ key ] as ApplicationFacade;
        }

The project tosses 5 different 1046 compiler errors without pinpointing what class(es) are the cause:

1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::ICommand.      StartupAsOrdered   Unknown   1215423380250   6951
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::ICommand.      StartupAsOrdered   Unknown   1215423380250   6952
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy.      StartupAsOrdered   Unknown   1215423380265   6953
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy.      StartupAsOrdered   Unknown   1215423380281   6954
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy.      StartupAsOrdered   Unknown   1215423380312   6955


I've double checked that any class implementing either ICommand or IProxy is, in fact, importing the multicore package - for grins I've re-added the standard 2_0_1.swc and now get different compiler errors. Since I changed no source code at all - just added the original swc back to the lib folder - it looks like perhaps the StartupManager utility might have dependency on the standard version?
6  PureMVC Manifold / Demos and Utils / Re: Startup as Ordered - A PureMVC AS3 / Flex Demo on: June 19, 2008, 05:06:32
A couple questions about the updated version as regards the open-ended resource list feature...the 'open-endedness' is meant to accommodate those resource lists where contents are generated at runtime?

On one hand, it seems like either SalesOrder or Invoice would fall into that category - one customer : many invoices. But wouldn't then the proxy have code that first discovered how many invoices/orders are to be loaded and then begin the loading process?

thx
--steve...
7  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: June 13, 2008, 08:13:19
I know justSteve has been working on something similar.

Funny...you misspelled 'mangling'. ;) ...actually, more like 'advocating for'  But make sure you are looking at the most recent version of StartupManager - the recent update references:

Added support for open-ended resource list.

Lately I've been grasping @ Pipes and am only just now getting enough time to take a look at it. Some time on it this weekend or bust. But speaking of pipes and 'other utilities' brings to mind the idea of a 'pipe aware' (or would that be multi-core aware) StartupManager to help with transModule management of Loading and starting up multi-core apps.

--steve...
8  Announcements and General Discussion / Getting Started / Handling non-pureMVC-ized subcomponents on: June 11, 2008, 04:49:48
I have an MXML view component implementing a menu where 'upstream functions' like startup and dataprovider population are standard pureMVC operations. The buttons used by this menu are created by a reasonably complex 3rd party .as class that knows nothing of pureMVC. My menu (the pureMVC view component) is correctly injecting the dataProvider and another property required by the button class (labelField) when it declares the button object:

:
<mx:Canvas id="contentCanvas" top="10" width="200">
<nav:UFMButtonList id="nav" y="200"
width="200" maxHeight="800"
labelField="@ModuleName" visible="true"
showEffect="{myWD}" hideEffect="{myWU}"
filters="{dsFilterArray}"
openDuration="500"
/>
</mx:Canvas>


So far, so good. Now I need to modify the button component so that click  events (but only _some click events) are bubbled up to the menu component or even the the menu's mediator without incurring the complexity of making the button component a full-fledged pureMVC-ized class. I want to change just enough button code so that, at a given condition internal to the button object, the click event is passed back to the menu component or perhaps, the menu's mediator.

In other words, add a property to the button's declaration that tells the button's internal click hander where to send events that meet my conditions. To my eye, this is the same pattern as sending a 'responder' argument from a proxy to the constructor of a delegate letting the delegate know who gets the results of an asynch operation.

thoughts?

thx
--steve...
9  Announcements and General Discussion / Getting Started / Re: Injecting data to a viewComponent on: June 02, 2008, 07:56:23
Here's the xml block:
         // constructor will store a reference to the service we're going to call
         this.service = new HTTPService();
         this.service.resultFormat = 'xml';
         this.service.url = url;
         
         // and store a reference to the proxy that created this delegate
         this.responder = responder;


The xml is coming as XMLNode (a top-level single node wrapping list of childNodes...in many other contexts - an XMLList. So the attempt to cast from an xmlnode to xmllist failed - and failed silently? It would be interesting to know if a Try/Catch wrapper ..um....could.
So anyway... the point is that the object returned from the http call came in as xml but was 'passible' as Object (not as XMLList) all the way to the dataprovider as Object. The original blog/tute/demo code is a sweet auto-scrolling menu demo pasted below via http://www.useflashmore.com/flex-as3-scrollable-accordion-menu/scrollable-accordion-menu-custom-component/main.html). It's able to sort out a number of contingent parameter objects that might be passed it's way and adjust on the fly.

But before pasting that - answer me this....wouldn't it be reasonable to expect to be alerted to such a failure to convert? Even if the try/catch traps it, ...really...i need to trap that tightly? or just log/trace better?

       //----------------------------------
       //  dataProvider
       //----------------------------------   
      
public function get dataProvider():Object {
   return _collection;
}                  
public function set dataProvider(value:Object):void {
if (_collection)
{
    _collection.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
}

if (value is Array)
{
    _collection = new ArrayCollection(value as Array);
}
else if (value is ICollectionView)
{
    _collection = ICollectionView(value);
}
else if (value is XMLList)
{
    _collection = new XMLListCollection(value as XMLList);
}
else if (value is XML)
{
    var xl:XMLList = new XMLList();
    xl += value;
    _collection = new XMLListCollection(xl);
}
else
{
    // convert it to an array containing this one item
    var tmp:Array = [];
    if (value != null)
        tmp.push(value);
    _collection = new ArrayCollection(tmp);
}
// get an _iterator for the displaying rows.  The CollectionView's
// main _iterator is left unchanged so folks can use old DataSelector
// methods if they want to
_iterator = _collection.createCursor();
_dataProviderChanged = true;

_collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);

var event:CollectionEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
event.kind = CollectionEventKind.RESET;
collectionChangeHandler(event);
dispatchEvent(event);

invalidateProperties();
invalidateSize();
invalidateDisplayList();
}      

10  Announcements and General Discussion / Getting Started / Re: Injecting data to a viewComponent on: June 02, 2008, 05:42:30
Turns out the data's dropped whereever the attempt to convert to
XMLList sits. As long as I leave it as Object, data's passed from
class to class as expected.

It sure seems like this failure to convert is something that
FlexBuilder should be notifying me of in some form or fashion,
shouldn't it?

thx much Cliff..._now I get to play with the pipes demo.
11  Announcements and General Discussion / Getting Started / Re: Injecting data to a viewComponent on: June 01, 2008, 04:38:48
Yep...those curlies shouldn't have been included in my question text. That statement only exists at this point to provide a breakpoint point - the malfunction is happening somewhere/sometime before that - when I breakpoint on my misguided curly statement and look at the 'value' parameter - it says 'null'.

But when the mediator attempted the injection:
   this.mainMenu.loadXML(this.menuProxy.getMenuData());

the data existed correctly in both type and content in the Proxy...it's just not getting returned out of the proxy correctly.

I've tried creating a public var in the mediator so as to store the value there with the intent of having the viewComponent retrieve that value (rather than being injected with it) - that changes the existing statement:

this.mainMenu.loadXML(this.menuProxy.getMenuData());

to:

this.mData = this.menuProxy.getMenuData();

Again....the data exists as expected in the proxy when the
   return data as XMLList;
statement is hit (also changed that method's return value to XMLList as suggested)

But mData in the Mediator comes up null just like it had when injected to viewComponent.
12  Announcements and General Discussion / Getting Started / Injecting data to a viewComponent on: May 31, 2008, 05:33:53
I have the connections in place that correctly;
  • loads xml data to the proxy;
    connects mediator to proxy
    connects viewComponent to mediator

Now I'm trying to get the mediator to pass the proxy's data to the viewComponent:
this.mainMenu.loadXML(this.menuProxy.getMenuData() as XMLList);

The above statement executes from the mediator after the viewComponent fire's it's CreationComplete event. Using breakpoints, everything is happening in correct order - the data in the proxy exists correctly when the getMenuData() method is called:
   public function getMenuData( ):*
   {
      return data;
   }

But the parameter passed to the viewComponent's method is coming up NULL.
   public function loadXML(  value:XMLList ):void
   {
      nav.dataProvider="{_navXML}";
   }

So the question boils down to, is this not a legit way to pass data down to a view component?
this.mainMenu.loadXML(this.menuProxy.getMenuData() as XMLList);

Thinking it might be a conversion of type issue, I've also tried:

(proxy)
public function getMenuData( ):*
{
   return data as XMLList;
}   

(mediator)
this.mainMenu.loadXML(this.menuProxy.getMenuData());

Data looks ok all the way to the final step where it's passed into the viewComponent.

thx
--steve...
13  Announcements and General Discussion / General Discussion / Logging Needs on: May 29, 2008, 11:26:50
Occasionally there have been messages posted about this or that strategy for getting better logging information out of PureMVC but I haven't seen code or samples that clearly demonstrates anything. There are a number of open source logging apps out there, including LogBook that might provide an advanced starting point for getting more robust logging capabilities.

It might be worthwhile putting out some feelers in some of those other logging-oriented forums looking for someone already adapt at logging to see what capabilities can be brought to a PureMVC framework.

IMHO, logging is very nearly as important as Startup / Preloading utilities.

thx
--steve...
14  PureMVC Manifold / Demos and Utils / Re: Login - A PureMVC AS3 / Flex / WebORB Demo on: May 12, 2008, 02:57:49
I'm trying to implement this for WebORB's .NET version. The php code looks simple enough but I'm having problem translating it to .net.

Can anyone express what's going on inside the 2 php classes in terms of .net/C#?

thx
--steve...
15  PureMVC Manifold / Demos and Utils / Re: Calendar - A PureMVC AS3 / Flex / Django Demo on: April 25, 2008, 10:00:01
:sniffles.
Pages: [1] 2 3 4