[Kst] Strange problem using the change data file tool
Brisset, Nicolas
Nicolas.Brisset at eurocopter.com
Wed Jan 25 18:39:32 CET 2006
> I have a problem which is driving me crazy: I have
> implemented a datasource for an internal format, and it works
> very well with the datawizard or the data manager. However,
> when I use d2asc or the "Change data file" tool, even though
> the plugin is called correctly, for some reason kst
> complains. D2asc says "d2asc error: file enreg.res.B has no
> data" and the GUI says "Impossible to load data file" (or
> something equivalent, I have it in French :-)).
> I'm really wondering why there is a difference here ??? Any
> hint as to where the problem could lie would be greatly appreciated.
OK, I think I know :-) The problem is the following: as the constructor
is sometimes called too often (the datawizard calls it twice I think,
and reload a lot of times) and this can be very long according to what
it does. So, I used a trick. Only the beginning of the data file is
parsed in the constructor, and in the first call to update() I really
parse the whole file and set the number of frames > 0. I'd bet that in
the change data file tool and d2asc, update() is never called !
Now, there are a few options:
1) these calls are added in these two places and possibly others (my
preferred)
2) I change the behavior of my datasource so that it scans the whole
file right at the beginning (but I fear users will complain)
3) we find a way to reduce the number of calls to datasource
constructors and 2) becomes acceptable (but this will surely take more
time)
Nicolas
More information about the Kst
mailing list