Bug 120772 - kst should maintain a list of strings
Summary: kst should maintain a list of strings
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-25 11:33 UTC by Nicolas Brisset
Modified: 2007-03-07 12:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2006-01-25 11:33:42 UTC
Version:           1.2.0_devel (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

There currently is a list of scalars, which can be used pretty much anywhere to build labels or equations. Non-numerical values are hence not supported.
It would be nice to add support for plain strings (not usable in equations, but in labels). I believe this is a prerequisite to be able to use metadata provided by datasources.
Comment 1 Nicolas Brisset 2006-01-27 09:17:42 UTC
It would be nice to ba able to edit a list of custom strings from the settings dialog, to set e.g. company name, user name, department, e-mail, phone number, copyright notice, etc... so that they can be used easily.
Comment 2 Nicolas Brisset 2006-03-29 13:05:30 UTC
Any chance that this request can be moved up the priority list ?
Comment 3 Nicolas Brisset 2006-06-23 16:20:42 UTC
If I were to add a couple of QString metadata to a datasource, is there a way I could reference them in a label ?
For example, if I make the required changes for an ASCII datasource to return the skipped header lines in one or more string variables like file1.dat-header1, file1.dat-header2, etc... can I then use them in labels with the[file1.dat-header1] syntax or can they only be displayed in the dialog George added some time ago (bug #120773) ? 
In other words, do we have string variables yet ?
Comment 4 George Staikos 2006-06-23 17:11:06 UTC
   Yes it should work just as you describe already.
Comment 5 Nicolas Brisset 2006-06-23 17:25:45 UTC
So, all that is lacking is some goodwill to update datasources so that they provide some metadata, and maybe a UI to set strings manually ? Interesting, I will try to see what I can do to CDF (export global attributes) and ASCII (one string for each header line) for a start...
Comment 6 Nicolas Brisset 2006-07-04 11:03:28 UTC
I have just tried initial metadata passing from an internal "test" datasource (where I can play without fearing to break things!) and it works partly: I get the metadata passed on to kst, I can see it in the metadata dialog called from the RMB menu on a vector in the data manager, but when I use a label like [Title], even though the "Title" metadata exists in the metadata dialog and has the right contents, the label remains empty.
It looks like there is still something lacking somewhere...

Besides, I have been thinking about this a bit more and I believe we need a mechanism to auto-sequence strings like vectors, curves and other objects so that we don't get name collisions when many datasources provide the same keys. But then, that means kst has to maintain a mapping like:
[kstName] <-> datasource/key 
I am not sure that's all in place yet ? If it isn't too big a change, I'd really like to see that added for 1.3.0 because it is a very usual complaint here that there is no good way to have reliable (aka as automatically updated :-)) context information added to kst plots. Once the infrastructure is in place, adding metadata for ASCII, CDF (global attributes are just that) and possibly netCDF should be very quick.
Comment 7 Eli Fidler 2007-03-02 00:59:28 UTC
This functionality is now implemented.
Comment 8 Nicolas Brisset 2007-03-05 12:59:24 UTC
Sorry, but I'm going to reopen this one for the following reasons:

I have just tried to create a custom string (from the create label dialog), and there are problems:
1) the first time I create the string "test" with contents "foo" it seems to work, but then the label shows no contents
2) when I subsequently try to edit the contents of that string from the label dialog (edit string contents) it opens a diloag whith empty contents (which is consistent with what the label showed !) and when I enter something it says "Error saving your new string"
3) it seems that not all characters are allowed within strings as I get the same error message as soon as there are spaces for instance. I'd say spaces sound right for string contents and should be allowed :-) Maybe not in the name but at least in the contents !

I don't think it's wise to ship 1.4 in that state, so as almost everything is there to provide that feature, let's just make it work 100% :-)
Comment 9 Netterfield 2007-03-06 14:58:44 UTC
I agree.  This should be fixed....
Comment 10 Eli Fidler 2007-03-06 21:21:10 UTC
Ok. We should be good to go now. Fixed in rev. 640094.
Comment 11 Nicolas Brisset 2007-03-07 12:41:53 UTC
Seems to work great :-) And you can even have blanks, not only in string contents but even in string names (hopefully this won't break further down the line) !