Quantcast
Channel: JavaScriptMVC Forum
Browsing all 3491 articles
Browse latest View live

Re : Maximum call stack size exceeded on model destroy

Here is a breaking test case:test("Max Callstack Exceeded", function() {        Policy = can.Model({        id: 'name',        attributes: {            cacheDetails: 'Cache.model'        },...

View Article


render view with data from two models

Hi,I found how to render a single vie with data from X models, although still an issue...using:can.view('todosAndUser', { todos: Todo.findAll(), user: User.findOne({id: 5})}).then(function(frag) {...

View Article


Re : In can 2.0.3, namespacing events does not work

Not anymore. We use our own, independent event system. Sent from my iPhoneOn Dec 2, 2013, at 12:55 PM, JavaScriptMVC Forum <noreply@zohodiscussions.com> wrote:

View Article

Re : Maximum call stack size exceeded on model destroy

Anyway you can clean that up a bit?  Ex: not creating a global (Policy). Remove unnecessary features like setting the id attribute. I doubt fixtures or a findAll method are needed. Sent from my...

View Article

Re : Maximum call stack size exceeded on model destroy

Ok, so I cleaned it up "a little" (removed fixtures and globals) and I uncovered an interesting fact. When I got rid of the globals as in the example below, I do not see the error. But if you remove...

View Article


Re : render view with data from two models

If you want to load them in parallel you can use $.when:$.when(Todo.findAll({}), User.findOne({id : 5}).then(function(todos, user){    ...do stuff})

View Article

Re : can.Component inserted event fires twice on the same element

Here is a breaking fiddle:http://jsfiddle.net/thecountofzero/8DeMY/

View Article

Re : can.Component inserted event fires twice on the same element

I would create an issue on github that is definitely a bug.

View Article


Re : can.Component inserted event fires twice on the same element

Well I've encountered it in my app now which is without can.Control at all. Event this simple fiddle http://jsfiddle.net/8DeMY/3/ produces the bug, it strange that i didn't noticed it before.Perhaps...

View Article


Re : Maximum call stack size exceeded on model destroy

The reason for the globals was so that associations (attributes) would work. And it's the associations that are ultimately causing the maximum callstack errors. That's why when I make them not global,...

View Article

Re : Steal Build Error

I had the same problem.Your suggestion seemed to have solved the problem for me too.

View Article

Re : Steal Build Error

That parsing stuff is pretty old code.  I think it should probably be replaced. Even though you get errors it shouldn't prevent the build from succeeded. It just won't remove steal.dev stuff, if you're...

View Article

can.Component and "jQuery Mobile component refresh"

One of the things you have to do when using jQuery Mobile, is to refresh certain components in order to style them. This needs to be done when such components are inserted to the DOM after the jQuery...

View Article


Re : Steal Build Error

I believe this whole build process will be replaced soon.

View Article

I'm confused what can.Components are meant for

Are they meant for building things like video players and custom control elements or to replace what we used can.Control for?Take a notifications widget; you can add new dialogs to it through something...

View Article


Re : I'm confused what can.Components are meant for

Component's replace can.Control except for high-performance widgets like a grid.  But a Component has a Control within it (the events object) so you can even create a high-performance Grid with a...

View Article

Re : I'm confused what can.Components are meant for

Awesome! Thank you very much!

View Article


Best practice for passing references to a can.Component instance

For example, a global "growl" style notifications widget. Would we use a global variable or pass a reference with something like $("some-other-component").scope().notifications = notificationsInstance?

View Article

Re : Best practice for passing references to a can.Component instance

The beautiful thing about using a data, event driven architecture is that you generally don't ever actually need to interact with the components that consume that data, only the data itself. You have a...

View Article

Re : can.Component and "jQuery Mobile component refresh"

You should be able to accomplish this by using helper functions, and leveraging their element callbacks to setup your logic.

View Article
Browsing all 3491 articles
Browse latest View live