By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 967

Summary: KJSEmbed (as kjscmd) broken: DCOPInterface::publish or KTextEdit::setText
Product: TDE Reporter: Jürgen <info>
Component: other (any)Assignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, darrella
Priority: P5    
Version: 3.5.13 [Trinity]   
Hardware: i386   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Test case including output

Description Jürgen 2012-04-18 15:19:27 CDT
The main problem for me was that DCOPInterface has a slot "publish" but the public function is missing. As a funny exercise I tried the call the slot via KTextEdit/textChanged and found that KTextEdit has no setText function (but should have as documented). As a final experiment I tried setAttribute("text") but this does not trigger the signal.

Resume: kjsembed seems to be broken in multiple ways. Is there any hope? For me it is show-stopper issue for trinity.

Here my example code (which works on kde3):

this.Echo = function(arg) {
   println(arg);
}

    var dcli = new DCOPClient(this);
    dcli.attach();
    var theDcop = new DCOPInterface(dcli, "ZapDvb");

//    This function is missing ...
//     theDcop.publish("bool Status()");

     var tbox = new KLineEdit(this);
     tbox.connect(tbox, "textChanged(const QString&)", this, "Echo"));
     tbox.connect(tbox, "textChanged(const QString&)", theDcop, "publish"));

// tbox.setText() is missing too.

// This workaround doesn't raise the signal
     tbox.setAttribute("text", "void Pipe(QString)");

     application.exec()
Comment 1 Darrell 2012-04-21 14:58:37 CDT
tdebindings can be built without kjsembed bindings. Possibly the version being used was compiled that way.

Which distro, TDE version, and set of packages?
Comment 2 Timothy Pearson 2012-06-12 18:26:52 CDT
There have been many bugfixes to bindings and DCOP in GIT since the release of 3.5.13, and it is very possible that this issue has already been resolved.

Can you provide a full compilable / executable test program for us, along with expected output, so that we can test and debug this issue further?
Comment 3 Jürgen 2012-06-20 16:00:18 CDT
Created attachment 687 [details]
Test case including output

Code that works on KDE 3.5 (Debian Lenny) and fails on TDE 13
Comment 4 Timothy Pearson 2012-06-20 16:13:03 CDT
After changing 'QString' to 'TQString' I receive the following output on R14.0 GIT:

./test.sh
Test server ready, use 'pkill kjscmd' to kill ...
1
It works
Test server terminated.

Therefore, it would seem that this bug is fixed in GIT.