-
Content Count
1264 -
Joined
-
Last visited
-
Days Won
26
Everything posted by David Schwartz
-
I haven't looked at the code, but is there anything special about the DHTML components that's required? TMS has a new lib, TMS FNC WX PACK, that includes TTMSFNCWXHTMLMemo (among other things). If I had to guess, you might be using the Observables to act as setters / getters for the HTML tags. The TMS FNC components are universal components and work in all platforms that Delphi supports. Specifically in this case, they work in WebCore (and WebCore VSC), which translates Delphi into javascript. You can get access to the js in several ways at the Delphi level. I think an interface library that works in WebCore and uses TTMSFNCWXHTMLMemo would be fairly easy to write. As for a regular VCL Delphi app ... not sure.
-
How do you know there are exactly 8 (or 'n') CPUs?
-
I've got a couple hundred pages of PDF files in many documents and someone said they need me to put some ID numbers in the footer or a margin of every page. Ugh. I don't have Acrobat and I'm not going to buy it just for this. I've also used several PDF libs and I know they can be used, but again, they cost about what Acrobat costs. (I don't have access to any of them myself.) Is there a simple PDF library for Delphi that I can use to put a small rectangle with a string in it onto every page in the same location on each one? Kinda like printing a bunch of stickers and then putting them on each page in the same place (eg., vertically in the left margin)
-
the paperwork can be submitted via FAX or printed and sent via snail mail. FAX is easier. My sister solved the problem with NitroPDF and combined all of the documents into a single large document, then added a header in the top margin with the required info.
-
No. It's a bunch of paperwork the bank wants that's already in PDF files, including a few years of tax returns. They want an ID printed on every page of every PDF, then FAXed to them All the same info on every page in the same place. I wonder how long it will be before banks move their data systems into the 21st Century?
-
RzBalloonHints isn't working for me. It just shows a yellowish rectangle instead of a balloon regardless of the ShowBalloon property setting. Can anybody working with the Raize Components (whatever they're called now) verify if this works for you or not? (I've got D10.4.2 with the latest V7.0.0 components installed. Haven't had trouble with any others, just noticed this one is behaving oddly.)
-
what's the image list for?
-
that works, but it's not nearly as nice as the Raize one. It's just the same rectangle with a tiny little "thumb" pointing down and to the left. And I have to put one on every form.
-
nope. I read the help page and didn't notice that. The Raize one does it automatically. I'll give it a try.
-
Yup, TRzBalloonHints is what I meant. I changed the post, but can't change the title. I didn't notice a TBalloonHint component. I'll check it out. ---------------- Nope, that displays the hints exactly the same as if it's not there. I have no style set up or anything that should be affecting these components.
-
I want a simple form with a button that lets me switch the internet connection on and off. Is there an API call for that? I've got Windows 10 and I HATE IT!!! No matter what I tell it as far as not updating stuff, it just goes along its own merry way and is constantly downloading crap and then telling me, "Oh, sorry, we need to reboot. Back soon! Bye!" I don't use the internet that much, and it's running inside of a VM anyway, so I figure I'll just turn on the ethernet port when I need to reach out, then turn it off when I'm done to keep Gates, er ... gated.
-
enable/disable the internet connection?
David Schwartz replied to David Schwartz's topic in Windows API
If you consider "2 weeks" as "old". It's constantly updating itself, I can't see how it can be "old". I don't use it every day but it seems to want to restart every couple of weeks. This is the virus calld "MSWindows10" that never sleeps for more than 10 minutes. It's my own copy running in a VM. It's isolated from everything, and if it blows up I just restore it from backup. I don't want no stink'n updates! They tend to screw things up while doing absolutely nothing to make my work any better. There are no corporate policies at work here. But the past few places I've worked who provided me with laptops rebooted weekly, sometimes multiple times a week, installing stuff. I never had a say in any of that. This one's mine, and I don't like that it's constantly doing stuff without telling me what's going on. Windows 7 rarely did this. I'm a developer, and I don't like having maintenance done on the building while I'm working in it just because someone somewhere reported a problem in a similar building. There are enough instablities in Delphi! I don't need OS stuff getting replaced that leads to other problems that sideline me for hours tracking them down. Edition Windows 10 Pro Version 20H2 Installed on 10/14/2021 OS build 19042.1288 Experience Windows Feature Experience Pack 120.2212.3920.0 -
enable/disable the internet connection?
David Schwartz replied to David Schwartz's topic in Windows API
Yes, that's what I want -- to be able to run stuff like this manually. -
enable/disable the internet connection?
David Schwartz replied to David Schwartz's topic in Windows API
I finally figured out how to shut off the auto-updates. It requires you to make changes to the system policies. So I don't have to shut off the internet connection to prevent it from downloading stuff automatically any more. Now I'd just like to know how to tell Windows 10 to stop doing undisclosed background processing after some amount of idle time. Maybe that's another system policy that needs to be edited... (It seems if you don't do anything for 10 minutes or so, it starts doing some housekeeping activities. It suddenly starts chewing up a bunch of CPU time which makes my computer fan start hissing, like a tea kettle coming to a boil.) -
REST API Server. Why do we need it? How to implement REST API Server? Pros and cons.
David Schwartz replied to Serge-Pilko's topic in Network, Cloud and Web
Why is this thread under "Windows API" instead of the one that deals with REST and other web services? -
Interfaces, Factories, Dependency Injection under D2007?
David Schwartz replied to Javier Tarí's topic in Algorithms, Data Structures and Class Design
I believe the line is drawn at D2010 because that's when generics were introduced into the language. Due to bugs, some stuff won't work before XE4 or so. -
I've got a situation where I have a bunch of combo-boxes where the user can define conditions for rules that are applied to set attributes on a big grid of "buttons" that are used to display the state of different things. (Sort of like if you had a grid and each row has combo-boxes to select what goes in a cell. But in this case, there's a row of them at the top and data is read / saved from / to a selected row in the grid.) There are a half-dozen combo-boxes, a few edits (for literals), and a couple of check-boxes for options. The user selects the factors he wants for a rule, then saves it to the grid. (Actually, I'm using a ListView in this case.) This is a "rule editor". At "run-time", we get some data in and it gets processed by going through each row in the list and applying all of the rules to set how each button looks. There's one record per button. I created an interpreter that loads up groups of rules and processes them for each record. Given that Delphi doesn't support the use of strings as discrimanents in Case statements, what do folks do to deal with this? I've seen a dozen or so approaches over time. But in this case, I'm looking for a solution that's best suited for rapidly going through a list of rules for each incoming record. It's sort of like a table-driven parser in that respect. You need to have a map to get from the list of strings to associated integers, then use the integer values in the Case statement. In my first approach, I made the mistake of tying everything to the UI components. They're used to create and edit the rules. But when processing the data, loading each rule into the UI elements is completely unnecessary since the user isn't interested, and there's really nothing to see. I want them to simply click a button and a form pops up with a grid and all of the buttons have what they want displayed on them. The nice thing about using the combo-boxes is that you can use the ItemIndex property instead of the string in the Text property. That is, the mapping is built-in. Ideally, what I'd like is something like the syntax that the awk language offers, which sort of like a Case statement where you get a string and it falls-through a list of regular expressions. Each one that matches runs a block of code next to it. Maybe there's an interesting way of compensating for the inability to use strings with Case statements that I'm not aware of. Right now I've just got a bunch of Case statements that use a stringlist to map strings to integers. But if I change the list, I have to re-number the lines in the Case statement. Grrrrr (Yes, I know it's best to add things at the end, but I'd prefer to have things either sorted alphabetically or organized in semi-related sub-groups. I don't like having the damn programming language impose restrictions on how things appear to users!) As I think about it, what might be best is something that lets me add items to a list with a string (key) and an anonymous method that does something when that key is found, corresponding to what a string-based Case statement might do, or even what awk lines do (just more verbose).
-
awk-like processor using Delphi code?
David Schwartz replied to David Schwartz's topic in General Help
What is HCL? Is there a button or graphic that I can display things on and format the BG color, Font attributes, display text, some smileys, etc? -
awk-like processor using Delphi code?
David Schwartz replied to David Schwartz's topic in General Help
sort of, but Delphi doesn't support CSS in forms. I know there are some components that support HTML, but ... CSS? -
awk-like processor using Delphi code?
David Schwartz replied to David Schwartz's topic in General Help
Thanks, I'll give that a try. -
What is part of your contiuos integration?
David Schwartz replied to Mike Torrettinni's topic in General Help
My last job I built a tool that integrated git into our workflow. Boy did it save a ton of errors and ensured we all did things the same way. It was a kind of "dashboard" that I did my work through. I also integrated a bunch of things that I found myself doing very regularly in my daily tasks. They were all very specific to the work we did, but it was extremely repetitive and automating parts of it made a huge difference. But the biggest benefit was with git, for sure. -
How do *you* test ?
David Schwartz replied to david_navigator's topic in Algorithms, Data Structures and Class Design
I use both approaches. Some bits of code let you take a fairly piecemeal approach, like what you describe. Others require quite a bit of code to be written before you can do much of anything. In the latter situations, I'll often do compiles just to look for typos and missing declarations, but 10.4.2 is quite good at highlighting various things with background parsing. Getting "clean code" that compiles is one thing. Making sure it does what it's supposed to is something else. Sometimes I'll build just enough UI scaffolding to let me play with bits of code as it evolves, but I'm not a fan of "Design for Test" so I don't make independent tests. UI-driven stuff either does what you want or it doesn't. I don't see the need for separate test code. The vast majority of what I do is UI-driven, so I don't even bother with unit tests. They are best for libraries. (I've often wished there was a way to add meta-methods to classes, like test meta-methods that you could add for testing. But often they need to be run at a higher level. Sometimes it makes sense to have integrity tests that check to ensure certain combinations of data members are provided and that nothing is out-of-range, but they'd still be called by higher-level functions. TForms for data entry use let you do this a little with Validate methods.) That said, I'll frequently add treeviews or listviews or memos to let me visualize results as I'm adding things. And sometimes things don't look as nice as I originally thought, so I'll change them. -
Found and remove unused uses units
David Schwartz replied to shineworld's topic in Delphi IDE and APIs
ahh, well then use the Peganza Analyzer Lite. (It used to be called Icarus.) That's what it's for. -
Found and remove unused uses units
David Schwartz replied to shineworld's topic in Delphi IDE and APIs
Just comment out a line then save the file. The ones that are needed will be added at the end. No compilation needed. -
yeah, but they keep paying their annual maintenance. If they'd tell EMBT they won't renew until a better job is being done on fixing the last release instead of just rolling the existing issues forward and then piling on more in the next release, they might actually do something to address this. It has been their SOP for years now!