Jump to content

David Schwartz

  • Content Count

  • Joined

  • Last visited

  • Days Won


David Schwartz last won the day on February 19

David Schwartz had the most liked content!

Community Reputation

146 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. David Schwartz

    Is anybody working with TMS WebCore non-visual libs?

    1) They're delivered as part of the WebCore release and they are not otherwise distinguished as to their origin or who to contact with questions. So I contacted the only obvious people to reach out to. What else would you suggest? 2) I got no reply from the first post, and eventually something from the second. I don't know why nobody replied to the first one, but I can't remember ever NOT getting a reply to support tickets sent to TMS -- if not from Bruno, then someone else. When I have problems with anything from TMS, I know I can count on getting an answer. I've had some really crazy issues come up over the years, and Bruno has always come through, even if it took a while. Even in cases I figured were hopeless, Bruno always showed up with an explanation, if not a remedy. That said, a guess was offered that, if it had been actually tested, would have shown it wasn't viable. These libraries were delivered with not one hint of documentation, tests, or demos. But Bruno did finally respond saying he contacted the pas2js people and they confirmed there was a problem in the translation, that it has been fixed, and they will issue an update in the next release. Yay Bruno! Regardless, without any other knowledge or information, I posted something here simply because I was curious if anybody else has used these libraries and was able to get them to work. This seems like a fair thing to do, especially if the folks who delivered them aren't able to help. I do appreciate the fact that somebody went to the trouble to translate these libraries and that they're more like "quick and dirty" code ports than actual products. If you have a tool that can do that with a few mouse clicks, why not? But even one simple test unit created to verify that the resulting code compiles and runs would have saved a lot of headaches in this case. I did spend most of a day trying to figure this out before reaching out to anybody. Maybe I'm the only person actually using these libraries. I don't know. Nobody else has raised their hand yet and said one way or the other.
  2. The WebCore folks used their import tool to translate several non-visual JS libs / APIs into Delphi, and they're included as part of the release. I've been trying to work with the Web Audio API, and not having much luck. Most of the classes are derived from TObject, and a few from TJSObject. None of the ones derived from TObject have a Constructor (.Create) method, while the classes based on TJSObject don't have a .new method. I don't know how the compiler doesn't find a Create method on objects derived from TObject, but it throws these errors saying it's just not there. So there's no obvious way to create instances of anything. I'm guessing this may be related to their import tool rather than this specific library. Has anybody had any luck working with this or any of the JS libs / APIs that are included?
  3. David Schwartz

    Delphi and Parallels for Mac

    I used Parallels for a while, then switched to VMWare Fusion, then to VirtualBox. TBH, I've had the fewest issues with VirtualBox.
  4. David Schwartz

    auto-generated REST APIs?

    I guess I should have been more specific in my question. What I was thinking was using this myself in situations when the DB needs are simple enough that going to the trouble of building a server-side app may not be warranted. I cannot imagine publishing this for outside use -- only for internal use. A good compromise would be if the generator could work with stored procs and/or views defined in the DB to extract specific filtered or aggregated data. Also, it makes sense to me as a means of switching from classic Client/Server to REST-based interfaces without having to change anything (unless stored procs and/or views are being used).
  5. David Schwartz

    looking for animated 3D lettering

    No, but I just discovered that PowerPoint can now generate Animated GIFs! What does it take to show an Ani-GIF in a Delphi app?
  6. David Schwartz

    auto-generated REST APIs?

    Does anybody here have any experience using tools that auto-generate a REST API from a DB schema? Here are a couple I've found: https://github.com/o1lab/xmysql https://github.com/mevdschee/php-crud-api I'm curious about using something like this vs. a hand-rolled REST server. Obviously this is going to publish pretty much everything, delivering 1:1 mappings to the DB structure. It strikes me as best for simple DBs. But from what I've seen of examples of REST service designs, they often function a lot like views rather than just mirroring the DB's structure. Any thoughts?
  7. David Schwartz

    looking for animated 3D lettering

    Someone gave me a bunch of PowerPoint slides that have a static background image and some fly-in text. They play a short music track over it, and record a video using Camtasia. That's ok for a few, but it begs to be automated. They make short videos that are delivered via a web page. My goal is to load the image, start the audio file playing, then fly-in the text, using TMS WebCore, inside of a web browser. The audio stops and that's it. Simple. I'm trying to make it so we can skip the whole process of setting up the PPT slides, the music, then recording each one in Camtasia. Instead, we'll either select a BG image, music track, and text randomly, or make a list of triples that will be used together. It's easy to load up a static image and trigger an MP3 to play, but how do I do the fly-in text? (What I'm referring to are the text animations you can do in PowerPoint where it slides, drops, flips around, spins, and other stuff.) While I think FMX may be able to do this directly, TMS WebCore probably requires a graphics lib that's VCL compatible. Can CSS do fly-ins? Also, we don't need hundreds of different fly-ins. It's just for some variety and eye-catching animation. A dozen would be fine.
  8. David Schwartz

    do any git tools work like this?

    Hmmmm ... I'm not sure what I'm missing. There are two devs who have been using git for many years, but they're web devs. They can't wrap their heads around having a dozen or more files in our source tree that are just "compiler artifacts" (eg., dcu and other similar files) that don't need to be maanged by git. They think our whole set up is extremely convoluted. I didn't set up anything we're working with. It was done by people 10+ years ago who are long gone. There's no documentation, and a variety of opinions about how things ought to work. Nobody is really sure, so we experiment and tend to follow the path of least resistance. I feel lucky when things work the way I expect. 🙂
  9. David Schwartz

    do any git tools work like this?

    Many folks here have seen the various missives I've posted over the past 6 months or so trying to deal with learning the weirdness of git (my perception). I still don't know if it's just how my workplace does things or if we're not using git as the designers envisioned, but I have not run into many folks who seem to deal with stuff the same way we do. One of the things that seems to be at the root of my issues is the disconnect between git and work activities. We have a ticket-based workflow where our Cust Svc people create work tickets based on customer needs and post them to a few different ticketing systems we support (including Jira). It's a very dynamic environment, and we can end up switching between different activities several times a day. It turns out that tracking git branches by naming them for the ticket numbers we're working on works well for our needs. The problem is, we can be on a meeting and questions will come up about different tickets and issues that I or others may be having, so I find myself switching from one ticket to another to another. Delphi doesn't know anything about tickets, nor does git or any other tool. But if I've been working in a git branch and make some changes to files in a folder for a given ticket, then I switch context, work can literally disappear if I change git branches without committing my work. Even worse, uncommitted work can inadvertently get attached to the wrong ticket / branch if I'm not really careful about what I'm committing when I do a context switch. In a nutshell, my work activities are highly interrupt-driven with lots of context switches throughout the day, so it's very easy for git to become out-of-sync with the work I need to focus on. I ended up building a tool that is designed around the notion of these "tickets". In most respects, a "ticket" is just a name with associated tasks, a client and one or more working folders. There's also a git branch named after it as well. So when I switch tickets in this "workbench", it does a full context switch for me: it pulls up notes, lists, related folders, and changes the git branch. One thing that's interesting about it is that if I try to switch to another ticket and git detects a conflict, it won't switch branches. I have to go in and do a commit or a stash, which is actually a very quick operation that's built into the workbench. This alone has saved my butt several times, because I'll usually either forget to change branches, or I'll not want to deal with the commit because it's just an interrupt. Delphi doesn't care, but once in a while I'll switch tickets with a project open in Delphi and when I go back to Delphi it will alert me that the underlying file(s) have changed. This is the problem that has caused us so much grief in the past where files get overwritten without our real understanding what was going on. (Delphi simply reflects the underlying file changes that switching branches often entails.) Anyway, I've seen lots of GUI tools for git, but they're all focused around git and git's workflow. We don't really deal with git, or even care about git's workflow at work. We deal with things the customers want, and these "wants" are enshrined in what we call "tickets". Our workflow focuses on tickets. Git ends up being more of an annoyance than anything else, like a pet that's always jumping into your lap when you're trying to do something else, and they hit the keyboard with their paw and wreak havoc while you're trying to put your coffee down without spilling it all over the place. The workbench I've created bridges the gap between having git branches being out-of-sync with work activities, and it works incredibly well. It has a bunch of git functions built-in that make it super easy to keep everything straight. I'm curious if anybody is aware of any general purpose tools that might do this. If not, I may be able to generalize this in places so it would be more broadly accessible to others. (FWIW, it is not integrated into any ticketing systems we have -- they don't let us do that. So "tickets" in this context are simply what we use to name working contexts. There are a few things highly specific to our environment that could probably be made configurable, but for the most part, it's quite generic.)
  10. David Schwartz

    strange problem with psftp lib

    Well, I put the lime in the coconut and ... oh ... I mean ... I put the DLL in the folder with the EXE and ... it worked. I thought I'd done that earlier, but it somehow snuck into the folder next door.
  11. David Schwartz

    compiler setting issue?

    Well, that's at the top of the 2 files with this code in it, so it looks like the culprit. I'll give it a try. Yup, that solved it. Thanks!
  12. David Schwartz

    compiler setting issue?

    Here's some code in a unit that compiles without error in a demo project (DX10.2): function TVCLSFTPClientDemoForm.ListingCallback(const names: Pfxp_names): Boolean; var StartRow,i:Integer; begin StartRow:=sgRemoteFiles.RowCount; sgRemoteFiles.RowCount:=StartRow+names.nnames; for i:=0 to names.nnames-1 do begin sgRemoteFiles.Cells[0,StartRow+i]:=Utf8ToString(names.names[i].filename); sgRemoteFiles.Cells[1,StartRow+i]:=DateTimeToStr(TTimeZone.Local.ToLocalTime(UnixToDateTime(names.names[i].attrs.mtime))); if names.names[i].attrs.permissions and $F000 = $4000 then sgRemoteFiles.Cells[2,StartRow+i]:='<dir>' else sgRemoteFiles.Cells[2,StartRow+i]:=IntToStr(names.names[i].attrs.size); end; When I paste this same code into another project that I created from scratch, I get errors saying "names.names is not an array" and it won't accept the [ i ] ]] subscript reference (square brackets apparently control italics). In fact, it's an array of pointers being returned from a DLL written in C/C++ where instead of using a subscript, it's probably using *p++ to iterate through the list. Here's how the data structures are defined: fxp_attrs=record flags:TUnsignedLong; size: UInt64; uid,gid, permissions, atime,mtime:TUnsignedLong; end; Pfxp_attrs=^fxp_attrs; fxp_name=record filename,longname:PAnsiChar; attrs:fxp_attrs; end; Pfxp_name=^fxp_name; Tfxp_name_array=array[0..20000000] of fxp_name; Pfxp_name_array=^Tfxp_name_array; fxp_names=record nnames:Integer; names:Pfxp_name; end; Pfxp_names=^fxp_names; I can't help but think this is probably a compiler flag somewhere. Any ideas?
  13. David Schwartz

    strange problem with psftp lib

    I copied the form from the VCL demo that works into the folder with my code, added a button to pass the PSFTP object to my form instead of creating it, then tried to run it. When the other form tried to initialize the DLL, it blew up in the same place. Is there supposed to be some handshaking between the client and the server when a connection is set up? I vaguely recall seeing a popup window saying the client hasn't seen this server before and asks if it's ok, and I click Yes. That thing isn't happening on my app, and it's not happening on the demo app when I moved it either. I read there are a couple of libs that let you tell them to simply "accept" this thing. I'm not sure if this lib does that or not.
  14. I found this library: https://www.syncovery.com/tgputtylib/ I'm guessing it's built with D10.3 while I'm using D10.2 I extracted the entire file tree to a folder and rebuilt the components and libs, and set up the search paths. (I moved the output into the same file tree rather than using the default.) I can run the VCL demo just fine, but the VCL Component demo blows up with an "External Exception". Strangely, my app with NO component blows up with the same error. I copied the code to init the lib from the VCL demo (non-component) and it blows up when it's initializing one of the DLLs. This demo even adds tgputtylib.pas and tgputtysftp.pas to the project, so I did that as well. That app works, mine blows up. There's exactly one dll and one bpl file on my system, and I did a BUILD on EVERYTHING before running it. Whatever is causing my app to blow up seems to be causing the same error when the component inits the DLL as well. All I'm trying to do is write a bit of code that needs to upload a file to a server using the SFTP protocol, poll every minute waiting for four output files to appear, then download them. These need to be called in discrete steps: Upload, wait for results, download. I've tried four different libs and approaches now, and every one has quirks that keep them from working, or they're just too complicated to figure out. I don't use a lot of DLLs so I'm quite baffled how one app would happily init the DLL while the other that was more-or-less cloned from the first blows up during the DLL init step. Suggestions welcome (including useful code samples that I could try).
  15. David Schwartz

    Reading fields with different lenghts

    use a series of Copy statements specifying the start col and field length