PDA

View Full Version : The sate of Sencha Command / MVC Auto generation for touch apps



eephillip
9 Oct 2011, 2:17 PM
I came across this video http://vimeo.com/17705448 from SenchaCon 2010 and they demonstrated the Sencha Command script for auto generating folders and formats for creating touch apps.
I also noticed that the demonstrated jsbuilder folder was included in my sencha Touch download. So I wanted to run through that by calling the
./sencha generate app myapp ~/myapp
everything built ok but when I direct my browser to http://localhost:8888/myapp the default viewport content that was auto generated is broken.

Checking out the errors it appears to be looking for mvc.js ext-touch.css ext-touch-debug.js files that don't exist. The folders for these files don't get created either.

I have seen others asking questions about the state of this tool but the threads were old.
So can anyone shed some light on the state of this tool, and point me to a fix. I can't imagine i'm the only one getting this problem.

eephillip
10 Oct 2011, 5:47 AM
I went ahead and fixed the errors all it took was a reorganization of the links and files. I suppose with senchaTouch 2 about the break, it is not a priority.

eephillip
13 Oct 2011, 2:09 PM
looks like they cleaned up the jsbuilder in 1.1.1 but you still have to place the following directories and files for it to work after the generate command. So anything in the lib touch dir. Maybe this is how they want it?

<link rel="stylesheet" href="lib/touch/resources/css/sencha-touch.css" type="text/css">
<script type="text/javascript" src="lib/touch/sencha-touch-debug.js"></script>
<script type="text/javascript" src="lib/touch/pkgs/platform/mvc.js"></script>

jnotti
9 Dec 2011, 9:23 AM
So I had the same issue and corrected it by loading the ST library into the lib/touch folder. That is all fine and dandy for the MVC structure but when going into the MyApp folder I just created, attempting to run the ./sencha.sh generate model test command will resut in a failed to open stream error. Did you encounter this as well?

Upon further inspection of sencha.sh I see it is building the path but not sure if it ever gets passed.


#!/bin/sh
UNAME="$(uname)"
ARGUMENTS=$*
DIRNAME="$(dirname $0)/lib/JSBuilder"
if [ $UNAME = "Darwin" ] ; then
OS="mac"
else
OS="linux"
fi
CMD="$DIRNAME/jsdb/$OS/jsdb -path $DIRNAME $DIRNAME/bin/Dispatch.js $ARGUMENTS"
$CMD