Jump to content

David Schwartz

Members
  • Content Count

    1191
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by David Schwartz

  1. David Schwartz

    looking for design ideas for an easily editable list

    I guess that would work. It also makes me think of accordion controls. No, that seems backwards. But I think I get your idea. 🙂
  2. What's the easiest way you know of to test predicate conditions of input parameters on methods and display a meaningful error message when one fails and skipping the rest, without using exceptions? Common situations include: * an input value is NIL or not * an input string is empty or not * an input numeric is < 0, = 0, or > 0 * an input object has a property like the above that includes that the object's reference pointer is valid I'm curious if there's a way to have a list of one-liners that are easy to read and aren't part of a huge nested if..then statement filled with and's or or's and terminated with a begin ShowMessage(...); Exit; end;
  3. David Schwartz

    handling predicate conditions

    I was looking for examples.
  4. David Schwartz

    parsing Google search results

    The only thing I could find was not what I was looking for. Do you happen to know which API returns the same results as running a query, and isn't limited to 100 queries per day?
  5. David Schwartz

    looking for design ideas for an easily editable list

    I appreciate these suggestions. Right now I'm just building a prototype of something and I don't want to get distracted learning to use a control for a something that might not even end up being used. I'm just curious what other solutions might be available ... how others may have solved this problem.
  6. David Schwartz

    handling predicate conditions

    You guys are all really great theoreticians. I'd really much rather see a variety of examples than debate theory. That's because I see very little written about this topic anywhere.
  7. David Schwartz

    handling predicate conditions

    Ahh, and example! Thanks! So how do you bail out of the procedure if a check fails? Does this throw an exception? Or is another test needed? @David Heffernan I'm actually fairly agnostic about Exceptions, It's just that they can be a PITA at times.
  8. David Schwartz

    looking for design ideas for an easily editable list

    Yeah, I've suffered through using that sucker a few times. I think it's more work than I want to put in. Any other ideas?
  9. David Schwartz

    handling predicate conditions

    No, I'm thinking about run-time errors here. Like, you cannot proceed without entering something in a Name field. You could say it's "required field" handling, but the form follows one set of rules, the back-end might follow one or two others, and they're all independent of each other. If you decide to change a field from required to options, or vice versa, you have to implement that logic in several different places, and it's not always obvious where they are. And it's hard to test for.
  10. David Schwartz

    handling predicate conditions

    Ahh, well ... I'm working on a form-based app, and the code I'm staring at isn't of the nature you're describing. But I see your point, for sure. Again, I'm looking for some examples, because the few I've seen don't take things like this into consideration. Historically speaking, these things get lumped into "error logging" mechanisms. If you're working with a server that has no display, then that's a valid perspective. But not so much in a form-based app -- you want to tell the user to fix the problem so processing can continue. Even in situations where the client-side code ends up passing improperly filtered data to the back-end, there needs to be a way to a message from the back-end that the front-end can then use to alert the user so the problem can be corrected. I don't see this much in desktop apps, even using DB servers. But boy do I see it a lot in web-based scenarios where a simple data entry error in one field causes the entire form to be reset and all of the previous data to be lost. (I was trying to enter some data into a site that asks for some work history, starting with the most recent / current thing. I added a couple then realized I forgot my "current" status. There's no way to enter something anywhere but at the end. After several attempts at moving things down, I just deleted everything and started over. Apparently there's a bug where if you check the box that says you're "currently employed" there, the back-end won't accept that, and it deletes the entire (first) entry, which is why i couldn't move things down. After deleting everything, it just left me with an empty list and no error message.) I see this same kind of problem repeatedly in web-based scenarios, and no consistent way of handling it. All these fancy frameworks and nobody seems to have a well thought-out way of handing these kinds of exceptions.
  11. David Schwartz

    handling predicate conditions

    Well, aside from a general sense that exceptions shouldn't be used for flow control ... Anyway, I'm looking for some examples as well. This is not a topic that is very widely discussed, although for lots of projects I've worked on, they've devised some kind of consistent approach, usually NOT based on exceptions. But many haven't, so you can see personality differences in the code depending whose favorite method for vetting incoming parameters was used. This isn't very Delphi-specific, so discussions about it in other languages would be fun to read, too.
  12. David Schwartz

    registering D6

    I'm trying to load up an old project that has dates on the files from 2004. I probably used D6, and I have it installed in a VM, but it keeps telling me to register it. I go through the registration and it has valid keys, but it says the registration fails. What the heck are we supposed to do to load up old projects like this? I also have D2007, but it has none of these components in it. So when I open the main form in this version, it's virtually empty because the panels and notebook I used are ancient. I'm not even sure they can be loaded into D2007. But I can change most of them to newer components.
  13. David Schwartz

    registering D6

    That worked! Thanks!
  14. David Schwartz

    registering D6

    The IDE doesn't run because the registration fails.
  15. David Schwartz

    Playing multiple wave files simultaneously

    WARNING: Mitov's library installs both debug and release libs for every possible platform on your version of Delphi. It does take up quite a bit of disk space! But you can safely go through and delete the platform libs you won't need.
  16. David Schwartz

    Request help from kbm/Component4Developers

    Not sure what you mean "ability to copy an existing TDataSet" But if you want to cache a TDataSet to an in-memory table, then TClientDataSet comes with Delphi and is all you need.
  17. David Schwartz

    Lots of errors when trying to compile an old project

    How much experience do you have working with Delphi? Do you even know how to locate files on the hard drive? Sorry, but I'd probably fire someone who came to me with this question. If you don't know how to find files on the disk or set up Delphi's search paths properly, there's no way you're going to make any sense at all of the crap you're going to see as a result of rebuilding this D7 app with Unicode strings!
  18. David Schwartz

    Playing multiple wave files simultaneously

    What library is this from? It looks like the built-in API for the old original Windows audio services. This was inherited from DOS. I wouldn't go near it with a 10' pole! You mentioned "bloat"... What percentage of your xxGB of memory is the footprint of your EXE taking up with whatever audio library you're referring to? BTW, there's a reason that audio devices all need custom drivers to work flawlessly in WIndows but not MacOS. The audio support built into Windows SUCKS! If you're really worried about "bloat" ... you'd avoid Windows for audio stuff. And I can attest that Mitov's libs work VERY WELL for multi-channel audio (and video, too) on both Windows and Mac.
  19. David Schwartz

    Playing multiple wave files simultaneously

    I've done this with Mitov's audio libraries.
  20. David Schwartz

    Disaster planning by archiving GetIt installers

    Now you know why nobody wanted to pay the price Embt was trying to get for these libs, just to ensure they compiled for new releases. I doubt we'll ever see any fundamental changes to Raise Components at this point.
  21. David Schwartz

    Disaster planning by archiving GetIt installers

    I'm not a "hobbiest" and the companies I've worked for that have products generating 7-figures annually in sales of products that incorporate libraries locked inside of GetIt are not "hobbyists" either. GetIt SUCKS. I'm not talking about GetIt! Raize Components were never distributed with any kind of an installer other than the one most libraries used, which was something like Wise Installer. (I don't recall exactly, but it was just a setup executable of some kind.) In case you haven't noticed Wise Installer is a ridiculously expensive tool, but it has been used by virtually every significant commercial library and software vendor. Who the heck wrote GetIt? What does it even take to prepare something to run on GetIt? That's all strictly confidential information from Embt. They don't own Wise or any other tool, but they do use an installer for Delphi that's about $4000 or so, even more expensive than Wise. Maybe GetIt is built around that? Who knows? If so, why aren't downloadable SETUP files available? Nobody would be calling GetIt a "toy" if it worked with Wise or any other decent installer. Clearly, there's a lot of disdain for Getit as far as being a package manager goes. I still don't know what the heck that has to do with the fact that LOTS of LEGACY PRODUCTS DEPEND on libraries that are ONLY available through this "toy"! I wish people would stop venting about the quality of GetIt in response to those of us who actually DEPEND on the libraries LOCKED INSIDE of GetIt. THAT is the problem I'm trying to address. As I said, I don't give a rip what anybody's PERSONAL OPINION of GetIt is. I want a way to manage the 3rd-party libs currently locked inside of it for times like this when it's broken or offline. Anybody else who has to depend on any of those libs probably feels the same way. If you don't that's fine. But consider what Management of a company thinks when they have to waste one or two man-quarters on updating software for a product that generates several million dollars a year in revenues because the tool they're spending tens of thousands of dollars in supposed "maintenance and support fees" has locked libraries that are critical to their revenue stream inside of a crappy interface that they don't want to support.
  22. David Schwartz

    Disaster planning by archiving GetIt installers

    a lot of stuff on GetIt has nowhere else to get it from. Raize Components, for example, have not been distributed directly since they were incorporated into GetIt. I haven't been able to make GetIt work for 18 months due to persistent errors that have gone unfixed. How am I supposed to get updates any other way? Heck, I don't even know if GetIt distributes source or just the object files! A lot of my personal projects have become hostage to this Good Idea that has run amok, and if my maintenance agreement expires, they may well disappear -- if Embt refuses to fix problems that occur and you can only get a fix if you have an active maintenance contract, you're basically hosed. Also, while I don't personally use them, there are several libraries that commercial products I've worked on over the past 10 years that rely on other libraries currently distributed only via GetIt. Because newer updates were unavailable last year, we spent quite a bit of time migrating older source to newer Delphi versions. This was not looked on favorably by Management, because we had just spent a lot of money on updating our licenses and when we contacted Embt, we were only told that there's a problem with GetIt and we'd just have to wait until it was fixed -- "probably the next release". What the heck kind of "support" is THAT when your company has shifted to a business model based around SELLING SUPPORT AND MAINTENANCE CONTRACTS??? It's PATHETIC. Embt has chosen to bury stuff inside of GetIt while refusing to offer ANY KIND OF ALTERNATE MEANS OF DOWNLOADING IT, and it's stuff that's used in a LOT of LEGACY projects. I don't care what anybody's PERSONAL opinion of GetIt is ... it has become the ONLY means of accessing several Delphi-specific libraries that are used in LOTS of LEGACY apps currently being supported by Delphi customers who have active maintenance agreements, and it would be cost-prohibitive to replace some of them.
  23. David Schwartz

    Disaster planning by archiving GetIt installers

    Is that GitHub repo still active? Does it house all of the libs for all of the releases and updates? We really need something to use as a backup to [cant]GetIt!
  24. David Schwartz

    General mobile app <-> REST design question

    I get all this, but you stepped right over the part that I'm most curious about. The UI says, eg, "Marguarita pizza", "Regina pizza", "Meat Lovers pizza", or "Veggie pizza". These are examples of standard combinations, and there could be a dozen or more. Your "order" packet (TOrder) might have a place to specify a "standard combo" by name. But there's usually an option for "build your own combo", right? In that case, you need a list of ingredients to show the user from which they can make their choices. There could be 5, 10, 20, whatever. AND ... would it not not also be perfectly acceptable to specify all of the individual ingredients when the user selected a standard combo, rather than (or in addition to) the combo's name? Where does this list of ingredients come from? Also, the catalog of standard combos (and what's in them)? Do you build these lists or catalogs into the app? Or would you normally plan for them to be loaded (or updated) from the server when the user logs-in? Is TOrder an ingredient list, or a meta-list that can hold catalogs (lists) of ingredients? See my point? I don't care about JSON or REST -- or even pizza. How does one approach a design like this?
  25. David Schwartz

    Best way to check if an internet SMTP server is available?

    This is where it helps to be an old-timer and remember how things worked back in the early days of the internet. The internet was developed by DARPA in the 60s during the Cold War, when the threat of nuclear war lingered in the air and shaped the way people designed things. DARPA wanted to design a large network of independent computers that had no single-point-of-failure in case major cities with central servers got nuked -- literally. Everything was done by dial-up at the time. That is to say, unless you could afford a dedicated phone line, there was no such thing as an "always-on connection" the way we experience things today. And dial-up was slower than molasses in the winter time. I remember 150 baud in the early 70's. Then 300 baud. In 1990, 2400 baud was fast. In the mid-90s, a "high-speed connection" was a dial-up line with a modem that ran at 9600 baud. In effect, virtually 100% of home users experienced what you're trying to argue against as their "normal" use-case. The server (or wherever your emails went next) was NEVER connected. Guaranteed. In fact, the solution for eliminating a single-point-of-failure scenario was to make the entire internet backbone work using store-and-forward mechanisms. They also took this approach because it would be unworkable to have thousands of computers attempting to dial-in to your computer directly just to drop a couple of emails. (In 1988 I did some work for a guy who literally had 25 phone lines coming into his office to support a couple thousand users who'd dial in to connect to his minicomputer that was used to allow search and download county assessor tax records. They charged something like $500/mo per account. He had me write some special driver software that tweaked the 1200 baud modems connected to each of those phone lines.) So servers were set up to collect stuff, then forward it on to the next server closer to the destination, until each email finally made it to an ISP that hosted that email. ONE SIMPLY DID NOT CONNECT DIRECTLY TO THE DESTINATION MTA! EVER!!!! That's just not how things were designed to work. Back in the days of dial-up access, we all remember times when we'd try to connect and the line would be dead. Or someone would be on the phone (or party line). Or it would be busy. Or the number was disconnected. THIS WAS N-O-R-M-A-L. It was also pretty normal to be in the middle of a dial-up session and someone in your home would pick up the phone in another room and the line would drop. So we'd get online late at night when we knew nobody was going to try to make a call. (Generally speaking, nobody called anybody after 10PM.) And THIS is EXACTLY how the internet in general, and mail delivery specifically, was designed to work. You seem to want to be able to assume otherwise. Just build a mail agent designed to work they way MTAs are SUPPOSED to work and save yourself some grief. You can find the actual RFC spec for how SMTP was designed to work here: https://tools.ietf.org/html/rfc5321 If you go back and look at earlier specs, you'll see that not much has changed since the original specs were written in the 60's.
×