Jump to content

Anders Melander

Members
  • Content Count

    2265
  • Joined

  • Last visited

  • Days Won

    117

Everything posted by Anders Melander

  1. Anders Melander

    gridlines in listboxes

    Since you don't want to hear about alternatives the only solution you have is owner drawing the listbox. A Google search would have given you that answer and it would also give you examples of how to do it. Start here: https://docs.microsoft.com/en-us/windows/win32/controls/about-list-boxes ...or simply use a TListView.
  2. Anders Melander

    Testing out DirectOffice Library

    Okay. I thought that maybe the typelib you're using had its own declaration of IComparable. I'm guessing the IComparable stuff is a mistake made by the typelib importer. It doesn't make much sense to me otherwise. Since you're using dispatch interfaces (i.e. late binding) anyway the solution could be to simply access the properties through IDispatch and ignore the concrete interface declarations. You can do this quite easily by using the OleVariant type: var Fontsize: OleVariant; begin Fontsize := CoDocumentFormat_OpenXml_Wordprocessing_FontSize.Create; Fontsize.Val := '40'; end; This is basically the way VB does OLE automation.
  3. Anders Melander

    Testing out DirectOffice Library

    Can you show us the declaration of IComparable ?
  4. Anders Melander

    TJSONObject.Format bug

    From what I can see, by reading the source, the only place SysUtils.Format is called is in EJSONParseException.Create. TJSONObject.Format ends up calling TJSONString.ToChars to encode the chars and I can't see anything there that would choke on %. Regardless, it would be trivial for you to look at the call stack when the exception occurs to determine where SysUtils.Format is called from.
  5. Anders Melander

    Can one include a TDataModule in a console application?

    What errors?
  6. Anders Melander

    Sorting question

    Plastic Merge can do move detection. You might have more luck with that. https://www.plasticscm.com/features/xmerge
  7. I can save you 70 minutes there. The key point of Chandlers Efficiency talk is "Cache locality is very important". The remaining 60 minutes are just circus IMO.
  8. Anders Melander

    Two Lists synchronised movement

    Why not just set the absolute scollbar position of the listbox based on the position of the checklist scrollbar position?
  9. Anders Melander

    Stratched image is wrong if bmp dimention >32767 (RAD2007)

    Hardly relevant since it's about GDI+. They are not the same. pfDevice creates a DDB while all the other create DIBs. I don't know why you would prefer DDB when you're working with bitmaps that large. Use DIBs instead. They are backed by virtual memory. There are way too many unrelated things going on in your example for me to investigate it. Instead of juggling different bitmaps just size TImage->Picture->Bitmap and draw on that.
  10. Anders Melander

    Stratched image is wrong if bmp dimention >32767 (RAD2007)

    I don't think the problem is in the VCL. As far as I can see the calculations done by TImage, TBitmap & TCanvas are correct and should not overflow. It would help if you could show what the problem looks like.
  11. Anders Melander

    Few do-not in website

    I don't get this moaning about the captcha at signup. AFAIK it's an standard option in JIRA so it's easy to turn on or off. There's no effort involved. My physic powers are limited so I don't know why they chose to enable it but I'm guessing they had a good reason. Apparently others know better. I agree that it would be better to have the captcha above the input field but it isn't really something I can get upset about. Click another field, read the image, enter the text and move on.
  12. Anders Melander

    Few do-not in website

    It's Atlassian. If you want to customize the UI you will have to modify the source and probably recompile JIRA. I think Atlassian invented suckage. Embarcadero has customized it a bit but I'm guessing they did that by tweaking the CSS. Here's what the standard JIRA Server 7 (they're on v6) login looks like: So your browser is able to autocomplete captchas? Impressive! Must be that there new artificial intelligence thing I've been hearing about... 🙂
  13. Anders Melander

    Few do-not in website

    The login looks like the standard JIRA Server login page so it's probably designed by Atlassian. While they're not known for their usability skills I don't see a big problem with it. You can blame the autocomplete on your browser. As far as the tracking on the main site goes, yeah that sucks. Luckily Firefox blocks all of it.
  14. Anders Melander

    Stratched image is wrong if bmp dimention >32767 (RAD2007)

    Try Graphics32: Use a TBitmap32 with a memory backend (instead of a GDI backend) and display it with a TImage32/TImgView32 control. That of course requires that the bitmap is 32-bit or that it's feasible to convert it to 32-bit in order to display it.
  15. Anders Melander

    Structured Difference Viewer added to MMX Code Explorer

    What is is that makes is a structured difference viewer? Looking the screenshot in the first post I don't see much structure there. I mean, the diff tool I use would have picked up on the fact that two of the lines in the original file had been embedded into a block in the changed file.
  16. Anders Melander

    Structured Difference Viewer added to MMX Code Explorer

    Compile it with madExcept and run. Investigate bug report. Profit!
  17. Anders Melander

    Fail faster than calling Connected := True?

    It's been a while since I last wrote a briefcase enabled database client, but AFAIR TClientDataSet has all the required functionality and doesn't require (but can use) a middle tier.
  18. Anders Melander

    OleSetClipboardData and delayed rendering

    Yes, forget what I wrote. I got things confused.
  19. Anders Melander

    OleSetClipboardData and delayed rendering

    The clipboard will synthesize some formats from others (e.g. CF_TEXT from CF_UNICODETEXT) but only if the target asks for that format and only if the source hasn't already provided it. See Synthesized Clipboard Formats. Did you remember to specify zero for the hMem parameter of SetClipboardData? - and do you handle the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages?
  20. Anders Melander

    OleSetClipboardData and delayed rendering

    Works for me. Here's what I'm seeing when I copy to the clipboard using the Drop Target Analyzer from the D&D Component Suite: I copied to the clipboard (blue bullets) and after a while (3.6 seconds) I pasted from the clipboard. The red bullets indicates the calls made from the drop target to the drop source. The list on the right are the data formats requested by the drop target. As you can see there are no calls made on the IDataObject until I paste from the clipboard. Here's the corresponding view from the drop target (the Drop Source Analyzer): Maybe you have an application running which monitors and reads from the clipboard?
  21. Anders Melander

    Fail faster than calling Connected := True?

    Why not just set the database connection timeout to the desired max. Connecting to the server with some other method fileshare/port 3050/whatever amounts to the same thing. The only reason they can get the result faster is that they have a smaller timeout defined.
  22. Anders Melander

    Fail faster than calling Connected := True?

    I think your only option is to lower the connection timeout if you want it to fail faster. The timeout is there for a reason so lowering it will also mean that you become less resistant against connection issues. Don't try to use the file system to verify the existence of the DB server. The server might not have the required ports open or the file sharing service available. Perfectly normal (and good sense) for a DB server. You could try to do a ping against the server but again, there's no guarantee that the ICMP service is available and you will still have the same problem of not knowing if lack of response means the server is down or if it's simply a transient connection issue.
  23. Anders Melander

    'as' operator??

    I think Pascal Analyser is wrong in this case. If PaPInAddr is a pointer type then 'is' and 'as' can't be used since these only operate on object types (i.e. object references/pointers).
  24. A memory mapped file can not be expanded. By design. Of course you can emulate expansion by closing the current view, expanding the file and then mapping the file again, but that is not a safe operation as any existing pointers to the old view will now be invalid.
×