[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] KParts::MainWindow and khtml weirdne
From:       Paolo Capriotti <p.capriotti () gmail ! com>
Date:       2009-07-16 21:47:25
Message-ID: h3o75d$ulu$1 () ger ! gmane ! org
[Download RAW message or body]

Paolo Capriotti wrote:
> Riemann, Robert wrote:
>> Did you try another way to get this katepart?
>>
>> A collection of examples with katepart:
>> http://www.salout.selfip.org/bemerkenswertes_meinerseits/2009/02/ruby-
>> ktextedit-verwenden.html
> 
> Yes, I tried. It still doesn't work, and I get very a strange behavior 
> even if I remove the khtml include: the katepart xmlgui is not loaded 
> when I call createGUI. That's why I resorted to loading the part directly.
> Can anyone shed some light on this?

After some experimentation, I found out that after this:

     editor = KTextEditor::EditorChooser::editor
     @doc = editor.create_document(self)
     @view = @doc.create_view(self)

@doc and @view are both instances of KXmlGuiClient, and @doc is the 
actual katepart, though only @view has the correct xml file set 
(@doc.xml_file returns nil).

To fix it, I added a simple

     @doc.setXMLFile(@view.xml_file)

which makes everything work.

I will test this issue in C++ to see if it's a bug in kate or in korundum.

As for the khtml require breaking createGUI, that still happens (though 
it's not anymore critical for me), but I haven't got any clue why. Does 
the khtml.rb file do some strange method rewriting magic?

Regards,

Paolo Capriotti

_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic