Jump to content

David Schwartz

Members
  • Content Count

    543
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by David Schwartz

  1. David Schwartz

    CrossOver : Win -> Mac

    I've been workign on a new little app, and in particular looking at the TMS FNC cross-platform library to let it run in a Mac environment (among others). I remembered something from a while back and pulled down the latest version of CrossOver from CodeWeavers to try out. It seems to be a very simplified VM for MacOS that lets you load up Windows EXEs and launch them. They execute internally using Wine rather than Windows. The initial setup was a bit confusing, but once I got it sorted out, I realized there's simply a folder there that contains your EXE -- and you can load up as many as you want into it. Your host's file system seems to be mapped to Z: drive, and it lets you reach out from inside the "bottle" into the host (Mac) environment and copy in Windows EXEs. When I ran it, I was quite surprised to see my app launch and run as if it's a native MacOS app, but it looks and acts exactly as if it's running in Windows. I think Parallels has something that lets you do this, but I never tried it. In fact, I licensed CrossOver in mid-2019 and it expired before I ever did anything with it. (Their license is for one year.) Does anybody have any experience with this? Makes me wonder how Delphi would run if it was stuffed into CrossOver? Has anybody tried, by any chance?
  2. David Schwartz

    swagger help needed

    I'm trying to build a small test bed in Delphi for accessing an internal company API and there's a swagger link published for it. What I want to do is suck in the Swagger definition and use it to build something that lets me query the API in Delphi. I'm not sure what all that requires. I guess most of the time people use some kind of javascript framework for this; I want to use Delphi. I searched around on Google and found this project: https://github.com/marcelojaloto/SwagDoc There's a demo in it named 'GenerateUnitFileForMVCFramework' that lets me put in the Swagger URL and it generates a Delphi unit. It works fine, but there may be a bug in this code in that it duplicates every class and interface definition. I was able to fix that without much trouble in the code generator, but there may be a problem in the part that's parsing the Swagger. (Right now I don't care.) I guess the MVC Framework comes from here: https://github.com/danieleteti/delphimvcframework I'm not exactly sure what to do from here. I need a way to connect to the service with OAuth2, and then make some queries and display the results in a form, like in a TListview. I'm looking for suggestions on how to proceed. Thanks! FWIW, someone here wrote a similar thing that generates C# code from a Swagger URL, and that code looks very similar to the Delphi code that's generated by this SwagDoc tool.
  3. David Schwartz

    simple cloud storage options

    I'm looking for a simple way to move data in some INI files into a cloud-based storage so someone can access the data from different devices. (It's not multi-user, just a way for someone who might access it from different devices without having to worry about syncing up the data.) I'd prefer an inexpensive hosted solution initially rather than having to create something myself and host it right out of the gate. I don't need structured data, like what a full DB offers. I'm just noticing that the entire INI files I currently have get >90% compression rates, so a 9K and 14K file compress to around 1.1KB - 1.2KB. The bigger one could end up growing to about 15x larger, tho, if it's not split into sections where each section would be 10K-12K at the top end. Aside from something like SFTP, what are some options worth looking at? This is something that needs to be done automatically "under the hood", so using an API of some kind. It should be something easily accessible to most people.
  4. David Schwartz

    swagger help needed

    I'm not suggesting he didn't "choose". Average annual salaries were around $50k at the time. He was reportedly offered $1M to leave Borland. I seriously doubt he would have left for a 10% increase in salary, whatever he was being paid. How many people can you think of who would turn down such an offer?
  5. David Schwartz

    swagger help needed

    Nope, this died as I got redirected to work on other things. I am still rather surprised that so few tools do it.
  6. David Schwartz

    grid with expandable area below each row?

    I'm looking for a grid that's like the DevEx Quantum Grid that let you open an area below a selected row to enter or display notes. I can't justify the price for just that one thing. Does anybody know of something similar? Or ideas on how to create something similar? (You could put a memo at the bottom of a panel with the grid above it; but if you're looking at a row at the top of the panel, the notes are all the way at the bottom. I'd like the notes to be right below the selected row the user is focused on.)
  7. David Schwartz

    grid with expandable area below each row?

    I'm just designing it. No users yet. TBH, I don't like how it looks on the DevEx grids either. I want to be able to display more details close to the data row itself. So it's either below that row, or in a popup, or maybe a block to the right of the list/grid. The DevEx grid idea came to mind, but I'm not stuck on it.
  8. David Schwartz

    grid with expandable area below each row?

    I have another app I did that with, sort of like how a combo-box works. But the row that expanded was fixed and rather high up in the form. This one is a list where the bottom is near the bottom of the form. The problem is not so much covering stuff up but opening a space between the rows. Something like how a treeview works. Maybe something that looks and works like a treeview and when all of the nodes are collapsed, it looks like a grid. But when you expand a node / row, it opens an area that doesn't look like a grid row, but a memo box.
  9. David Schwartz

    Can an app beat a spreadsheet?

    I'm wondering if anybody here has been faced with moving something from a spreadsheet into an app and what your experience was like in terms of how users liked it. I'm especially curious if you didn't get a bunch of people asking later, "Why don't you just put this out in a spreadsheet?" When I hear people complain about their finances, I've developed an approach that seems to address a lot of the things that underlie their complaints. I have been using Excel to track my expenses and help with budgeting for several years and I am thinking of how I could package it up and offer it to others. There are some things I'd like to see that I can't do in my version of Excel (or couldn't when I tried) and other things that are just cumbersome because of how spreadsheets work. That is to say, there are things that work in one version / platform of one spreadsheet app but not in others. (For example, I use a Mac, and for many release cycles, Excel for Mac did not support conditional macros. It did at one point, then Microsoft removed that support; they may have put it back in again. Now they have both web-based and platform-based versions and they don't have the exact same feature set. I have no idea how Google Sheets or OpenOffice compare, but I'm guessing they're not exactly the same either.) So I'm not sure that just publishing it as a spreadsheet, or instructions on using a spreadsheet, wouldn't result in a nightmare of support tickets, unless I targeted a "common subset" of features that I know work (today) on all of the most popular tools (which would probably force me to remove several nice features). A Good Thing about a spreadsheet is that you can enter and edit data right in the cells, although I'm not sure how much of a benefit that is in this case over a little popup form that lets you just "Add/Edit an Item". I know it's possible to set up grids in Delphi that allow you to edit cells directly, so that can be side-stepped if desired. One Bad Thing about spreadsheets is that when you add or delete rows, sometimes formulas get messed up and you have to fix them. There's also no way to organize notes "on the side" easily. (The area to the right of my monthly grids has become flooded with notes that don't really fit well in a grid structure.) I'm curious what others think who've been faced with this situation before....
  10. I had a unit somewhere that let me stream basic Delphi object instances to and from an INI file, but now I can't seem to find it. Google is turning up stuff from 2009. The newer RTTI stuff is a lot simpler. Can anybody point me to something that uses the latest RTTI stuff?
  11. David Schwartz

    Can an app beat a spreadsheet?

    Exactly!
  12. As I said, I've got code that uses the old RTTI methods introduced in D2010. I'm looking for something that uses the newer RTTI methods. Not an entirely different approach. They're simple classes with no embedded objects, but there are some enums.
  13. They're fairly simple data objects derived from TObject, not from TComponent. I could derive from TComponent instead, but it buys me lots of overhead with little if any value.
  14. I don't need to. As I said, "... stream basic Delphi object instances ..." I can already handle stringlists easily, and arrays of basic types should be easy to handle anyway, although I don't have any at this point. I will have collections of objects, but I'll deal with them one-by-one.
  15. David Schwartz

    Can an app beat a spreadsheet?

    MS Money competed with Quicken and QuickBooks; surprisingly, this is one area where MS was unable to conquer a market. I used QB for years. It was helpful come tax time for dealing with historical data, but it didn't really help me manage my cashflow at all.
  16. David Schwartz

    Can an app beat a spreadsheet?

    I agree. In this case, I started out using Excel for lack of anything better. I wasn't sure what I was after exactly, just a way to forecast upcoming payments against my income. It looks like I started in mid-2014. It has evolved somewhat. It doesn't do any real analysis, it's more like a consolidated report of all my income and recurring (or expected) expenses. Kind of like a dashboard. I hardly even pay attention to the income side now; it's the expenses I'm most concerned with paying on-time. I tried a couple of services that display all of your different account activities in one place, but I found that to be pretty much useless. Everything I've seen presents historical data. They're like watching things in your rear-view mirror. That does not help avoid bouncing checks or making late payments that result in late fees, in the future. Given delays that are inherint in various payment channels, by the time you notice something show up, it's too late to do anything about it. That's the biggest complaint I hear from people. Maybe folks in other countries relate to their finances differently, but we here in America aren't very good with basic math like that. As far as passing out the spreadsheet for people to play with and give feedback ... I think it would be far easier to support an app. So maybe that answers my question. 🙂 With an app, I imagine that people will have ideas that relate more to their financies rather than how to improve how the spreadsheet works.
  17. David Schwartz

    Can an app beat a spreadsheet?

    Yeah, well ... it's basic personal finance -- tracking periodic / recurring income and expenses in a meaningful way. I could probably do what I need with a TListView since the calcs are mostly additions and subtractions of two cells, or sums of several cells. As I said, it would be nice to be able to highlight certain cells based on simple formulas. In spreadsheets, that would be done with Conditional Macros, which are not universally supported. In Delphi it's quite simple.
  18. I've been building this "workbench" app of sorts (for lack of a better term for it) that has some contextual stuff at the top, a block at the left that shows files, and a big chunk of overlaid stuff that's in a tabbed notebook with a few levels of sub-notebooks below some of the main tabs. It's designed to simplify a very haphazard and unorganized process where you need to switch between a half-dozen different apps to do things. (I know lots of people detest such designs, but let's not go down that path, ok?) The tabsheets have controls on them, and behind each list/tree control are 5-10 methods, some of which are event handlers for the control. Delphi's IDE doesn't really help with organizing them, and in fact sorts everything alphabetically when it has the chance. I've looked at lots of code over the years, and I've seen most of the same 3 patterns: (1) all the methods are ordered alphabetically by name; (2) they're ordered by function; (3) they're ordered in a way that clusters the methods around a common control (so all the methods for a given treeview are all nearby each other). Today I decided to add a grouping mechanism for something using a TTreeView on a new tab. This has buttons to Add main items (Level=0); Add and remove sub-items (Level=1); Edit text associated with the sub-items; Save/Load to/from storage (INI files); Save/Load to/from the TreeView; and some other minor stuff. (As an aside, I need to save additional data in each of the top-level items, and discovered the use of OnCreateNodeClass in TTreeView (or at least RzTreeView). They're sort of like class helpers, but they let you add data to the storage items.) Anyway, I'm trying to figure out if there's any sane way to collect these related methods together and manage them as a group? I know about Delphi's form templates, but most of the things on this form only have one instance. It's not like there are several of the same things, as there aren't. I wish I could pull this related code into a separate unit, but the damn event handlers make that problematic since they pretty much need to be in the same unit as the form class, unless you set them all up as proxies. Splittiing things into an MVC or MVVM design breaks things along what occur to me as odd lines. I'm curious what approaches others may have taken to address this in larger form units.
  19. David Schwartz

    ways to organize related code in a form?

    Let me clarify this... I don't want to work in the same conditions I've been working in for the past 25 years where I'm mostly maintaining legacy apps. I do want to keep working, but at a level better suited for my natural skills. I'm very creative by nature. My mind easily handles "big picture" concepts and I'm not good at reading code to reverse-engineer it just to fix some weird bug someone made 15-20 years ago. It bores the hell out of me. BTW, I've heard this is common for people with Asperger's. I've heard managers say, "Everybody [ie., all programmers] love working on new code! Of course! But most of what we have is not that. So just do what's here to do and don't complain!" That has not been my experience, but I'm not really in a position to argue it. What I can say is this: First, some people are far better at reading code and absorbing it into their head like a sponge. I've known several who, after a few minutes flipping page to page, they challenge you to ask them anything and they can find it in a minute or so. I'm no good at that until I reach the point where I've spent so much time pouring over the code that I know it as if I wrote it myself. And if I don't keep swimming around in it, those details fade pretty quickly. Second, I have met very few people who have the mental ability to deal with high-level abstractions on any kind of scale. I've come to believe that software architecture is more dependent on innate mental abilities than anything you can learn. This is something I've always been great at, but not something most employers have ever cared about. They want low-level coders who can find needles in haystacks by reading through reams of code that's been running for 10-20 years. I don't say any of this as a judgment -- some people are naturals at writing fiction stories, and others can barely write an entry in a diary. Some people are great at math and working with numbers in their head, and others struggle to add 2+2. It's just how their mind works. If you need someone who's great in math, you don't just assume everybody is equally skilled in math just because they made it through college. Why do people think all programmers have the same level of skills, from lowest-level to highest? It's silly to me, and very counter-productive in reality. One thing I struggle with is generics, recursive algorithms, and pretty much anything that has a layer of "meta-coding" to it. I don't know why, it's just the only place I've ever had trouble grasping computational concepts. Everybody has some innate skills where they're really great, and others that constantly challenge them. That's not to say that with enough practice and work you cannot overcome some of those barriers, but they just show up along the way and many folks simply avoid them. It reminds me of the 80's when C++ and OOP were just getting going. A rule of thumb was that experienced C programmers would take 6-9 months before their thinking shifted and "OOP thinking" became a natural thing. It took me about 7 months, and that shift happened in an instant one day. Poof! Suddenly I looked at programming differently. It was a very noticeable and mind-altering event. Anyway, this is stuff I've been aware of for years, and have fought against my whole career. But I'm feeling reenergized now that there may actually be a specific thing that can be pointed to that people who literally cannot get inside my head to observe how I think can use to realize that maybe these things that have been assumed to be "universal skills" really are not. This situation presents some interesting opportunities.
  20. David Schwartz

    RichEdit Popup question

    I've always used TRichView when I've needed RichEdit stuff, but where I'm at now doesn't have it, so I'm using TRzRichEdit, which is derived from the standard TRichEdit control. So I apologize in advance if this seems like a basic topic. I have some RichEdits and added a Popup to them. I multiplex the popup across the RichEdits and set a Tag to figure out which one is being used. I know both TMemos and TRichEdits have basic editing stuff wired-in -- cut, copy, paste, etc. I seem to recall that if you don't provide your own Popup, then you get a default with those menu items in it. Anyway, I did not define these common actions and only had my own menu items in the popup. As a result, you CAN use the hotkeys <ctrl-C>, <ctrl-X>, <ctrl-V> etc, but there are no corresponding menu items in the popup. I just added them to the popup explicitly, but now the hot-keys don't work. I defined the hot-keys in the popup menu items, but that doesn't seem to do anything (unless they're disabling the hot-keys instead).  Isn't there some way to inherit all of this from the default popup menu? Or ... how do you get these default actions added to your own popup menu without redefining them?
  21. David Schwartz

    ways to organize related code in a form?

    I've heard people ask me why I'm "so different" all my life. "Why can't you just go with the flow" or "be more flexible" or ... whatever. I don't know why people think that. But TBH, I'm a lot more tolerant of personal differences today than I was in my youth. If the past 5 years of American politics has done anything, it has shown how lazy so many Americans are and how willing they are to turn their minds over to others. Critical thinking seems to be a lost skill here among about 1/3 of our population. Maybe it has always been missing, but the past 5 years have certainly made it visible. Anyway, this is actually getting me kind of excited in a strange way. I've had lots of bosses and work colleagues who have all formed similar opinions of me throughout my life, which tells me they've all got similar expectations about how people are supposed to be and act "normally". Now I have a reason or excuse to offer that gives them permission to relax their expectations and readjust how they look at me. I do that naturally because I see everybody differently anyway. It took me a while to realize that most people do NOT think that way! The more exciting thing is this: To me, everybody has their own unique strengths and weaknesses. I've certainly got mine. But managers in this field (if not in general) tend to think that "all programmers are equally skilled for all tasks". This is utter bullshit, and I've seen it lead to an unbelievable amount of mistakes and shoddy work. Most people are happy to have a job and won't speak up. I do, but it doesn't really accomplish anything -- this attitude is very hard to crack. But now it looks like I have some leverage to use to make a viable case that I REALLY DON'T "fit the mold" that their expectations are based on. Managers everywhere will stand up and beat their chests shouting about how they're willing to do anything to support their people and help them be as productive as possible. It's all a show. Maybe one or two whom they've known for a while, but not the entire team. Especially the newbies. You've got to learn to "fit in" first. For some of us, that's a non-starter. We know it, but if we mentioned it up-front, we'd never get hired. But you know what? When you mention you have been diagnosed with something, and there's a law that says they actually have to do what they like to shout about in public to accomodate it, their tune changes. (I don't have personal experience with this, but I've had several friends who've told me about their own experiences.) It totally sucks that these folks simply don't do what they like to say they're committed to doing, and it takes the weight of potential legal action to get them to really do that. But ... should I really care? There are programming things I'm really good at, and things I really suck at. They don't want to hear it because their overarching belief system is we're all equally skilled. Except now I will have a standardized diagnosis from some outside authorities who SAY IT AIN'T SO for me. WOO-HOO! It makes me wish I had another 20-30 years to work just to see where this could lead. 🙂
  22. David Schwartz

    RichEdit Popup question

    Ok, assigning the popup menu in the Enter/Exit events made me go DUH! Yeah, it's a lot easier than what I did with tags. But all of the boilerplate code for the menu items and actions is already defined somewhere. I mean ... it's there by default if you don't override the PopupMenu. Isn't there some way to "inherit" it?
  23. David Schwartz

    ways to organize related code in a form?

    for sure! 🙂 Luckily it's a genetic neurological disorder that comes at birth and does not "develop". It actually sort of "mellows out" (in a manner of speaking) over time as one develops compensatory behaviors. It's most noticeable in youth. This whole thing got started last year when I was talking with my sister who has a couple of daughters who the school regards as "special needs". (This is America where anything outside of "normal" is regarded as "broken" or "faulty" in some respect.) One kid was diagnosed with ADD / ADHD and the other was diagnosed with two forms of dyslexia. Both have genius-level IQs so it's clearly not innate abilities. I mentioned that if they knew what these things were back when I was in school, they probably would have diagnosed me with ADD and/or ADHD. My sister replied, "No, they probably would have diagnosed you with Aspurger's, You have classic symptoms." I wasn't sure what to make of that. I've been poking around the edges of it for the past year or so and started looking more closely over the past few months. Frankly, I'm amazed at how dead-on some of the recognized symptoms are at identifying things I've encountered throughout my life that up until now had no explanation. They have always look like random things and no particular pattern. But given this context, I can actually see a very clear and consistent pattern. The main reason I'm even bothering to discuss this here is because I've run into lots of programmers over the years who, in retrospect, probably have undiagnosed Asperger's as well. It's considered a "disability", now defined as an "Autistic Spectrum Disorder". They don't test so-called "high-functioning" people for that, although I don't know what might happen today now that they know all this stuff. But it seems that the same cross-wiring that results in odd behavioral issues also makes those with Aspurger's particularly well-suited for programming and engineering jobs, as well as patent lawyers and certain roles in medical research. I did work with a guy once who has Tourette's. His whole family had it and they were all part of some long-term study. Today he's the director of a bioinformatics lab doing genetic and genomic research.
  24. David Schwartz

    ways to organize related code in a form?

    Maybe this helps: "Because they are not good at looking at things from the listener’s point of view and considering what type of information would help explain a point, their conversations often are disjointed and lack logical or meaningful connections. They tend to ramble on, go off on tangents, or not focus on any particular point. What drives the way they talk is what they are focused on, what they are interested in rather than what holds the attention of whoever they are conversing with. In one-on-one conversations and in groups, they stand out as disorganized, jumbled and confused due to the mismatch between what they want to say and the topic at hand. "A frequent reaction of someone conversing with an adult who has Asperger’s is to experience the person as thinking out loud to themselves, rather than trying to have a mutual conversation. Whatever comes to mind is said out loud." Roberson, Kenneth. Adult Asperger's Syndrome: The Essential Guide This is something I've been learning about myself over the past year. It explains a lot of ways people have regarded me since I was very young. This is just a small part of it. Thanks for noticing.
  25. David Schwartz

    Updated Community Edition

    Well, yes, that's obviously from my own perspective. I've worked on about a dozen different projects over the past 15 years, give or take. They were all written in the D4-D7 days, and none of them used newer features of the language, RTL, or the newer stuff added to the Ent. Ed. b/c they only used the Pro Ed. None of the devs I've worked with over the years showed any interest in Delphi oustide of work, and they were mostly unaware of newer features. They did their work and went home. Most of the excitement I'm seeing online comes from places like Brazil and Belgium. The jobs I hear about are all the same -- maintaining 10-15 yo code bases with minimal new development going on. The last three places have gotten increasingly militant against cleaning up / refactoring old code. The current place has flatly forbidden me from touching anything even though things are broken, customers are complaining, the Exec Team is pissed off, and the Dev mgr is trying to figure out ways to fix stuff other than touching the code. Go figure. It makes no sense to me. It's nice to know there are a few of y'all who are actually creating new stuff and using the latest language features. That's why I like hanging out here. 🙂
×