Jump to content

Ian Branch

Members
  • Content Count

    1272
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Ian Branch

  1. Ian Branch

    Strange one with zLib..

    Hi Lajos, Great call. I found that if I had the System.Zlib after the VCL.Graphics, all is fine. Before and I get the issue. Tks for the assist. Regards, Ian Edit: I didn't need VCL.Graphics in the library anyway. 😉
  2. Ian Branch

    Loop a Delay in a thread??

    Hi Remy, Yes, seriously. I don't really understand what goes on in Threads and therefore what you can and can't do. I am still learning about them. p2k, Tks. I will have a look. Tks to both of you. Regards, Ian
  3. Ian Branch

    Anything in a TMemoryStream??

    Hi Team, I am ostensibly sending a PDF file to a TMemoryStream. How do I test if the TMemoryStream has been 'loaded'? Regards & TIA, Ian
  4. Ian Branch

    Anything in a TMemoryStream??

    Ahhh. Yes. m.size. Shoulda thought of that. Tks. Ian
  5. Ian Branch

    I'm missing some nuance..

    Hi Team, I want to be able to make a generic function like this.. function SetDBSessionNames(const ComponentCount: Integer; const Components: TComponent; const sSessionName: string): boolean; begin // for var i := 0 to ComponentCount - 1 do begin // if (Components[i] is TEDBSession) then (Components[i] as TEDBSession).SessionName := sSessionName; // if (Components[i] is TEDBDatabase) then (Components[i] as TEDBDatabase).SessionName := sSessionName; // if (Components[i] is TnlhTable) then (Components[i] as TnlhTable).SessionName := sSessionName; // if (Components[i] is TnlhQuery) then (Components[i] as TnlhQuery).SessionName := sSessionName; // if (Components[i] is TnlhScript) then (Components[i] as TnlhScript).SessionName := sSessionName; // end; // end; That would be called like this.. // SetDBSessionNames(ComponentCount, Components, sSessionName); // The function is in a separate function library. Unfortunately it doesn't like "Components" in the if.... lines. 😞 I have obviously missed or misinterpreted some aspect. Some assistance/guidance would be appreciated. Regards & TIA, Ian
  6. Ian Branch

    I'm missing some nuance..

    Now we're getting fancy. 😉 But I like it. 🙂
  7. Ian Branch

    I'm missing some nuance..

    Hi Renate, That looks like a winner but this.. SetDBSessionNames(Self, sSessionName); Gives me this in this case.. In this case it is a Datamodule the function is being called from. Ian Edit: Solved - I made it an overload method and created one that use a TDataModule.
  8. Ian Branch

    I'm missing some nuance..

    Tks Keesver. That calms down the function itself, but now the calling function isn't happy What replaces Components in the calling function? SetDBSessionNames(ComponentCount, Components, sSessionName);
  9. Hi Team, I have a TListview that currently looks like this. I have tried to set the first column to Center justify but it keeps reverting to Left Justify. 😞 What I would like is for the first column to be center justified, and the second colmn's header to be center but the rest of column to be right. I would also like the Header font to be Bold as well, but there doesn't appear to be any 'Font' related property. 😞 Is this doable? If so, how please? Regards & TIA, Ian
  10. Hi p2k. Unfortunate. It offends my OCD. 😉 Ian
  11. Ian Branch

    Formatter doesn't work in a Unit??

    Is there a reason the formatter, CTRL-ALT-F, doesn't seem to work in a Unit without any Form? Or is it a Bug? Ian
  12. Ian Branch

    Formatter doesn't work in a Unit??

    Done..
  13. Ian Branch

    Formatter doesn't work in a Unit??

    Yup. Confirmed. Remove the comment on line 22 and the Formatter works on mine as well. In fact, if you have a comment on the end of any of the declarations, the Formatter fails. Whether it is a '//' or a '{ }' style comment. A strange thing. Thomas, You want a bug report? [edit] Bug Report submitted. Oooops! It went in as a feature request rather than a bug report. 😞 My Bad. Ian
  14. Ian Branch

    Formatter doesn't work in a Unit??

    😞 It works for me on all other units except for this one. 😞 OK. Thanks for your time. It is only a small one so no biggie to keep it formatted manually. Thansk to all for your input & support. Regards, Ian
  15. Ian Branch

    Formatter doesn't work in a Unit??

    Agreed, but it still has its quirks. 😉
  16. Ian Branch

    Formatter doesn't work in a Unit??

    Tks.
  17. Ian Branch

    Formatter doesn't work in a Unit??

    How would one identify a 'strabge character' out of the multitude?
  18. Ian Branch

    Formatter doesn't work in a Unit??

    I am using D11.3, GExperts 1.3.23.4026.
  19. Ian Branch

    Formatter doesn't work in a Unit??

    OK. I give up. What is it in the attached that the Formatter doesn't like?? GITLAKLib.pas
  20. Ian Branch

    Formatter doesn't work in a Unit??

    OK. My apologies. It does. Just not on my Function library unit. 😞 Investigating. Apologies again. Ian
  21. Ian Branch

    Formatter doesn't work in a Unit??

    I feel a Bug report coming on.... 😉
  22. Ian Branch

    Capture Ctrl-Click on a TButton?

    Hi Team, I have a TButton that does one thing, I want to capture a Ctrl-Click on that button so I can have it do some preprocessing before continuing. How can I do that please? Regards & TIA, Ian
  23. Ian Branch

    Capture Ctrl-Click on a TButton?

    Tks Thomas. Ian
  24. Ian Branch

    Thank You!!

    To all, Over the years I have used this Forum a lot. It has allways been a source of information. Some great, enilightening, educating, some not so much. ;-) What has never failed, is to get an answer/help/advice when needed. I am a strong believer in the saying.. "There are no stupid questions, only stupid answers." So, to all of you who have helped and responded to User's questions, issues, etc. And in particular to those that have responed to my inane, sometimes ignorant, questions/issues. A very large THANK YOU! THANK YOU! THANK YOU! All very much appreciated. Regards, Ian P.S. I'm sure I have many more questions/issues to come. :-)
  25. Hi Team, Win 11, D11.3.1. I experienced this a while ago, pretty sure I asked the question here, but I don't recall ifthere was a resolution. Twice in the past week two different Apps have had their DB components lose their connection to their datasource. As in the Datasource entry in the components is empty. All of them. I have had to reconnect all the components to their datasource. Oh the pain!! It isn't just one datasource either. There are a couple of datasources involved that get lost. Has anybody else experienced this? Does anybody have any suggestions as to what might be causing it? Regards & TIA, Ian
×