User forums > General (but related to Code::Blocks)

Feedback on Code::Blocks

<< < (6/7) > >>

kidmosey:

--- Quote from: MortenMacFly on July 25, 2006, 01:39:50 pm ---In addition: The extension list can change quickly if support for another set of files is added. And - in fact - this will happen with the new compiler framework. So this index we are settings there would have to be "maintained". I don't think that's a good idea. Thus - why not keeping it at the "first extension" only for the very first time?

--- End quote ---

If you add an extension, would that not also possibly change the index value?  Why not save the extension instead of the index?

killerbot:

--- Quote ---If you add an extension, would that not also possibly change the index value?  Why not save the extension instead of the index?
--- End quote ---
that's how it should be done !!!

Gena01:
From the whole discussion I see three possible issues:
1. The default starting index is 0 (AngelScript).
2. When I select "Open an existing project" link from the  "Start Here" (blank workspace) it should select the index to match CodeProject project files and not what was last used.
3. Index is used and saved across sessions. (and not extension?)

Gena01

killerbot:
I remember I once fixed some bugs so that the last extension was remembered (for generic open) bu I vae the impression something happened to it, since it does not work that well anymore ;-)

When opening project, it indeed should be cbp extensions selected, I will fix this.

MortenMacFly:

--- Quote from: killerbot on July 25, 2006, 05:29:02 pm ---I remember I once fixed some bugs so that the last extension was remembered (for generic open)

--- End quote ---
Don't worry: It still works very well. That's what I'm saying: The last filter selection IS stored as name, not the index. Then from the name the index is being computed. If there is no name stored, the default index (which is zero) is used. Anyway, for the file-open dialog you have to come to an (integer) index in the end allthough you save the filter as literal (again: as it is done).

So in the end it only happens the very first time that you are presented the AngelScript filter because this has index zero (the default). I could only imagine doing in MainFrame::OnFileOpen(wxCommandEvent& event) not a int StoredIndex = 0; but something like int StoredIndex = GetDefaultFilterIndex(); which would resolve to what?
There are so many good reason to resolve to any of the following:
- C::B workspace
- C::B projects
- C/C++ source/header files
(...)
But again I'm saying: We don't know what a good default value is. If we set iot to "something" next time people will complain different.

The only thing I could imagine to have the default index set to "All files" which is always appended to the filter index list. This is already returned by FileFilters::GetIndexForFilterAll(). How about that?

With regards, Morten.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version