Re: [fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-12 Thread Philippe
solution may depend on the way the collection is used. load once? many inserts and deletes? ... the time you have to switch from one sort to another ... and the size of the collection ... you could - store the actual collection to a TMemoryStream, - destroy the collection, - Load then a

Re: [fpc-pascal] TProcess on windows: incompatibility between poUsePipes and InheritHandles:=false

2014-03-12 Thread Luca Olivetti
El 11/03/14 19:43, Luca Olivetti ha escrit: >> I have no explicit solution for you, but a few links that I hope can >> help you further: >> >> http://blogs.msdn.com/b/oldnewthing/archive/2011/12/16/10248328.aspx > > What surprises me is that it says that handles by default are > non-inheritable

Re: [fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-12 Thread Frederic Da Vitoria
2014-03-12 21:56 GMT+01:00 Jim Leonard : > On 3/12/2014 2:30 PM, Philippe wrote: > >> Type >> TMethod = ( method_type_1, method_type_2, method_type_3); >> > > Ah, clever -- create a Compare that switches based on what I tell it to > do. I like that, but as far as I can tell there's no way to tell

Re: [fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-12 Thread Jim Leonard
On 3/12/2014 2:30 PM, Philippe wrote: Type TMethod = ( method_type_1, method_type_2, method_type_3); Ah, clever -- create a Compare that switches based on what I tell it to do. I like that, but as far as I can tell there's no way to tell a TSortedCollection to "resort" -- it's kept sorted on

Re: [fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-12 Thread Philippe
using the example at http://acm.msu.ru/mkoshp/fpc/rtl/objects/tsortedcollection.html may something this way ... Type TMethod = ( method_type_1, method_type_2, method_type_3); PMySortedCollection = ^TMySortedCollection; TMySortedCollection = Object(TSortedCollection) method : TMethod; Fun

Re: [fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-12 Thread Jim Leonard
Sorry, some Turbo Pascal-isms in my initial mail -- I see that FreePascal's TCollection class has an explicit .Sort method so this helps me re-sort on demand, but it doesn't help me switch the Compare method. So, my question still stands. On 3/12/2014 1:51 PM, Jim Leonard wrote: I'm working

[fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-12 Thread Jim Leonard
I'm working on a project that utilizes a TSortedCollection to help keep items sorted during processing. There is a need to re-sort the collection by different criteria on-demand as the program runs. (Different sort orders are an integral part of the processing.) Unless I'm missing something,

Re: [fpc-pascal] RTL debuginfo on GDB 7.4+ and OSX Mavericks

2014-03-12 Thread Jonas Maebe
On 12/03/14 17:35, Dmitry Boyarintsev wrote: On Wed, Mar 12, 2014 at 8:01 AM, Jonas Maebe mailto:jonas.ma...@elis.ugent.be>> wrote: That's because no one has implemented a DWARF lineinfo reader for Mac OS X. There is only one for Stabs. Patches are welcome. Is there DWARF reader for ot

Re: [fpc-pascal] RTL debuginfo on GDB 7.4+ and OSX Mavericks

2014-03-12 Thread Dmitry Boyarintsev
On Wed, Mar 12, 2014 at 8:01 AM, Jonas Maebe wrote: > > That's because no one has implemented a DWARF lineinfo reader for Mac OS > X. There is only one for Stabs. Patches are welcome. > > Is there DWARF reader for other OS targets? Is it a matter of parsing the executable (and/or being smartenough

Re: [fpc-pascal] RTL debuginfo on GDB 7.4+ and OSX Mavericks

2014-03-12 Thread Jonas Maebe
On 12 Mar 2014, at 12:27, Joao Morais wrote: Hello list. I've just upgraded to OSX Mavericks. GDB is no longer installed with xcode5 so I downloaded, compiled and installed GDB 7.6.2 myself. I can debug my own programs, testcases and Lazarus packages if I use Dwarf debuginfo. However, RT

Re: [fpc-pascal] RTL debuginfo on GDB 7.4+ and OSX Mavericks

2014-03-12 Thread Martin Frb
On 12/03/2014 11:27, Joao Morais wrote: However, RTL which I compiled with "-gl" doesn't show filenames, procnames and line numbers anymore in the heaptrc output or stacktraces. If I compile RTL with "-gl -gw", GDB crashes with the following messages. Using FPC_2_6 and Laz_1_2 from yesterday.

[fpc-pascal] RTL debuginfo on GDB 7.4+ and OSX Mavericks

2014-03-12 Thread Joao Morais
Hello list. I've just upgraded to OSX Mavericks. GDB is no longer installed with xcode5 so I downloaded, compiled and installed GDB 7.6.2 myself. I can debug my own programs, testcases and Lazarus packages if I use Dwarf debuginfo. However, RTL which I compiled with "-gl" doesn't show filena