Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1263
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. I used Sherzod's Image Map concepts (see Components and Code Samples) and did get Hot Zones working on Mobile BUT it is slow AND when the device is rotated (Horizontal) the viewport cuts off the full image no matter what I do and Sherzod has not responded to my requests for help.
  2. OK now, even though I cleared the cache I still had issues so I cleared router - testing ...
  3. Fails to fire events in Desktop, fails to load in Mobile iOS 13 ?
  4. Sherzod, how are we going with the Mobile Implementation ?
  5. My code below walks through ALL MainModules fetching their MyUserName's - All Good. Problem, when sessions are no longer active (closed down [browser gone]) they still show up as active connected sessions. How can I determine if a session in the list has died ??? function TUniServerModule.GetSessionLoggedInUserNames(): String; var I: Integer; S: TUniGUISessions; U: TUniGUISession; begin Result:= ''; S:= UniServerModule.SessionManager.Sessions; S.Lock; try SetLength(ASessionList, S.SessionList.Count); for I:= 0 to S.SessionList.Count - 1 do begin U:= S.SessionList; ASessionList.ASessionId:= U.SessionId; ASessionList.AIP:= U.RemoteIP; ASessionList.ALastTime:= U.LastTimeStamp; if U.UniMainModule <> nil then begin if U.Active = True then begin // Need Dead Session Logic Here if I = 0 then begin Result:= (U.UniMainModule as TUniMainModule).MyUserName; end else begin Result:= Result + ', ' + (U.UniMainModule as TUniMainModule).MyUserName; end; end; end; end; finally S.Unlock; end; end;
  6. Programmatically move cursor to last char of last row (auto-scroll if necessary) of Mobile Memo at runtime
  7. 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.
  8. Please provide work around ASAP
  9. 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
  10. 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
  11. 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;
  12. 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 ...
  13. 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) ?
  14. In the code you posted no, but in my own websites - yes, I will test there.
  15. Apple iOS Cannot enumerate devices, method not supported. Win10 Desktop Chrome Cannot enumerate devices, method not supported.
  16. 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.
  17. 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; ...
  18. 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);
  19. 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
  20. 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;
  21. 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])
×
×
  • Create New...