Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/26/19 in Posts

  1. dummzeuch

    How to replace text in every unit?

    Please note that there are known limitations with GExperts Grep Search on form files. A string will not be found if one of the following conditions is met: A string is split into several lines (in the form file) and the search string spans a line break (Bug #49). A string with special characters (e.g. Umlauts) is stored as 'bla'#nnn'blub' in the form file and the search string spans this special character (Bug #112).
  2. Sherlock

    Bluetooth not working with 10.3 on Mac?

    If that were the case we should at least be getting some decent burgers...
  3. Stéphane Wierzbicki

    Bluetooth not working with 10.3 on Mac?

    That's a *SHAME* Is EMB a 5 guys running business ?
  4. Ian Branch

    How to replace text in every unit?

    I use a tool call FAR, short for Find and Replace. http://findandreplace.sourceforge.net Its a free app and as long as your .dfm files are in text rather than binary, works a treat. HTH. Ian
  5. Vincent Parrett

    Blogged : Delphi Package Manager RFC

    @timfrost Thanks for your feedback. Funnily enough, I do exactly what you do with my array of third party packages right now, but it's not really optimal (even with a great tool like FinalBuilder 😉 ). Taking updates to packages is still problematic/manual and error prone, and this is really still a global thing rather than per project. I want to open a project in the IDE, and know that all my dependencies are present and correct, just we do now with nuget. As you would expect from a company that sells a CI Server, we do lots of CI builds, and building all the third party code from source with every build is painful to say the least, it almost doubles our build times. Building them once on install would speed up the build process dramatically. Of course there will still be the option to just use the source, and an option to turn off compilation on install. Authors/Vendors will have the option to choose what they distribute, source code, pre-compiled binaries or both, the option to compile on install (which users can override). This project is going to take some time, there are so many variables, every author/vendor does things differently, so we'll need to consider all the variables and come up with something that hopefully works for the majority. I don't have the power to force this on anyone, nor would I want to. I'm just trying to create some order out of the current random chaos that exists now.
  6. Primož Gabrijelčič

    How to pass a parameter to a certain stage of the pipeline?

    Forgot to write that? Oh, me! 😞 In this case, the code can just assume that the first value in the pipeline is a database name: function Build_DbInserterStage(const ADatabaseName: string): TPipelineStageDelegateEx; begin Result := ( procedure(const input, output: IOmniBlockingCollection; const task: IOmniTask) var ovIN: TOmniValue; DB: TxxxDatabase; begin DB := TxxxDatabase.Create(); DB.DatabaseName := ovIN.Take; for ovIN in input do begin // ... insert downloaded file end; DB.Commit; end); end; In more general terms you can declare your special messages which carry metadata (database name) instead of a normal data (to be operated upon). The worker thread can then check the type of the message and react accordingly. You can use TOmniValue's array support for that: pipeline.PipelineStage[3].Input.Add(TOmniValue.CreateNamed(['Type', 'Config', 'DBName', dbName])); pipeline.Input.Add(TOmniValue.CreateNamed(['Type', 'Data', 'Value', value])); for ov in input do if ov['Type'] = 'Config' then db.DatabaseName := ov['DBName'] else Process(ov['Value']);
  7. type TInfoType = (itProject, itContacts, itWorker, itWorkers); const cInfoTypeNodeNames: array[TInfoType] of string = ('project', 'contacts_info', 'WRK', 'WRKS'); begin Writeln(cInfoTypeNodeNames[1]); // will not compile Writeln(cInfoTypeNodeNames[itContacts]); // will compile end.
  8. jbg

    IDE Fix pack for Rio

    And another development snapshot is available. This time the functions in StyleUtils.inc (Vcl.Styles) got optimized what makes the UI rendering faster. IDEFixPackD103RegDev.7z fastdccD103vDev.7z
  9. It is never a good idea to increment the size by one. See this blog post: Extending arrays But otherwise: yes, you are being too pedantic. If this is in a tight loop, you might think of profiling which is faster, otherwise, it doesn't really matter. FWIW, I would do it like this (after Delphi XE7, IIRC): NewRecord.SomeField := SomeValue; // etc... MyArray := MyArray + [NewRecord]; No need for SetLength, Len or High
×