Jump to content
uniGUI Discussion Forums

fredmontier

uniGUI Subscriber
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    14

fredmontier last won the day on June 7

fredmontier had the most liked content!

Community Reputation

59 Excellent

3 Followers

About fredmontier

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    São Paulo / São Paulo / Brazil
  • Interests
    Filosofia, computação, AI, progamação, Delphi e uniGUI

Recent Profile Visitors

414 profile views
  1. English: This example shows how to copy text using the clipboard but on the client side and not using the application memory area on the server. In other words, it's how you should do the "copy and paste" in uniGUI. Portuguese: Este exemplo mostra como copiar texto usando o clipboard mas no client-side e não usando a área de memória do aplicativo no servidor. Em outras palavras, é como se deve fazer o "copiar e colar" no uniGUI. Thanks to Sherzod Code: http://forums.unigui.com/index.php?/topic/6116-copy-paste-selected-text-in-tunimemo/&tab=comments#comment-31802 Moderator/ Staff: http://forums.unigui.com/index.php?/profile/906-sherzod/ Also, third party code from the web. uniGUI DOES COPY TEXT TO CLIPBOARD.rar
  2. Hi... I'm trying to make this example to the uniGUI DOES Series but I got some problems using the correct names in CANVAS to generate the karaoke CDG GRAPHICS using the JS libs/code. Any help is welcome and I think it will be of grate value to the community. Bellow are two different CDG libs and project's Skeletons to make it work. I don't want to generate a HTML to the CDG (It's already in the example included) and browser to it. It's a ridiculous solution. Use uniFRAMEHTML, uniCANVAS , FORM or other solution. But no external HTML or uniURLFRAME (don't work either). I will pack the final working project and give the credits to whom ever come up with the solution. And of course, will be published in CODE SAMPLES to everybody. Thanks... PS: Already tried support. uniGUI DOES KARAOKE.rar uniGUI DOES KARAOKE2.rar
  3. fredmontier

    Change color field with focus

    "Changed in css" I meant , what has changed in CSS attribution to component names, class , whatever. Same project works fine in version 1482 but not in 1496.
  4. fredmontier

    Change color field with focus

    I had it working fine in prior versions via CSS. And now, it is not working. Same example in codepen do not work in CSS via CustomCSS. The example above uses function at runtime and its not necessary. What has changed in CSS ? And how can we be aware of that changes in the future ? See post below.
  5. fredmontier

    Has something changed in CSS ?

    Has something changed in CSS definitions ? Only today I noticed. Background color on focused is not working (version 1496) Se example in https://codepen.io/chriscoyier/pen/IgEiz. and below. Rolled back and compiled in an old version as its Ok, with a background color inside when focused. An example and printscreen (Custom CSS): Same code different results .... input[type=text], textarea { background-color: grey; } input[type=text]:focus, textarea:focus { background-color: yellow; }
  6. fredmontier

    pwa mobile app

    OK. thanks... I posted about your message in General D..
  7. fredmontier

    PWA and uniGUI

    Hi there... I know the difference between stateful and stateless and uniGUI works in stateful mode (hence sessions, etc),and is the core to it's technology. As Android dominates mobile apps and Apple declines in importance, the app stores fees and prices seems to be more and more unreal. And recently I read a post from neo4a about it and really worked in a webpage. See reference here and here. There are websites services dedicated to convert you webpage to a "PWA-ish". I think its almost impossible, hope I'm wrong but would it be possible to create a more modest uniGUI app stateless in the future ? Or just a new encapsulated project model in Expert Project Design in IDE as PWA (manifest, resources etc) ? Since recent Safari versions an IOs are "supporting" PWA there is a good opportunity for another uniGUI format in the near future. Don't you think ?
  8. fredmontier

    pwa mobile app

    And how it works when session goes off-line ? Looks like you could easily adapt a webpage/app stateless but not a stateful app like uniGUI. Am I wrong ?
  9. fredmontier

    Receive a Json Array in uniGUI

    Hi there... I need to receive a json array and I figured out that it was supposed to be handled in ServerModule, in UniGUIServerModule.OnHTTPDocument on in UniGUIServerModule.OnHTTPCommand. How it should work: 1- Send data to the ecommerce server (name, card number, amount etc) 2- It will return in another transaction the JSON Array with info about it. (more detail, approved or not etc) 3- I need to get that array and manipulate it. Where I get this Json array ? In manual just said the "ONhttpDocument" worh like idHTTPServer event. But even there I could not put it to work properly. PS: Don't work with Serverparams, tried already.
  10. fredmontier

    Alternative for MessageDLG

    really thanks.. I tested and it's really a good replacement to messagedlg.
  11. fredmontier

    uniGUI DOES SESSION TIMEOUT PROPERLY

    Already updated source. Missing one unit.
  12. uniGUI DOES SESSION TIMEOUT PROPERLY There is nothing worst than lazy people using your program and keeping it open taking resources (DB access, memory, CPU time) and not paying homage to your wonderful work , hey ? They just leave there paying no attention whatsoever !!! I hate those lazy Btds people ! So, what about a solution to detect idle UI time at browser's side and alerts the user showing the real time left to close the session ? "No problemo, I got you back boy !!!" Seriously, when you have 50-100 concurrent sessions and not planning to expand to Hyper Server, it may cripple yours application performance very deeply and quickly. That's no joke for real developers ! So, kick out the lazy ones doing nothing ! Solution https://stackoverflow.com/questions/13246378/detecting-user-inactivity-over-a-browser-purely-through-javascript This project is based in the code above and I made some tweaks to work properly and warn the user to put, that lazy bstd, to work again or leave that marvelous piece of code of yours alone. I found a better code some days latter but it don't seams to make any big difference to the JS Snippet used here. I'm planning to a latter update in the users area of unigui.com.br. For now it's what I got working and tested. Instructions 1- Put the MainForm Script in your project. 2- In MainForm OnAjaxRequest past the code provided here. Change the messages and other details. 3- As you can see, there are two Events: one to trigger at a 1 minute idle time (_idle_timeout = no mouse ou keyboard activities) and starts to show the time remaining based in uniServerModule.SessionTimeout, to TimeOut, of course !. And teh other to show the busy mode (_busy). So when the session expires, at least you warned the user before and have a trigger point to save data and close any pending task. You can also flag "work mode" and and "idle mode" showing proper remaining session time. Have fun... and have a good one. Here is a second JS Code Snippet that works better and I will replace later. Stay tuned ! (or clicking...) var IDLE_TIMEOUT = 60; //seconds var _localStorageKey = 'global_countdown_last_reset_timestamp'; var _idleSecondsTimer = null; var _lastResetTimeStamp = (new Date()).getTime(); var _localStorage = null; AttachEvent(document, 'click', ResetTime); AttachEvent(document, 'mousemove', ResetTime); AttachEvent(document, 'keypress', ResetTime); AttachEvent(window, 'load', ResetTime); try { _localStorage = window.localStorage; } catch (ex) { } _idleSecondsTimer = window.setInterval(CheckIdleTime, 1000); function GetLastResetTimeStamp() { var lastResetTimeStamp = 0; if (_localStorage) { lastResetTimeStamp = parseInt(_localStorage[_localStorageKey], 10); if (isNaN(lastResetTimeStamp) || lastResetTimeStamp < 0) lastResetTimeStamp = (new Date()).getTime(); } else { lastResetTimeStamp = _lastResetTimeStamp; } return lastResetTimeStamp; } function SetLastResetTimeStamp(timeStamp) { if (_localStorage) { _localStorage[_localStorageKey] = timeStamp; } else { _lastResetTimeStamp = timeStamp; } } function ResetTime() { SetLastResetTimeStamp((new Date()).getTime()); } function AttachEvent(element, eventName, eventHandler) { if (element.addEventListener) { element.addEventListener(eventName, eventHandler, false); return true; } else if (element.attachEvent) { element.attachEvent('on' + eventName, eventHandler); return true; } else { //nothing to do, browser too old or non standard anyway return false; } } function WriteProgress(msg) { var oPanel = document.getElementById("SecondsUntilExpire"); if (oPanel) oPanel.innerHTML = msg; else if (console) console.log(msg); } function CheckIdleTime() { var currentTimeStamp = (new Date()).getTime(); var lastResetTimeStamp = GetLastResetTimeStamp(); var secondsDiff = Math.floor((currentTimeStamp - lastResetTimeStamp) / 1000); if (secondsDiff <= 0) { ResetTime(); secondsDiff = 0; } WriteProgress((IDLE_TIMEOUT - secondsDiff) + ""); if (secondsDiff >= IDLE_TIMEOUT) { window.clearInterval(_idleSecondsTimer); ResetTime(); alert("Time expired!"); document.location.href = "logout.html"; } } uniGUI DOES SESSION TIMEOUT PROPERLY.rar
  13. uniGUI DOES Circular Images aka Avatars Don't ask me way but they are in everywhere. Don't ask me why they must be circular either. But... that's it. This project show some methods to produce circular images and how to apply loading, as resource and applying to a regular image at run-time. Thanks to Sherzod for correcting my CSS class name. Have fun uniGUI DOES AVATARS.rar
  14. fredmontier

    Circular image

    Oh.. .man... I'm so dumb ! Thanks a lot. This is for a example I will post here. A lot of people asked me about it and it turn out to be a little trickier than I thought. Really appreciated your help.
  15. fredmontier

    Circular image

    Hi, having problem with CSS in a uniImage. My goal is to produce circular images with CSS but I can only apply to the main class in CustomCSS as follows: img { vertical-align: middle; width: 80px; height: 80px; border-radius: 50%; } Problem is, affects all uniImage. I want to apply to a specific uniImage When I change the name for instance ... .avatar { vertical-align: middle; width: 80px; height: 80px; border-radius: 50%; } And try to apply in only one specific uniImage it does not work. Have tried beforeinit, run time adding config.cls , addCls etc... Using version 1.0.70.92
×