Jump to content

Fabian1648

Members
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

1 Neutral

Recent Profile Visitors

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

  1. Fabian1648

    [Android] How to put data from a dataset into a listbox?

    I already use ListBox.Items.BeginUpdate and ListBox.Items.EndUpdate. This reduced the display of 1,000 ListBox items from 30 seconds to 6 seconds. As already written, what's wrong is adding one listboxitem after another in a loop. This is equivalent to an action for each item. If you assign a Listobject to the Listbox, it's a single action. I've tested the assignment method; it's immediate, but I can only do it for the main ListBox field. My question is whether it's possible to make an assignment that updates the other two ListBox fields by making a single assignment for the ListBox, or an assignment for each of the 3 fields, which would make it possible to do 3 actions at worst instead of 1000.
  2. Fabian1648

    [Android] How to put data from a dataset into a listbox?

    Hi, Thank for your answer Martifan. The code is actually written in Delphi. I tested your solution and I get exactly the same time to perform the operation as my best solution (6 sec for 1 000 items!). The following operation takes far too long because it adds one ListBoxItem after another for i := 0 to DataList.Count - 1 do begin ... ListBoxItem.StylesData['Reference.text'] := DataList[i].Definition; ListBoxItem.StylesData['Qty1.text'] := DataList[i].Qty1; ListBoxItem.StylesData['Qty2.text'] := DataList[i].Qty2; If I use a "Listbox.assign(ListObject)", the delay for 1 000 items goes from more than 6 sec to 500 millisec because all ListBoxItem are added in one shot. The problem is that only the field Reference of ListBoxItems is completed... The question is .... Is it possible to fill in the other fields of a ListBoxItem using an assign function?
  3. Fabian1648

    [Android] How to put data from a dataset into a listbox?

    Hi, 1. If I don't use Livebindings, it's because I can't use Livebindings (the source is a dataset > I extract some columns of this dataset to display these in a visual component) 2. This speed problem occurs with all visual components (Combobox, Listbox, etc...) 3. I've already solved a similar problem with combobox: Dataset > Stringlist > Listbox.assign(Stringlist). For 1000 lines, the delay goes from more than 30 sec to 500 millisec!. In the case of the Listbox, I don't have just one dimension, but two: not just lines, but lines made up of 3 distinct fields.
  4. Hi, In an Android app, I'm retrieving some data (3 columns) from a dataset and need to display it in a Listbox with 3 fields in each line. If I use the following procedure in a loop, adding one line after another, it works for about ten lines, but when it comes to displaying a hundred lines, the process is too slow. ... ListBox1.BeginUpdate; try for i:=0 ... ... AddListBoxItem(Listbox1,value1[i],value2[i],value3[i]); ... end; finally ListBox1.EndUpdate; end; //********************* procedure TForm1.AddListBoxItem(myListBox:TListBox;Definition, Qty1, Qty2:string); begin ... ListBoxItem:= TListBoxItem.Create(myListBox); ListBoxItem.Parent:= myListBox; ListBoxItem.ApplyStyleLookup; ListBoxItem.StylesData['Reference.text']:=Definition; ListBoxItem.StylesData['Qty1.text']:=Qty1; ListBoxItem.StylesData['Qty2.text']:=Qty2; ... end; It's much faster if the data extracted from the dataset are placed in a Stringlist and I transmit the data to the listbox in a single operation using "myListBox:=myStringList". In this case, the values are only in the 1st field of the listbox. How can I perform the same kind of operation to put the data in ListBox fields 2 and 3?
  5. Fabian1648

    delphi Twebbrowser Javascript error

    This solution has a note "Asked 8 years, 9 months ago"... 8 years ago, what version of Windows was in use? Do we have the same ie sources in a Windows OS 8 years ago and in Win11?
  6. Fabian1648

    delphi Twebbrowser Javascript error

    To give a WebBrowser1.Silent := True; to suppress script errors is not a solution!!!!! I have the same problem with the Delphi 11.3 sample called "WebBrowser" running on Win11. It is impossible to load a website (even bing.com!!!) without these script errors. And "do not display these errors" does not prevent malfunctions of the website!!!! So I'm reactivating the question, does anyone know why the Webbrowser sample is unable to play javascripts and is there a solution? Since these are samples provided by Embarcadero itself, we shouldn't even have to ask this question 😞 --- If anyone wonders why you insist on using delphi to display a website, I'd like to point out that the latest versions of Chrome and Edge (and maybe others) have changed their popup management, making many sites unusable without any prior announcement that I'm aware of!
  7. Hello, I use Delphi to develop applications for Android devices and I have a customer who asks that one of my Android applications be adapted to Apple i-phones. After doing some research, it seems that this is quite complicated to do: 1. You need an Apple device to compile the Delphi code 2. Then you have to register with Apple and submit the application for acceptance 3. You can only distribute the app from the Apple Store 4. Then there seems to be licensing issues to pay to Apple (the developer has to pay but also the end customer! Indeed, it seems that for professional apps, our customer who will use our app will have to pay each year a license to Apple for an app that was never created by Apple) If anyone has experience in this area, I would be happy to hear from them: - What are the minimum Apple devices required to transpose an Android app to an i-phone app? - What are the steps to take with Apple? - Is this story about the Apple license to be paid by the final customer true and what is its cost? Thanks for your help
  8. 1. To have specific links, just type "Delphi 10.3 Android11" in Google For instance: https://stackoverflow.com/questions/67453524/why-is-delphi-10-3-app-crashing-in-android-11 2. Personally I haven't tried it but according to some comments on the web an empty app compiled on Delphi 10.3 crashes on Android11
  9. I give myself the answer to my question so that it can be useful to others 🙂 I found in the code that handles image capture 2 problems related to the changes made by Delphi 10.4: 1. A unit of the ZXing library has an error following the change of the indexing of the characters of a string (mystring[0] in Delphi10.3 becomes mystring[1] in Delphi10.4) 2. The management of the .free (a .free in Delphi 10.3 which must be removed because in Delphi 10.4, the release of a parent object automatically releases its children objects
  10. No, I don't think it's a problem of hardware or configuration. We have tested on many devices (smartphones and tablets of different manufacturers) and we always have the same behavior. In fact, just do a search on the web and you'll find many people who have had exactly the same problem. On our side, we took the same original code (with some adaptations due to the changes brought by Delphi 10.4, for example the 1st character of a string becomes mystring[1] while before it was mystring[0]) and compiled it with Delphi 10.4. The result is? The app compiled with Delphi 10.4 works on all Android versions. So there is a problem between Delphi10.3 and Android11.
  11. Hi, I am facing a problem that many people have already noticed. I have an app developed with Delphi 10.3.3 that works perfectly on all Android (7,8,9,10 and 12) but crashes on Android11: After splashscreen display, the app stops. The app crashes on Android 11 but it works on Android 12 when it is the same .apk file. Does anyone know the cause? Thanks for your help
  12. Hi, I had an Android app developed in Delphi 10.3 that scanned barcodes via the smartphone camera and the ZXing library. After switching to Delphi 10.4, the project was able to compile without any problem but the picture taking frequently crashes: It works sometimes and often the app freezes and you have to wait for a timeout for Android to ask if you don't want to close the application (same behaviour on Android 9, 10, 11). There must have been changes in Delphi 10.4 that cause this problem. Does anyone have an idea of such a change in Delphi 10.4 that could be the cause of this problem? Thanks for your help
  13. Hi, The Android SDK provided with Delphi 10.3 included a logging system of the Android device events (launched by monitor.bat). With Delphi 10.4, the tool still exists but crashes indicating that Eclipse files are missing. With Delphi 11, this tool does not even exist anymore! How can I access the log of the Android device (internal messages of the Android device and those originating from "log.d('My error message');" added to its Delphi code? Thanks for you help
  14. Choices must be made based on the target users: 1. Our apps are not intended for every country in the world. We have therefore 3 types of keyboards according to our targeted languages and geographical areas 2. The "virtual keyboard" solution is not available on all Android devices, so it is not interesting unless you limit your app to some specific models. In the end, there is no magic solution. You have to make a choice according to the specific needs of your app.
  15. Hi, The floating keyboard is only available on some Android device models. To avoid any problem of accounting from one device to another, I no longer use virtual keyboards provided by Android. I have developed my own keyboards. When the user clicks on the object to be edited, I call an input screen consisting of a display area and keyboard keys. Advantages of the approach: 100% compatible with any Android device and keys big enough to avoid taking a magnifying glass to write something.
×