Jump to content

omnibrain

Members
  • Content Count

    100
  • Joined

  • Last visited

Everything posted by omnibrain

  1. omnibrain

    ANN : TECNativeMap 5.1

    My map looks like this: Then I add point markers for asset tracking, etc.
  2. omnibrain

    ANN : TECNativeMap 5.1

    Sounds great. I'm really intrigued. I'm really considering giving it a try, because currently I'm using leaflet in a web view. While that has advantages, especially for reusability in the web, a "native" Delphi solution would make my life easier especially for the simpler usecases. One more question: In one part of my app I'm enriching my Map with WFS and WMS. Via WFS I get a geojson layer and have a click handler assigned to every feature: var wfslayer = L.Geoserver.wfs("https://maps.dwd.de/geoserver/dwd/ows?service=WFS", { layers: "dwd:Warnungen_Gemeinden_vereinigt", style: { fillOpacity: 0, }, onEachFeature: function (feature, layer) { layer.on('click', handleClick); } }); wfslayer.addTo(map); Via WMS I get a raster layer and use plugins to show the legend and more important navigate through the time dimension: var regen = L.tileLayer.wms('https://maps.dwd.de/geoserver/ows?', { layers: 'dwd:Niederschlagsradar', format: 'image/png', transparent: true, version: '1.3.0', opacity: 0.5, attribution: 'DWD' }); var regen_time = L.timeDimension.layer.wms(regen, { updateTimeDimension: true, }); regen_time.addTo(map); L.control.scale().addTo(map); uri = "https://maps.dwd.de/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=dwd%3ANiederschlagsradar" L.wmsLegend(uri); Would this be possible with your component? Edit: I'm getting data from: https://maps.dwd.de/geoserver/web/ but will also use other sources in the future.
  3. omnibrain

    ANN : TECNativeMap 5.1

    For geolocation can I specify my own Nominatim instance?
  4. omnibrain

    ANN : TECNativeMap 5.1

    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
  5. 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).
  6. omnibrain

    Hosting a console in a Delphi Application

    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.
  7. 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.
  8. 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)
  9. omnibrain

    Delphi gitlab question

    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.
  10. What extensions would you recommend? Is Delphi Extension Pack - Visual Studio Marketplace a good start?
  11. omnibrain

    pdfDoc

    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.
  12. omnibrain

    Best practices for working with a DB accessed via REST API?

    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.
  13. 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;
  14. omnibrain

    Async/Await with updating visual controls

    Doesn't matter in this case, because it's just an example, but definitily something to consider if it plays a role.
  15. omnibrain

    Async/Await with updating visual controls

    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.
  16. Yes, they are barely scraping by and nobody uses their tools.
  17. Jetbrains gives you 25% if you send them a screenshot of your Delphi License.
  18. 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.
  19. omnibrain

    VCL - DevExpress

    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.
  20. omnibrain

    Need a "Delphi programming guideline"

    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?
  21. omnibrain

    your own DB vs. 3rd-party?

    I would go with Supabase. In the end it's "just" postgreSQL, but they sprinkled tons of sugar on top of it.
  22. omnibrain

    A book about Object Pascal Style Guide

    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.
  23. omnibrain

    Need a "Delphi programming guideline"

    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.
  24. omnibrain

    ICS V8.70 announced

    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.
  25. omnibrain

    ICS V8.70 announced

    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.
×