Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1258
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Although I can use UnimHTMLFrame.HTML.Add to accomplish this, as a learning piece can I have help to do this via the UnimHTMLFrame aftercreate Event as well. I have been having intermittent API Key Registration Failures (iPhoneX) with Google Map API (initialised in ServerModule CustomFiles) so I am trying to simulate the adding of CustomFiles with the UnimHTMLFrame aftercreate Event in order to execute the following URL (API Key Registration) but I get the following error (see attachment) - please advise - thanks in advance. function aftercreate=aftercreate(sender) { window.location = "https://maps.googleapis.com/maps/api/js?key=mykeygoeshere&callback=initMap"; }
  2. I have A Complex Table (minimised here for simplicity), Please advise how I can set each row color in the itemTpl based on a DBListGrid Data Value. ListGrid.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config)'+ '{'+ 'config.itemTpl='+ '<table style="width:100%; white-space: nowrap; vertical-align:middle;">'+ ' <tr bgcolor={[this.getColour(values)]}'+ ' <td "Test Data"/td>'+ ' </tr>'+ '</table>,'+ ' {'+ ' getColour: function(values)'+ ' {'+ ' if(values[1] == true) return "#FF00FF";'+ ' else return "#00FF00";'+ ' }'+ ' };'+ '<img onclick="javascript:xxxxx"/>'+ '}' );
  3. Working On a Mobile Platform Kiosk Concept (click/tap on Hot Zones and respond with both graphic and text information about the zone). UniGUI Mobile has no Mobile Canvas Object so I am trying to improvise using the Mobile Image Canvas. Problem is the Mobile Image Object does not have Click/Tap X/Y implementation (browser/frame click/tap X/Y does not reference the Image Canvas) as well as other deficiencies. I tried using HTML Frame but that posed even bigger problems. Farshad is looking into this, I hope he does not take too long. Andy Melbourne Australia
  4. How can I change the Scale (zoom) of a TUnimImage in code ? Please advise.
  5. Yes, real X,Y on Image canvas irrespective of zoom
  6. Please show how to add Mouse Click (tap) listener and retrieve X,Y Position on Canvas.
  7. I have a Mobile TMainmForm TUnimContainerPanel TUnimPanel TUnimHTMLFrame All perfectly displayed on iOS Device. I want to work with the HTMLFrame canvas which is declared in HTML as //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(ContainerPanel.Width+43)+'" height = "'+IntToStr(ContainerPanel.Height+84)+'" style = "border: 1px solid #000000;">'); HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(Panel.Width+43)+'" height = "'+IntToStr(Panel.Height+84)+'" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "100%" height = "100%" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(UniApplication.ScreenWidth-2)+'" height = "'+IntToStr(UniApplication.ScreenHeight-2)+'" style = "border: 1px solid #000000;">'); Why can I not get correct width/height for canvas, my best fit was Panel.Width+43 and Panel.Height+84 which is unique to my iPhoneX and incorrect for any other mobile device. How can I get correct pixel dimensions to declare for my canvas ? Please advise - thanks in advance.
  8. The above reference is to Touch (as you know we are now 6.6.0) with other forum users saying it does not work. (They use a Desktop Canvas in a Mobile project which no longer compiles). As an interim, how can we use TUnimImage. Image: TUnimImage; // Contains Image URL (Parent is Panel) ... procedure TMainmForm.UnimFormReady(Sender: TObject); begin UniSession.AddJS('ajaxRequest(MainmForm.Panel, "_Draw", []);'); end; procedure TMainmForm.PanelAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_Draw' then begin Image.Picture.Bitmap.Canvas.Lock; Image.Picture.Bitmap.Canvas.Pen.Width:= 4; Image.Picture.Bitmap.Canvas.Pen.Color:= clBlack; Image.Picture.Bitmap.Canvas.MoveTo(10, 10); Image.Picture.Bitmap.Canvas.LineTo(20, 20); Image.Picture.Bitmap.Canvas.UnLock; end; end; Running on Desktop line fails to show ? Running on Mobile project times out, does not run.
  9. How can we draw on any mobile object canvas ? Please give me something to work with.
  10. Trying to test. My Google Account OAuth-2.0-Client-ID does not show ReDirect Option ? Please advise - thanks Authorized domains To protect you and your users, Google only allows applications that authenticate using OAuth to use Authorized Domains. Your applications' links must be hosted on Authorized Domains. Learn more Application Homepage link Shown on the consent screen. Must be hosted on an Authorized Domain. Application Privacy Policy link Shown on the consent screen. Must be hosted on an Authorized Domain. Application Terms of Service link (Optional) Shown on the consent screen. Must be hosted on an Authorized Domain. Save Submit for verification Cancel
  11. Ellipse and Text. I think off memory you have shown canvas text out in another post. This must all work on Mobile.
  12. Thank you, I look forward to the answers
  13. Sherzod, We need canvas drawing in both Desktop and Mobile. Line, Rectangle (flood fill) and Circle (flood fill) appear to be there. We need polygon (flood fill), Ellipse (flood fill) and Arc. Polyline via a work around is possible but a true PolyLine function would be better. Never got to test Text but that goes without saying. We need SaveToFile and SaveToStream to work. Scaling too.
  14. Why would you say such a thing when CanvasDemo does not contain :- Arc PolyLine PolyGon Plus UniCanvas1.BitmapCanvas.Ellipse does not exist in 6.6.0 as far as I can tell ? Also UniCanvas1.SaveToFile('files\temp.jpg', tiJPG); does not save a valid image ?
  15. How do we draw:- Arc Polyline Polygon Ellipse etc.
  16. It actually has to do with my Google Maps License. Google will not accept the same IP, same Device (mobile in my case) concurrently having two sessions using GeoCoder/GetCurrentPosition. I need to destroy the legacy session.
  17. I am recording every SessionID, IP and UserName for every user who accesses my website. I have noticed that some users (either due to impatience or hapatic feedback insensitivities) are running multiple browser sessions at the same time and I want to limit them to a maximum of one session at a time - the current one - by automatically closing any previous ones. After fetching previous SessionID and IP used on last access I attempt to close it (release). My code below executes correctly but it appears that the legacy session is not removed after calling ReleaseSession - please advise - thanks in advance. procedure TUniServerModule.KillActiveSession(SessionID, IP: String); var sid: TUniGUISession; ActiveSessions: TUniGUISessions; begin try ActiveSessions:= UniServerModule.SessionManager.Sessions; sid:= ActiveSessions.GetSession(SessionID, IP); sid.ReleaseSession; except end; end;
  18. Please show me how to Emulate Back Button Click in Code - thank you GPSmForm.TitleButtons[0].
  19. Fails, makes no difference on Mobile iOS ? If it helps, Menu is Hidden by default and is only shown via a TitleButton selection.
×
×
  • Create New...