Please use Markdown to format your posts in order to make them more comprehensible. In particular, use lines with ``` to surround blocks of code (see my edits above to your latest posts).
it looks like the _f4u$t.main()
call is passing a json as first argument, while the _f4u$t.main()
definition in http://www.mikesolomon.org/faust/svg/faust_proto.js
expects function(svg, raw_json)
, so it seems that there is a mismatch there between the two files.
The faust_proto.js
in faust/architecture/httpdlib/html/js/svg/faust_proto.js
instead seems to accept the same arguments that are passed in the html file, so you should probably use this instead of the mikesolomon one. In order to use this you probably have to remove the #define LOADSCRIPTS
line you added in https://github.com/grame-cncm/faust/blob/master-dev/architecture/httpdlib/src/html/htmlpage.cpp
following my above suggestion and probably you will have to declare stylesheet_len
, stylesheet
, jsscripts
, jsscripts_len
in your .cpp
file instead. They are declared as
// in faust/architecture/httpdlib//src/html/stylesheet.h
extern unsigned char stylesheet[];
extern unsigned int stylesheet_len;
// in faust/architecture/httpdlib//src/html/jsscripts.h
extern unsigned char jsscripts[];
extern unsigned int jsscripts_len;
Judging by the way they are being parsed in https://github.com/grame-cncm/faust/blob/master-dev/architecture/httpdlib/src/html/htmlpage.cpp, these should be char[]
which should contain actual css and js code. I have no idea how you would generate that.
So here is another trick: change the generated html (or even better the faust/architecture/httpdlib/src/html/htmlpage.cpp
file) so that it does not use those remote URLs but the local files with the same name provided by faust in faust/architecture/httpdlib/html/js/svg/
. The relative paths to the files will depend on where the root of the http server is. Something like this may work, or try changing the prefix to svg/...
<script type="text/javascript" src="js/svg/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/svg/jquerysvg/jquery.svg.js"></script>
<script type="text/javascript" src="js/svg/jquerysvg/jquery.svgdom.js"></script>
<script type="text/javascript" src="js/svg/faust_proto.js"></script>
<script type="text/javascript" src="js/svg/faust_jquery_svg_backend.js"></script>
<script type="text/javascript" src="js/svg/faust_mobile.js"></script>
<script type="text/javascript" src="js/svg/faust_ui_inits.js"></script>
<script type="text/javascript" src="js/svg/faust_load_external_file.js"></script>
<script type="text/javascript" src="js/svg/faust_ui_objects.js"></script>
<script type="text/javascript" src="js/svg/faust_ui_builder.js"></script>
with your html file appropriately placed in a local http server, the above works for me and I get displayed a GUI (no idea if the backend communication works though).