

omnibrain
Members-
Content Count
122 -
Joined
-
Last visited
Everything posted by omnibrain
-
For geolocation can I specify my own Nominatim instance?
-
I run my own OSM tile server. Currently I bundle leaflet with my application, but your component looks interesting too. Regarding OSM you only mention setting map.TileServer := tsOsm; in code. But can I also specify my own tile server in the format http://example.com:8080/tile/{z}/{x}/{y}.png? Edit: I found it further down: https://www.helpandweb.com/ecmap/en/tecnativemap.htm#USE_YOUR_OWN_TILE_SERVER
-
I want to host a console in my Delphi application. Editors/IDEs like VS Code and IntelliJ IDEA have an embedded console. I want essentially achieve the same. For the moment it doesn't matter if it is the "old" console oder the new "windows terminal". I want to have a tab or panel in my application with a console that runs cmd or powershell. Trouble is, I don't know where to start. When I search I only find how to write Delphi console applications. Or I find information on how to read the console output of other programs (like with TurboPack DOSCommand).
-
Yes, but redirecting input and output is not what I want to do. That's possible with the TurboPack DOSCommand I mentioned. But this way I lose everything that makes a (modern) console magic. Colours, clickable links. So I want to "host" the real deal. I suppose I can start a Console, pass a handle to a panel or something as the parent and have it draw within my program. I don't need the output. I could send input via Windows Messages if necessary.
-
Can someone help me? I use a TObjectDictionary<integer,TmesData> with doOwnsValues, but if I remove an object via .Remove(key) my destructor does not get called. My class declaration: TmesData = class private procedure socketDataAvailable(Sender: TObject; ErrCode: Word); public payload: string; sendCount: integer; sendSocket: TWSocket; log: ts; sendTime: tdatetime; constructor create(alog: ts; const ip,port,apayload: string); destructor Destroy; //close and free socket function doConnect():boolean; function doSend():integer; end; On my form I do //create sendList sendList:=TObjectDictionary<integer,TmesData>.Create([doOwnsValues]); // add objects sendlist.Add(strtoint(seq),TmesData.create(doLog,edIP.Text,edPort.Text,mes)) later I do processing with for var seq in sendlist.Keys do begin //do processing //... //remove current object after processing sendlist.Remove(seq); end; The destructor of my TmesData objects never gets called. I must miss something obvious.
-
generics Destructor of Object in TObjectList<k,v> never gets called despite doOwnsValues
omnibrain replied to omnibrain's topic in Algorithms, Data Structures and Class Design
Ah, yes. Obviously. I generally don't write my own objects (or they are only "records on steroids, so I don't need a custom destructor) -
And most important: Only commit what you actuallly changed. Revert all the rest. Only made a change to the .pas? Revert that changes to the dfm. Those are either selected tabs, attributes that got added with newer versions, or those imagelist headers that change by themselves. Or worse: you missclicked and moved a control. (Or Delphi decided to f*** with the DPI). Same for the project files.
-
How to use an external editor like VScode and GitHub Copilot for Delphi 11 Alexandria?
omnibrain replied to Al T's topic in Delphi IDE and APIs
What extensions would you recommend? Is Delphi Extension Pack - Visual Studio Marketplace a good start? -
ChatGPT does not answer with Facts but with the thing that is most likely going to be the answer. Sometimes that's actually a fact, sometimes it just makes stuff up. I had ChatGPT make up library names that sounded good, with method signatures that fitted the requirements, but they did not exist. When pressed ChatGPT even made up github repositories. This behaviour is more likely for Delphi than for example Javascript, because there was just not as much Delphi code in the training set.
-
Best practices for working with a DB accessed via REST API?
omnibrain replied to David Schwartz's topic in Databases
Supabase Try Supabase. It is postgreSQL+postgREST+Auth. You can manage your access rights via row level security directly in the database. If the automatic API via postgREST does not fit you can always build something yourself later, because in the end it's postgreSQL and you can use it as such. -
I implemented the Async/Await-Pattern as described in The Delphi Geek: Async/Await in Delphi Now I want to update GUI-Elements from my async task. For example to write into a log window or update a status bar. How would I best do that. I guess I can't use TThread.Synchronize because that's a whole different library? memo1.append(datetimetostr(now)+': Starting'); Async( procedure begin memo1.append(datetimetostr(now)+': Start Processing'); for i=0 to itemcount do begin //process TThread.Synchronize(nil, procedure begin memo1.append(datetimetostr(now)+': Processed item No '+inttostr(i); end); end; end). Await( procedure begin memo1.append(datetimetostr(now)+': Finished Processing'); end); end;
-
Async/Await with updating visual controls
omnibrain replied to omnibrain's topic in OmniThreadLibrary
Doesn't matter in this case, because it's just an example, but definitily something to consider if it plays a role. -
Async/Await with updating visual controls
omnibrain replied to omnibrain's topic in OmniThreadLibrary
Thanks a lot. It's my first real foray into parallelism and concurrency with Delphi. Especially with parallelism and concurrency I learned the hard way, that there is a difference between "seems to work in development" and "does really what it should be doing", especially when the Dev is inexperienced with the tools. Oh, yes, of course. -
Opinions about Pascal vs C/C++ IDE
omnibrain replied to TimCruise's topic in Tips / Blogs / Tutorials / Videos
Yes, they are barely scraping by and nobody uses their tools.- 39 replies
-
- programming hardware
- rad studio
-
(and 1 more)
Tagged with:
-
Opinions about Pascal vs C/C++ IDE
omnibrain replied to TimCruise's topic in Tips / Blogs / Tutorials / Videos
Jetbrains gives you 25% if you send them a screenshot of your Delphi License.- 39 replies
-
- programming hardware
- rad studio
-
(and 1 more)
Tagged with:
-
On the other hand, I'm currently building something with Supabase as part of the backend (that's just postgreSQL with some fluff, like Auth around it), Frontend with vue.js and Quasar Framework, and it's almost RAD. Only deployment will be more complex. But with modern webservers like Caddy deploying a webserver with working TLS is no problem at all anymore. Funnily, while Caddy is Open Source it is sponsored by ZeroSSL, which in the end belongs to Idera nowadays.
-
The trouble with web is less about the development of the user interfaces (web apps), but more that most developers that did desktop application development their whole life are still stuck in desktop developer paradigmns. They are stuck not only in the UI paradigmns, but also have often no clue how authentication works, how to build software for zero trust environments, how to deploy the whole stack, etc, how to work with the latency. For those it would need a new generation of RAD tools. An IDE that lets them build client and server, auth and everything is handled by the framework and when they press "build" they get a docker container ready for deployment.
- 21 replies
-
- vcl
- devexpress
-
(and 2 more)
Tagged with:
-
I wish them the best of luck. I hope the product is not of vital interest to the company. They were somewhat between a rock and a hard place, having a legacy Delphi application with a sub par engineering team. But rewrites (in a completely new technology) rarely go well. (At least in time and in budget). Does your company already work with react or are they going to build a completely new engineering team, or even outsource the development?
-
I would go with Supabase. In the end it's "just" postgreSQL, but they sprinkled tons of sugar on top of it.
-
Being overworked is not the only reason for burnout. It can also happen due to the opposite (boreout) or just working in a bad environment. Be careful.
-
Honestly, it would be best if you started looking for a new job. You coworkers don't care. Your boss doesn't care. It works for them (for now), but it will crush you.
-
Thanks for the clarification. I misunderstood what you want to do with the new server component then. I currently use THttpAppSrv and I'm curious what your future developments are going to offer.
-
I would really like to continue to be able to use webservers without SSL/TLS for several reasons: In a more complex setup ssl gets offloaded from the application servers to load balancers, reverse proxies or web application gateways modern reverse proxies like caddy are ridiculously easy to use and just work with ACME certificates (or self signed) with almost zero config, it's not even funny it's usually easier to update a reverse proxy/load balancer or WAG for new openSSL versions than the applications itself webservers embedded into the application, bound only to localhost, don't need ssl/tls (for internal APIs) it's easier during development if you don't have to wrangle self signed certs and browser errors But I don't care if the ssl/tls code get's compiled into the program or not. I just want to be able to use a server without SSL/TLS.
-
Ah, did not know that. Is there a way to convert our 100+ existing DFMs?
-
Are there any (known) changes to the compiler regarding string handling from Delphi 10.2 (or 11.0)to 11.2? I don't have code, because I can't reproduce it yet, it's more of a feeling, that something is wrong. We do a lot of serial communication. Parts of the code are rather old, but survived man Delphi version changes. Some of the code may be pre-Unicode but got modernized before my time and thus before source control, so I can't check the history. We read the ansichars that come via the serial connection and put them into chars and them into strings and work from there. I think that's not ideal because strings are unicode (nowadays) but so far it worked fine. Recently we switched from Delphi 10.2 to 11.2 (with a short stint in 11.0, but I'm only 80% sure the error wasn't there). And now it only works like 99.9% of the time. (With our test systems everything works, but our customers have more "traffic). The error is, that we get symbols we can't explain in positions where they don't belong. It looks like chars get converted to other hex values. At the moment I'm just poking around, because the error is rare enough and we don't have a trace yet. But perhaps someone knows of a possible change to string/char handling with the most recent compiler versions.