Posts

Showing posts from April, 2012

SC.outlet

Whenever in a Sproutcore app a controller or a state needs to reference a view which is deeply nested in the ui tree there is a good case to use SC.outlet . The outlet creates a layer of indirection between the view and the other layers leaving to the view the responsibility to provide shortcuts to its inner objects, decoupling the layout from the application logic. An example of SC.outlet usage is shown in the todos application described in the Getting Started guides. Without outlet: ... TodosThree.mainPage = SC.Page.design({ // conventional design // https://github.com/sproutcore/getting-started/blob/master/apps/todos_three/resources/main_page.js#L4 ... TodosThree.SHOWING_APP = SC.State.design({ enterState: function() { TodosThree.mainPage.get('mainPane').append(); TodosThree.mainPage.mainPane.newTodoField.field.becomeFirstResponder(); }, Notice how the view design trickles down to the state layer (a part of the controller layer, which should be pre...

Guide to searching (and finding) help on Sproutcore

Image
Make no mistake: Sproutcore IS a huge framework. Also not all of it is documented equally well and that's the reason why a casual observer or someone picking it up for the first time might find it difficult to perceive its full power (and extent). My first acquaintance with Sproutcore goes back to fall 2009 when a series of articles began to appear on the web about this new framework created at Apple by Charles Jolley. Since then a lot of things have changed and it's not always been clear what was driving those changes. This post is an attempt to write down and share my experiences and the resources that I used in learning Sproutcore in the hope that they may be useful to others. A little bit of history First of all a little bit of history: Sproutcore was started by Charles Jolley while working on the MobileMe platform at Apple. From there the framework spun off into an Open Source MIT licensed version (originally hosted on GitHub under the sproutit account). Tha...

Installing Sproutcore on Windows (with Screenshots)

Image
Most Sproutcore developers working on Windows are used to the installer, which is also the default choice on the download page. Since lately the installer seems to be a little unreliable I decided to try the manual way and screenshot the whole process so that it might be of help to others. The first thing to do is install Ruby for Windows, which can be conveniently fetched from  http://rubyinstaller.org/ . I recommend you pick version 1.9.2 which, at the moment, I believe is the version used by most of the Sproutcore developers. Installing is a breeze, just remember to tick the 'Add Ruby to your path'  box so that you don't have to do it yourself later. If you have other ruby versions installed and you DO care about which version is selected by default than it's up to you whether or not to tick the box. If unsure just tick the box. When the installer is done open a command prompt (just type cmd in the run box on the Start menu and select the black icon ...

How I fixed Windows event id 333 (disabling NFS)

Image
As much as I like to delve in cutting edge tech, to make a living I also provide systems administration services on old-school environments, where ahem Windows rules. One problem that's been biting me (daily!) for some time now is that on a Win2k3 Storage Server Event ID 333 will often surface, requiring a reboot. After checking all software, disabling antivirus, analyzing memory pools and all the usual (and unusual) stuff it turned out that the cause of the problem was the NFS server. I moved all shares to an EMC NAS, modified mount points, disabled the NFS service and the issue has been gone for the last two weeks.