Can arguments be passed on the commandline?

11 views
Skip to first unread message

PaulANormanNZ

unread,
Sep 27, 2011, 2:43:53 AM9/27/11
to glues...@googlegroups.com
Hi,

I've been trying various variations of this.

Where am I going wrong please?

Paul

var wx = require("wx"); 
 
print(arguments[0] + "\n");
 
 
wx.theApp.onInit = function() 
{
 var frame = new wx.Frame(null, -1, "An App example");
 // Don't forget to show the frame by setting 
 // the visible property to true!
 frame.visible = true;
     this.topWindow = frame;
     return true;
}
argumentz = wx.theApp.argv;
 
 print(argumentz[0] + "\n"); // throws error

print("Finished\n");

Franky Braem

unread,
Sep 27, 2011, 4:55:36 AM9/27/11
to GLUEscript
Arguments passed to the script can be reached by using the argv
property of the glue global object.

Franky

PaulANormanNZ

unread,
Sep 27, 2011, 5:40:18 AM9/27/11
to glues...@googlegroups.com
Many thanks Franky,

//G:\LaTeXPortable\LatexUtils\glue\bin>glue ..\projects\App\arguments.js Hello This is Great !
 
 
var arguments = argv;
 
 for (arg in argv){
print(arg + ".  " + argv[arg] + "\n");
}
 
glue.log.level = warning
0.  Hello
1.  This
2.  is
3.  Great
4.  !


Can you please tell me where I should have looked in the .chm? I had already searcxhed for argv. I think I must be missing other important information which is right in front of me, but I can not see it  

Paul

Franky Braem

unread,
Sep 27, 2011, 1:58:13 PM9/27/11
to GLUEscript
The argv on wxApp is a document error. argv is not a property of wxApp
anymore.
The global glue object is not documented very well. I ll try to add
this in the next version.

Franky

PaulANormanNZ

unread,
Sep 28, 2011, 6:30:33 AM9/28/11
to glues...@googlegroups.com
Thanks Franky,

Do you want notes on the manual posted any where if anything is noticed?

Paul

Franky Braem

unread,
Sep 28, 2011, 11:00:47 AM9/28/11
to glues...@googlegroups.com
You can always post a bug report on the project website. Even for
documentation. That way I can't forget to implement it.

Franky

Op 28/09/2011 12:30, PaulANormanNZ schreef:


> Thanks Franky,
>
> Do you want notes on the manual posted any where if anything is noticed?
>
> Paul

> --
> You received this message because you are subscribed to the Google
> Groups "GLUEscript" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/gluescript/-/Ndh_TjsTUQ0J.
> To post to this group, send email to glues...@googlegroups.com.
> To unsubscribe from this group, send email to
> gluescript+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/gluescript?hl=en.

Reply all
Reply to author
Forward
0 new messages