[prev in list] [next in list] [prev in thread] [next in thread]
List: kjsembed
Subject: [kjsembed] Translation of PyKDE script to KJS
From: Matej Cepl <cepl () surfbest ! net>
Date: 2005-04-27 19:41:28
Message-ID: 200504271541.35030.cepl () surfbest ! net
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
Hi,
I am a total newbie in KJS world so forgive me please if the
question is totally stupid (I really tried to find all necessary
information, but I got lost).
I have created a small dialog in Qt Designer and Python and I
would love to translate it into KJS (I hope it would be at least
slightly faster -- Python script takes at least five seconds to
start, and that is too slow for me; I cannot write C++ and I
would rather maintain script). I tried to create KJS version
(see attached), but this end doesn't work (there doesn't seem to
be sort() method for listBox1) and even when the dialog is shown
it is dead (now method seems to do anything, although all
connections are defined in .ui file):
ui.child("listBox1").sort();
ui.show();
/* app.setMainWidget(f) */
application.exec();
listBoxItems = [];
numItems = ui.listBox1.numItemsVisible();
for(num=0;n<numItems;n++) {
listBoxItems += ui.listBox1.text(num);
}
saveList(listBoxItems);
Can you help me with this script to make it work, please?
Thanks,
Matěj
--
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
It would be very good idea.
-- Gandhi, when asked what he thinks about Western
civilization?
["KDE-dialog.tar.gz" (application/x-tgz)]
[Attachment #8 (application/pgp-signature)]
_______________________________________________
kjsembed mailing list
kjsembed@kde.org
https://mail.kde.org/mailman/listinfo/kjsembed
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic