Jump to content

Leaderboard


Popular Content

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

  1. 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.
  2. David Heffernan

    IPV6 to number

    If that code would compile, then there wouldn't be much point in having the library. Think about what the literal on the rhs of the assignment actually is.
  3. Fr0sT.Brutal

    Exception.CreateFmt vs. CreateResFmt

    Noticed this hidden catch too so turned all my routines to use CreateFmt. Btw, the same goes for string concatenation raise Exception.Create('Error: '+ErrorText);
  4. @Isaac Badru: Welcome to our little english Delphi forum. I know it is tough to post in English, especially technical stuff. There are people from all over the world here, and for everyone to profit from all that knowledge we use the common language of Delphi...and English to explain what we try to achieve and what we don't understand or know. Please try sticking to English as there might be a fellow programmer who can't speak Portuguese but is either the absolute expert for the question you are asking or has the same issue and desperately needs help. Google translate or Deepl are adequate tools to help you create your posts in a way anybody can understand, and more importantly can search for using the engine of their choice. You will find that searching for the solution of a programming problem will yield more useful results when the search is done with English key words anyway (or Chinese, but that is a different story), so try to get used to it, and enjoy learning English on the way. I translated above text with https://translate.google.com and with https://www.deepl.com. Which one is better? Google says: Bem-vindo ao nosso pequeno fórum Delphi em inglês. Eu sei que é difícil postar em inglês, especialmente coisas técnicas. Existem pessoas de todo o mundo aqui e, para que todos possam lucrar com todo esse conhecimento, usamos a linguagem comum do Delphi ... e o inglês para explicar o que tentamos alcançar e o que não entendemos ou sabemos. Tente aderir ao inglês, pois pode haver um colega programador que não sabe falar português, mas é o especialista absoluto na pergunta que você está fazendo ou tem o mesmo problema e precisa desesperadamente de ajuda. O Google translate ou Deepl são ferramentas adequadas para ajudá-lo a criar suas postagens de uma maneira que qualquer pessoa possa entender e, mais importante, pode pesquisar usando o mecanismo de sua escolha. Você descobrirá que procurar a solução de um problema de programação produzirá resultados mais úteis quando a pesquisa for feita com palavras-chave em inglês (ou chinês, mas essa é uma história diferente), então tente se acostumar e aproveite o aprendizado Inglês a caminho. Deepl says: Bem-vindo ao nosso pequeno fórum inglês Delphi. Eu sei que é difícil postar em inglês, especialmente coisas técnicas. Há pessoas de todo o mundo aqui, e para que todos beneficiem de todo esse conhecimento usamos a língua comum da Delphi... e o inglês para explicar o que tentamos alcançar e o que não entendemos ou não sabemos. Por favor, tente manter-se fiel ao inglês, pois pode haver um colega programador que não sabe falar português, mas ou é o especialista absoluto para a pergunta que está a fazer ou tem o mesmo problema e precisa desesperadamente de ajuda. Google translate ou Deepl são ferramentas adequadas para o ajudar a criar as suas mensagens de uma forma que qualquer pessoa possa compreender e, mais importante ainda, pode procurar usar o motor da sua escolha. Você vai descobrir que pesquisar pela solução de um problema de programação irá produzir resultados mais úteis quando a pesquisa é feita com palavras-chave em inglês (ou chinês, mas isso é uma história diferente), por isso tente se acostumar, e aproveite para aprender inglês no caminho.
  5. Desculpa. Nao habla Portugeze, me.
  6. Dany Marmur

    FireBird tool, Coworker doing this, 2.0 just released

    I have been waiting for this! Downloading |\-/|\-/|... Thanks for the heads-up!
  7. One reason for using the CreateRes version over the normal Create is to avoid all of the additional code that the compiler generates to load the resource string before passing it to Create. An example to help demonstrate (compiled w/ 10.3.3 in Win32-Release configuration) procedure DoExceptRes; var lRes: Boolean; begin lRes := DoSomething; if not lRes then raise Exception.CreateRes(@MY_RES_STRING); end; 004EA78B 90 nop TestMain.pas.117: lRes := DoSomething; 004EA78C E8F7FFFFFF call DoSomething TestMain.pas.118: if not lRes then 004EA791 84C0 test al,al 004EA793 7516 jnz +22 ; $004ea7ab TestMain.pas.119: raise Exception.CreateRes(@MY_RES_STRING); 004EA795 B9B4A04E00 mov ecx,$004ea0b4 004EA79A B201 mov dl,$01 004EA79C A13C9B4100 mov eax,[$00419b3c] 004EA7A1 E886BFF3FF call Exception.CreateRes 004EA7A6 E8D1F9F1FF call @RaiseExcept TestMain.pas.120: end; 004EA7AB C3 ret procedure DoExcept; var lRes: Boolean; begin lRes := DoSomething; if not lRes then raise Exception.Create(MY_RES_STRING); end; TestMain.pas.125: begin 004EA7AC 55 push ebp 004EA7AD 8BEC mov ebp,esp 004EA7AF 6A00 push $00 004EA7B1 33C0 xor eax,eax 004EA7B3 55 push ebp 004EA7B4 68FFA74E00 push $004ea7ff 004EA7B9 64FF30 push dword ptr fs:[eax] 004EA7BC 648920 mov fs:[eax],esp TestMain.pas.126: lRes := DoSomething; 004EA7BF E8C4FFFFFF call DoSomething TestMain.pas.127: if not lRes then 004EA7C4 84C0 test al,al 004EA7C6 7521 jnz +33 ; $004ea7e9 TestMain.pas.128: raise Exception.Create(MY_RES_STRING); 004EA7C8 8D55FC lea edx,[ebp-$04] 004EA7CB B8B4A04E00 mov eax,$004ea0b4 004EA7D0 E8F755F2FF call LoadResString 004EA7D5 8B4DFC mov ecx,[ebp-$04] 004EA7D8 B201 mov dl,$01 004EA7DA A13C9B4100 mov eax,[$00419b3c] 004EA7DF E814BEF3FF call Exception.Create 004EA7E4 E893F9F1FF call @RaiseExcept TestMain.pas.129: end; 004EA7E9 33C0 xor eax,eax 004EA7EB 5A pop edx 004EA7EC 59 pop ecx 004EA7ED 59 pop ecx 004EA7EE 648910 mov fs:[eax],edx 004EA7F1 6806A84E00 push $004ea806 004EA7F6 8D45FC lea eax,[ebp-$04] 004EA7F9 E88202F2FF call @UStrClr 004EA7FE C3 ret 004EA7FF E998F8F1FF jmp @HandleFinally 004EA804 EBF0 jmp -16 ; $004ea7f6 004EA806 59 pop ecx 004EA807 5D pop ebp 004EA808 C3 ret Note how in the case where we just call Create instead of CreateRes, Delphi needs to generate a call to LoadResString within the context of our procedure in order to actually turn the resourcestring into a value that can be passed into Exception.Create. This isn't really an issue though because it only happens if we're actually going to raise the exception, and CreateRes will ultimately need to do the same thing internally. The issue comes from the fact that Delphi needs somewhere to put the string it gets back from LoadResString before passing it to Exception.Create. To that end it generate an implicit local string variable, and because strings are managed, and local variable have a scope covering the entire procedure lifetime, it wraps the entire body of our procedure into an implicit try...finally to ensure the string is cleaned up. As a result, we will incur the cost of this try...finally scaffold and the call to UStrClr every time we call DoExcept. Even if it never actually raises an Exception. A similar thing applies to the use of CreateFmt vs Create(Format(...)). The compiler will generate an implicit variable to store the result of the call to Format, and you will incur this overhead regardless of whether the actual call to Format ever happens. Whether or not this actually makes a measurable real world difference will depend on your use case, but it is worth being aware of.
  8. Der schöne Günther

    Windows 1909 screws with my PixelPerInch in Designer on HDPI

    He told Windows not to tell RAD Studio anything about the "true" DPI. Windows should "lie", pass 96 DPI and then handle the scaling on the operating system level, instead of the application level. Windows did so when using DPI scaling with 125% or 150%, but not with a "custom" 115%.
×