Re: Reflection warning on setCaretPosition

2015-02-27 Thread Fluid Dynamics
On Friday, February 27, 2015 at 12:51:45 PM UTC-5, Cecil Westerhof wrote: > > 2015-02-27 17:30 GMT+01:00 Dave Ray >: > >> (let [^JEditorPane html-table (editor-pane ...)] ...) should fix it. Or >> just set the caret position in the create function: >> > > ​I have removed all my warnings by usin

Re: Reflection warning on setCaretPosition

2015-02-27 Thread Andy Fingerhut
If (text ...) is an invocation of a macro, not a function, then that type tag is most likely silently ignored by the Clojure compiler, not hurting anything, but not helping anything, either. Eastwood [1] can warn you about such useless type tags in your Clojure code, via the :unused-meta-on-macro

Re: Reflection warning on setCaretPosition

2015-02-27 Thread Cecil Westerhof
2015-02-27 17:30 GMT+01:00 Dave Ray : > (let [^JEditorPane html-table (editor-pane ...)] ...) should fix it. Or > just set the caret position in the create function: > ​I have removed all my warnings by using: ^JEditorPane, ^JFrame​ ​, … But I always like to check deeper. On one of the places I

Re: Reflection warning on setCaretPosition

2015-02-27 Thread Cecil Westerhof
2015-02-27 17:30 GMT+01:00 Dave Ray : > (let [^JEditorPane html-table (editor-pane ...)] ...) should fix it. Or > just set the caret position in the create function: > > (editor-pane :caret-position 0) > ​This one I find the the best option. You only need to do it after the :text option. ​ > o

Re: Reflection warning on setCaretPosition

2015-02-27 Thread Dave Ray
(let [^JEditorPane html-table (editor-pane ...)] ...) should fix it. Or just set the caret position in the create function: (editor-pane :caret-position 0) or use config: (config! editor-pane :caret-position 0) Dave On Fri, Feb 27, 2015 at 4:07 AM, Cecil Westerhof wrote: > 2015-02-27 11:34

Re: Reflection warning on setCaretPosition

2015-02-27 Thread Cecil Westerhof
2015-02-27 11:34 GMT+01:00 Gary Verhaegen : > It means the Clojure compiler cannot emit the efficient bytecode directly, > so it emits bytecode that calls the method reflexively. > > This only impacts performance, so if that code is not used much, it is not > a problem. > ​It is not used much, so

Re: Reflection warning on setCaretPosition

2015-02-27 Thread Gary Verhaegen
It means the Clojure compiler cannot emit the efficient bytecode directly, so it emits bytecode that calls the method reflexively. This only impacts performance, so if that code is not used much, it is not a problem. The underlying problem is that jvm bytecode is typed, so ideally the bytecode sh

Reflection warning on setCaretPosition

2015-02-27 Thread Cecil Westerhof
On a editor-pane I use: (.setCaretPosition html-table 0) ​And it does what it should do. But when I run: lein check I get: Reflection warning, quotes/core.clj:98:42 - call to method setCaretPosition can't be resolved (target class is unknown). Is that something to worry about? By th