Re: [patch] extend guile plugin connectivity



On Tue, Jul 02, 2002 at 06:45:33PM +0200, Jon Kåre Hellan wrote:
On Tue, 2002-07-02 at 16:52, Floris Kraak wrote:

Hi,

This patch allows guile calls to hand gnumeric data other than
type 'string' from within the guile plugin. Diffed against 1.0.8.



I don't see anything wrong with it.

On the other hand - I am probably just revealing my ignorance here - but
what is the point? You turn the value into a Scheme string before
passing it to Guile. You can already pass integers as Scheme numbers
with value-get-as-int, and floats as Scheme bignums with
value-get-as-float.


Apparently, the main reason is convenience.


These have the problem that you're supposed to know the value type. If
you want to improve the Guile plugin, wouldn't it be better to declare
the 'value-get-as-' gang deprecated, and make a 'value-get-value' (lousy
name!) which returns a Scheme value of the type most appropriate to the
Gnumeric value?

(Is anybody actually using the Guile plugin?)

Maybe. Probably. This is a quick hack joost implemented because
it made the guile plugin more usable for him. I am not
claiming this particular problem couldn't be adressed differently,
or even better; This is merely passing along the code we have.

(The obvious answer to the other question here is an empathic 'yes',
by the way. In fact, joost claims it is 'very useful' and is using
it to export gnumeric fields to a database. This by the way
exposes a problem with constant field recalculations but that is
a different problem and a different patch)

Regards,
Floris Kraak
-- 
Q:      Why did the tachyon cross the road?
A:      Because it was on the other side.



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