Jump to content

Rollo62

Members
  • Content Count

    1674
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Rollo62

  1. Rollo62

    Any update on the v10.3.3 release?

    Use a virtual machine.
  2. Hi there, I just stumbled about some class helpers, I rarely use, and I found that Embarcadero seems to have a different understanding of howto use them. For example TByteHelper.Parse I would have expect to use it like this: var LByte : Byte; begin LByte.Parse( AString ); // Use LByte end; Unfortunately Delphi has set Parse as static class function in the record helper, which leads to the following useage: var LByte : Byte; begin LByte := Byte.Parse( AString ); // Need an assignment here end; Why not using the first version ? I assume this if because Delphis internal types, like Byte, Integer, etc. are special datatypes, and lack a kind of "Self" behaviour. What I'm thinking of is, does the 2nd version maybe has some other advantages over the 1st version, which would make it the preferred choice. If anybody has a good reason why I should prefer the 2nd version also with my normal types and classes, please let me know.
  3. Hello there, I was making some experiments with shrinking larger VmWare Fusion VM images, which is not as simple as it should. My configuration is: Macos Host: Mojave, VmWare 11.5.0 Macos Guest: Catalina I have found the following process to shrink the OS disk, which looks as if it works well so far. The disk-sace is free and reduced and the VM is accessible. Unfortunately the last step, to shrink the VM image itself from the host seems to be the issue now. The "pre-occupy disk space" checkbos is NOT checked, so it should be a sparse file. There is the "vmware-vdiskmanager" tool, which should be able to do this, and it comes back with "Shrink: 100% done.". It seems that after this the VM size is still original, and the VM disk is not accessible any more. Does anybody has a good tip what may go wrong here ?
  4. Rollo62

    [Macos, APFS, VmWare] Shrinking VM images

    @Ondrej Kelle Thanks, but I'm on Macos host and Macos guest in the VM. On Windows this task seems to be easier, but I think the real issue lays in VmWare images, which need to be resized. If VmWare itself doesn't support them, maybe some 3rd party may exists.
  5. Rollo62

    [Macos, APFS, VmWare] Shrinking VM images

    Thanks for the info. I thought about script on MAcos, like I have read some notes that this also supports "wipe" all unused bytes. Since I tried shrinking only via VmWare Fusion yet, on my Macos host, maybe its a good point to check with VmWare Spere, what this can offer. This seems not an easy task at all, fortunately the vmdsk images are exchangeable between Fusion, Workstation and Sphere (hope so). However, if this adventure turns out to get that difficult, I could create a new, empty VM from scratch, as usual. Only that the smallest disk size I can create via VmWare Fusion seems to be 40 GB (~30-35GB physical), while a really cleaned up VM (removed all garbage) maybe only would need only 20-25GB (I would assume).
  6. Yes, I agree too all whats said. Still I don't like the usage of class functions on basic types, my fault
  7. Ok, that is a workaround. But I hope that there is a better way ... Apple strikes back on iOS13 again ... I'm just still fixing other similar issues.
  8. Rollo62

    Delphi Rio 10.3.2 : iOS Custom Font

    http://docwiki.embarcadero.com/RADStudio/Rio/en/Creating_an_iOS_App Check "using custom fonts"
  9. Rollo62

    LiveBinding at runtime

    Why not work and improve ? There were times when also VCL was fragile and slow.
  10. Rollo62

    [Macos, APFS, VmWare] Shrinking VM images

    Interesting, do you have a script which you used for that ? When I check my partitions and volums, it looks pretty clear whare the "free space" is. The problem is that VmWare seems not to offer a shrinking option for Macos, maybe only with some tweaks deep in the VmWare tools ? Since the drive images are only files, I think this should be possible somehow, maybe in best case by just editing a HEX variable encoding the physical size, and trunkating somehow. Because the partitions looks fine, only the physical size didn't change, which makes sense in the physical world.
  11. Looking for a solution too, since I used same code as yours. Seems that SetStatusBar was deprecated, and now in iOS 13 its probably gone. https://stackoverflow.com/questions/7030682/ios-iphone-ipad-sdk-alternative-for-uiapplication-sharedapplication-setst https://developer.apple.com/documentation/uikit/uiapplication/1623026-statusbarorientation
  12. Ok, from time to time I use records as simple parameter containers, without such convenience methods like Parse() since I don't need them (I thought I'm a little old.fashioned then) procedure TForm1.UseMyRecord(const ARec: TMyRecordTest); begin ARec.Parse( '42' ); // This opens a "backdoor" to the const record, better don't do if ARec.FField = 42 then begin ARec.FField := 0; // This doesn't compile, thats fine end; end; Thats enough reason for me to start liking ugly constructions like LMyVar := Byte.Parse('42') ;
  13. Aha, right. Thats a good reason to use the 2nd version. I thought that I would get a warning, that I cannot modify const. Have to check how this behaves ...
  14. Rollo62

    Interesting article about dying languages

    Nice visualization. Like always with such statistical data one should ask where does this come from ? How does GitHub evaluate "popularity" ? Isn't "popularity" just high because you can do small tasks easily ? Maybe such popularity index must be weighted against the complexity of projects as well. This also gives a clue to what developers maybe really like, as its seems to be a kind of simplifications in the language itself (JS amd Python). Anyhow, I don't really agree on this, as typed languages has a much practical benefits. Easy-to-learn is maybe not the only core feature of popular languages. From my experience, the languages are more or less irrelevant, but the libraries and frameworks do. I like all C languages, because they are "readable" for me, as C++ developer, although there are still many different features in each of them. Aren't JS/Python not only that popular because of their fantastic libraries and frameworks out there ? For me the key benefit of a language is not to support all small features like Nullable or Inline variables (nice to have, but not mission critical), but most important for me are stable and effective frameworks (VCL/FMX), encapsulating the complexity of the real world underneath. Regarding Delphi I would like to ask: Why can't I use ALL the core libraries of the modern OS, like beacons, sensors, ARKit, etc. etc. at 100% yet ? If so, there would be no need to move to Swift, JS or C#, only because I need to solve a special task, unreachable from FMX right now. Same for VCL and WinRT, but the situation is much more relaxed there, from the history of Delphi. Maybe I'm wrong, and there are different opinions for sure, but I would put most efford on building infrastructure and quality around libraries, instead of trying to follow the last hype in language theory. The "ease-of-use" is not by leaning only 20 keywords instead of 40, but to be able to use powerful libraries that encapsule all OS features in a nicely, cross-platform way, which are easy to learn, self-explaining, consistent, powerful and error-free. Furthermore to have powerful debugging tools as well, around this infrastructure.
  15. Rollo62

    Add a system-menu item to all applications?

    <OT> (c) Monty Python </OT>
  16. Rollo62

    [Macos, APFS, VmWare] Shrinking VM images

    Still no luck, but I added the step fragmentation before the shrinking. After the shrinking, I've got missing user access, so I solved this by giving access to everyone again: --> sudo chmod -v 666 /Users/myusername/Documents/Virtuelle\ Maschinen/macOS\ 10.14.7_Rx1032B_2_BETA.vmwarevm/Virtuelle\ Festplatte.vmdk After that the VM is running again, but still the physical size is not shrinked, although the internal partition is shrinked as it should. Maybe somebody has a clue how the VM image could be shrinked physically as well, maybe there are some tools out there (Paragon, etc.), but I could find any tool yet solving such specific issues with VmWare Fusion images. I nobody has some clue, maybe I have to restart again with some older, clean images, but I would like to know howto cleanup existing images for the future. What I cannot believe is that a modern file system like AFPS and VmWare are not able to allow a simple shrink of the file, only with a lot of terminal command steps, as below. Isn't this the 21st century now
  17. Rollo62

    Delphi 10.3.2 with Xcode 11 and iOS 13?

    I've just tried my proposal on a Mojave VM, which I updated to Catalina. 1. With old Mojave Mac: Copy and backup ApplicationLoader from the OLD installed XCode package. Right click at XCode and select Show package content 2. Get he AplicationLoader app from here 3. Application loader is an self-containing app 4. Compress the app to ZIP file (this I needed to do, because I had issues to copy the .app onto my server) (Maybe this is again some strange security issue of big A) 5. I could copy the ApplicationLoader locally w/o problems, e.g. to the Macos desktop. 6. Upgrade Mojave and install Catalina (I removed and cleaned up XCode completely, except my copy of ApplicationLoader of coarse),. 7. Now I have Catalina, and I can start ApplicationLoader from old XCode. All seems to work nice and smooth, I didn't made a real upload yet, but I uploaded an old app and got the usual messages, after checking with iTunesConnect. Seems to work fine, probably still OK for a while ( Catalinas lifetime ??).
  18. Rollo62

    Modern C++ and Delphi

    I like the growing support for C++, maybe one day I have the chance to migrate my projects back to C++ if its stable enough. The whole advantage of C++ would be if all these countless popular C/C++ projects like ImageMagick, OpenCV, LibVLC, etc. could be build from CppBuilder out-of-the-box, has anyone tried yet ? As I understood David Millington, Embarcadero has seen this big advantage as well, and is working in that direction to bring C++ world more close to Delphi.
  19. Rollo62

    Delphi 10.3.2 with Xcode 11 and iOS 13?

    Nice, thanks for the link. Is'nt this as well deprecated together with ApplicationLoader ? @Jose Morango Since ApplicationLoader is only an app, maybe its possible to extract this from the old package before updating to XCode 11. Probably this only uses such the commandline tools. So then this could work for a while, until Embarcadero solved the topic, and there would be no need to install the whole XCode10 package. Have you checked if this might be working and what dependencies you need for ApplicationLoader ?
  20. Rollo62

    Context menu UI built with HTML and CSS only

    @Alexander Sviridenkov I use and like your library, although I must say this is sometimes not easy to figure out how simple, obvious tasks are intended to operate in runtime and designtime. Please provide more of such samples, to get clear about the intended use and possibilities.
  21. Rollo62

    JSON as a way to save information in Firebird

    I use JSON field for a similar approach, but I need to have saved the current state of a table document as safety backup. Since table entries might change over time, and building a history-safe table structure is somewhat brittle, I decided to store a copy of the current document (with main table entries) as JSON backup. No matter how the database structure and the data might change over time, I have valid backups when I release a document. So that I can surely find the state that is related to a special ID and date. Works fine, but of coarse there is the lack of search, but since the current tables refer to the momentary situation, I do not need to search in JSON really, Only when I need to restore old settings, I simply readout the JSON, and there is may be different versions of parameters stored in the JSON over time, which I can manually adjust if needed. Not sure if it is a good idea to have such field as main operating field, I guess this has too many drawbacks (speed, no seach, not easy to isolate between multiple user edits, etc.). Especially as you wrote that these fields need to be changed frequently. But if the field is just an addon to the normal table structure for a special use, as it is in my case, this might work fine. Maybe a clever mix of DB table fields and JSON fields can keep best of both worlds, but this highly depends on your project.
  22. Rollo62

    Good practices with nested methods

    Good point. I didn't count the many times when extracting from fast demo code with nested methods to private methods. Maybe this is the kind of "Evolution" how code might evolve over time, in the process of testing different approaches for a solution.
  23. Rollo62

    Good practices with nested methods

    I would rename one of the var i: integer; to to a distinct variable name "J", to avoid naming issues in the future. Better safe than sorry. Usualy when I use nested functions, they might also work on the above defined variables in the parent method, so that these methods might act as a kind of "helper methods". The drawback is that the common variables act like global variables, so you have to take care about their side-effects. I use this usually only with very short methods, where the behaviour is clear (like Item_Add(const AValue : String); ), to preset repeated settings in one more convenient common method.
  24. Dear all, I'm still upgrading my older projects from 10.3.1 to 10.3.2, and try this as always as sensitive as possible. But it turns out that too many libraries under Android would have been changed. This is my orginal project loaded in 10.3.2 So I'm better off to create a complete new, empty project , and reset all my old values from 10.3.1 step-by-step. In 10.3.2 the libraries looks like this So I try to figure out what would be the best way to make such upgrades, which can be very tricky these days. I know @Uwe Raabe and his ProjectMagician, thanks for that nice tool. There are also OptionSets, MigrationTool, etc., many ways to successfully reset or completely destroy your .dproj files. I want to consider the basic steps here, and hope to get some feedback, how this can be done best (without expecting strange side-effects) in a complex world. Steps to upgrade: Backup your orignal project Create a new, empty multidevice application Remove the Mainform (Unit1) and other from the main form, this will be reset later from the older project. Save and overwrite the Project file to the same .dproj !! Make global settings in Project options\All configurations first, and try to keep minimal changes from there only In later separations of Debug or Release, these changes will be done in the respective configurations later. Adding special libraries, frameworks, etc. needed for the app Adding special ressources/images needed to deploy with the app Setup Search path, version no., bundle identifiers, entitlements, permissions, icons, etc., which shall be global for the whole app Setup special settings, like debug/release store API's, Google maps debug/release API's, etc. in the respective configurations Fixes and workarounds Add the old units and datamodules (I try to minimize these in my projects, so I usually have to add only one main form), and try to restore the old project state Refine and check the settings, and ready to debug, test and deploy This way I evaluated for myself that I have best control over all settings (and there are many which could go wrong in the cross-platform world). Is there probably a better way to automate this process ( ! but please consider that many features might have large incompatibilities from 10.3.1 to 10.3.2), I don't really trust automatisms when it comes to such sensitive data, and when too many changes are there. Do I miss something, is there a more easy "migration tool" out there ? Would be great to hear how you do this usually, and which tools you use.
×