Jump to content

sjordi

Members
  • Content Count

    203
  • Joined

  • Last visited

Everything posted by sjordi

  1. sjordi

    Request for advice: FireMonkey and Frames

    @Mavarik offers a nice solution. I use TFrameStand too. The advantage here is that you can create the frame only when you need it, no other one is created before being used. And it's released once you leave it. The advantage of Maverick solution is that you can switch the appearance of the form at design time between Windows, mac, iOS and Android. This is not possible with Frames... But I have no problems using stands.
  2. did you first erase all entitlement files before deploying? I use Delphi 11.1 and iOS SDK 15.4 without problems
  3. Are you using a database in your app? If it is not correctly deployed to the iOS device, it will close right away... You have to place it in specific locations and make the app know where to find it.
  4. sjordi

    Tag editor?

    Hi, Before I start trying to create one myself, does anyone here know an FMX component to use tags with add, delete, move functionalities. Something looking like (a little cross to delete next to each tag text would be nice) or from this forum Thanks for any help. Steve
  5. sjordi

    Tag editor?

    Dang! I have FNC UIPack... but I didn't check "list"... only "tag" or whatever close to this... I knew I saw this somewhere. Thanks...
  6. Hi all, A generic question. I'm deploying my apps with an embedded SQLite DB. Each time I compile/deploy, that existing on device DB file is overwritten by the default one. It's fine for development. But how do you actually proceed if you want to deploy an update? If a user has the app already with personal data, I don't want her/him to lose that data. Testing whether the DB already exists is not possible since it's deployed each time within the new binary. One way would be to have all the code to check whether the DB exists. If not, programmatically create it and fill it with sample data. If it does, just check its version and apply possible structure upgrades? But it feels like this would embark a lot of code that may not really be useful. How do you guys deploy news versions of your apps without overwriting exists DBs? I especially think about iOS and Android devices. Thanks for any light. Steve
  7. sjordi

    Deploy without overwriting the DB?

    ok, I think I faced a border effect... I copied the System.StartUpCopy from here and pasted it into my IDE. Didn't work. Some extra characters? No idea. Then, I erased it, typed System. and saw StartupCopy in the completion list, selected it and still, the IDE was complaining, not even possible to compile. Then I typed it in manually and it was fine. Just tried to redeploy my app and I correctly kept my actual data. Cool Thanks all. Steve
  8. sjordi

    Deploy without overwriting the DB?

    Actually, I don't find it. It's not known from the compiler, and I have no trace whatsover of any file that looks like it besides a DCU file... but not seen I'm under Alexandria... Docwiki at Embarcadero doesn't reference it either... nor does the help... I think I'm missing something.
  9. sjordi

    Deploy without overwriting the DB?

    Wow, never ever encountered this! Thanks a thousands I'll investigate this a bit further more, but it looks like it does exactly what I need... Thanks a lot.
  10. sjordi

    ListView: click on checkmark only?

    Hi In a TListView, is there a way to know whether we clicked the checkmark (accessory in a dynamicappearance) ? The OnClickItem is fired when we click anywhere in the List Item. Under VCL there were a GetItemAt(X,Y) function to test whether we were on the check mark itself or not. It doesn't exist in FMX. I'd like to be able to put my own icon as a checkmark and turn it on / off only when clicking (or tapping with the finger) only in that checkmark area, not by clicking/tapping the full item itself. Any way to achieve such a thing? Thanks for any idea Steve
  11. sjordi

    ListView: click on checkmark only?

    Nope, didn't find the Arlésienne 🙂 It looks like the OnclickEx part works fine as it also allows to react to a click on the item (outside of the checkbox). I'm moving forward with this for now, but can definitely refactor later on. I had your blog article in my personal ressource wiki and didn't see it ... (no comments)
  12. sjordi

    ListView: click on checkmark only?

    Thanks Mr ListView specialist !!! Still in Arles here! It works fine actually, I didn't find any limit so far, but I'll check your blog. I'm always learning a lot from others, and especially from you... My app is fully MVVM and decoupled mostly from the GUI so trying other implementations rarely break anything. I checked your demos and found a lot of ListView customization, but didn't find one that check/unchecks when only the checkmark is clicked (unless you display it in edit mode but then it's not a custom checkmark)
  13. sjordi

    ListView: click on checkmark only?

    It looks like you can get the ClickEX event and get the coordinates of the click. Then check wether your clicked within your checkmark area and then respond accordingly. Something like this, say my glyph working as a checkmark is 44x44 and positioned at 0,0 and called "CheckIcon" procedure TForm.myListViewItemClickEx(const Sender: TObject; ItemIndex: Integer; const LocalClickPos: TPointF; const ItemObject: TListItemDrawable); if (LocalClickPos.X >0) AND (LocalClickPos.X < 44) And (LocalClickPos.Y >0) AND (LocalClickPos.Y < 44) then if myListViewItem.Items[ItemIndex].Data['CheckIcon'].AsInteger = 0 then myListViewItemItems[ItemIndex].Data['CheckIcon'] := 0 // First image in the ImageList else myListViewItem.Items[ItemIndex].Data['CheckIcon'] := 1 ; // 2nd image in the ImageList Now this seems to work on Windows, Mac, iOS, Android and Linux. Obviously that's one way to proceed. No problems with screen density differences. But if someone has a better practice, it would be great to post it here for everyone. Steve
  14. Hi everyone, Did anyone try to programmatically close the delete button when swiping on a TListView item? The only way it to click on it or on the List Item. I'd like to take an action and immediately close/hide it when the user lifts the finger... (just like swipe to immediately execute an action and release) Any idea? Thanks for any help Steve
  15. sjordi

    VertScrollBox real size?

    Hi, I'm losing my nerves on something I thought would be simple. I have TVertScrollBox aligning "client" to the main form in which I place other controls at creation time. Some of those controls are out of screen, much down there in the VertScrollBox. Now my problem is that I need to know what is the full size of the VertScrollBox containing all the controls. By full size I mean even the non-visible part that can be revealed once one scrolls down. I think I tried everything and always get the height of the visible part of VertScrollBox. I tried its ViewPort, its Boundaries, Content.Height, Content.Boundaries, etc... each time the same result: the actual visible form size. After looking around, someone facing the same problem suggested to calculate it myself while adding the controls, taking the further down one, get its vertical Y position, add its height and then I know what the height (bottom) of the VertScrollBox. It works. But I may be a purist, it looks to me to be just tinkering around like a fool. How come there is no way to get the VertScollBox FULL size at each moment ? Or is it so obvious right under my nose that I don't see it? Thanks for any light. Steve
  16. sjordi

    VertScrollBox real size?

    Damn ! Of course I found the answer right after posting. For those facing the same problem... VertScrollbox.ContentBounds.Height // no comment
  17. Hi, I would like to know whether it's possible to send a file to a specific app on iOS. First thing coming to mind is to use ShareSheet, but is there a way to bypass the form and do everything programmatically? An example, would be to have the Nextcloud app on the smartphone and on my Delphi app, create some zip files with some data inside the archives. Once a zip file is ready, I'd like to send it to the Nextcloud app (which is already identified via credentials) so it can push it on its server. All this without displaying the ShareSheet ... Any idea? Nextcloud is for self hosted file servers, my question would be the same f it would be targeting GoogleDrive, OneDrive, DropBox, etc... Thanks for any help Steve
  18. sjordi

    Cannot build for linux on Windows 11

    if you are in a VM and you share the Documents folder from the host, it's seen as a remote folder (network) and it doesn't work. As you say, either you can copy the entire Linux SDKs into your local disk and make the IDE point on them or you can use aliases. I have 3 SDKs: CentOS7, Rocky8, Ubuntu20.04. Copying everything into the VM would gobble a lot of valuable disk space. Instead I keep my SDKs on my Mac Documents folder. The VM sees the Document sfolder mounted as Y: (so adapt to your situation in the example below). Here is what I did in the Windows VM mklink /d "c:\Documents\SDKs\Ubuntu20" "y:\Documents\Embarcadero\Studio\SDKs\ubuntu20.04.sdk" That way, in your Windows Documents folder, you'll have a link to the outside (host) real SDK and they won't appear as remote network mounts, and thus work correctly. In RadStudio IDE, make sure to set the Linux platform "Local root directory" to C:\Documents\SDKs\ubuntu20 Same for CentOS, Rocky, and other flavors... Hope this helps.
  19. sjordi

    Image ios

    Shouldn't you first crop the picture to the exact display position and then save it? Then you will lose everything outside of the view if that's what you intend to do? Isn't there a function like ClipRect or so.
  20. sjordi

    Scrollable TGridLayout question

    Hi all, After three days googling and reading about the same question... it looks like I didn't find a valid answer. I have to display glyphs in a TGridLayout, because I create those glyphs dynamically. Each of them represent either a folder icon or a file icon. I can click on them and respond the way I want. Problem is that I need my GridLayout to scroll vertically when I reach more rows than displayed on screen. For this I resize the layout taller than the form's height. On desktops, it's fine, I can click all my glyphs and the scrollbar appears to scroll up and down when I have more rows than the form's height (macOS, windows, Linux) Now on mobile devices it's another story. I think it has to do with HitTest that captures the click/tap on the glyph. So when I want to scroll the layout, nothing happens. If I turn HitTest to false for each glyph, then I can correctly scroll but I can't click the glyph anymore. The only way to still be able to click and to scroll is scrolling from outside the layout, on the very right edge of the screen, but it's not intuitive. I think I have tried all HitTest combinations combined with all Touch>InteractiveGesture>Pan=True|False to no avail. Tried using TImage instead of TGlyph. Same thing Just in case it's useful, I'm placing that TGridLayout in a TFrame. So I have also moved the OnClick event from the Glyph/TImage to the main GridLayout itself. Same behavior. My guess is that it's either responding to a Click/Tap or a scroll gesture, but can't do both... Still, there are plenty of apps doing this. The Delphi examples provided don't use a TGridLayout unfortunately. Except the ScrollableForm example though: it works. But I can't seem to figure out how the hell I can reproduce this. You can click a control and still scroll the form while pressing the control and dragging. It would correctly respond as a click/tap when not scrolling. My config: TFrame > TVertScrollBox > TGridLayout [> TGlyphs] Did anybody here practice with GridLayout and be able to click any of the grid component AND still be able to scroll the grid on mobile devices? Thanks for any clue. Steve
  21. sjordi

    Scrollable TGridLayout question

    Just for those facing the same problem... If I set the TVertScrollBox on a TForm, it works perfectly. One can both scroll and click on controls. It seems that the problem is when the ScrollBox is in a TFrame. I'll tinker a bit with this and let you know if I come up with a solution... -- EDIT - SOLVED -- Yes it's the case. I now have set my TVertScrollBox into the main TForm. Then when I dynamically add a Frame, I set it with the VertScrollBox as its parent. Now everything works fine. I can click my controls and they respond, and if I click on them and drag up and down with my finger, they do scroll. Technical note: I use Andrea Magni's TFrameStand to do this. When adding a TFrameStand, you can specify the DefaultParent property as the TVertScrollBox ! Don't hesitate to come back to me for details if you hit your head on a wall too 🙂
  22. sjordi

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Did you try to move the metal initialization into the .dpr file? I think it's mandatory. Something like in this example (to adapt for your need) {$IF defined(MACOS)} if TCustomContextMetal.IsMetalSupported then GlobalUseMetal := True; {$ENDIF} Application.Initialize; Application.CreateForm(TFormMain, FormMain); Application.Run; I faced several problems when in the main application, it didn't work or even produced errors. Someone here told me that, according to the documentation this has to be set into the DPR file.
  23. sjordi

    Scrollable TGridLayout question

    Hi, Well, this would make it very laggy and difficult to scroll naturally like the platform does natively. But I'm sure it's just a matter of properties. I'm going to deeply study the ScrollableForm example tonight as this one works naturally without extra tricks.
  24. sjordi

    Application to generate all cross platform images

    Unfortunately I think it's a macOS only command On Linux, something close to it is imagemagick A quick google search didn't really result in finding something for Windows.
  25. sjordi

    Application to generate all cross platform images

    I do this myself on my Mac. I generate the largest one 1024x1024 and then run this script. It's easy to adapt when a new resolution shows up. generate [path\]iconname.png It will create all required icons for iOS and Android in the generated subfolder generate.sh
×