Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 07/23/21 in all areas

  1. Carlo Barazzetta

    Looking for SVG support in Delphi?

    Good news about 2.4.0 version of SVGIconImageList: - Added new engine: Image32 library (ver.3.0) by Angus Johnson (VCL+FMX) - Image32 is now the default native Delphi engine, because has more SVG functionalities like blur, gradient, merge, drop-shadow, markers, simbol, pattern, subpixel. - Added support for Android and iOS platforms (by Image32 engine) - Added support for backward Delphi versions (from XE3) - Added demo to compare the four engines (SVGViewer)
  2. Alexander Sviridenkov

    Parsing Text search expression

    HTML Library Bundle contains SQL framework with SQL parser for Firebird, Oracle, MySQL, Postgres, Microsof SQL, Elevate and SQLite. Library supports query parsing, formatting, translation between SQL dialects, modifying (change order, where, limit, fields, etc) syntax check and DB schema check, editor completion implementation and much more. https://delphihtmlcomponents.com/SQLLibrary.pdf
  3. Found this https://developer.android.com/reference/android/app/ActivityManager#clearApplicationUserData()
  4. I am not sure i do understand your quest completely, but will guess a little ! First, the records you listed look like a DB columns, so, is SQL approach is on the table ? By using SQL you do need nothing else, SQL in fact built to such search and much more complex syntaxes, but again i am guessing here, and to add to this, to my knowledge the most comprehensive SQL parser for pascal is the one by NexusDB, there is one file called nxSQLParse.pas and it is freaking scary ! Also there is many Pascal/Delphi scripters engine that do similar things, most of them are insightful, From the powerful TMS Scripter, to RTC, or Delphi HTML, ... the list is long and browsing the code is valuable knowledge. But again, guessing you did not miss the SQL choice, so let me explain how i did many similar filtering on big data with complex syntaxes, although in my case it wasn't text at all. I will try to explain with an example from your sample syntax, and hoping you will get the idea. Your syntax is ("test phrase" OR testing) AND text OR "anything else" First lets dissect syntax into pieces, we will solve this by the most simple and least complex way, divide and conquer ! 1) Separate by the logic operators, means we will be left with a list of searchable text "test phrase" testing text "anything else" 2) Build logic flow accordingly to brackets, here a little knowledge in how mathematical expression being parsed will be a great help, see we brackets and logic operators are similar to brackets, +, -, *,/ , after building the flow which almost modified version of the list in (1) with which one comes first then applied to which, there is many Pascal/Delphi mathematical expression parsing code out there. 3) Search for each item in (1) and build a new list (an array) for it, yes this seem expensive, but let it be for now. 4) Apply the Flow you built in (2) on the lists generated from (3), with each step you will be building a new list, this might be easier from adding or removing from/into (aka changing) a list, the last list is the search result. Simple, Right ? 🙂 Later, and after making this work, you can go after eliminating unneeded lists, like the case with ("test phrase" OR testing), these can be handled as one list, but again make it work first in the simplest way you can, only after that you can refactor and redesign it with more complex but faster and less memory usage. May be others will suggest different approaches, but now this what i can thing of, which i see can fit your need, and it will be elegant.
  5. Yes, I meanwhile put such "prominent disclosure" dialog in front of all my apps ( even if Windows ) 🙂 No matter if iOS don't require this, I think that is a good policy too. Regarding the permissions I do it similar as in some websites, saying we have "required" permissions, and explaining why they were required. Also explaining some privacy stuff there. If the user don't agree's, he should leave the app. But of course the user still can choose other settings in the OS dialog, than he did in the "prominent disclosure". The whole permission stuff is a permanent pain ....
  6. dummzeuch

    Tool to inspect properties at run-time?

    There is also an object inspector component in the jvcl.
  7. SwiftExpat

    Tool to inspect properties at run-time?

    This is correct, you can see sample source code on Github here with compiled demos here. The component is a simple button which is appropriate for starting out. In an established application I take the approach to not use any extra space on the form by utilizing an onclick event handler of a label. The FMX sample shows a click 3 times on a label to invoke, similar to the 7 long presses in Android. This design allows you to ifdef out the code for your release and not modify the form. Note the ifdefs in the samples. This is correct. This code maintains the tree of forms, data modules, components. The Inspector loads the component details but is not automatically aware of changes that occur. On the Inspector tab there is a button that always allows you to reload. In general workflow it stays up to date, but depending on what events are assigned on the component you may need to reload. An example would be modifying the align edit1 from center to client, The Inspector updates the align property because it is aware it made the change. The width still shows 100 as in the Inspector because it is unaware of the new width due to alignment. A click on the reload button will force it to load the current values.
  8. SwiftExpat

    Tool to inspect properties at run-time?

    Also worth mentioning from TMS is with the FNC UI pack you get an object inspector. Note in the documentation it calls out that you are inspecting published properties only. TMS FNC Object Inspector does not populate a tree of the application components, it is just the Inspector. https://www.tmssoftware.com/site/tmsfncuipack.asp?s=fncobjectinspector#features To your original question of all classes and objects, it is worth considering visibility and ownership. The component tree is populated based forms / data modules owned by the application, then components owned by the form. Consider if you are creating components at runtime and the owner is assigned to the form, if not then the component will not be visible. I have used it to inspect some of by business objects, with the condition that the property is published. It also has events so that you can make properties read only at runtime. Take a look through the PDF and see if it fits your needs. If you desire a component tree you could build / buy something like my product, I do not include a license to FNC UI pack, it is a separate purchase. Some youtube videos are available at https://swiftexpat.com that will give you an overview.
  9. David Heffernan

    gridlines in listboxes

    Use a list view. Part of problem solving is exploring the problem space and finding the best solution, given the pros and cons of all possible options. Deciding on the solution first and then trying to force it to work is not the way to solve problems.
  10. PeterPanettone

    Tool to inspect properties at run-time?

    This looks very promising: http://www.greatis.com/delphicb/objinsp/
  11. Understood, however there will always be someone, and they may still contact support to ask why the app is not working 😉
  12. Nigel Thomas

    Tool to inspect properties at run-time?

    marco.cantu[at]embarcadero.com. He has contributed to this forum before so may respond to you here. You can find other ways to contact him via his website: https://www.marcocantu.com/
  13. Angus Robertson

    THttpAppSrv - Add*Handler for PUT and DELETE

    SVN has been updated with a new OverbyteIcsHttpAppServer adding support for PUT and DELETE verbs, also OverbyteIcsDDWebServiceSrv.pas now uses TUrlHandlerRestApi instead of as a virtual page, little simpler. Angus
  14. Dave, on iOS it works the same way, and with the increase in privacy controls year after year, I think there will be no regressions. What many apps do is show a form before the permission request saying that it is necessary to grant X permission and if the user clicks on proceed, then requests the permission. This will avoid almost all permissions being denied. And when that happens, there's nothing to do but ask the user to grant permission on the settings (even Telegram does that).
  15. angusj

    Resource Hacker

    Resource Hacker A resource editor for 32bit and 64bit Windows applications. It's both a resource compiler and a decompiler - enabling viewing and editing of resources in executables (*.exe; *.dll; *.scr; etc) and compiled resource libraries (*.res, *.mui). Resource Hacker also provides many options for compiling and decompiling resources from the command-line. http://www.angusj.com/resourcehacker/ Download: http://www.angusj.com/resourcehacker/reshacker_setup.exe
  16. Dany Marmur

    JSON parsing question

    { "myArray": [10, 20, 30, 40], "myObject":{"subValue":44}, "version":"1.2" } { "myArray": [10, 20, 30, 40], "myObject":{"subValue":43, "subName":"AHA!"} } If "version" is missing, it's null. If "subName" is missing it's null. Or to express it differently any conceivable value not specified is null. It's actually like objects in JavaScript, you can almost "add anything to them anywhere". Or like this; If a JSON does not have a schema, then you can definitely miss "stuff" if you "analyse" it. So JSON requires documentation or a kind of "schema" IMHO, at least in your use case. HTH, correct me if needed.
  17. pyscripter

    New Community Edition

    In case you have not seen it: Delphi & C++Builder Community Editions Now Available in Version 10.4.2! (embarcadero.com)
  18. Dalija Prasnikar

    TListView filled by Thread = Freeze

    Animation is not working because thread is doing very little work besides queuing work to the main thread. This gives very little chance to the main thread to do anything besides processing the queued work and repaint animation. This is matter of timing so it is not surprising that you have different behavior on different platforms. You can either use ProcessMessages to force main thread message processing and repainting the animation, or you can put thread to sleep for short period of time. However, sleeping will slow down the whole process, so you don't want to call it at every iteration. Following code works without issues. There are some additional notes, some already mentioned by @Remy Lebeau First, I have changed StopThread procedure to just call FreeAndNil(FMyThread) - freeing the thread will also call Terminate and WaitFor - this is why it causes the deadlock is you are using Synchronize. Niling the thread is there so you can click the button again otherwise you would leak the thread. If the thread is already running you will not be able to start the thread again, but you will be able to do so after the first thread is finished. NotifyComplete procedure will also call StopThread to release the thread because it makes no sense to keep dead thread around. Calling TThread.Queue(TThread.CurrentThread will discard any queued events after the thread is dead. In this example it is important to do so, because form is closing any we don't want to run any already queued events after form is released as this would cause AV. If there is something that needs to be always executed then such code should be in OnTerminate event. When it comes to anonymous method variable capture, they will be captured and their lifetime will be extended, but that only means variable will be accessible, but does not guarantee that the content (object) will be alive, you can only safely use variables of value types and managed types. For others, you need to be sure that they will be alive as long as anonymous method is running. In this case ListView1 and Button2 will not be alive when the form is closed. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin StopThread; end; procedure TForm1.StopThread; begin FreeAndNil(FMyThread); end; procedure TForm1.NotifyComplete; begin AniIndicator1.Visible := False; AniIndicator1.Enabled := False; ListView1.EndUpdate; ListView1.Enabled := true; StopThread; end; procedure TForm1.Button2Click(Sender: TObject); begin if Assigned(FMyThread) then Exit; AniIndicator1.Visible := True; AniIndicator1.Enabled := True; ListView1.Enabled:=false; ListView1.BeginUpdate; FMyThread:=TThread.CreateAnonymousThread(procedure () var I: Integer; Total: Integer; begin Total := 0; for I := 1 to MaxValue do begin TThread.Queue(TThread.CurrentThread, procedure () begin ListView1.Items.Add.Text := 'Th: ' + I.ToString; Button2.text:= i.tostring; end); if Application.Terminated then begin break; end else begin if i mod 10 = 0 then Sleep(1); end; end; TThread.Queue(TThread.CurrentThread, procedure() begin ListView1.Items.Add.Text := 'Thread: ' + Total.ToString; NotifyComplete; end); end); FMyThread.FreeOnTerminate := False; FMyThread.Start; end;
  19. Jim McKeeth

    Is this C++ builders new FORUM ???

    I spent quite a bit of time with Ann Lynnworth from https://www.codenewsfast.com and restored a full archive there. You can go find all the old messages there.
  20. https://delphisorcery.blogspot.com/2021/06/spring4d-20-sneak-peek-evolution-of.html
  21. Thank you all for the help and comments. I went with VMWare Workstation PRO and I am quite satisfied. The system is very responsive, all custom hardware that we are developing works trough USB and network. I am using Veracrypt for encrypted containers where I keep the source code (in case my PC gets stolen) and it work flawlessly. My reasons for virtualization: Privacy. I plan to switch to Linux by the end of the year. I don't want Windows to be my main OS any longer. I plan to use hardware with Intel ME, Webcam, Audio, WLAN/Bluetooth switchable. There are at ton of reasons, but that is another discussion. Tedious setup. I have hundreds of my own libraries and packages. I have over 20 commercial 3rd party packages (tools) and they are all interconnected. This means that it takes a lot of time to setup system that truly works. I also need to keep older versions of RAD Studio Enterprise for debugging/compiling older products, where customers did not upgrade to newer software. With VMWare I will be able to switch between versions fast. Portability/backups, I want to switch my development environment to another machine fast in case of main PC gets broken or stolen. I do backups almost on daily basis. Testing. I want to test the software with clean Windows with our tools and databases preinstalled. But nothing else. Windows Sandbox is not useful in my case. Low spec machine simulation testing, etc. I still have testing computers that are running native Windows OS for some development and testing. OFC the performance and speed of native development is important, that is why I will not switch my Unreal Engine development to virtualization, that would be disastrous. But I can setup my full Unreal Engine environment + Visual Studio in 5 hours and it also works natively on Linux. Kind regards
  22. A.M. Hoornweg

    VMWare Workstation PRO vs MS Hyper-V

    Some advantages of using virtualization: Backing up a vm is as easy as copying a file. If you break something in a vm, it doesn't affect the host machine. If you decide to replace your host machine with a new one, you're up and running again within an hour. I've configured my VM to use separate virtual disk files for C: and D: and I keep my projects on D:. Whenever I update Delphi, I archive the virtual C: drive first. This makes it dead easy to fire up an older Delphi version whenever I need it.
  23. Remy Lebeau

    Is this C++ builders new FORUM ???

    I miss the old newsgroups 😢 None of the newer web-based forums have really matched up to them, in terms of usability, monitoring, organization. It is just not the same.
  24. AlexBelo

    Is this C++ builders new FORUM ???

    🙂. But (IMHO) dropping of official forum was really wrong decision. In old days (since ~2000 year) I usually started my day from browsing of official newsgroups (in good old plain text and very handy tree format of messages) and I still have a huge collection of answers in "how to ..." style from famous specialists like Peter Below, Remy, and many others. After end of NG civilization there is no default place where I can get help from gurus and be well informed. Yes, you can say that there are many such places but "many" means "scattered" in this context ...
  25. uligerhardt

    win32metadata

    https://blogs.windows.com/windowsdeveloper/2021/01/21/making-win32-apis-more-accessible-to-more-languages/ Sounds very interesting.
×