[Lazarus] Global dialog "file filters" feature + patch in mantis
Michael Van Canneyt
michael at freepascal.org
Thu Oct 21 16:26:31 CEST 2010
On Thu, 21 Oct 2010, Graeme Geldenhuys wrote:
> Op 2010-10-21 14:38, Michael Van Canneyt het geskryf:
>>
>> Name = 'AllPascalFiles'
>> DisplayName = 'All pascal files'
>> Mask = '*.sql'
>>
>> User edits DisplayName and Mask. 'Name' can be used to track changes.
>
> OK, so lets say the above is implemented... now lets walk through a use
> case. Remember I said, I DO plan features, I don't just code them off the
> top of my head.
>
> 1) First time in IDE since 'File Filter" patch was applied. File Filters
> grid is populated with default display name (from translation resource
> strings) and default file masks.
>
> 2) I modify the display name and file masks of existing filters, and I
> add my own filters.
>
>
> ...[ time goes by and one of the default filters had there file mask
> changed ]...
>
>
> 3) First time I enter the IDE since new default filter file mask. What
> should happen?
> - Lazarus overwrites my customized file mask for that filter? I'd be
> pissed off about this.
> - Lazarus prompts me to to do something?
> * I'd be pissed off about pointless prompt.
> * Prompts for what?
> * I don't like software that prompts me for every damn change, so
> no I want to know where do I disable such prompts?
> - Lazarus just ignores the new default filter file mask, and keeps
> using what I specified (I opt for this, which is essentially what
> I have already implemented)
The last point is correct. You changed something, nothing is done.
As soon as something is marked 'changed', it is ignored.
>
> 4) I add more file filter masks. eg: XML files (*.xml)
>
>
> ...[ time goes by and one of the default filters had there display name
> changed ]...
>
> 5) First time I enter the IDE since new default filter display name
> change. What should happen? Essentially the same as (3).
Nothing. Modified means: do not touch.
>
>
> ...[ time goes by and a new default filters had been added.
> eg: FPDoc Description Files (*.xml) ]...
New filters are simply added to the end of the list.
>
>
> 6) First time I enter the IDE since new default file filter was added.
> What should happen?
> - Essentially the same as (3).
> - Automatically add new default filter. But hey, now the mask clashes
> with my own 'XML Files' filter.
No. The name is different. You'll simply have the same thing twice.
A user action is always required when the IDE changes:
in your way just as in my proposal...
> - What about my preferred order of filters. I don't what that to change
> either, so where should IDE add new file filter.
Always at the end.
> My observations:
> * You guys now made the whole feature a damn site more complicated than
> it needs to be.
But it gives maximal user experience, least amount of fuss.
Isn't that what it's all about ?
Many things in the IDE are more complicated than I would like them to be,
but usually Mattias puts me straight: he always gives the reason why
things are the way they are. I may think they are needlessly complicated
sometimes, but in the Lazarus IDE, his story is always consequent and
logical. Making the IDE a damn sight better than Delphi's meanwhile.
Michael.
PS 1. I am merely an observer in this particular discussion. You asked opinions
in order to resolve a dispute. I gave mine, how I would solve the dispute.
You're of course free to do different.
PS 2. I often find that the following lyrics help me put things in perspective:
http://www.metrolyrics.com/you-cant-always-get-what-you-want-lyrics-rolling-stones.html
More information about the Lazarus
mailing list