Dear all,

I've successfully extended a Java class (:gen-class and :extends) and
all is working as expected, until I was forced to call a protected
final method of the superclass from within my derived class. I don't
seem find a way to do this (:exposes-methods really is only for
overridden methods?) - is it even possible?

The method has the following signature:

  protected final void beginInsertRows
(com.trolltech.qt.core.QModelIndex parent, int first, int last);


A code snippet:

> (ns name.space.XStoreListModel
>   (:gen-class
>     :extends com.trolltech.qt.core.QAbstractListModel
>     :prefix "XStoreListModel#"
>     :methods [
>       ["addPath"     [java.lang.String] Boolean]
>       ["addFiles"    [java.util.List]   Boolean]
>       ["removeFiles" [java.util.List]   Void]
>     ]
>     :exposes-methods {
>       beginInsertRows beginInsertRowsSuper
>     }
>   )
>
>   (:import
>     (com.trolltech.qt QThread)
>     (com.trolltech.qt.core QModelIndex QCoreApplication QEvent QEvent$Type)
>     (com.trolltech.qt.core Qt$ItemDataRole)
>   )
>
>   (:use
>     [name.space.XStore]
>   )
> )
> ...
> (defn- XStoreListModel#addPath [this path]
>   ;;
>   ;; Here's the call for testing purposes...
>   ;;
>   (.beginInsertRowsSuper this nil 0 10)
>
>   (.start
>     (QThread.
>       (fn []
>         (add-files xstore path)
>         (QCoreApplication/postEvent this (QEvent. QEvent$Type/User))
>         nil))))
> ...


I really hope this is possible. Many thanks in advance and
greetings...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to