Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/21/20 in all areas

  1. I present a simple technique that uses a combination of generics and static class variables to map any Delphi type to a simple integer index. And why you would want to... https://blog.grijjy.com/2020/04/21/mapping-delphi-types-to-indices-at-compile-time/
  2. Hello, We are looking for an FMX developer, experience required. We are located in the Netherlands, but working remote is possible. This is a long term project for at least 3 days per week. Thanks, Kees Vermeulen, A-dato
  3. Tommi Prami

    FireBird tool, Coworker doing this, 2.0 just released

    Version 2.1.0 (April 20, 2020) - Added completion proposal options - Added hex editor for byte array fields - Added package and function objects for Firebird 3+ - Fixed application scaling option - Fixed completion proposal - Fixed document - Fixed grid control - Fixed SQL editor - Fixed SQL highlighter
  4. Firebird Editor Pro. Made with Delphi (for Windows) 2.0 just released. Have had few problems related to third party components, which Author is using. He is pretty fast on developing and if have ideas or feedback, he usually fixes them pretty fast. https://www.texteditor.pro/firebird/ Also check out his text editor, which I use along with Delphi to do many jobs that are easier to do with that, than using Delphi IDE. -Tee- PS. Not my app, so feedback directly to the author.
  5. Lars Fosdal

    Date in Android call log

    Aha - I assumed the UnixToDateTime did milliseconds - but it also requires seconds. If you change your code to CallTimeDouble := UnixToDateTime(Round(StrToInt64(DATEx)/1000), false); you should get local time, which for you is UTC + 3 ? So '1587377791601' is 2020.04.20 13:16:32,000
  6. Vincent Parrett

    Threading question

    That is in a separate repo - https://github.com/VSoftTechnologies/VSoft.WeakReferences
  7. David Schwartz

    Threading question

    @Kas Ob. it does not seem to make a difference. An AV is still happening. Maybe from something else.
  8. Vincent Parrett

    Threading question

    No, just as string fields in the record. Yes by value, they are wrapped in a class while in the queue, see TVSMessageWrapper<T>. You don't need to anything fancy, just create a message record type with the fields you want to pass around. We use have been using this library (or variations of if, I refactored it a few years ago) in FinalBuilder for a long time to send messages from the stepping engine to the UI and the logger and I've never seen any issues with message contents etc. There's a sample application (vcl and fmx versions) which shows it passing strings around just fine.
  9. Vincent Parrett

    Threading question

    Not sure how much scope you have to change things, but this is what I use for internal messaging from threads https://github.com/VSoftTechnologies/VSoft.Messaging - it uses custom messages rather than trying to pass data using wparam.
  10. David Schwartz

    Threading question

    FWIW, I'd like to think I have a better-than-average understanding of multi-threading. I spent the first 10 years of my career in the real-time machine-control world and even spent a couple of years working on a real-time multitasking kernel. The thing is, these platforms were all designed from the ground-up to do this, and they were very consistent and predictable. In contrast, I find Windows to be more of a swampy mess when it comes to multi-threading. And when you layer Delphi on top of that, it only gets worse. Thankfully, I have not had to deal with it much. So I do find this mess rather confusing to deal with. The fact that you guys keep arguing with each other about things that should be quite simple only points to the underlying complexity of how Windows offers up it's ugly, hydra-like threading models. It makes me feel like it's not just my own stupidity. But I do really appreciate the help. 🙂
  11. Bill Meyer

    Difference between Pred and -1

    Yeah, it's in the fine print. 😉 I learned that one only in the last few years.
  12. The task to extract the controls from a tab sheet or other part of a form into a frame is quite common. A requirement is the code affecting those controls being orthogonal in the first place. The I am able to copy all relevant properties, methods and event handlers from the form class into the frame class. After that I can copy the controls from the form designer into the frame. This usually keeps the event handlers wired. After verifying that everything still compiles I am able to remove all those properties, methods and controls from the original form and clear the event handlers so that they will be removed. All this are about three or four steps when using MMX. I am pretty sure that writing an expert able to do all this automatically will be pretty complicated and error prone. It might work for some simple cases, but probably not for medium sophisticated code.
  13. pro_imaj

    Delphi fmx comes standard in iOS font

    While I can specify the text family with the code below on the VCL side, I could not find out how to do it on the FMX side, so I can solve the problem in this way! Application.Initialize; Application.DefaultFont.Name: = 'Segoe UI';
  14. To write an expert that helps separate the UI from the logic would be far from trivial. I strive to write code that is testable, something that Steve McConnell's "Code Complete" drilled into me. My logic routines and biz objects are created without a UI, and the UI itself is connected afterwards. I make an effort to isolate the displayed data from the data that is actually used. I.e. a grid only reflects the underlying data, and all work is done on the underlying data and not the data in the grid itself. A checkbox state reflects the underlying state, and a change to the checkbox affects the underlying data - which then again applies any recalculations to states, and suggest a refresh of the display. The benefits: It is easy to write unit tests and integration tests for the biz logic. It is easy to reuse the code, or change the UI. It also simplfies changing the biz.logic as it is inside the "black box" object, and not heavily tied to the UI. If the tests says the object works, and the app doesn't work - the error is in the coupling between the non-visual object(s) and the UI. The drawback: There is a certain degree of data duplication - but the cost of that is quite limited. You can use proxy classes and/or Attributes/RTTI to associate elements between the non-visual and UI elements. Divide and conquer is good - but hard unless applied from the start on.
  15. Stefan Glienke

    Find record operators via Rtti?

    https://bitbucket.org/sglienke/spring4d/src/409cf53e4848815ac089763243469226b363d3be/Source/Base/Spring.pas#lines-3806
  16. Jacek Laskowski

    Variant to generic T, how?

    I'm blind, sorry and thx! 🙂
  17. Uwe Raabe

    looking for a lo-fi Delphi Style

    Perhaps someone can write a DFM-to-Balsamiq converter. It's pretty much just a SQLite database.
×