View Full Version : How to add/call non-Sencha functions in new ST Designer Beta?

6 Feb 2012, 3:23 PM
In ST1.1, I was able to add a function at the end of the Sencha controller Ext.regController('ControllerName', {...}); code block that I could call from within the app like this (btw this is from the PhoneGap samples):

function gotFS(fileSystem) {
try {
fileSystem.root.getDirectory("path/to/my/file", {create:true,exclusive:false}, createFile, fail);
catch (e) {
alert("(gotFS) Failure writing file: " + e.decription);

How do I do this now in Designer Beta?

6 Feb 2012, 5:18 PM
WagsMax -

Are you trying to execute this code at Definition time of the controller class?

Or are you trying to add this as a method for the controller?

If you are trying to add it as a method to the controller you can add a "Basic Function" to your controller.

Name the function gotFS. Add a single parameter named fileSystem. Paste in the above code.