Jump to content

Berocoder

Members
  • Content Count

    79
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Berocoder

  1. Berocoder

    IDE Code Coverage Plugin available

    Good that you manage to fix problem with Toolbar The big 5 mloc project also have a Testproject. I know only a fraction of code is executed in testproject. So I am curious how much. 0.1, 3 or 10 % of all code ? But I also understand now it is technically challenging to get a code coverage of whole project. Reading https://github.com/magicmonty/delphi-code-coverage/blob/master/CodeCoverage/BreakPoint.pas now It use opcode $CC Is it the same kind of breakpoint you use ? Could be there is no silverbullet to get full code coverage without major speed penalty
  2. Berocoder

    IDE Code Coverage Plugin available

    Does it understand Delphi source ? URL ?
  3. Berocoder

    IDE Code Coverage Plugin available

    Ah ok. I am sure it will be slow. I have been looking for a tool that cover a whole project for Code coverage. There is https://github.com/magicmonty/delphi-code-coverage. I had a memory there was some kind of problem last time I tried. Maybe I should look again. But still impressive work with your plugin! Regards Roland
  4. Berocoder

    IDE Code Coverage Plugin available

    Yes the Toolbar is not working in Sydney. But can still use hotkey so no big deal. I have to manually mark each method to enable code coverage. Is it possible to just enable all code in a project for code coverage? My project have about 5 mloc with thousands of methods. It would be handy 😊
  5. Berocoder

    IDE Code Coverage Plugin available

    Great, will try it now [EDIT] I tried to clone the repo, compiled it and install. I got this error --------------------------- CodeCoverage - Delphi 10.4 - Welcome Page [Built] --------------------------- Registration procedure, Codecoverage@Main.Register in package C:\Attracs\DelphiCodeCoveragePlugin\Packages\Delphi 10.4 Sydney\CodeCoverage270.bpl raised exception class EAbstractError: Abstract Error. Any clue ? /Roland
  6. Berocoder

    VCL Handling of dpi changes - poor performance

    Well in that case it would be the ultimate test of VCL DPI handling.😊
  7. Berocoder

    VCL Handling of dpi changes - poor performance

    Delphi IDE is built with Delphi?
  8. Berocoder

    VCL Handling of dpi changes - poor performance

    So most users here think VCL have poor implementaton for DPI on monitor changes. So what about other platforms on windows. Is it better handled in C#. Java, QT etc?
  9. Attracs company in Finland looking for Delphi developer. Our main application do transport planning and logistics. The office is in Kokkola. Now, most work is done remotely but hopefully, COVID-19 will end someday. So we would prefer someone in the neighborhood. We use Delphi Sydney, Bold for Delphi and Windows. Currently, we are 4 developers plus 2 consultants. In case you are a senior Delphi developer you can also work remotely as freelancer. Experience of ORM or Bold for Delphi is a merit. Ask for more details.
  10. I want to develop an own component for TCombobox. It should work like this: 1. User type something in the field2. User type magic keys, in my case ",," to trigger the search for typed characters3. My event OnTrig is called. That search in SQL in the database for the characters. So this can be any tables in the database and is customized per instance of the component.4. The list of hits is displayed in the combobox. If too many the first 99 hits is displayed5. The user picks one of the hits in the combobox. Now the event OnPick is triggered. That is, of course, different per instance and transform the hit to an object in application.Now could you give some general advice about how I should proceed? I have bought Devexpress VCL components so have source for that. Maybe better to use any of those comboboxes as base? Regards Roland Bengtsson
  11. Back in 2012 I made a petition to make Bold for Delphi open source. It is still there if anyone would like to sign https://www.change.org/p/embarcadero-technologies-release-the-intellectual-property-of-bold-for-delphi. The target failed as Bold is still closed source. IP is kept by Embarcadero. But I achieved one thing. I got attention from Embarcadero. They actually answered my mails when the petitions had some hundred signs. So my plan is the following. We make petition to get attention from Embarcadero. It should contain ideas what we their customers want Embarcadero to change. Ex, make a self-service portal for licenses. Focus less on features more on bugs. Make VCL opensource etc. But only a few points. We should focus of most important things and explain why this is important. Set up a shared document at Google docs Cooperate around the expressions. I am sure there are many here that can write exactly what we need in a clear manner Publish the petition Spread the word to as many as possible When enough signs are collected we contact Embarcadero 🙂 Another thing, who is in charge of Delphi at Embarcadero? I talk to Marco Cantu sometimes but he claim he cannot make big decisions. Is it some of these happy guys we should talk to https://www.ideracorp.com/leadership ?
  12. Berocoder

    Make attention to Embarcadero

    Yes, I corrected spelling. Anyway even if that guy is in charge of Delphi. I doubt he is reading this or other forums that people complaining about how things are handled. I think it is better to try do something concrete about it. I made an empty document here https://docs.google.com/document/d/1uxa9u09hE7tLEMau1Ld9OELJoTCTvxEyst6JY3yevzo/edit?usp=sharing Anyone can add and edit the ideas. What changes do we want from Embarcadero ?
  13. I just wonder why not people using VmWare or similar virtualisation for Delphi? Then you never have to move to a new computer and this problem is gone. A VM have also other advantages.
  14. Berocoder

    Unused local variables

    Yes our big legacy codebase of around 4 mloc take one minute to build. And we don't build from dcu's so that would be a nice improvement.
  15. I recently switched from Win7 and D2007 to Win10 and Delphi 10.1 Berlin. I use VmWare workstation VMs. Many new things to explore. But I noticed one thing. To open projects and forms is much slower now. I Googled it and found an older post claiming that rename livebinding bpl could improve speed. I am sure we will never use livebinding in our code. Any comments how to improve speed i the IDE?
  16. Berocoder

    Scaled windows behave differently

    I cannot find a link to create new account. Luckily I already have one...
  17. I found http://docwiki.embarcadero.com/RADStudio/XE2/en/Classes_and_Objects#Forward_Declarations_and_Mutually_Dependent_Classes I try to create 2 classes. Each of those have a reference to the other. unit TestA; interface uses TestB; type // TTestB = class; TTestA = class public M_TestB: TTestB; end; implementation end. unit TestB; interface uses TestA; type TTestB = class M_TestA: TTestA; end; implementation end. Got [DCC Error] TestA.pas(6): F2047 Circular unit reference to 'TestA' What is wrong here ? If I remove TestB from uses and add TTestB = class; I got this instead [DCC Error] TestA.pas(9): E2086 Type 'TTestB' is not yet completely defined
  18. Berocoder

    Forward declarations

    This is just an experiment, a proof of concept. The real model have about 460 classes. The relations between them can be - One to one - One to many - Many to many. In this case a new association class is used. So in reality this is two relations. Many to one association class. one (from association class ) to many. In some cases the relation is navigable only in one direction. In some cases in both. In some cases a class have a relation to itself. That's the situation now and it works. I just want to remove usage of inc-files for storing code to make development easier. Disadvantages with inc-files - Codeinsight in IDE don't work - Many tools to analyze source don't handle inc-files well. - IDE (bds.exe) tends to lock inc-files sometimes, This is random. So restart is required before project can be compiled. In spite of that we used the current solutions in fifteen years.
  19. Berocoder

    Changes in Parallel Library

    Make a small testcase to demo the bug so others can confirm it or point to error in code.
  20. Berocoder

    Forward declarations

    I investigated more now and unfortunately I don't get this as I want Declaration of TestAbstractB happen in unit TestA. I want to move it to unit TestB as there can be many classes that have references to that class. But then again I got [DCC Error] TestA.pas(6): F2047 Circular unit reference to 'TestA' as TestB have a reference to TestA. So I don't know. Using interfaces need huge changes in framework and insert Abstract classes don't work as I expected. So maybe we continue with original implementation with inc-files 🙂 [EDIT] Simple solution to that was to store abstract declarations in own unit. So far so good 🙂
  21. Berocoder

    Forward declarations

    Hm ok. Thanks for the advice 🙂
  22. Berocoder

    Forward declarations

    Btw, that means I have to typecast every access to the concrete class ?
  23. Berocoder

    Forward declarations

    The code I posted here is heavily simplified. I agree that cyclic dependencies is not good. But basically one class is one table in database for most cases. There is also some transient classes that reside only in memory. So this is about relations between classes. Many times I want to navigate both from class A to B and from B to A. For example class TPerson have a relation to TAddress. So to find the address: vAddress := aPerson.Address,AsString:; But to find the person who live at an address make also sense vName := aAddress.Person.AsString; So one way to break dependency is to use interface. But there are many questions left to work with as the whole framework now assume direct access. So I want to work with IAddress and IPerson instead of TAddress and TPerson. But at some point I must deal with the concrete class anyway. About abstract classes, that is a good point. But what happens with the inheritance chain. TObject TBoldMemoryManagedObject // inherited in framework TBoldFlaggedObject // inherited in framework TBoldSubscribableObject // inherited in framework TBoldElement // inherited in framework TBoldDomainElement // inherited in framework TBoldMember // inherited in framework TBoldObject // inherited in framework TBusinessClassesRoot // Dummy TAmObject // basic info TAmStateObject // have states TPerson // concrete class This is the inheritance tree for TPerson. Is it even possible to use a TAbstractPerson somewhere ?
  24. Berocoder

    Forward declarations

    See https://stackoverflow.com/questions/53980032/how-to-avoid-using-inc-files-for-code-with-delphi for more details. But I now believe that interfaces is the correct solutions instead of direct references between the classes.
  25. Berocoder

    Forward declarations

    Ok so basically it is not possible to have direct references in both directions between two classes if they are stored in separate units...
×