Re: [Interest] reading javascript body from c++

2012-12-11 Thread Andy Mayer
Am 11.12.2012 10:21, schrieb Koehne Kai: > Other ideas: Use v8 debugging API to get the text, e.g. by setting > breakpoints and do a "Request: source" [1]. Parse .qml files on your > own (there's a QML parser both in qtdeclarative and Qt Creator which > you can copy). [1]: http://code.google.com

Re: [Interest] reading javascript body from c++

2012-12-11 Thread Koehne Kai
e: [Interest] reading javascript body from c++ > > Since QML has a JavaScript engine underneath it, have you tried using > JavaScript to get the text of the function and store it in a string variable > for > C++ to grab? > > ie. > http://stackoverflow.com/questions/3379875/ca

Re: [Interest] reading javascript body from c++

2012-12-10 Thread Lincoln Ramsay
Since QML has a JavaScript engine underneath it, have you tried using JavaScript to get the text of the function and store it in a string variable for C++ to grab? ie. http://stackoverflow.com/questions/3379875/can-javascript-get-a-function-as-text I don't know if this actually works or not bu

Re: [Interest] reading javascript body from c++

2012-12-10 Thread Jan Krause
Am 10.12.2012 16:55, schrieb Thiago Macieira: > On segunda-feira, 10 de dezembro de 2012 13.44.23, Andy Mayer wrote: >> But for my DSL (declaration of a special petri net) I need the body of >> the javascript functions. The workaround looks quite interesting... > This of it this way: you can't get

Re: [Interest] reading javascript body from c++

2012-12-10 Thread Thiago Macieira
On segunda-feira, 10 de dezembro de 2012 13.44.23, Andy Mayer wrote: > But for my DSL (declaration of a special petri net) I need the body of > the javascript functions. The workaround looks quite interesting... This of it this way: you can't get the source code as written by the user, but you c

Re: [Interest] reading javascript body from c++

2012-12-10 Thread Andy Mayer
Am 10.12.2012 10:01, schrieb Thomas McGuire: Hi, On Saturday 08 December 2012 20:18:50 Andy Mayer wrote: Am 08.12.2012 19:25, schrieb Thomas McGuire: On Saturday 08 December 2012 11:34:17 Andy Mayer wrote: I have a question regarding the possibilty of reading the body of a javascript function

Re: [Interest] reading javascript body from c++

2012-12-10 Thread Thomas McGuire
Hi, On Saturday 08 December 2012 20:18:50 Andy Mayer wrote: > Am 08.12.2012 19:25, schrieb Thomas McGuire: > > On Saturday 08 December 2012 11:34:17 Andy Mayer wrote: > >> I have a question regarding the possibilty of reading the body of a > >> javascript function from c++. I want to create a DSL

Re: [Interest] reading javascript body from c++

2012-12-10 Thread Bo Thorsen
Den 08-12-2012 11:34, Andy Mayer skrev: Dear all, I have a question regarding the possibilty of reading the body of a javascript function from c++. I want to create a DSL based on QML and I have to read the body of a javascript function. e.g. QML: Item { function action() { c

Re: [Interest] reading javascript body from c++

2012-12-08 Thread Andy Mayer
Am 08.12.2012 19:25, schrieb Thomas McGuire: Hi, On Saturday 08 December 2012 11:34:17 Andy Mayer wrote: I have a question regarding the possibilty of reading the body of a javascript function from c++. I want to create a DSL based on QML and I have to read the body of a javascript function. e

Re: [Interest] reading javascript body from c++

2012-12-08 Thread Thomas McGuire
Hi, On Saturday 08 December 2012 11:34:17 Andy Mayer wrote: > I have a question regarding the possibilty of reading the body of a > javascript function from c++. I want to create a DSL based on QML and I > have to read the body of a javascript function. > > e.g. > > QML: > Item { > funct

[Interest] reading javascript body from c++

2012-12-08 Thread Andy Mayer
Dear all, I have a question regarding the possibilty of reading the body of a javascript function from c++. I want to create a DSL based on QML and I have to read the body of a javascript function. e.g. QML: Item { function action() { console.log("Got message:", msg)