Jump to content

WillemvanZyl

uniGUI Subscriber
  • Posts

    36
  • Joined

  • Last visited

Everything posted by WillemvanZyl

  1. I am using Version:1.50.0 build 1477 (I'm only licensed to this version) I was using a TUniButton with Anchors Bottom, Right with theme Crisp. When I changed the Theme and the button to the TUniBitBtn it seemed to resolve the issue
  2. Hi, I get the following error after the Main Form OnShow: Ajax Error: _ssz_(O4D,1918,901);_sps_(O6E,16,812,true,null);_sps_(O72,247,812,true,null); The Application is basically empty. I have started a clean Desktop project Completed my Login Code. Any Help
  3. Here is the test app. From the menu, you can select account to go to the second form. I include the custom CSS file and the graphics that need to load. UniGUI TestCase.7z
  4. My Creative Director and a UI consultant have come up with how they want the application to look. The mobile version also has to look and work on desktop. To have those buttons correctly align in the middle I have these events for. Believe me I have tried all sorts of ways. It is the new upgrades where the underlying Sencha framework has jumped two versions that now throws every thing around, I still can't get a simple label on click to work. Apart from that, our UI designer spend hours on the old cuppertino theme to customize the CSS and that now counts for nothing as cuppertino has been dropped. The catch 22 is that i'm in the middle of trying to complete the application, so to not upgrade will bite me at a later stage. Right now I am have completed 20 of the 80 forms that the application needs, and to upgrade 20 forms now as oppose to 80 later will save me time. The old version had lots of issues and work arounds, so I do prefer to upgrade now. And finally I'm the developer that punted the move away from ISAPI/Bootstrap developement to ISAPI UniGUI to the corporate team and I love UniGui (I do puke a little in the back of my moth if I have to write endless long JS pages for responsive sites, I'm old school pascal coder :-) ). I will build a test case application and submit to support and this thread. thanks
  5. The behavior is however on all my non Main forms. I have other forms that have less code or no code on resizing that does exactly the same
  6. Hi, So all the Forms have properties: FullScreen = True Scrollable = False AutoHeight = True I attach the sequence of events. 1. Main Form 2. Open 2nd Form 3. Flip screen with 2nd Form (resizing here fails) 4. Go Back to Main Form (screen still flipped) 5. Flip Main screen back to portrait 6. Open 2nd Form, displays correctly 7. Same result as 3 8 & 9. Repeating but starting the Main form on Landscape So as long as I go back to the main form and then to the 2nd form, the second form displays correctly. But when you flip the screen while the second form is open is when the resizing does not happen correctly. I also have events: procedure TfrmMobileAccount.UnimFormResize(Sender: TObject); begin Logger('UnimFormResize'); Setsizes; end; //This does not trigger at all procedure TfrmMobileAccount.UnimFormScreenResize(Sender: TObject; AWidth, AHeight: Integer); begin Logger('UnimFormScreenResize'); end; //frmMobileAccount > pnlMainContainer > sbMain //pnlMainContainer.alignment = Client //sbMain.alignment = Client //sbMain.constraints.maxwidth and minwidth = 320 procedure TfrmMobileAccount.Setsizes; Var MargDif :Integer; Begin sbMain.Left := (self.Width div 2) - (sbMain.Width div 2); MargDif := (self.Width-sbMain.Width) div 2; if MargDif < 7 then MargDif := 7; sbMain.Margins.Left := MargDif; sbMain.Margins.Right := MargDif; sbMain.AlignWithMargins := True; imgMainBackground.Top := pnlAccountTopToolbar.Height+1; imgMainBackground.left := 0; imgMainBackground.Width := self.Width; imgMainBackground.Height := self.Height-(pnlAccountTopToolbar.Height+1); if self.Width < self.Height then Begin imgMainBackground.Picture.LoadFromFile(IncludeTrailingBackslash(UniMainModule.RootPath)+'images\Account\BackgroundPortrait.jpg'); End else Begin imgMainBackground.Picture.LoadFromFile(IncludeTrailingBackslash(UniMainModule.RootPath)+'images\Account\BackgroundLandscape.jpg'); End; //Otherwise the backgrounds end up infront imgMainBackground.JSInterface.JSCall('element.setStyle', ['z-index', '0']); pnlMainContainer.JSInterface.JSCall('element.setStyle', ['z-index', '3']); //Force Synchronisation UniSession.Synchronize; sleep(100); (*Older version fix UniSession.AddJS('setTimeout(function(){' + sbMain.JSName + '.scrollableBehavior.scrollView.getScroller().maxPosition.y = ' + IntToStr(sbMain.Height) + '}, 500)' );*) End; Hope this explains it more.
  7. Hi, Please see the attached screens, for when the screen of a phone is flipped. Any form except the main form does this now. Is there a new setting that I'm missing or is this a bug? Kind Regards Willem
  8. Hi, In the previous version this worked without a problem. I had a button next to a TUnimEdit with the PasswordChar = '*' The button's event simply did this: if edPassword.PasswordChar = '*' then edPassword.PasswordChar := #0 Else edPassword.PasswordChar := '*' So the user can view the password. In the new version however I get and "Cannot read property 'dom' of null" Anyway around this?
  9. Hi, I have installed the new version (Big upgrade it seems), in the old version I got help implementing a label click event by adding a UniEvent: function afterCreate(sender) { var me = sender; me.element.on("tap", function() { me.fireEvent("click"); } ) } This does not work anymore. Please help
  10. I wrote this for a GridList, sort of works, but based on the theme and font you use you may need to play around with the font.size in the GetTheTextWidth and width calcs: procedure FitGridColumns(Grid: TunimDBListGrid; theForm:TUnimForm); const C_Add=3; var ds: TDataSet; bm: TBookmark; i: Integer; w,tw, ShortestLength: Integer; a: Array of Integer; Function GetTheTextWidth(StrIn:String):Integer; var c: TBitmap; Begin Result := 0; c := TBitmap.Create; try c.Canvas.Font.Name := theForm.Font.Name; c.Canvas.Font.Size := theForm.Font.Size+2; Result := c.Canvas.TextWidth(StrIn); finally c.Free; end; End; begin ds := Grid.DataSource.DataSet; if Assigned(ds) then begin bm := ds.GetBookmark; try if Grid.Columns.Count = 1 then Begin Grid.Columns[0].Width := grid.Width; End Else Begin if ds.RecordCount > 0 then Begin ds.First; SetLength(a, Grid.Columns.Count); while not ds.Eof do begin for I := 0 to Grid.Columns.Count - 1 do begin if Assigned(Grid.Columns[i].Field) then begin tw := GetTheTextWidth(Grid.Columns[i].Title.Caption)+40; w := GetTheTextWidth(ds.FieldByName(Grid.Columns[i].Field.FieldName).DisplayText)+40; if w < tw then w := tw; if a[i] < w then a[i] := w ; end; end; ds.Next; end; for I := 0 to Grid.Columns.Count - 1 do Begin Grid.Columns[i].Width := a[i] + C_Add; End; End Else Begin for I := 0 to Grid.Columns.Count - 1 do begin Grid.Columns[i].Width := GetTheTextWidth(Grid.Columns[i].Title.Caption)+40; end; End; End; ds.GotoBookmark(bm); finally ds.FreeBookmark(bm); end; end; end;
  11. Hi, I have a form with 2 radio controls on them. My Form's width is 300 (not a full screen form) and both my radio controls FieldLabelWidth is set to 250, and FieldLabelAlign is Left. But on runtime I get the attached screenshot. How can I get all the text to display? and is it possible to wrap the text into a second line?
  12. I have implemented the whole MailChimp rest api, with the main MailChimp and OAuth2 processes in a datamodule. I have one UI Form that triggers the Synchronization calls with the procedure SyncMailChimpGroup. All this is working perfectly and seamlessly as is with EnableSynchronousOperations=False. When I set EnableSynchronousOperations=True (at design time) I get the error when the login Form opens. So the error occurs long before anything MailChimp comes into play, so in essence MailChimp integration is almost irrelevant. Does that make sense?
  13. OK, but setting this at designtime gave the same Error?
  14. I have Version:1.0.0 build 1424 installed. Based on the demo sample sUpdate I want to Implement the ShowMask/HideMask for a MailChimp Synchronisation of lists and members. This can be potentially a long process. At first I simply enabled the EnableSynchronousOperations and got the error. I then tried to rather implement it in my actual Procedure (Which is preferable) but yielded the same error: procedure TfrmMobileEditGroups.SyncMailChimpGroup; Var OKtoGo :Boolean; LastErr :String; ListID :String; Begin Logger('SyncMailChimpGroup; - Start'); Try UniMainModule.EnableSynchronousOperations := True; OKtoGo := True; LastErr := ''; if not dmMailChimpModule.InitDone then dmMailChimpModule.Init; dmMailChimpModule.SetOAuthPropertiesForUser(UniMainModule.qCurrentUserPracticeUserID.AsInteger); If dmMailChimpModule.OpenMCLists(UniMainModule.qCurrentUserPracticeUserID.AsInteger) Then Begin //Sync the List and ClientGroup First Logger('CheckGroupsandLists'); ListID := CheckGroupsandLists; if ListID <> '' then Begin CheckListMembers(ListID); End; End Else Begin OKtoGo := False; LastErr := 'Could not retrieve MailChimp Lists'; End; if not OKtoGo then Messagedlg(LastErr,mtError,[mbOK]); Finally UniMainModule.EnableSynchronousOperations := False; End; Logger('SyncMailChimpGroup; - Complete'); End;
  15. Hi, When I set EnableSynchronousOperations = True, I get the following error: "ProcessEventQueue(): Worker is not assigned." Where and how do I handle the ProcessEventQueue Kind Regards
  16. Hi, So my creative team does not like the Sencha themes available. Cupertino seems the blandest one, and I have made a neatened extract that they can customise this. Using the ServerModule.CustomCSS property I load the custom cupertino.css and that works perfectly. However They which to add additional css classes to buttons labels edits etc. This post: here seems to be the way to go invoking these custom classes, however the config property that is passed in function beforeInit(sender, config) will differ for every type of control. Where can I find a reference to the various config objects available? Thanks
  17. On my Login Form (Mobile) my Label's on click event does not trigger. Is this a bug? and is there a way around this?
  18. The .Font Property is not exposed in Mobile?
×
×
  • Create New...