*/Steph Bredenhann/* PrEng, PrCPM (sent from SJB-Linux)
On 17/07/2011 22:22, Philip Nienhuis wrote:
Hi Steph
(helpdesk here!)
Steph Bredenhann wrote:
See my comments in the text:
<snip>
If none of these solutions work for you, we'll have to debug this more
or less in cooperation (as I have no 64 bit machine).
Now you going to test whether I am a novice?
Well, are you ready? Don't be afraid....
BTW, re-reading odsopen.m's code in io-1.0.14 I see that is doesn't
support odfdom-0.8.7 at all. I added support for 0.8.7 in svn (the
development code repository); in the next io release (1.0.15) it'll be
there.
So, you do need odfdom version 0.8.6.
Just to check if you have the proper version, in the Octave prompt
please copy this hocus-pocus:
java_invoke('org.odftoolkit.odfdom.JarManifest','getOdfdomVersion')
(on one line!)
and report back. It should mention something like "0.8.6" (a character
string).
octave-3.2.4:8>
java_invoke('org.odftoolkit.odfdom.JarManifest','getOdfdomVersion')
ans = 0.8.6
octave-3.2.4:9>
Pls read on....
You can start then by adding a "keyboard" statement just after L. 188
(after the line "odssupport = 0") in odsopen.m, and repeat what you
did (with odsfinfo). It'll trap in odsopen at the keyboard statement,
in debug mode (a sort of command line mode; you can quit with
"dbquit").
odssupport = 0 is at Ln 163 in my code
I've added the statement:
octave-3.2.4:7> odsfinfo ('Protocol.ods')
error: structure has no member `POI'
Hmmm this is weird. POI is alien in odsopen & friends POI is for Excel
.xls, not .ods).
Did you do the copying all-right?
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error: /usr/share/octave/packages/3.2/io-1.0.13/odsopen.m at line 331,
column 3
error: /usr/share/octave/packages/3.2/io-1.0.13/odsopen.m at line 148,
column 19
error: /usr/share/octave/packages/3.2/io-1.0.13/odsfinfo.m at line 78,
column 6
octave-3.2.4:7>
I cannot find where this comes from.
Lines 330-332 of odsopen.m (in io-1.0.14 pkg from octave-sf.net) read:
error ('No Java support found.');
else
# No specific Java-based interface requested. Just return
?????? Something must be fubarred at your side.
We'll do it the risky way (no worries, from the information in your
previous posts I have a fair understanding of the situation as regards
Java & Octave at your side.)
Please do the following:
- Just to be sure, copy odsopen.m from io-1.0.14.tar.gz again to
/usr/share/octave/packages/3.2/io-1.0.13/
(I don't trust what you showed me above, we need clean code)
Done
Just note: I have to use SUDO to copy as I have only read rights
/usr/share/octave/packages/3.2/
- Using a regular editor, add a statement to odsopen.m:
Just above L. 152 of odsopen.m, above the line that reads: "chk1 =
strcmp ..."etc,
enter this statement:
odsinterfaces.OTK = 1;
(it should read like:
# Supported interfaces determined; now check ODS file type.
odsinterfaces.OTK = 1;
chk1 = strcmp (tolower (filename(end-3:end)), '.ods');
please mind proper case!)
("keyboard" statements like in my previous post shouldn't be present.)
and now re-run
odsfinfo ('Protocol.ods')
If all is well, you should get some normal behaviour now.
Motivation:
In your javaclasspath the proper files are listed.
odsopen.m, in its subfunction getodsinterfaces(), merely checks this.
In fact, the code there is almost identical to the relevant parts of
chk_spreadsheet_support.m. But because you got odfdom 0.8.7 it bailed
out. You said you did install odfdom-0.8.6, so it should be OK now.
Knowing that all is in place, we can fool odsopen itself by poking the
right value into odsonterfaces. odsopen should proceed like it should.
Please do this & report back.
As you can see there is no difference! I am starting to think that I
don't read from /usr/share/octave/packages/3.2/io-1.0.13/, I'll do some
searching here!
octave-3.2.4:9> odsfinfo ('Protocol.ods')
Supported interfaces: error: structure has no member `POI'
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error: /usr/share/octave/packages/3.2/io-1.0.13/odsopen.m at line 332,
column 3
error: /usr/share/octave/packages/3.2/io-1.0.13/odsopen.m at line 148,
column 19
error: /usr/share/octave/packages/3.2/io-1.0.13/odsfinfo.m at line 78,
column 6
octave-3.2.4:9>
Philip
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev