[Kommander-devel] Connecting Kommander with Kross
Michal Rudolf
mrudolf at kdewebdev.org
Thu Oct 19 13:41:07 EDT 2006
Eric Laffoon, czwartek, 19 października 2006 18:24:
>I see the preliminary work for passing parameters with signals and slots to
>scripts too. Unfortunately I can't seem to make any SVN tool produce the
> nice version diffs I used to get with Cervisia... Anyway I remember our
>discussion. It would be nice if you could post here exactly how to test
> this. I see a new "item" in the function browser that looks like you can
> refer to item(int index) for passed parameters and a mention of using
> "self" as we discussed in widgets so it looks like...
>self.item(int index)
>returns arg i. I'm guessing you can use execute(arg1 arg2) but it's much
>easier not blindly testing things like that. ;-)
There are a few new features:
* there are some new execute() slots of ScriptObject that match most common
signal parameters, f. e.:
LineEdit::textChanged(QString) -> ScriptObject::execute(QString)
* in ScriptObject's script you can access those parameters via item(index)
* you can also get the number of parameters by count()
* you can call ScriptObject manually, passing parameters that way:
ScriptObject::execute(param1, param2, params3)
One mostly unrelated new feature is that you can use 'self' as a currrent
widget, for example instead of:
ScriptObject1.item(1)
you can use Self.item(1)
Everything should be obvious from attached example.
--
Michal Rudolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: params.kmdr
Type: application/x-kommander
Size: 4095 bytes
Desc: not available
Url : http://mail01.fortunecookiestudios.com/pipermail/kommander-devel/attachments/20061019/d66ab358/params.bin
More information about the Kommander-devel
mailing list