Status report on kde-soc-scripting 08/08
Kun Xi
bookstack at gmail.com
Mon Aug 8 20:11:25 CEST 2005
Hello all,
Last week, I made little progress since I underestimate the complexity
of exposing the objects
to the script namespace. :-(
DONE:
Finish reading kjsembed sources, including jsbuiltin, jsfactory ......
Finish reading the kst/extensions/js module. -- Kst provides a
applicable approach.
Finish the first step to expose a "virtual object" with wrapper
class, "Contacts", now I don't
expose the bare QObject, instead, I write a wrapper class for it, so
we may have more power to
control access.
TODO:
The most chanlleging part is how to develope a wrapper class for
KABC::AddressBook object,
aka mAddressBook in KABCore class. Our apporach is: add a read-only
property "AddressBook"
to the Contacts object. It would reture an AddressBookImp class.
AddressBookImp would wrap
the KABC::AddressBook, any request to AddressBookImp would be
forwarded to KABC::AddressBook.
Besides, we also need to add a wrapper for KABC::Addressee with
constructor enabled, since
we may add a new addressee to the AddressBook.
SUGGESTION:
I am not quite familiar with how KJSEmbed works, so if this
suggestion is naive, please laugh
and laugh aloud. :-)
Could we seperate the JSFactory and KJSEmbedPart in KJSEmbedPart
construction and
change all functions in JSFactory to virtual ? Then the user could
sub-class the JSFactory and override createObject for their own needs.
Best regards,
Kun Xi
More information about the Kde-soc
mailing list