Home » U++ Library support » U++ Core » GetIndex on Array
Re: GetIndex on Array [message #11731 is a reply to message #11729] |
Sun, 23 September 2007 23:32 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
mdelfede wrote on Sun, 23 September 2007 17:03 |
luzr wrote on Sun, 23 September 2007 20:00 |
Well, so what we need is a key that invokes help, fills in the current ID and performs the search, right?
That should be trivial... sorry that it is not already there
|
Ehehehehehe.... maybe it's not so trivial, if you want to manage multiple (external) help files and index all of them in a smart way.... But context help is a must, I think.
|
Actually, this part is already done
You can search the files now. Invoke help, enter the symbols you want to search and hit a button... (That is why I was wondering why you miss existing feature...
Quote: |
Nor is trivial the html widget you'd need in order to make all that stuff.
Even worse, if you want to directly support chm files.... too many help files are in that format.
|
Ahh, sorry, I thought we are speaking about U++ Topic++ help files... Yes, this would be a bit more complex issue (but not that complex if somebody would write html and chm RichText parsers)
Quote: |
Back to container classes, another thing that I miss is some sort of 'uniform behaviour' between various containers. I know that Index is the best for fast searches and Array is better for insertions/deletions, but having for them the same set of member functions would make life easier. Why a Find() member on Index and not on Array ? Ok, on Index is faster, but what if I need a sortable container (like Array) and I need also to search inside it ? Yes, there's the FindIndex algorithm, but it's another function usage to remember.
|
Actually, I stand behind the design here. In fact, you can use FindIndex for Index too (with the same performance implications).
FindIndex is universal code that works with any U++ container. Why should you repeat it in each one of them?
Also, if you decide that FindIndex is so important that it grants it a method status, what else is important? We do not want to end with hundreds of methods per class, do we?
IMO it is a good practice to limit methods to things that cannot be implemented using container's interface (and, ok, maybe break this rule for convenice in case of very often or very typical methods). But FindIndex is far from frequently used or typical...
Mirek
|
|
|
|
|
GetIndex on Array
By: mdelfede on Sat, 22 September 2007 18:36
|
|
|
Re: GetIndex on Array
By: mirek on Sun, 23 September 2007 10:36
|
|
|
Re: GetIndex on Array
By: mdelfede on Sun, 23 September 2007 15:30
|
|
|
Re: GetIndex on Array
By: mirek on Sun, 23 September 2007 18:57
|
|
|
Re: GetIndex on Array
By: mdelfede on Sun, 23 September 2007 19:33
|
|
|
Re: GetIndex on Array
By: mirek on Sun, 23 September 2007 20:00
|
|
|
Re: GetIndex on Array
By: mr_ped on Sun, 23 September 2007 21:23
|
|
|
Re: GetIndex on Array
By: mirek on Sun, 23 September 2007 21:36
|
|
|
Re: GetIndex on Array
By: mdelfede on Sun, 23 September 2007 23:03
|
|
|
Re: GetIndex on Array
By: mirek on Sun, 23 September 2007 23:32
|
|
|
Re: GetIndex on Array
By: mdelfede on Mon, 24 September 2007 00:13
|
Goto Forum:
Current Time: Mon May 06 11:21:29 CEST 2024
Total time taken to generate the page: 0.03296 seconds
|