Re : Structuring of application state objects
However if I set a player object in the global state observe, and then set it to a new instance of a player object once the view is rendered, the view is not updated. The problem is hard to diagnose...
View ArticleRe : Structuring of application state objects
Hi Alex,I am using the mustache views so these use the attr() calls automatically I believe. I will try to create a fiddle to demonstrate this.Thanks,Adam
View ArticleRe : Structuring of application state objects
Here is a very contrived fiddle showing this http://jsfiddle.net/adampilks/gmMLn/3/ basically if you have a null attribute on an observe which is then set to an observe the changes are shown in the...
View ArticleRe : CanJS Tracker binding plugin is throwing an error I can't figure out
But I agree with beno. That error means that you are trying to call the "same" function on an undefined object.Therefore can.Object is undefined
View ArticleRe : CanJS Tracker binding plugin is throwing an error I can't figure out
Definitely see that now. Was super tired at the time I wrote that. Still don't know where it's coming from. The object definitely existed. I wanted to get a bunch more done, so I went a different route...
View ArticleRe : Structuring of application state objects
Superb! Thanks Alex.Out of interest, what's the difference in how the can view handles the {{#if state.player}} vs {{#state.player}} or was it not updating as it was being referenced as...
View ArticleRe : CanJS - Default route called when route is not default
http://codepen.io/anon/pen/DjGEkOpen that pen and watch your console to see what's happening when you click back and forth between the buttons. When you change the project...
View ArticleRe : Document Fragment, ejs, jQuery-plugin, width and height
I'm not sure if it's going to work, but you could try using jquery++ (jquerypp.com) and use outerWidth() on the element. Maybe see if that gives you the proper width as a cross-browser solution?Hope...
View ArticleRe : Document Fragment, ejs, jQuery-plugin, width and height
I will typically make these types of widgets work with jQuery++'s resize event. After inserting the fragment, I'll call .resize() on the container.Autogrow should be listening to resize and do it's...
View Articlecan.observe.delegate doesn't look up the controller's option
Here's a JSfiddle to explain the issue:http://jsfiddle.net/j6yer/Basically, a templated event which refers to an object works when the object is in the global object (window), but not if it's only in...
View ArticleRe : Structuring of application state objects
I don't use mustache yet in my projects, so I'm not the person to ask how it works.But as mustache is logicless templating language there are no conditions like if statements. Look at view code here:...
View ArticleRe : Structuring of application state objects
Hi Alex,I think that although its referred to normally as Mustache views, they actually implement the core Handlebars helpers too. So the #if statements seem to work, but don't live bind in the same...
View ArticleTemplated events and observes
Hi all,Very quick question I think. Is it possible to listen to change events on observes using templated event binding in controls?Such as:define(['can', 'core/global/appState'], function(can,...
View ArticleRe : Templated events and observes
Yes. That works. I have an app that is quite customizable, so the user has a lot of preferences to choose from. Before the rest of the app loads, I do this:// Load all of User #1's...
View ArticleRe : can.observe.delegate doesn't look up the controller's option
setup is where all of the templated event bindings are bound. This happens immediately before init, so by the time you modify options the events are already bound.Control does have an on() method which...
View ArticleRe : Templated events and observes
One of the advantages of RequireJS and Steal is not polluting the global scope, so while your solution does work, you are just using global variables.When Control processes an name in the curly braces,...
View ArticleRe : Templated events and observes
Aha, I see. I wondered why it wasn't finding the local variable, so I will set it as one of the options so it can be found.Many thanks,Adam
View Articlestealjs/canjs
what's the folders/files structure to use stealjs with canjs? where to put stealjs? where to put canjs ?I cloned canjs from github and steal too but I dont how to start! thanksMohamed Cherif BOUCHELAGHEM
View ArticleRe : stealjs/canjs
can and steal should be at the same level. I usually do the following:-can-jquery-myapp-steal
View Article