Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/19/24 in all areas

  1. darnocian

    Sempare Template Engine 1.7.7

    Hi All, Just a quick ping that an update to the Sempare Template Engine is now available... v1.7.7 It is also available on GetIt. Please star the project if you havn't already. (Thanks) Also for those watching Delphi Dev Days (https://www.codegear.com/DevDaysofSummer/) ... There will be a video posted today (15 Aug) with some demos showing some features and how easily the template engine can be included into projects... https://github.com/sempare/sempare-delphi-template-engine Changes: - fixed a few things - new 'functional includes' syntatic sugar - release mode builds will fail if the license confirmation is not acknowledged - also fully CI enabled now on github ... what is a functional include... Lets say we have a main template where we are creating an html form: <form method=post action=/register> Name: <input name=name> E-mail: <input name=email> <input type=submit value=register> </form> so what we could do from a templating perspective: <% template 'input' %> <% label %>: <input name=<% name %>> <% end %> <% template 'button' %> <% label %>: <input type=<% type %>> <% end %> <form method=post action=/register> <% input { label="Name", name="name" } %> <% input { label="E-mail", name="email" } %> <% button { label="register", type="submit" } %> </form> So above, you can see that we can have 'inline templates' that are named 'input' and 'button'. In the form section, the 'functional include' syntax is then used to pass the params... The alternative way of doing the include traditionally is a bit more verbose, but essentially the same: <form method=post action=/register> <% include 'input', { "label": "Name", "name": "name" } %> <% include 'input', { "label": "E-mail", "name": "email" } %> <% include 'button', { "label": "register", "type": "submit" } %> </form> The above is a bit more verbose, passing a dictionary, whereas the 'functional include' syntax can be a bit more pretty on the eye... So the nice thing then is that the inline templates could be moved out to separate files. The template registry can then be configured to load the various templates as required - from disk, resources, db, etc... Custom styling, etc can then be localised to the specific 'atomic' template. This works quite nicely when using stuff like TailwindCSS (https://tailwindcss.com/) , which lends itself to styles being inline rather than being in CSS files... Anyways, have fun. Please support me if you can.
  2. kobygold

    Android Invalid APK

    Hi guys, Sorry for the late response, I was on a trip abroad. I tried creating a simple Hello World app and it didn't work, so uninstalled & re-installed the Android tools (from Tools > Manage Features) running as Admin, and uninstalled other apps I created, and then it worked! Thanks!
  3. silvercoder79

    Watch me coding in Delphi on YouTube

    Setting Up Delphi and RAD Studio for Android Development Link: https://youtu.be/g7tvSlGoG0k In this video, I walk you through the step-by-step process of configuring Delphi RAD Studio for Android development and using the SDK Manager to get the required packages. Along the way, we learn how to overcome common challenges and get your development environment up and running. Useful links: https://en.delphipraxis.net/topic/10436-delphi-120-athens-is-not-correctly-installing-the-android-sdk/ http://delphi.org/2013/10/wireless-android-debugging-with-delphi-xe5/ https://stackoverflow.com/questions/31886049/list-installed-sdk-package-via-command-line
  4. Hi, OAuth2 is basically an authorization protocol that after a successful authorization, returns a bearer token (like an id) that can be used later to access to a REST API. You just need to pass the bearer token in the HTTP headers of the Get/Post... request. I've a commercial product called sgcWebSockets that implements OAuth2 (among other protocols), you can download a trial for Delphi from: https://www.esegece.com/websockets/download/download-delphi-cbuilder If you want to read more about the OAuth2 implementation, you can use the following link: https://www.esegece.com/help/sgcWebSockets/#t=Components%2FHTTP%2FAuthorization%2FOAuth2%2Fclient%2FTsgcHTTP_OAuth2_Client.htm If you are in trouble testing the demo or you need assistance converting the postman scripts, you can use the following link: https://www.esegece.com/contact/contact-us Kind Regards, Sergio
×