Material Design Lite Dart, refreshing table - dart

Is there a simple example of custom component in MDL Dart http://www.material-design-lite.pub using a data table or a list linked to a model changing over time?
I have the exception
Exception: Uncaught Error: RangeError: Index out of range: index should be less than 6: 6
Stack Trace:
#0 HtmlCollection.[] (dart:html:17296)
#1 _ChildrenElementList.[] (dart:html:10623)
#2 MaterialRepeat.insert.<insert_async_body> (package:mdl/src/template/components/MaterialRepeat.dart:148:55)
#3 Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
#4 _microtaskLoop (dart:async/schedule_microtask.dart:43)
#5 _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#6 _ScheduleImmediateHelper._handleMutation (dart:html:42503)
Using the custom ToDo sample when updating the items list

Related

Fatal error: Uncaught Error: "Presta vers. 1.6.1.18

My prestashop gives the following errors:
Fatal error: Uncaught Error: Call to a member function getProducts() on null in /var/www/html/minie.dk/public_html/modules/productsbundle/productsbundle.php:181 Stack trace: #0 /var/www/html/minie.dk/public_html/classes/Hook.php(591): ProductsBundle->hookActionCartSave(Array) #1 /var/www/html/minie.dk/public_html/classes/Hook.php(546): HookCore::coreCallHook(Object(ProductsBundle), 'hookactionCartS...', Array) #2 /var/www/html/minie.dk/public_html/classes/Cart.php(214): HookCore::exec('actionCartSave') #3 /var/www/html/minie.dk/public_html/classes/controller/FrontController.php(327): CartCore->update() #4 /var/www/html/minie.dk/public_html/classes/controller/Controller.php(170): FrontControllerCore->init() #5 /var/www/html/minie.dk/public_html/classes/Dispatcher.php(367): ControllerCore->run() #6 /var/www/html/minie.dk/public_html/index.php(28): DispatcherCore->dispatch() #7 {main} thrown in /var/www/html/minie.dk/public_html/modules/productsbundle/productsbundle.php on line 181
Can Anyone here see what the problem may be? And also, how to save it?
This problem is related to your 'productsbundle' module when a product is added to the customer's shopping cart.
I would suggest either to update this module to the latest version available or to disable it from your admin panel.

Cannot nest placeholder captures for the same placeholder'

i am making an ajax call to the controller, i dont know wants going wrong and this error is coming.
can someone explain this error.
Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with message 'Cannot nest placeholder captures for the same placeholder' in E:\xampp\htdocs\xnspy-web-app\xnspy-cp\vendor\ZF2\View\Helper\Placeholder\Container\AbstractContainer.php:141 Stack trace: #0 E:\xampp\htdocs\xnspy-web-app\xnspy-cp\module\Application\view\partial\global-head.phtml(5): Zend\View\Helper\Placeholder\Container\AbstractContainer->captureStart() #1 E:\xampp\htdocs\xnspy-web-app\xnspy-cp\vendor\ZF2\View\Renderer\PhpRenderer.php(506): include('E:\xampp\htdocs...') #2 E:\xampp\htdocs\xnspy-web-app\xnspy-cp\vendor\ZF2\View\Helper\Partial.php(61): Zend\View\Renderer\PhpRenderer->render('partial/global-...', NULL) #3 [internal function]: Zend\View\Helper\Partial->__invoke('partial/global-...') #4 E:\xampp\htdocs\xnspy-web-app\xnspy-cp\vendor\ZF2\View\Renderer\PhpRenderer.php(399): call_user_func_array(Object(Zend\View\Helper\Partial), Array) #5 E:\xampp\htdocs\xnspy-web-app\xnspy-cp\module\Application\view\layout\ajax-layout.phtml(3): Z in E:\xampp\htdocs\xnspy-web-app\xnspy-cp\vendor\ZF2\View\Helper\Placeholder\Container\AbstractContainer.php on line 141
This error comes when u open capturestart two times in a row
placeholder('script')->captureStart(); ?>
placeholder('script')->captureStart(); ?>
eleminate one and problem is solved.

Exception not caught by ZF2

In the onBootstrap of my Application's Module.php I have registered a function onErrors on the EVENT_DISPATCH and EVENT_DISPATCH_ERROR events. In any of my models if I throw a custom error, Zend will catch it for me and in the onErrors function and I can handle the error (show an error page, return an error message as json, etc). This works fine except when an error is thrown in a function that's being used by Smarty. In that case I do still end up in the onErrors, but McvEvent->exception is NULL and I get this error:
Fatal error: Uncaught exception 'Application\Exception\InternalServerErrorException' in
/........../module/Smarty/src/Smarty/View/Renderer.php:90 Stack trace:
#0 /........../vendor/zendframework/zendframework/library/Zend/View/View.php(205):
Smarty\View\Renderer->render(Object(Zend\View\Model\ViewModel))
#1 /........../vendor/zendframework/zendframework/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php(102):
Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#2 [internal function]:
Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#3 /........../vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#4 /........../vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207):
Zend\EventManager\EventManager->triggerListeners('render.error',
Object(Zend\Mvc\MvcEvent), Array)
#5 /.......... in
/........../module/Smarty/src/Smarty/View/Renderer.php on line 90
What's happening here? Why isn't Zend catching this error for me?

Map as a published property of custom element

Dartium gave me this error when I load my app (dart version, not compiled js) into browser:
Uncaught Error: Error evaluating expression 'model["mode"]': EvalException: Can't assign to null: model
I can see the error is caused by some code like this:
<polymer-element name="outer-element">
<!-- some codes here -->
<inner-element mode="model['mode']"></inner-element>
</polymer-element>
Where the model is a Map, model['mode'] is String, and the mode is declared via #published String mode on <inner-element>. Also, model is declared on <outer-element> via #published Map model so I can pass some map to <outer-element> in another custom element using <outer-element model="{{some map}}">.
This error doesn't make the app crash, actually, it has no effect as far as I can see, but it's really annoying to see it. (I have this error since the beginning of my development!)
I go through the data flow, but cannot find the problem.
Any idea would be appreciated. Thanks.
Version:
dart 1.4.2
polymer 0.10.1+1
polymer_expressions 0.10.0
dartium-win-full-stable-36647.0
If it helps, here is the stack trace:
Uncaught Error: Error evaluating expression 'model["mode"]': EvalException: Can't assign to null: model
Stack Trace:
#0 assign (package:polymer_expressions/eval.dart:137:18)
#1 _Binding.value= (package:polymer_expressions/polymer_expressions.dart:142:28)
#2 HtmlElement&Polymer.bindProperty (package:polymer/src/instance.dart:675:16)
#3 HtmlElement&Polymer.bind (package:polymer/src/instance.dart:447:34)
#4 _processBindings (package:template_binding/src/template_iterator.dart:186:38)
#5 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:71:19)
#6 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:60:26)
#7 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:60:26)
#8 TemplateBindExtension.createInstance (package:template_binding/src/template.dart:87:40)
#9 HtmlElement&Polymer.instanceTemplate (package:polymer/src/instance.dart:430:44)
#10 HtmlElement&Polymer.shadowFromTemplate (package:polymer/src/instance.dart:288:31)
#11 HtmlElement&Polymer.parseDeclaration (package:polymer/src/instance.dart:228:34)
#12 HtmlElement&Polymer.parseDeclarations (package:polymer/src/instance.dart:215:23)
#13 HtmlElement&Polymer.prepareElement (package:polymer/src/instance.dart:190:22)
#14 HtmlElement&Polymer.bind (package:polymer/src/instance.dart:437:42)
#15 _processBindings (package:template_binding/src/template_iterator.dart:186:38)
#16 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:71:19)
#17 TemplateBindExtension.createInstance (package:template_binding/src/template.dart:87:40)
#18 _TemplateIterator._handleSplices (package:template_binding/src/template_iterator.dart:449:53)
#19 _TemplateIterator._valueChanged (package:template_binding/src/template_iterator.dart:330:19)
#20 _TemplateIterator._updateIteratedValue (package:template_binding/src/template_iterator.dart:303:18)
#21 _TemplateIterator._updateDependencies (package:template_binding/src/template_iterator.dart:287:25)
#22 TemplateBindExtension._processBindingDirectives (package:template_binding/src/template.dart:50:34)
#23 _processBindings (package:template_binding/src/template_iterator.dart:197:51)
#24 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:71:19)
#25 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:60:26)
#26 _cloneAndBindInstance (package:template_binding/src/instance_binding_map.dart:60:26)
#27 TemplateBindExtension.createInstance (package:template_binding/src/template.dart:87:40)
#28 _TemplateIterator._handleSplices (package:template_binding/src/template_iterator.dart:449:53)
#29 _TemplateIterator._valueChanged (package:template_binding/src/template_iterator.dart:330:19)
#30 _updateIteratedValue (package:template_binding/src/template_iterator.dart:303:18)
#31 _check (package:polymer_expressions/polymer_expressions.dart:131:16)
#32 dirtyCheckZoneSpec.wrapUnaryCallback.<anonymous closure> (package:observe/src/dirty_check.dart:120:15)
#33 _rootRunUnary (dart:async/zone.dart:730)
#34 _ZoneDelegate.runUnary (dart:async/zone.dart:462)
#35 _CustomizedZone.runUnary (dart:async/zone.dart:667)
#36 _BaseZone.runUnaryGuarded (dart:async/zone.dart:582)
#37 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:333)
#38 _DelayedData.perform (dart:async/stream_impl.dart:585)
#39 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:701)
#40 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:661)
#41 dirtyCheckZoneSpec.wrapCallback.<anonymous closure> (package:observe/src/dirty_check.dart:111:15)
#42 _rootRun (dart:async/zone.dart:719)
#43 _ZoneDelegate.run (dart:async/zone.dart:453)
#44 _CustomizedZone.run (dart:async/zone.dart:663)
#45 _BaseZone.runGuarded (dart:async/zone.dart:574)
#46 _BaseZone.bindCallback.<anonymous closure> (dart:async/zone.dart:599)
#47 dirtyCheckZoneSpec.wrapCallback.<anonymous closure> (package:observe/src/dirty_check.dart:111:15)
#48 _rootRun (dart:async/zone.dart:723)
#49 _ZoneDelegate.run (dart:async/zone.dart:453)
#50 _CustomizedZone.run (dart:async/zone.dart:663)
#51 _BaseZone.runGuarded (dart:async/zone.dart:574)
#52 _BaseZone.bindCallback.<anonymous closure> (dart:async/zone.dart:599)
#53 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#54 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#55 _handleMutation (file:///E:/b/build/slave/dartium-win-full-stable/build/src/dart/tools/dom/src/native_DOMImplementation.dart:588)
I suspect it has to do with:
Binding initialization when model is null
see also the comment here:
Polymer template repeat has weird side effect
The binding initialization can lead to situations where Polymer assigns to null or to non-assignable expressions. Previously they tried to suppress this errors but have seen situations where this is actually a bug and the developer should be notified about it, so they changed the behavior that errors are not suppressed but printed.
They try to figure out a way to improve this experience but seems not too easy.
This is just how I interpret some posts I read, I don't have any additional infos.

Observer reaction functions should not change model

Chapter_06 in AngularDart example
when I run it in Dartium, there are some error:
Observer reaction functions should not change model.
These watch changes were detected: ctrl.allRecipes: [Instance of 'Recipe', Instance of 'Recipe']
cmp.categories: [Appetizers, Salads, Soups, Main Dishes, Side Dishes, Desserts]
<= [Appetizers, Salads, Soups, Main Dishes, Side Dishes, Desserts]
These observe changes were detected:
STACKTRACE:
#0 RootScope.flush.<anonymous closure> (package:angular/core/scope.dart:554:11)
#1 RootScope.flush (package:angular/core/scope.dart:560:9)
#2 RootScope.flush (package:angular/core/scope.dart:561:7)
#3 RootScope.flush (package:angular/core/scope.dart:561:7)
#4 apply (package:angular/core/scope.dart:262:18)
#5 _rootRun (dart:async/zone.dart:710)
#6 _rootRun (dart:async/zone.dart:711)
#7 _rootRun (dart:async/zone.dart:711)
#8 _ZoneDelegate.run (dart:async/zone.dart:440)
#9 NgZone._finishTurn (package:angular/core/zone.dart:96:21)
How to fix it?

Resources