Feature or Bug ? (long)

Feature or Bug ?

I designed - in a multimedia project - a “export the list of files” in a ListBox (the file names use a delimiter sequence) and set the number of fields with the first line (decoding the first line). *

I have a “book” who holds a British magazine (2000AD) who started to be published in 1976 (no bar code label [BCL] at this date) and I decided to add the bar code labels in the file names (a file name represent a 2000AD issue).

Because of the design I set “on purpose”, and the fact that no BCL on the first years, my export code does not creates a column for BCL.

So, I have the choice: either add a “false tag” that simulates a column for BCL (say “running” or “complete“) in the first line (filr name) who is a description of the magazine (an About this magazine entry) to get the correct number of Columns or change my code to detect the maximum number of columns in the file names loop and adds one if needed.

What is your feeling ?

a. about the problem: design failure (bug) or special feature (to be kept as is)
b. an advice for the solution to implement.

More info:

The main window have a ListBox who is populated from disk and display data about the selected entry. I added a way to export the ListBox contents (that will act as a list in another Window). The exported list will holds:

a. the issue name number (2000AD 0001),
b. the cover title (or a cover title just like: "The sensational issue 1),
c. the release date (1977-02-26)
d. a bar code label when available

The generated list is very usefull for… data debugging (not code, data). I was able to discover erroneous dates (a click in the Release date column), etc. These errors are always present when you enter so many data (the last issue number for 2000 AD is… 1930 !)
You can also discover some duplicates spaces in the file names, etc.
The Find text is also of a good use for debugging data (text): you have the text below the search indow, but the code do not find it !!!
And I do not talk about the question mark in the file name who’s a character line any other under OS X, but… not when running Windows ! And so, have to be removed (?)

At last, when I was getting data about an India comic book (Indrajal Comics), I added a field with the Character name: very useful to get the list of issues sorted by characters (excepted that in the last years, some issues were having two different characters…). That is why I added a global seach (a search in the text files description issue(s) (two files for each issue): now I am able to get the list of issues for a specific character (poluted by any advertising page).

The generated list in its own window:

I will clean the Open / Save and Trash icons in the ToolBar in the future.

FWIW, I wouldn’t design an export based on the listbox. The export is based on the data. Presumably this is a database application? If not, it should be, in which case your missing BCL will be a null or blank value and the export should work without a hitch.

You didn’t say what the export format was but it sounds like a pure text format (tab delimited?). You should look at XML or JSON since you can explicitly say what the data is that you’re exporting so if a record doesn’t have a field the data schema of XML or JSON will explicitly show this.

Thanks Bob for your answer. The exported text (.txt, standard Tabs + Return) is done from the ListBox you see on screen above.

[Added before sending this answer]
Now, I really understand what you mean: it is a slightly design that allows me to not fall into that “feature”. It is clear now.
[/Added before sending this answer]

The data in the ListBox (screen shot above) comes from a ListBox (with only one column filed with the file names).

In the original window, the file name, once one is selected is used to get (from CellTag) load and display information based on the data subject (a cover [book, magazine, CD-LP, etc.] and two text files).

Of course, I could have stored these informations as Records instead into folders.

Yes, in the application design, thinking to use a Data Base to store the data is what can comes in mind. It will need another window to be able to feed the db file vs a simple “New Folder" followed by “copy the image and two text files into that folder” and done.

PS: in many years of use, this is the first time I had that crazy idea (to add the BCL, to add an information that is not available for all folders). This falls into the definition of a bug.

I would argue that this is the PERFECT use of a database. If not all records have data, a database can handle this exceptionally easy. If you are using a flat file structure this become a lot more complicated.