Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1257
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Programmatically move cursor to last char of last row (auto-scroll if necessary) of Mobile Memo at runtime
  2. I have been in the hybrid world for so long I forgot how to move the cursor on a Mobile Memo to the end at runtime, please show how.
  3. Please provide work around ASAP
  4. Sherzod, the following which works on UniImage does not work on MOBILE UnimImage (Throws "O34.getEl is not a function")??? with Image.JSInterface do begin JSCode('Ext.get('#1'.getEl().select("img").elements[0]).dom.setAttribute("alt", "");'); JSCode('Ext.get('#1'.getEl().select("img").elements[0]).dom.setAttribute("id", "image-unique-id");'); JSCode('Ext.get('#1'.getEl().select("img").elements[0]).dom.setAttribute("usemap", "#image-map");'); end; Please advise ASAP
  5. Thank You Sherzod for this practical example. I see you are using a HTMLFrame to hold the Chords for the map images - all good. Question: This HTMLFrame seems to act as a hidden repository to hold the map image co-ordinates and does not paint (setting Hidden Tag to True and/or Top to -249 makes no difference to the outcome of the WebApp). (1) Is this normal ? (2) How many Hidden HTMLFrames can one use ? I assume if it contained visual objects they would have been painted if Visible and not outside form rectangle range ? Please advise
  6. I moved the ajax request to FormReady and all OK now (stability issue) procedure TMainmForm.UnimFormReady(Sender: TObject); begin UniSession.AddJS('ajaxRequest(MainmForm.Panel, "ExportImage", []);'); end;
  7. I have a Mobile Image that I create the bitmap at runtime, how can I export it (I am using an ajax event to allow stability) ? procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin EXEDir:= UniServerModule.StartPath; ... procedure TMainmForm.PanelAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if SameText(EventName, 'ExportImage') then begin Image.Picture.SaveToFile(UniServerModule.EXEDir+'\files\temp\tmp.png'); // CLAIMS D:\nnnn\files\temp Directory Not Found when it exists ...
  8. Ronbral, How do we add the new background font to the Font DropBox (any text typed on new bodyarea assigned font does not locate Font Name in the Font Dropdown) ?
  9. In the code you posted no, but in my own websites - yes, I will test there.
  10. Apple iOS Cannot enumerate devices, method not supported. Win10 Desktop Chrome Cannot enumerate devices, method not supported.
  11. No, Mobile is missing a Canvas Object. My mockup skeleton app above starts out as a blank image on which I draw Polylines/Polygons at runtime with optional bitmap layering. I used Mobile Image but all X/Y Mouse/Tap only accurate if Image is 100% non scalded/non rotated and non panned - totally useless. All requests fell on dead ears, now many years later and still no canvas.
  12. Persons (TUnimSelect) After many restless nights and hundreds of tests I have finally come up with a work around as follows using only the events that are fired (remember most Ext Events do not work) and of course pre seeding the SelectedIdx variable before expanding, Note Timing is critical:- ... procedure TMainmForm.PersonsDropDown(Sender: TObject); begin // TUnimSelect is unstable here so we defer our request for 500ms UniSession.AddJS('Ext.defer(function() {ajaxRequest(MainmForm.window, "_PersonsDroppedDown_", []);}, 500)'); end; ... procedure TMainmForm.UnimFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if SameText(EventName, '_PersonsDroppedDown_') then begin if SelectedIdx > -1 then begin with Persons.JSInterface do begin JSCall('getPicker().setValue', [Persons.Items[SelectedIdx]]); end; UniSession.Synchronize(100); end; end; ...
  13. It appears that TUnimSelect is only half functional ? I want to PreSelect in code the opening focused item on or before Expand. Setting before expand only makes item bold but does not focus it with the DropDown Selection List, it is as if you have hardcoded the ItemIndex to 0 (" ") or -1. // NEVER FIRES s:= 'store.load=function store.load(sender, records, successful, operation, eOpts) '#13#10+ '{ '#13#10+ ' ajaxRequest(MainmForm.window, "_PersonsStoreLoad_", ["Operation="+operation]); '#13#10+ '} '; Persons.ClientEvents.ExtEvents.Add(s); // FIRES (After JSCall('expand', []);) s:= 'expand=function expand(field, eOpts) '#13#10+ '{ '#13#10+ ' ajaxRequest(MainmForm.window, "_PersonsExpanded_", []); '#13#10+ '} '; Persons.ClientEvents.ExtEvents.Add(s); // NEVER FIRES s:= 'beforeshow=function beforeshow(sender, eOpts) '#13#10+ '{ '#13#10+ ' ajaxRequest(MainmForm.window, "_PersonsBeforeShow_", []); '#13#10+ '} '; Persons.ClientEvents.ExtEvents.Add(s); // NEVER FIRES s:= 'show=function show(sender, eOpts) '#13#10+ '{ '#13#10+ ' ajaxRequest(MainmForm.window, "_PersonsShow_", []); '#13#10+ '} '; Persons.ClientEvents.ExtEvents.Add(s); // FIRES (After Close if selection is made) s:= 'change=function change(sender, newValue, oldValue, eOpts) '#13#10+ '{ '#13#10+ ' ajaxRequest(MainmForm.window, "_Persons_", ["val="+newValue]); '#13#10+ '} '; Persons.ClientEvents.ExtEvents.Add(s);
  14. Persons (TUnimSelect) contains 300 Items, before DropDown we want to seed the selected/focused item using SelectedIdx and SelectedText Persons.ItemIndex:= SelectedIdx; // Does Nothing, Always Positioned at First Item Persons.Text:= SelectedText; // Makes Bold In DropDownTumbler List but not focused Persons.Invalidate; // Does Nothing UniSession.AddJS(MainmForm.Persons.JSName+'.setValue('+Chr(39)+SelectedText+Chr(39)+')'); // Does Nothing Persons.JSInterface.JSCode(#1'.setValue=new "'+SelectedText+'";'); // Errors UniSession.Synchronize; Persons.JSInterface.JSCall('expand', []); // Opens Always Positioned at First Item
  15. I have a TUnimSelect (Persons) that I want to PreSelect the Focused Item in code before DropDown. My code below makes bold the matching item but the Tumblers do not focus this item with Persons, Persons.JSInterface do begin ItemIndex:= Idx; // This Makes Item Bold but not selected if Idx > -1 then begin // Makes No Difference Text:= SelectedText; Refresh; UniSession.Synchronize; end; JSCall('expand', []); end;
  16. Kind of you to share. Some food for thought to make this a mega example:- Footer: Rec 1/340, Paging (First, PrevPage, NextPage, LastPage), Summary Columns etc. Grouping Options Parent/Child Nested (expand/collapse) Grids etc. Record Editing Form (Like DevExpress [auto generate from grid row data])
  17. Sherzod, If the Session has timed out and we catch it at MainModule.OnSessionTimeOut event, it is already too late as all of the session critical variables are now defunct (void) !
  18. This has been a problem for some time and is amplified (worse) on iOS. See my older post "iPhone iOS 13 Web Page Session Timeouts"
  19. I have wrestled with this problem for some time now with what appears little help or interest from UniGUI. We pay good money on a yearly subscription (many years now) to use UniGUI and I believe that UniGUI owes it to it's customers to get a modern iPhone for it's own testing. This may even be a Sencha problem, has Sencha been advised by UniGUI ? I see no real effort to solve this problem. I have set all my timing values in code (remember this all worked flawlessly until iOS 13):- ServerModule SessionTimeout:= 1000 * 60 * 60 * 3; // 10,800,000 = 3hrs AjaxTimeout:= 1000 * 60 * 3; // 180,000 = 3mins Should I make this bigger ? HTTPServerOptions.MaxAliveSecs:= (60 * 60); // 1hr HTTPServerOptions.MaxPoolSize:= 600; HTTPServerOptions.DisableKeepAliveInDebugMode:= True; // UseGlobalImageCache "It instructs the uniGUI server to use the global image cache to improve image access performance" what happens when set to false, please explain in detail ? MainModule EnableSynchronousOperations:= True; TerminateOnBrowserClose:= False; iOS Server Timing ON Blank anchor target implies rel=noopener OFF
  20. Yes, in the foreground while one is using it (not idle), it is as though there is an iOS set timeout irrespective of what the Server says and irrespective of activity. This is urgent.
  21. "Inavlid Session or Session TimeOut" Here are my Server Time outs UniServerModule.SessionTimeout:= 1000 * 60 * 60 * 3; // 10,800,000 = 3hrs UniServerModule.AjaxTimeout:= 1000 * 60 * 3; // 180,000 = 3mins As stated above I turned SERVER TIMING ON All to no avail, could it be some sort of cache timing issue ? iOS 13.x introduced some sort of new timeout, here is what Apple says if one has problems which does not fix the problem, it appears to be some sort of UniGUI or Sencha problem:- If Safari displays a blank page or quits on your iPhone, iPad, or iPod touch If you can't load a website or webpage, or Safari quits unexpectedly, follow these steps. Connect to a different network Try to load a website, like www.apple.com, using cellular data. If you don't have cellular data, try connecting to a different Wi-Fi network and then try loading the website. Restart your device Turn off your device and turn it on again. Clear website data You can clear website data occasionally to improve Safari performance. If you still need help, follow these steps: Go to Settings > Safari. Tap Clear History and Website data. Tap Clear History and Data to confirm. Get more help If the issue continues and only effects a certain website or webpage, contact the website developer for more help.
×
×
  • Create New...