[Qt-interest] QtScript: Returning exception on invalid properties

Thiago Macieira thiago at kde.org
Sun Dec 20 09:41:41 CET 2009


Em Domingo 20. Dezembro 2009, às 05.34.22, Dan escreveu:
> I am making scriptable QObjects and setting a few scriptable properties. I
> would like to throw javascript errors when the user gives them bogus values
> bug I can't figure out how.
> 
> If I simply used a function that's not a member of a class, it would be
>  easy but from a class member, I really don't find anything in the doc. Is
>  it possible?

See http://doc.trolltech.com/4.6/qscriptable.html

The documentation for that class has an example of what you want.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091220/7b419699/attachment.bin 


More information about the Qt-interest-old mailing list