PDA

View Full Version : Command application generator script?



mrsunshine
28 Oct 2010, 2:02 AM
where can i find the Sencha Command application generator script which is mentioned in the senchatouch docs?

jamesgpearce
29 Oct 2010, 2:16 PM
I run it from the jsbuilder folder:


~/Projects/sencha/touch/latest/jsbuilder > ./sencha.sh generate app MyApp ~/myapp

(Then move to that directory to run its version of sencha.sh and start creating the inner parts of the app)

More details on usage are in examples/kiva/lib/Command/README.md

mrsunshine
1 Nov 2010, 12:43 AM
Thxs a lot!

Artistan
9 Nov 2010, 11:55 AM
The version in RC 1 does not build the index properly.
- uses ext-touch-debug.js instead of sencha
- adds srcs that do not exist.
- also:



List: List is not a Panel anymore so you can't dock items to it. Please put this list inside a Panel with layout 'fit'

Ext.List: The tpl config has been removed and replaced by itemTpl. Please remove tpl and itemSelector from your Lists.



Also


./sencha.sh generate model Appointment appid:int date:date

*********************************************
Generating the Appointment model
*********************************************

Creating file: app/models/Appointment.js
FileStream: No such file or directory
Stream:"Could not open the stream" (src/generators/model/templates/Model.js)

thanks!

AntoineGrant
25 Jan 2011, 11:21 AM
Is there an update soon to make this work? Or is everybody else making there own mvc pattern?


The version in RC 1 does not build the index properly.
- uses ext-touch-debug.js instead of sencha
- adds srcs that do not exist.
- also:



List: List is not a Panel anymore so you can't dock items to it. Please put this list inside a Panel with layout 'fit'

Ext.List: The tpl config has been removed and replaced by itemTpl. Please remove tpl and itemSelector from your Lists.



Also


./sencha.sh generate model Appointment appid:int date:date

*********************************************
Generating the Appointment model
*********************************************

Creating file: app/models/Appointment.js
FileStream: No such file or directory
Stream:"Could not open the stream" (src/generators/model/templates/Model.js)

thanks!

vunction
11 Feb 2011, 2:55 PM
I was watching the video from SenchaCon http://vimeo.com/17705448 and trying to follow along. I can generate the application


./sencha.sh generate app MVCTest ../mvc-test

but I think that it is incomplete. It doesn't even include sencha touch library in the resources folder. Like the post above, creating a model fails.

(:|


prey2$ ./sencha.sh generate model Products id:int name:string description:string price:float

*********************************************
Generating the Products model
*********************************************

Creating file: app/models/Products.js
FileStream: No such file or directory
Stream:"Could not open the stream" (src/generators/model/templates/Model.js)

RyanFreng
16 Feb 2011, 9:20 AM
Yeah.... This is still not working. I was trying to follow the vimeo video, got what i thought was the default app generated but files were missing. The index.html page links to:


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


Which do not exist. The 'lib/touch/' folder isn't generated.

RyanFreng
17 Feb 2011, 12:24 PM
This is really holding me back. I also tried downloading older versions of sencha touch but all of the older download links were broken.

RyanFreng
21 Feb 2011, 8:33 AM
Sorry to keep bumping this but it's important. Does no one use the js builder? I hope everyone is not trying to make complicated apps without an MVC structure =)

Even a "it's broken don't bother" is better than sitting here hoping someone will have the fix =)

fx-mike
21 Feb 2011, 9:00 AM
I guess the version used in the demo at SenchaCon hasn't been released yet. I hope that Sencha Command will be ready with ST 1.1 / Ext JS 4, can anyone confirm this?

mikeycgto
23 Feb 2011, 12:23 PM
any word on when this may be updated?

ostkaka
24 Feb 2011, 6:04 AM
yeah will this be fixed soon? :)

RyanFreng
24 Feb 2011, 7:11 AM
For the time being i'm just mashing everything into one file. Not ideal but since there is no official response on this brokenness I have to do something...

crumley
27 Feb 2011, 9:39 AM
I am putting code in the "recommended" places and when it comes to release the app I will either build my own solution for merging them together or do it by hand.

There is an alarming number of poorly documented or down right broken areas of Sencha Touch. The progress also seems to be pretty slow as there hasn't been a release in months and little communication. I hope this improves otherwise it does not bode well for the future of this project. There are too many competitors out there that could quite easily leap frog this project.

jamesgpearce
27 Feb 2011, 10:44 AM
Hi all,

Rest assured that there is progress taking shape on both ExtJS4 and Sencha Touch 1.1.

The latter is dependent upon RIM/BlackBerry support which is coming along well.

There is also an expectation that the generators will be a fully-fledged part of 1.1

Thanks for your patience
James

BlueCamel
24 Mar 2011, 6:57 PM
This doesn't seem to be working still. I'm able to use the sencha.sh to generate the initial application skeleton but then cannot correctly generate various application parts. Tested on OS X.


betelgeuse:MyApp2 scottrus$ pwd
/Users/scottrus/Desktop/MyApp2

betelgeuse:MyApp2 scottrus$ ls
app lib sencha.sh
index.html public test

betelgeuse:MyApp2 scottrus$ ./sencha.sh generate model myModel id:int name:string

*********************************************
Generating the myModel model
*********************************************

Creating file: app/models/myModel.js
FileStream: No such file or directory
Stream:"Could not open the stream" (src/generators/model/templates/Model.js)


Hmm... so let's just link the src directory to the expected location and try again...


betelgeuse:MyApp2 scottrus$ ln -s lib/JSBuilder/src .
betelgeuse:MyApp2 scottrus$ ls
app lib sencha.sh test
index.html public src

betelgeuse:MyApp2 scottrus$ ./sencha.sh generate model myModel id:int name:string

*********************************************
Generating the myModel model
*********************************************

Creating file: app/models/myModel.js
Creating file: test/unit/models/myModel.js
Creating file: test/fixtures/myModel.js

That looks positive, what's the result look like?


betelgeuse:MyApp2 scottrus$ cat app/models/myModel.js
Ext.generator.Model.templates.Model = new Ext.XTemplate(
'Ext.regModel("myModel", {
',
' fields: [
',
'',
' {name: "id", type: "int"},
',
'',
' {name: "name", type: "string"}
',
'',
' ]
',
'});'
);

Wait, what? jslint isn't going to like that! :)

Any idea when this will be fixed?

dmillasich
25 Mar 2011, 1:34 PM
Are there plans to provide a Windows version of the Sencha Command application generator script in the next Sencha Touch release?

ncooley527
1 Apr 2011, 5:51 PM
This doesn't seem to be working still. I'm able to use the sencha.sh to generate the initial application skeleton but then cannot correctly generate various application parts. Tested on OS X.


betelgeuse:MyApp2 scottrus$ pwd
/Users/scottrus/Desktop/MyApp2

betelgeuse:MyApp2 scottrus$ ls
app lib sencha.sh
index.html public test

betelgeuse:MyApp2 scottrus$ ./sencha.sh generate model myModel id:int name:string

*********************************************
Generating the myModel model
*********************************************

Creating file: app/models/myModel.js
FileStream: No such file or directory
Stream:"Could not open the stream" (src/generators/model/templates/Model.js)


Hmm... so let's just link the src directory to the expected location and try again...


betelgeuse:MyApp2 scottrus$ ln -s lib/JSBuilder/src .
betelgeuse:MyApp2 scottrus$ ls
app lib sencha.sh test
index.html public src

betelgeuse:MyApp2 scottrus$ ./sencha.sh generate model myModel id:int name:string

*********************************************
Generating the myModel model
*********************************************

Creating file: app/models/myModel.js
Creating file: test/unit/models/myModel.js
Creating file: test/fixtures/myModel.js

That looks positive, what's the result look like?


betelgeuse:MyApp2 scottrus$ cat app/models/myModel.js
Ext.generator.Model.templates.Model = new Ext.XTemplate(
'Ext.regModel("myModel", {
',
' fields: [
',
'',
' {name: "id", type: "int"},
',
'',
' {name: "name", type: "string"}
',
'',
' ]
',
'});'
);

Wait, what? jslint isn't going to like that! :)


I just ran into this too, but I suspect we're both doing something wrong (not surprising given the sparse documentation for non-command line gurus like myself...)

It looks like this is spitting out pieces of the actual template used to generate the sencha code... Wondering if there's something different we should be doing here? I followed James' suggestion re: copying the structure over to my desired location and using its local sencha.sh, but I did get the generator template instead of simply the regModel object instantiator. Or is this a new development and it works just fine?

Thanks...

BlueCamel
2 Apr 2011, 5:47 AM
From the output of /sencha.sh generate model it looks like the template is parsed wrong to include the quotes. In fact, it almost looks like what I would expect an XTemplate to look like if there was a failed
join command.

That said, I didn't dig into it further.

railsjedi
3 Apr 2011, 6:17 PM
I tried for a few days to get this working, seems pretty busted though in 1.1. I've just been using the template source and creating my own files. Hopefully they'll have it fixed up soon. In the meantime, senchatra seems to be the best way to get up and running anyways (if you're a ruby fan). https://github.com/nelstrom/senchatra

Sencha Touch MVC definitely feels like the path less traveled at the moment. More docs and more example apps would be great. The Sencha Touch codebase is pretty well written and organized so its nice to have that opened and looking through that while trying to develop anything.

It took a little longer than I think was necessary, but I've finally been able to get MVC up and running (controllers, views, router) pretty nicely on an app. The actual Sencha Touch MVC code organization is insanely awesome, but I don't trust any of the generators until they revamp it all and provide some decent functional tutorials.

psalvitti
31 May 2011, 5:32 AM
Hmm, this thread is going on a year old and STILL no word on whether the application generator script will ever work?!? I've seen/followed all the links to the TMaintz Vimeo, this forum and other associated info on using this ... and STILL no word?!?

C'mon, any news?

realidea
8 Jun 2011, 3:23 PM
i just finished an update for the jsbuilder in sencha touch release 1.1.0

see the other post: http://www.sencha.com/forum/showthread.php?120667-Sencha-Command-for-Windows&p=611820#post611820

B)

sschat
3 Nov 2011, 3:16 PM
Hello Sencha Touch lovers,

anybody has a status on this "generator" script?

I saw one of the conference vids and these Sencha guys are showing of this great generator script...
but in real life?... not working....

After a false installation of an app, i manually added the missing resources.
Then tried to generate a model. Again missing resources added.
But after viewing the generated result of the model file...

Ext.generator.Model.templates.Model = new Ext.XTemplate(
'Ext.regModel("Category", {
',
' fields: [
',
'',
' {name: "categories", type: ""}
',
'',
' ]', '});'
);


then i knew... no, this REALLY is not working well..

too bad... anybody some news?

version Sencha Touch 1.1.1

cheers

Cammo
3 Nov 2011, 8:44 PM
Let us know if we are doing something wrong here but I am also getting the same output as above. Can any one shed any light on what the issue might be also using 1.1.1

Many Thanks

jnotti
8 Dec 2011, 8:27 AM
Bump...

I reached out over to the #extjs channel on freenode but no answer there. Looks like this will remain unsolved as they are focusing all their resources on the 2.0 release.

BUMMER!