Re: [Interest] Import C++ types to Javascript

2015-12-01 Thread Jérôme Godbout
; > *Sent:* Tuesday, December 01, 2015 at 9:25 AM > > *From:* "Jason H" <jh...@gmx.com> > *To:* "Jason H" <jh...@gmx.com> > *Cc:* "Jérôme Godbout" <jer...@bodycad.com>, interest < > interest@qt-project.org> > *Subject:* Re: [Int

Re: [Interest] Import C++ types to Javascript

2015-12-01 Thread Jason H
Wow, yes, it does, very much so!!! ...   Hope this clarify thing a bit. Jerome       14 AM, Jason H wrote: Here's a sample project. TypeError on line 5 of app.js     Sent: Tuesday, December 01, 2015 at 9:25 AM From: "Jason H" To: "Jason H"

Re: [Interest] Import C++ types to Javascript

2015-12-01 Thread Jason H
I'm still looking for help on how to use QObject slots in JS, not as singleton. I'm still getting that parse error.   Are there any examples of QObjects being used in JS files (NOT QML! -- .import vs import )       Sent: Sunday, November 29, 2015 at 12:39 AM From: "Jason H"

Re: [Interest] Import C++ types to Javascript

2015-11-28 Thread jhihn
gt; To: "Jason H" <jh...@gmx.com> Subject: Re: [Interest] Import C++ types to Javascript If your object is not a singleton you will need to create an instance to call the function on that object. I suggestion you keep your staticfunction call into a singleton. So you don't need

Re: [Interest] Import C++ types to Javascript

2015-11-28 Thread Jérôme Godbout
ber 2015 at 02:21:06 > From: "Jérôme Godbout" <jer...@bodycad.com> > To: "Jason H" <jh...@gmx.com> > Subject: Re: [Interest] Import C++ types to Javascript > If your object is not a singleton you will need to create an instance to call > th

Re: [Interest] Import C++ types to Javascript

2015-11-28 Thread Jason H
Also note that I'm talking about _javascript_, not QML.  I'm not sure if it matters, but this is me trying to use a C++ class in a JS file, which is then imported into QML.     Sent: Sunday, November 29, 2015 at 12:33 AM From: "Jason H" To: "Jason H" Cc: 

Re: [Interest] Import C++ types to Javascript

2015-11-28 Thread Jason H
Thanks I;ll give that a shot, but what about a non-singleton? I think my code should be working now,  and I doon't know why it isn't. How to I make an instance?       Sent: Saturday, November 28, 2015 at 7:03 PM From: "Jérôme Godbout" To: jh...@gmx.com Cc: interest

Re: [Interest] Import C++ types to Javascript

2015-11-28 Thread Jason H
To add to that: I am currently doing: var hash = new MyLib.Hash(); //  Parse Error: TypeError: Type error var result = hash.sha1('...') Which should work as I understand it, without a singleton. But I get the error above.   Many thanks.   Sent: Saturday, November 28, 2015 at 11:58 PM From: 

Re: [Interest] Import C++ types to Javascript

2015-11-27 Thread Jason H
To: "Jason H" <jh...@gmx.com> > Cc: interest <interest@qt-project.org> > Subject: Re: [Interest] Import C++ types to Javascript > > Make sure your function is Q_INVOKABLE or is a slot. also take care .pragme > library is not possible with javascript an

Re: [Interest] Import C++ types to Javascript

2015-11-27 Thread Jérôme Godbout
...@bodycad.com> >> To: "Jason H" <jh...@gmx.com> >> Cc: interest <interest@qt-project.org> >> Subject: Re: [Interest] Import C++ types to Javascript >> >> Make sure your function is Q_INVOKABLE or is a slot. also take care .pragme >>