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
1  PureMVC Manifold / Bug Report / Error when generating docs on: January 18, 2013, 10:32:51
When running 'Generate Dartdoc' (Tools menu in DartEditor) on the ReverseText example this is the output in the console:

Running dartdoc...
../../../../Projects/PureMVC-Dart-Reversi/puremvc-dart-demo-reversetext/src/model/proxy/TextProxy.dart:3:1: Error: The compiler crashed when compiling this element.
class TextProxy extends mvc.Proxy
^^^^^
Unhandled exception:
NoSuchMethodError : method not found: '[]'
Receiver: null
Arguments: [Instance of 'Identifier']
#0      Object._noSuchMethod (dart:core-patch:1360:3)
#1      Object.noSuchMethod (dart:core-patch:1361:25)
#2      ConcreteTypeInferencer.visitSend (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/types/types.dart:184:31)
#3      Send.accept (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:283:47)
#4      TypeAnnotation.visitChildren (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:975:20)
#5      ConcreteTypeInferencer.visitNode (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/types/types.dart:121:45)
#6      Visitor.visitTypeAnnotation (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:77:58)
#7      TypeAnnotation.accept (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:972:57)
#8      ClassNode.visitChildren (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:224:46)
#9      ConcreteTypeInferencer.visitNode (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/types/types.dart:121:45)
#10     Visitor.visitClassNode (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:18:48)
#11     ClassNode.accept (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/tree/nodes.dart:219:52)
#12     TypesTask.analyze.<anonymous closure> (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/types/types.dart:37:18)
#13     CompilerTask.measure (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:919:20)
#14     CompilerTask.measure (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:920:7)
#15     TypesTask.analyze (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/types/types.dart:36:12)
#16     Compiler.analyzeElement (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:711:22)
#17     Compiler.analyze (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:738:28)
#18     WorkItem.run (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:56:38)
#19     LibraryCompiler.processQueueList.<anonymous closure>.<anonymous closure> (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:310:54)
#20     Compiler.withCurrentElement (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:167:15)
#21     Compiler.withCurrentElement (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/compiler.dart:188:7)
#22     LibraryCompiler.processQueueList.<anonymous closure> (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:310:25)
#23     Enqueuer.forEach (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/enqueue.dart:414:8)
#24     LibraryCompiler.processQueueList (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:309:18)
#25     LibraryCompiler.runCompilerList (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:297:21)
#26     LibraryCompiler._runList (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:271:22)
#27     LibraryCompiler._runList (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:272:7)
#28     LibraryCompiler.runList (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:262:28)
#29     Dart2JsCompilation.Dart2JsCompilation.library (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:418:28)
#30     Compilation.Compilation.library (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart:36:12)
#31     Dartdoc.documentLibraries (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/dartdoc/lib/dartdoc.dart:332:25)
#32     main (file:///Users/dev-admin/Documents/SDK/dart/dart-sdk/lib/_internal/dartdoc/bin/dartdoc.dart:217:28)

Consequently, this also occurs when trying to generate the docs of my own project.
2  PureMVC Manifold / Bug Report / Re: Declaration of interface deprecated on: January 15, 2013, 12:17:51
Great! Thanks Cliff for the support.
3  PureMVC Manifold / Bug Report / Declaration of interface deprecated on: January 15, 2013, 04:32:17
Hi Cliff,

I'm using:
Dart Editor version 0.2.10_r16761
Dart SDK version 0.2.10.1_r16761

and the 'interface' declaration is now deprecated and should be changed to 'abstract class'.
Also see http://news.dartlang.org/2012/11/breaking-change-deprecated-language-features-and-dart2js.html

I think the puremvc package should be updated?

Peter
4  PureMVC Manifold / Bug Report / Re: Failure on dependencies on: January 14, 2013, 03:27:43
I can now install puremvc without issues. Thanks very much for looking into this!
5  PureMVC Manifold / Bug Report / Failure on dependencies on: January 09, 2013, 04:55:27
Unsure if this is a bug but as soon as I add 'js' as a dependency I get an error using pub install:
Running pub install ...
Pub install failed, [1] Resolving dependencies...
Incompatible dependencies on 'unittest':
- 'js' depends on it from source 'hosted'
- 'puremvc' depends on it from source 'sdk'

If I remove puremvc as a dependency, the error goes away.
Trying 'puremvc: any' doesn't resolve the issue.

Just having:
dependencies:
#  js: any
#  unittest: any
  puremvc: any

works fine and using:

dependencies:
#  js: any
#  unittest: any
  puremvc: ">=2.0.1 <3.0.0"

also works. This btw gets me both puremvc and unittests as packages. As soon as I use:

dependencies:
  js: any
#  unittest: any
  puremvc: ">=2.0.1 <3.0.0"

I get an error:

Running pub install ...
Pub install failed, [1] Resolving dependencies...
Incompatible dependencies on 'unittest':
- 'js' depends on it from source 'hosted'
- 'puremvc' depends on it from source 'sdk'

So, does this point to puremvc declaring a dependency on unittests which causes some incompatibility?
6  Announcements and General Discussion / Architecture / Re: Help with Commands on: February 08, 2009, 07:17:05
If I look at the practical side and leave the theory to Cliff, I rather like this 'freedom'. I do a lot of short term 'marketing action' related sites (flash) where it is about speed of development and less about decoupling, life span of the project and maintenance. If a View calls the Model directly... well, so be it. Anything to get the job done... within the budget.

If however it's about a project with a longer life span, I won't allow that. A View - Mediator and its ViewComponent - should be taken out of the project easily and be replaced with another View. Here the View may only communicate with the core using notifications and commands will decide what to do next.
Also, when working with a team of developers, I can have developers working on Views only while others only work on the core.

I'm sure you will want to see more theory in the answers so let's wait for Cliff to answer.
7  Announcements and General Discussion / Public Demos, Tools and Applications / Re: FDT Templates for pmvcAS3 Available on: September 08, 2008, 03:22:29
Great Pedr, thanks for that!
8  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 08, 2008, 02:32:45
Look in the UserListMediator:
(which is instantiated in the StartUpCommand with:
facade.registerMediator( new UserListMediator( app.userList ) );
)

in its constructor:
userProxy = facade.retrieveProxy( UserProxy.NAME ) as UserProxy;
userList.users = userProxy.users;

The Proxy has a property 'data' which is a generic object. It receives a new ArrayCollection in:
super( NAME, new ArrayCollection );

so if you want to use that ArrayCollection you need to retrieve it as an ArrayCollection, hence:
public function get users():ArrayCollection
{
   return data as ArrayCollection;
}

which is used in:
public function addItem( item:Object ):void
{
   users.addItem( item );
}

because users is an ArrayCollection you can use ArrayCollection.addItem() there.

Hope this helps...
9  PureMVC Manifold / Demos and Utils / Re: Bookstore - A PureMVC AS3 / Flex / WebORB Demo on: July 07, 2008, 07:20:38
Is there a sql script available to generate the database?
10  Announcements and General Discussion / General Discussion / Re: Meditor, handle of notification without switch statement... on: December 28, 2007, 12:39:38
I don't think so. If you let a Mediator govern just one ViewComponent, the switch won't have to handle that much notifications. I'm building a fairly large application and I didn't have to use more than 5 notifications per Mediator max. Performance is great untill now so nothing to complain there either. So I guess it's just a matter of taste then.
11  Announcements and General Discussion / Getting Started / Re: Where should visual theme assets go? on: December 27, 2007, 02:57:08
I'm using a Command to govern the loading process of assets.

1. I've registered several Commands to load assets with the ApplicationFacade, like LoadMovieCommand.
2. The viewcomponent broadcasts an event to its Mediator, like onChange.
3. The Mediator sends a Notification which invokes LoadMovieCommand
4. LoadMovieCommand retrieves a remote Proxy to load a swf
5. When loaded, the remote Proxy sends a Notification which invokes a Command - like AddViewsCommand.
6. AddViewsCommand evaluates what has been loaded (for instance by looking at the type of the Notification) and based on the result, sends a Notification to invoke another Command like LoadCSSCommand -> step 5 (you can also sequence the loading of several swf's this way).
7. AddViewsCommand decides if all assets are loaded and sends a Notification using the body and optionally the type of the Notification to pass any data to the Mediator.
12  Announcements and General Discussion / Architecture / Re: Validate form data, where to put it? on: December 27, 2007, 02:23:02
The good thing here (besides the obvious re-use) is that you can do both client side and server side validation this way. I needed the solution to add new users to the application. While I can check - for instance - an email address client side, I can't check if the provided email address is already in the database.
So, if things validate client side, the ValidateFormProxy sends a Notification that invokes a Command to retrieve a Remote Proxy that will try to save the entry. The Remote Proxy catches any server side errors (XML) and sends a Notification to a Mediator to report the errors.
13  Announcements and General Discussion / General Discussion / Re: loading exernal views in a flash application on: December 27, 2007, 02:01:18
Well, it's just that I'm working on a commercial project so I was forced to find solutions for all sorts of Flash related issues. The good thing is that I could solve just about anything using the Proxies and Commands. Man, you did a good job writing PureMVC. It's the best thing I've seen yet.
14  Announcements and General Discussion / Architecture / Re: Validate form data, where to put it? on: December 26, 2007, 03:17:55
I simply use a Proxy and a SimpleCommand to do validation. In short:

-register the Proxy - ValidateFormProxy - at startup (I need it all the time...)
-the viewcomponent broadcasts an onSubmit event to its Mediator (passing in the data)
-the Mediator then sends a Notification to validate a form at which point a SimpleCommand is invoked (registered as a command with the ApplicationFacade) to retrieve the ValidateFormProxy and passes in the data to be validated (via the body of the Notification)

When things don't validate - the ValidateFormProxy can send a Notification to the Mediator that needs to take action, passing errors in the body of the Notification.

When things validate - the ValidateFormProxy can send a Notification to save the form data.

The ValidateFormProxy can import an external library with utility classes to do the actual validation.
15  Announcements and General Discussion / General Discussion / Re: loading exernal views in a flash application on: December 26, 2007, 02:33:34
Well Cliff, what can I say... once you discover the power of the Notifications and the Commands...  ;)
Pages: [1] 2