sproutcore

Malformed buttons with SproutCore

拈花ヽ惹草 提交于 2019-12-13 02:27:21
问题 This week I started learning SproutCore. I quite like the framework, but hate the absence of learning material. After going through most of the guides I decided to learn by trying to build something. I wrote a little GridView with buttons in it, but the buttons seem to be distorted, there are labelless blue copies under each button, and a couple of pink lines. What is this? Why is this? How do I get rid of it? Relevant code: buttons: SC.GridView.design({ layout: { centerX: 0, top: 40, width:

Connecting to an HTTPS service with SproutCore

谁都会走 提交于 2019-12-12 02:17:18
问题 I'm building a web app that requires me to connect to a service (https) to get some data. The web app is to be built using SproutCore. Now, I'm super new to SproutCore, and haven't been able to get to connect to the service. Some folks on the irc channel were super helpful and told me that to connect to an https service, I need to add a line in my BUILDFILE that says: proxy '/path', :to => "https://myWebService.com", :secure => true I did that. However, if I try to navigate to the url using:

Basic Sproutcore: class method, class variables help

我怕爱的太早我们不能终老 提交于 2019-12-11 17:54:45
问题 This is how i am defining a simple class with instance variables and instance methods. ExampleClass = SC.Object.extend({ foo:undefined, bar: function() { this.foo = "Hello world"; console.log( this.foo ); } } // test var testInstance = ExampleClass.create(); testInstance.bar(); // outputs 'Hello world' Could anyone help me out with a similar example of class variable (or similar behavoir), and class method? Thanks 回答1: A class Method/Property would be done like: ExampleClass = SC.Object

How do you specify the tag name for sproutcore/emberjs inline script templates?

旧巷老猫 提交于 2019-12-11 06:58:54
问题 Ember inline templates are wrapped in DIVs. I'd like to wrap them with a different tag. How do I do that? The following template: <script type="text/x-handlebars"> Foo </script> generates something like: <div>Foo</div> I'd like to generate something like: <someOtherTag>Foo</someOtherTag> 回答1: I don't think that is possible in the current version 0.9.3 . If you look at https://github.com/emberjs/ember.js/blob/master/packages/ember-views/lib/views/view.js#L707 div is used when the property

SproutCore javascript

我与影子孤独终老i 提交于 2019-12-10 18:31:35
问题 Hey... I started using Javascript MVC SproutCore Framework (sproutcore.com) and I found it impressive. But... Where can I find good tutorials for it? Where can I find widgets for it? How can I use (best practice, loading librarys, implementation) other frameworks like Spry framework (http://labs.adobe.com/technologies/spry/). Thx! 回答1: The only tutorial I know of is the Todos tutorial, which I believe is not currently completable from Incremental Loading point onward. The widgets available

Using CouchDB's jquery.couch.js?

穿精又带淫゛_ 提交于 2019-12-05 00:38:15
问题 Here http://blog.couchone.com/post/1027100082/whats-new-in-couchdb-1-0-part-4-securityn-stuff it says that jquery.couch.js is the standard JavaScript API that ships with CouchDB. But how do i get the jquery.couch.js file from couchdb so I could use it's functions ($.couch.signup, $.couch.login etc) in my Sproutcore application or another frontend application? 回答1: Futon uses this API itself, so you can see where it includes it, as well as other dependencies it may have, depending on what you

Writing custom controls in Sproutcore 2

北城以北 提交于 2019-12-04 13:36:55
I'm fairly new to Sproutcore, but I am familiar with Handlebars. I have walked through the Todo tutorial and checked out a few other samples as well. I love everything about it and would like to use it over Backbone, but I am having a hard time understanding how to wire up custom controls. I can see where some of the data will play into the bindings, but triggering events I get lost in. As an example, if I had a link list that I would like to use to filter data below it, how to do I tie into the events? I know in backbone you would use the event and selector: "click .link" Any help would be

Using CouchDB's jquery.couch.js?

走远了吗. 提交于 2019-12-03 15:13:29
Here http://blog.couchone.com/post/1027100082/whats-new-in-couchdb-1-0-part-4-securityn-stuff it says that jquery.couch.js is the standard JavaScript API that ships with CouchDB. But how do i get the jquery.couch.js file from couchdb so I could use it's functions ($.couch.signup, $.couch.login etc) in my Sproutcore application or another frontend application? Futon uses this API itself, so you can see where it includes it, as well as other dependencies it may have, depending on what you'll be doing. Since the CouchDB server can serve up HTTP requests, you can also pull in the dependencies like

How to push/pop arrays in Ember.js?

[亡魂溺海] 提交于 2019-12-03 06:20:40
问题 I can include an array in an Ember object, and display the contents using Handlebars. However, I can only replace the array contents using set(). How can I modify the array contents using push/pop/etc. and still have the UI bindings update? // JS App.obj = Ember.Object.create({ "things": ["1", "2"], }); App.obj.set("things", ["1", "2", "3"]); // Works App.obj.things.push("3"); // Doesn't Work // HTML + Handlebars {{#with App.obj}} <ul> {{#each things}} <li>{{this}}</li> {{/each}} </ul> {{

good example applications combining rails 3 and sproutcore

风格不统一 提交于 2019-12-03 03:48:27
I am trying to write a sproutcore frontend for a rails 3.1 application I am making. I have had a look at the sproutcore guides, but I am interested in seeing real examples how to use sproutcore together with rails 3(.1). I have found two examples, but each is totally different: A todo-app created using bulk_api : an interesting approach using a specific REST-style to minimise the traffic. But it proposes to place the sproutcore app in app/sproutcore , and is still a bit unclear to me how that actually hooks in completely. Travis-ci which seems to be a very clean example, rails 3.1, to use