help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PCRE supposedly no UTF support


From: PhilipNienhuis
Subject: Re: PCRE supposedly no UTF support
Date: Sun, 10 Nov 2013 06:16:02 -0800 (PST)

PhilipNienhuis wrote
> 
> ahowe42 wrote
>> Thanks Philip.  I know what java_invoke is; I think you're missing the
>> point.  My issue is that I try to run java_invoke as 
/
>> java_invoke ('org.octave.JDialogBox', 'questdlg', 'question');
/
>> ,
>> 
>> which is supposed to create an instance of the org.octave.JDialogBox.  I
>> get the following error message.
/
>> error: [java] java.lang.NoSuchMethodException: questdlg
/
>> 
>> Since this is just invoking a java method from an existing class, this
>> should work, but doesn't.
> OK, sorry for my confusion.
> 
> But why would you try to invoke questdlg from the Java world, rather than
> directly in Octave? 
> 
> Skipping that answer, maybe this trick that I often use could help you
> find out how to call JDialogBox methods (tried in Octave-3.7.7+ but it
> should work similarly in Octave-3.6.4 w java-1.2.9 package):
> 
>>> jq = javaObject ('org.octave.JDialogBox')
> jq =
> <Java object: org.octave.JDialogBox>
>>> javamethods (jq)
> warning: javamethods is obsolete and will be removed from a future version
> of Octave, please use methods instead
> 
> {
>   [1,1] = int[] listdlg(java.lang.String[], java.lang.String,
> java.lang.Object[], java.lang.Object[], java.lang.String,
> java.lang.String[], java.lang.String, java.lang.String)
>   [1,2] = java.lang.String[] inputdlg(java.lang.String[],
> java.lang.String, java.lang.Object[], java.lang.Object[])
>   [1,3] = void SelectAll()
>   [1,4] = int helpdlg(java.lang.String, java.lang.String)
>   [1,5] = int emptydlg(java.lang.String, java.lang.String)
>   [1,6] = java.lang.String questdlg(java.lang.String, java.lang.String,
> java.lang.String[])
>   [1,7] = int errordlg(java.lang.String, java.lang.String)
>   [1,8] = int warndlg(java.lang.String, java.lang.String)
>   [1,9] = int genericdlg(java.lang.String[], java.lang.String[],
> java.lang.String, java.lang.String, int,java.lang.Object[],
> java.lang.Object[], java.lang.String, java.lang.String, java.lang.String)
>   [1,10] = void closeDialog(int)
>   [1,11] = void setFocus()
>   [1,12] = void main(java.lang.String[])
>   [1,13] = void wait(long) throws java.lang.InterruptedException
>   [1,14] = void wait() throws java.lang.InterruptedException
>   [1,15] = void wait(long, int) throws java.lang.InterruptedException
>   [1,16] = boolean equals(java.lang.Object)
>   [1,17] = java.lang.String toString()
>   [1,18] = int hashCode()
>   [1,19] = java.lang.Class getClass()
>   [1,20] = void notify()
>   [1,21] = void notifyAll()
> }
>>>
> 
> ...from which I tentatively conclude that you might be supplying not
> enough parameters, of the proper class, to the questdlg call (through
> java_invoke).
> 
> Note that java_invoke is deprecated now, better use javaMethod()
> 
> FYI, the Java package author once informed me that error messages like 
> "error: [java] java.lang.NoSuchMethodException: questdlg" 
> are indeed appropriate because Java is a (very-) strictly-typed language
> and (in this case) indeed has no methods for the actual set of parameters
> (number, class) you supplied here.

Forgot to ask the obvious:

Why don't you just look in the source of questdlg.m to find out how that
routine does the Java method calls?

"Use the Force, read the Source"....

Philip



--
View this message in context: 
http://octave.1599824.n4.nabble.com/PCRE-supposedly-no-UTF-support-tp4658627p4659003.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]