Bug 75541 - create vector column 0
Summary: create vector column 0
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-18 19:39 UTC by claude mercier
Modified: 2004-08-11 23:04 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 claude mercier 2004-02-18 19:39:55 UTC
Version:           CVS version  (using KDE KDE 3.1.5)
OS:          Linux

The create vector dialog box let me select
the column zero, and it starts at 1, should not let
me do it

(minor, I missed the place I should have select it)
Comment 1 George Staikos 2004-02-18 21:41:51 UTC
On Wednesday 18 February 2004 13:39, claude mercier wrote:
> The create vector dialog box let me select
> the column zero, and it starts at 1, should not let
> me do it
>
> (minor, I missed the place I should have select it)

  The scope of this is actually a bit larger.  It boils down to whether we 
should allow the user to type anything in this field at all, or if the 
datasources should supply the contents exclusively.  0 is not the only 
invalid thing that can be entered in this field.  Are there any datasources 
that might not know their fields before reading the file or attempting to 
open a given field?

Comment 2 George Staikos 2004-07-24 18:40:29 UTC
Still no response to my comments here.  I'm tempted to make this combo non-editable, though completable (if you understand what I mean).
Comment 3 Netterfield 2004-07-27 19:14:34 UTC
Frame Files don't return a complete frame list, though no-one is using it now.
But others could come up.  How about if data-sources have a bool fieldListIsComplete() method to help us decide.
Editable if incomplete, non-editable if complete.
Comment 4 George Staikos 2004-08-11 23:04:06 UTC
CVS commit by staikos: 

activate the fieldListIsComplete() member in datasources to prevent users from
entering vectors that don't exist when we know the complete set.

note: data wizard surely doesn't work well with sources where we don't know
  the full set though

CCMAIL: 75541-done@bugs.kde.org


  M +2 -0      datawizard.ui.h   1.75
  M +1 -0      kstvectordialog_i.cpp   1.45
  M +5 -0      datasources/frame/frame.cpp   1.8
  M +2 -0      datasources/frame/frame.h   1.5


--- kdeextragear-2/kst/kst/datawizard.ui.h  #1.74:1.75
@@ -117,4 +118,5 @@ void DataWizard::sourceChanged( const QS
             _xVector->insertStringList(fl);
             _xVector->completionObject()->insertItems(fl);
+            _xVector->setEditable(!_ds->fieldListIsComplete());
             for (QStringList::ConstIterator it = fl.begin(); it != fl.end(); ++it) {
                 new QCheckListItem(_vectors, *it, QCheckListItem::CheckBox);

--- kdeextragear-2/kst/kst/kstvectordialog_i.cpp  #1.44:1.45
@@ -91,4 +91,5 @@ void KstVectorDialogI::updateCompletion(
     list = ds->fieldList();
     ds->readUnlock();
+    Field->setEditable(!ds->fieldListIsComplete());
   } else {
     list = KstDataSource::fieldListForSource(FileName->url());

--- kdeextragear-2/kst/kst/datasources/frame/frame.cpp  #1.7:1.8
@@ -197,4 +197,9 @@ void FrameSource::save(QTextStream &ts) 
 
 
+bool FrameSource::fieldListIsComplete() const {
+  return false;
+}
+
+
 extern "C" {
 KstDataSource *create_frame(const QString& filename, const QString& type) {

--- kdeextragear-2/kst/kst/datasources/frame/frame.h  #1.4:1.5
@@ -46,4 +46,6 @@ public:
   virtual bool isEmpty() const;
 
+  virtual bool fieldListIsComplete() const;
+
 private:
   int _frameCount;