Jump to content
uniGUI Discussion Forums

wprins

uniGUI Subscriber
  • Content Count

    149
  • Joined

  • Last visited

Everything posted by wprins

  1. wprins

    ceate form.

    Explain to me, what does the following line do, exactly? xf := TUniForm(f.qo.fieldbyname('formulario').asstring); I think that if you think about that line you'll sooner or later realise what you're doing wrong. If you still come up blank after pondering what you're doing there then post back...
  2. wprins

    Standalone Server Window on Server Desktop

    When you run the standalone server there's a tray icon that you can close the server from. You shouldn't use task manager. Also there's a page reachable from a browser at the "/server" URL that will show you some stats from the server. (You can and indeed should control access to this page from the ControlPanelLogin event on the server module.)
  3. Hi, I've checked out the demo's and documentation but haven't been able to find anything existing in uniGUI equivalent to Vcl.FileCtrl.SelectDirectory() or VCL.Dialogs.TFileOpenDialog. Have I missed something is there no existing component or dialog to select a folder on the server from within uniGUI? Thanks in advance, Walter
  4. Hi. I'm currently using Delphi 10.1 Berlin and UniGUI 1.70.0 build 1491. Could someone confirm that the MegaDemo under "C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\MegaDemo\mDemo.dproj" also generates the following error for them when you click the topmost node in the tree on the left, e.g. "Main": And if any of the UniGUI developers read this -- would you classify this as a bug and so can I report this as a bug in the bug reports section? Also I was thinking of just fixing it myself -- Would I be allowed to create a public repo of the Demos where I can fix this myself and others can benefit? Or better, is there already perhaps a public git (or github) repo I can pull the latest Demos from and submit pull requests from once fixed? (Digression: Perhaps these demo's ought to be covered by an automated QA test suite, maybe using something like Selenium or Taiko. I might be able to help get something like this going [ideally driven from Delphi] as I/we will likely look into doing something like this for our own projects soon to prevent accidental regression failures...) Thanks Walter
  5. Thanks. Any comments on the idea of a github repo for the Demos?
  6. Sure no worries. I have to build something myself. I was just wondering whether there was something already existing somewhere. Thanks anyway.
  7. Hmmm OK. I'll upgrade and see if that fixes things... Thanks!
  8. wprins

    Is there a need for a (structured) uniGui WIKI?

    FWIW, I think this would be a good idea.
  9. wprins

    HyperServer multiple servers ?

    I've previously asked this same question. It is apparently on the roadmap: http://forums.unigui.com/index.php?/topic/11253-hyper-server-nodes-on-multiple-servers-possible-or-not/
  10. I'm making a menu with icons using TUniTreeMenu. I've already learnt from the forums that normal Icon images do not work currently (will this be fixed?) and you're meant to use FontAwesome icons. Except, this does not work reliably either, the problem being that (as I've found) the "IconCls" drop down list is seemingly hard-coded and not all the entries are valid (anymore), the result of which is that not all the icons appear as they should. For example: In the above I've got a TUniNativeImageList set up: As it turns out both "locate" and "arrow_left" no longer exists on FontAwesome (it seems) so these icons don't work. It would probably be better to allow refreshing this list from FontAwesome dynamically, or to warn users that the entries may not be all functional. (Apologies if any of this is documented and I've missed it.)
  11. I'm trying to make the menu respond when an item is clicked repeatedly (to implement collaps/expand by setting the Micro property), but it seems I have no way of implementing this that I can see because the click even doesn't seem to know which item's been clicked? That is to say, the Sender parameter that is passed to the event is the entire menu itself. It would seem to have made more sense to pass the clicked item than (as currently) the entire menu object itself? Am I missing something? Moreover OnSelectionChange is also not passed the selected node, nor is menu.Selected set to the (newly) selected node when the event handler is called. How are you meant to respond to repeated clicks on menu items in this menu object?
  12. I have since realised that you can accomplish this indirectly be segregating the menu items into a TUniMenuItems, since the TUniMenuItems do provide the clicked item to OnClick handlers related to the menu items etc. (One could also use a corresponding TActionList to attach to TUniMenuITems if desired, though notably if you want to use the click handler for a menu item, then you must not use a TAction for this menu item since this will stop the TUniMeniItems OnClick from triggering.) It should be noted that when doing this the existing Items become effectively redundant, hence I'd argue that either using a TUniMenuItems ought to be the only way to supply menu items to this control, or if the current Items property is retained (for developers who do not want to use TUniMenuItems), then it ought to be possible to recognized clicked items as previously described.
  13. wprins

    .. best way to find a EAccessViolation ???

    Back to the AV tracking topic, I later remembered about "SafeMM" (https://stackoverflow.com/questions/1039646/trying-to-locate-safemm-for-delphi, probably the best link seems to be http://cc.embarcadero.com/item/28681) which you may also be interested in maybe trying, and then found the following question on StackOverflow with references to several other relevant projects: https://stackoverflow.com/questions/17164155/delphi-tools-technics-for-tracking-propagated-access-violation Hope that helps. Edit: aaaand then on Eurekalog's site again:https://eurekalog.blogspot.com/2010/03/memory-problems-in-delphi-apps-final_30.html
  14. wprins

    .. best way to find a EAccessViolation ???

    OK, you have to be very careful with the Ansi -> Unicode changeover. With D7, strings equated to Ansi strings (8-bit characters) and so D7 era code sometimes makes assumptions about buffer sizes, strings and the size of a Char and a PChar which may not be true anymore. Because in modern delphi Char = WideChar and hence it can happen that a buffer (allocated in bytes) is perhaps now too small to hold what is actually a widechar buffer/string etc, leading to buffer overflows and access violations. You need to review the code for use of Char, PChar, and strings and change the code to be explicit if you want to continue using Ansi strings, .e.g change the code to PAnsiChar and AnsiChar respectively. Or you must migrate the code to account for the new unicode semantics. Aside: We use madExcept, which is a competitor of Eurekalog. Maybe you'll find it easier to use. (Maybe not.) One other comment: There's quite a few leak and memory checking options in FastMM, including heap corruption checks. The latter might help you track down buffer overflows and such. (Heap checking can make apps really slow though, so needs to be carefully employed.) For more see: https://wiert.me/2009/07/29/delphi-fastmm-using-fastmm4-for-debugging-your-memory-allocations-part-1-introduction/ Edit: I've stumbled over this, which should help you: https://eurekalog.blogspot.com/2009/05/access-violation-in-details_12.html
  15. wprins

    .. best way to find a EAccessViolation ???

    Interesting. I use GExperts nearly daily, though mostly the grep search. I've known about the component translation abilities but it's always put me off that you'd have to manually do this, but seemingly I'm wrong? Are you saying you could set up definitions to automatically translate components in a reproducible fashion? (If so how? Any examples?)
  16. wprins

    HowTo question: Make a "beautifull" schedule-Overview

    It's at this point that one becomes suddenly, a web developer and starts learning all about DOM, CSS, JS and maybe ES6 and a bunch of other things (maybe Sencha ExtJS). :/ (My experience having had to create grids as well.) And eventually maybe one learns enough to create a UniGUI component to save others the hassle. From experience, you can get quite advanced with jqGrid, though it has its own quirks and foibles, and off the top of my head I'm not entirely sure how to integrate that into UniGUI in a nice way (yet). There's actually multiple JS table options, another would be Datatables, though this still also depends on JQuery. Otherwise ... roll your own, but that's obviously not so trivial if you're having to learn the JS ecosystem and do the work. :/
  17. wprins

    send sms

    The same way you'd send an SMS from any other Delphi app! (Do you have a solution you use already?)
  18. wprins

    uniGUI and NexusDB

    There shouldn't be anything special about NexusDB and UniGUI per se. Just continue as you would with any other DB component. I suppose simplistically, start by putting your user's connection component in the TUniGUIMainModule instance, which you can think of as each user session's "default" and/or "global" datamodule. (It's not truly "global" of course, in the usual sense of the word, and with "default" i just mean that it is created by default by the application wizard, but of course you can create other datamodules yourself.)
  19. wprins

    How do you update a dll on Apache server

    I'm assuming you're using apache on Windows. Aside from hyperserver, I think you should be able to do all of that with a PowerShell script.
  20. wprins

    can Barcode read from mobile's camera ?

    Hmmm. I have a Note 8 and on the default Samsung browser I also get "test success" only, and on Chrome I don' get anything, just blank edit box... Any ideas? By the by has anyone tried to make this work with the ZXing Delphi port (which includes a fairly decent FMX scanner App as demo) somehow? (I imagine not...)
  21. wprins

    Service - Write files to UNC-Path

    Does your service run standalone or under e.g. IIS? (Obviously the simplest is for the service to be set to run under an account with write rights to the share.)
  22. wprins

    Auto Login

    Sorry I only just noticed this reply. I'll post an example for you, just give me a bit of time...
  23. wprins

    Auto Login

    I'd like to point out for the benefit of the original poster that the demo does *not* protect the credentials. This is a major security concern for a production system, as anything else in the browser can read the credentials out of the cookies on the user's machine. For a production grade solution you must therefore not store the credentials themselves, but rather a login token. Or if you must store the credentials themselves, then they must be encrypted on the server using strong encryption (say AES256). If you use a token, then it should be validated upon use, to prevent eg. token theft and/or impersonation by a malicious third party. So for example a token should ideally include some way to validate the IP address making use of the token. (In our system I ended up employing AES256 encryption to protect the credentials in the browser, to allow seamless processing and auto-login from a specific URL straight to a specific screen/form/page without demanding the user to login - if the credentials are absent then of course you are asked to login as normal. Edit: To add, we used SynCrypto.pas, part of mORMot framework, for the AES encryption. )
  24. 1) I am trying to use icons from here: https://material.io/icons/ When clicking on the "Glyph" property in Delphi and then Clicking "Load" and selecting a PNG sourced from there, the image is loaded and displayed but when you then click OK, an error message "Invalid graphic format" is displayed with call stack as follows: http://i.imgur.com/wiOns0Z.png The same happens with a conventional VCL TSpeedButton so it looks like some kind of Delphi bug, but mentioning just in case this is something UniGUI can do something about. 2) Additionally I notice TUniSpeedButton has "Images" and "ImageIndex" properties. I'd assumed that assigning a TUniImageList, populating it with PNG (which does work) and setting ImageIndex might cause the button to display the image but this appears to do nothing. Can you clarify whether this is supposed to work or why these properties appear to be ignored? Thanks Walter
  25. wprins

    OnShowEvent -> Ajax error

    Thanks, that all seems reasonable. Have you tried other browsers, and does it occur there also? To clear the cache press Ctrl-Shift-Del. (Or click top-right three dots button->"More options"->"Clear browsing data", click on "Advanced tab" and delete everything.) It's perhaps easier to open an incognito window and this has the benefit of leaving all your cookies and things alone, press Ctrl-Shift-N: https://support.google.com/chrome/answer/95464?co=GENIE.Platform%3DAndroid&hl=en Is there anything else that is special about this form? And can you make it break in isolation? That is, if you put that form into a project by itself, does it still break? Do you have to do something else first before it breaks? Have you tried recreating this form in its current state from scratch and does that new form still break in the same way? Again, unless you can work out some way to replicate the issue it's going to be very hard to work out what's going on.
×