Re: [Qt-qml] Showing text into the console

2010-04-23 Thread Kent Hansen
Ettrich Matthias (Nokia-D-Qt/Berlin) wrote: > On Wednesday 21 April 2010 03:28:54 Allison Warwick (Nokia-D-Qt/Brisbane) > wrote: > >>> print() >>> >> Please don't use that one. It's a QtScript extension, and makes your JS >> quite incompatible with browser JS (which "print" is something

Re: [Qt-qml] Exporting overloaded methods to QML

2010-06-18 Thread Kent Hansen
Hi Artur, On 17. juni 2010 16:59, ext Artur Souza (MoRpHeUz) wrote: > Hi all, > > I have a set of methods in a class that has overloaded versions. In > order to export them to QML I needed to create a QObject with one slot > for each overloaded version. For example, one of my set of methods is: >

Re: [Qt-qml] Exporting overloaded methods to QML

2010-06-18 Thread Kent Hansen
On 18. juni 2010 11:10, Hansen Kent (Nokia-D-Qt/Oslo) wrote: > Even if you could get at the QScriptEngine, I'm not sure > how you would be able to add anything to it (in a non-hackish way, i.e. > that's not going to break when QML internals are changed). > Adding an overload of QDeclarativeCon

Re: [Qt-qml] Exporting overloaded methods to QML

2010-06-18 Thread Kent Hansen
On 18. juni 2010 14:43, ext Artur Souza (MoRpHeUz) wrote: > On Fri, Jun 18, 2010 at 6:10 AM, Kent Hansen wrote: > > >> I _think_ you should be able to get the engine by creating a C++ slot >> that takes a QScriptValue as argument, call that slot from QML, and call >>

Re: [Qt-qml] QML's QScriptClass

2010-06-21 Thread Kent Hansen
On 21. juni 2010 06:55, Allison Warwick (Nokia-D-Qt/Brisbane) wrote: >> I saw the quite impressive QML presentation at LinuxTag and I liked it. >> But what I dislike is QML's SQL-based database interface, so I decided >> to implement a MongoDB-based NoSQL database interface for QML. >> > I wr

Re: [Qt-qml] Exporting overloaded methods to QML

2010-06-21 Thread Kent Hansen
On 18. juni 2010 20:14, ext Artur Souza (MoRpHeUz) wrote: > On Fri, Jun 18, 2010 at 11:04 AM, Kent Hansen wrote: > > >> This doesn't work. QtDeclarative currently doesn't use the same QObject >> method call logic as QtScript. You can "fix" th

Re: [Qt-qml] Calling slots with binding

2010-06-29 Thread Kent Hansen
Hi, On 29. juni 2010 16:58, ext Cristian Daniel Stamateanu wrote: > Hello, > > I have the following problem : I have a class declaring the following slot: > > void RssFeedManager::addFeedEx(const QScriptValue& name,const > QScriptValue& address ) > { > bool nameIsString = name.isVarian

Re: [Qt-qml] 'property variant' mutilates / can't store a javascript object with js prototype?

2010-10-26 Thread Kent Hansen
Hi, On 26. okt. 2010 13:58, ext Ville M. Vainio wrote: > I'm trying to store a javascript object with 'prototype' in property variant. > > In my qml I have > > import "redditengine.js" as RE > > Rectangle { > ... > > property variant eng > Component.onCompleted: eng = RE.create() > > My

Re: [Qt-qml] QML JS Weirdness

2010-11-18 Thread Kent Hansen
Hi, Den 19. nov. 2010 03:22, skrev ext Jason H: > So, I think I got this figured out. > > QML doesn't support the for each ( ... in ...) construct, just for ( ... in > ...), thus requiring me to use subscripts. > "for each" is a Mozilla-specific JS extension. You could use Array.prototype.for

Re: [Qt-qml] Objects get mangled into QVariantMaps when passed from QtScript to QML functions... why?

2010-11-30 Thread Kent Hansen
Hi, Den 29. nov. 2010 15:54, skrev ext Bart Kelsey: > My current project is a game engine that uses QML for the UI and > QtScript for game scripting (video at > http://www.youtube.com/watch?v=SG5p-qLARrw ). At any rate, while it's > possible to call functions on QML elements from QtScript, whe

Re: [Qt-qml] Objects get mangled into QVariantMaps when passed from QtScript to QML functions... why?

2010-12-06 Thread Kent Hansen
I do. > > Thanks for your help! > > Bart > > > > On Tue, Nov 30, 2010 at 3:47 AM, Kent Hansen > mailto:kent.han...@nokia.com>> wrote: > > Hi, > > Den 29. nov. 2010 15:54, skrev ext Bart Kelsey: > >