Jump to content

Clément

Members
  • Content Count

    245
  • Joined

  • Last visited

  • Days Won

    2

Clément last won the day on August 26 2019

Clément had the most liked content!

Community Reputation

108 Excellent

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

1601 profile views
  1. Since this is such sensitive debate, better set some base rules: no pulling hair no poking the eye no dropping hot coffee over the speaker desktop no high kick no low kick no wedgie let's try to keep this debate civilized
  2. Oh. Now See! I'll study the Semaphore implementation
  3. I'm looking for something like this... https://docs.microsoft.com/en-us/windows/win32/procthread/suspending-thread-execution "A thread can suspend and resume the execution of another thread. While a thread is suspended, it is not scheduled for time on the processor. If a thread is created in a suspended state (with the CREATE_SUSPENDED flag), it does not begin to execute until another thread calls the ResumeThread function with a handle to the suspended thread."
  4. I wrote a old listener derived from TThread, and I'm using Suspend/Resume when +100 connections are made. The code is simple : if (FThreadCount > _MAX_THREADS) and Assigned(FListener) then FListener.Suspend; if (FThreadCount < _MAX_THREADS) and Assigned(FListener) then FListener.Resume; The compiler is complaining both methods are deprecated. So... should I ignore the warning (W1000) or use a different approach to limit the connections? What would that be? Thanks
  5. Clément

    Delphi 11.1 is available

    Just installed 11.1! The installation ran smoothly ( uninstalling / reinstalling ) I used Web Installer. I compiled a few projects successfully. I really want to test the debugger! 11.0 was driving me nuts!!
  6. Have you received the "What's coming in RAD Studio" webinar? Having to answer to everyone is very time consuming, repetitive and unproductive task. Maybe it's easier for Emb to address the public from a single place: The Webinar. Hopefully they will tell us what's going on and what they are planning to do (Wiki, roadmap, next update, etc... ) Read more
  7. For a good solution you must work both ends. The application, the device and the connection between them can crash, this is why is very important to be able to query the device! From your application: 1. Write down some identification ( file, table record, etc) 2. Send the data 3. Store the answer ( delete the file, update record status etc) From the fiscal printer, in case of a crash you need to query the ID you sent: a. If file exists or record is in open state then read the ID and query the device for that ID status b. If data was not sent, the device will return with an error, in this case pick up from step 2 c. if data was sent, the device should answer properly, in this case start from step 3 If you can't query the device, you will get a half baked solution to your problem.
  8. Clément

    DocWiki.Embarcadero.com does Russian Roulette.

    It's tradition. Since newsgroup days Somebody shutdown THE server that could never be shutdown...
  9. Hello, I'm using D11 I need to create a custom highlighter with the following properties: * VariableList * FunctionList: must have () (open and close parenthesis) * Literals * constants Variables: SomeString, SomeInteger, SomeDouble should be highlighted as variable if they are in VariableList Functions: DateFormat( param1, param2 ), Date() should be highlighted as functions only when the '(' is typed; The following expression should be display like: c:\temp\DateFormat(Date(),"yyyy_mm_dd") and c:\temp\DateFormat( Date, "yyyy_mm_dd") // here Date is a variable I found some old code in the internet for older versions/branches of TSynEdit. I'm using the latest from Getit! Is there any example somewhere? Thanks
  10. Clément

    Interface question

    Why don't you use the TListView in Virtual mode (OwnerData := True)? Use the OnData event with Item.Index as your index and use an objectList like TStudentList = TObjectList<TStudent>; get the data from this list, for example: procedure TForm1.ListView1Data(Sender: TObject; Item: TListItem); begin var lStudent := glbStudentList[ Item.Index ]; Item.Caption := lStudent.Name; Item.Subitems.Add(''); // lStudent.Score1 ? Item.Subitems.Add(''); // lStudent.Score2 ? Item.Subitems.Add(''); // lStudent.Score3 ? Item.Subitems.Add(''); // Total ? end; Remember to "feed" your listview using the count property: MyListVview.Items.Count := glbStudentList.Count; This assignment is required everytime you add or remove a student from the list.
  11. Have you tried: TBook = Class End; TNote = Class End; TBooks = TObjectList<TBook>; TNotes = TObjectList<TNote>; TSerializeJSON<T : class> = Class private public function ToJSON<T : Class>( aList : TObjectList<T> ) : String; End; And call it : procedure TForm56.FormCreate(Sender: TObject); var lNotes : TNotes; S : TSerializeJSON<TNote>; begin S := TSerializeJSON<TNote>.Create; Memo.Lines.text := S.ToJSON<TNote>(lNotes); end; This is just to give you an idea. I just compiled and posted
  12. Have you tried to use val ? ex: val('1287653.3', yourFloat , InvalidCharIndex ); Val converts a string to a numeric value. The Result argument can be an integer, Int64, or floating-point variable. If the conversion is successful, InvalidCharIndex is zero. Otherwise, the value of InvalidCharIndex is the string position where Val first detected a format error. Val is not a real procedure.
  13. Hello, This suite is designed to keep devices online during active hours and optionally turn them off, both manually or automatically. The client app can configure each devices properties like hostname, MAC address, active hours, shutdown hours and allows to wake-up or shutdown several devices when needed with a button click. In case of an emergency, you can shutdown all devices. If the service is installed and running, each device will be checked and woke-up (or shutdown) automatically using the active hours and shutdown hours. NB: You must configure WOL properly in your OS and BIOS! You can check it out at https://www.dhs.com.br/dhsWOLSuite.html It's free! Save up energy! Don't keep machines up and running if they aren't required. Save the Planet!
  14. I've been testing Delphi 11 with small projects, just because their are simply to migrate and test. Although most features are working fine, some bug are very annoying and counter productive. 1) Code refactor: Is not working fine. There are methods (or classes) that kept the old name. For example, I'm renaming a class with several methods. Only part of them gets renamed in the same unit. Nothing happens with external references. I have to check manually or "Compile and Fix" the bad refactored code. 2) LSP: It's hard to describe. There's clearly an improvement but something got broken in the way. Lot's of curly lines are shown where code is fine. I have to close/reopen the IDE. If I refactor a method name for example, The new name will get red curly lines. After adding units or refactorying code, there are so many curly line is hard to pin point what is correct and what's not. Once the project compiles, I have to restart the IDE for those curly lines to disappear. 3) Delphi 11 Help need some help.. again 😞 4) When debugging Inline var the wrong value is displayed but the routine works as expected, i.e, the value is correct. 5) Incremental searching components (component palette) is very slow. Someone forget to use BeginUpdate/EndUpdate? 6) When closing the IDE there's this error that pop's once in a while. The projects I'm working are very simple, and I'm using valina components from the IDE ( TControlList, TControlListButton, SVG Images from ethea, ICS ), in fact the same components/source code are shared with 10.4.2 (which is working fine) On the other way... 1) Delphi 11 generates faster and smaller code. 2) The IDE design is the best, snappier, no more flicking, and very fast! I really enjoy working with it 3) The class helpers for TDatetime and currency are great! 4) the debugger improved a lot and displays correctly (most of the time) generics and complex structures, both in 32 and 64 bits. 5) Getit is great! I will continue migrating my small projects to Delphi 11, but I will wait for a patch before considering Delphi 11 as my main IDE.
  15. Clément

    TFDQuery Async execution aborts with out of memory

    Good news! I'm calling TFDConnection.AbortJob from an instance in the main thread, and it is aborting the query running in another thread! How cool is that! Also I manage to catch the out of memory error in my default Query execution flow! The application remains stable even after the out of memory
×