Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


alfr last won the day on June 1 2019

alfr had the most liked content!

Community Reputation

7 Neutral

About alfr

  • Rank

Recent Profile Visitors

424 profile views
  1. alfr

    Highcharts Component

    Sure. Thanks for sharing and replying back to me! I've spend quite some time testing and working on the memory problems. Perhaps your goal was to handle this more dynamic?, but I've instead handle it more traditional. So I've added a lot of destructers on the various objects. Also to get around the reference count problem with the ChildList:TObjectlist<THighValue> I've change it not to own its objects. So I believe all leaks now are fixed. (I don't get the memory leak dialog warning any longer.) I've also done some other small changes. One thing that I found helpful working with HighChart is to have the x-values in Highchart date format and then just format the data labels as needed function DateTimeToHighChartDateTime(d:TDateTime):int64; begin Result:=DateTimeToUnix(D) * 1000; end; I as well have a need for reloading the Graph when the user change various things. As it takes some milliseconds for the urlFrame to load the temp data-file from the web server over internet, the object flicker some then. So to get around this, I have a procedure that handle this internally within unigui. So instead setting the HTML in the UrlFrame directly. This gives a more smoother and quicker appearence. I attach the uEchoHightChart.pas - file if you're interested in reviewing any of it. Thanks for your help!
  2. alfr

    Highcharts Component

    Hi, I do get a lot of memory leak warnings in your component. I haven't used the generic RTTI-functions before either, which makes it more complicated to understand - but it seems not to work... Is this something you have looked at? You write that it is stable, but have you as well checked it for memory leaks? procedure THighValue.FreeChilds; VAR Contexto: TRttiContext; Classe: TRttiType; Field: TRttiField; obj: THighValue; begin Classe:=Contexto.GetType(self.ClassType); for Field in Classe.GetDeclaredFields do BEGIN IF (Field.Visibility in [TMemberVisibility.mvPublic, TMemberVisibility.mvPublic]) THEN BEGIN if (Assigned(Field.FieldType.BaseType)) and (Field.FieldType.BaseType.Name = 'THighValue') then BEGIN obj:=THighValue(Field.getValue(self).AsObject); if Assigned(obj) then BEGIN obj.Free; END; END; END; END; end;
  3. alfr

    TuniDBGrid Title Height

    Cascading style sheet rules can be located in several places, which include browser default style sheet, external style sheet, embedded styles, and inline style rules. The closer a rule is to the content being styled, the higher its precedence. The cascade of rules starts with the furthest and goes toward the closest to the content. Browser style sheet have lowest precedence All browsers have a built-in default style sheet. The cascade starts with these styles. If you have no styles defined, the browser styles will be used. Note that defaults are slightly different in each browser. It is a good idea to examine a page with no styles in each browser in order to see any difference. External style sheets have next precedence Browser default styles are overridden by the rules in external style sheets. If there are several external style sheets, they apply in the order listed. Embedded styles Styles embedded in the page header are the next in order of precedence. If there are many rules, typically they are placed in an external style sheet. Inline styles have top precedence Finally, since inline styles are closest to the content, they take top precedence. Specific rules The more specific a rule is, the greater its precedence. Any rule on a tag is the least specific. A class rule is more specific and overrides the tag rule. Since an ID rule can be used only once in a web page, it is the most specific, overriding the other two. Later rules take precedence Finally, sort the rules by the order they were defined. Rules that are defined later in the document tree have higher precedence than those defined earlier. And rules from an imported style sheet are considered before rules directly in the style sheet. Summary The location of the styles and rules is one factor in the order of precedence. Specific rules take precedent over more general rules. Also, the rules toward the end of a style sheet take precedence over the front rules. https://www.school-for-champions.com/web/css_cascade_order.htm#.XuaA2Tr7SUk
  4. One option I believe is just to input <br> In the caption where it should break.
  5. alfr

    How to DON´T SHOW TUniLoginForm in runtime ?

    You can set Handled:=true in the onBeforeLogin event in the mainmodule to skip the loginform and get directly to the mainform.
  6. Not sure if it's by design or not, but some confusing... What I understand the UniSession.UniApplication.ClientInfoRec record is filled at different times - or more precise shortly after the first form is shown. So to my understanding, the ClientInfoRec can first be retrieved/used in the first Form's AfterShow event? So it can't be used in the mainmodule.create event nor in the LoginForm.create or show event. Below some logging. (In the beginning no text/data in the end of each row. First at "At Login Form AfterShow" there is text/the record is filled) login.exe: 0000382C: 15:39:44 []:Mainmodule: login.exe: 0000382C: 15:39:44 []:BrowserType: login.exe: 0000382C: 15:39:44 []:BrowserVersion:0 login.exe: 0000382C: 15:39:44 []:OSType: login.exe: 0000382C: 15:39:44 []:At Login Form Create: login.exe: 0000382C: 15:39:44 []:BrowserType: login.exe: 0000382C: 15:39:44 []:BrowserVersion:0 login.exe: 0000382C: 15:39:44 []:OSType: login.exe: 0000382C: 15:39:44 []:At Login Form Show: login.exe: 0000382C: 15:39:44 []:BrowserType: login.exe: 0000382C: 15:39:44 []:BrowserVersion:0 login.exe: 0000382C: 15:39:44 []:OSType: login.exe: 00005AC4: 15:39:44 []:At Login Form AfterShow: login.exe: 00005AC4: 15:39:44 []:BrowserType:chrome login.exe: 00005AC4: 15:39:44 []:BrowserVersion:80 login.exe: 00005AC4: 15:39:44 []:OSType:windows login.exe: 00004170: 15:39:51 []:At Login Button click: login.exe: 00004170: 15:39:51 []:BrowserType:chrome login.exe: 00004170: 15:39:51 []:BrowserVersion:80 login.exe: 00004170: 15:39:51 []:OSType:windows login.exe: 00004170: 15:39:51 []:At MainForm Create: login.exe: 00004170: 15:39:51 []:BrowserType:chrome login.exe: 00004170: 15:39:51 []:BrowserVersion:80 login.exe: 00004170: 15:39:51 []:OSType:windows If in the MainModule instead using the BeforeLogin event and there sets Handled to true to bypass the login form - the same pattern occur. The MainForm is then the first form created, so it's first at the MainForm.AfterShow event the record is filled. login.exe: 000055E8: 15:51:57 []:Mainmodule: login.exe: 000055E8: 15:51:57 []:BrowserType: login.exe: 000055E8: 15:51:57 []:BrowserVersion:0 login.exe: 000055E8: 15:51:57 []:OSType: login.exe: 000055E8: 15:51:57 []:At MainForm Create: login.exe: 000055E8: 15:51:57 []:BrowserType: login.exe: 000055E8: 15:51:57 []:BrowserVersion:0 login.exe: 000055E8: 15:51:57 []:OSType: login.exe: 000055E8: 15:51:57 []:At MainForm Show: login.exe: 000055E8: 15:51:57 []:BrowserType: login.exe: 000055E8: 15:51:57 []:BrowserVersion:0 login.exe: 000055E8: 15:51:57 []:OSType: login.exe: 00004068: 15:51:58 []:At MainForm AfterShow: login.exe: 00004068: 15:51:58 []:BrowserType:chrome login.exe: 00004068: 15:51:58 []:BrowserVersion:80 login.exe: 00004068: 15:51:58 []:OSType:windows So seems that this record is filled quite late and can't be used for example early in sessions for logging different types of browsers being used. (I'm also not sure if the functions UniSession.IsMobile and UniSession.IsDesktop have the same limitations - i believe they have or perhaps shouldn't be used? I believe the function UniApplication.UniPlatform is the one that works best - (another option is to use the agentstring directly - UniSession.UserAgent) Just let me know if I've missunderstod anything... UniGui Professional DemoLoginCookies.zip
  7. Would be great if you in next version would be able to make sure all form controls had the same generic properties published through the Delphi interface. Today I find it hard to easily design forms as some controls have some properties published but others haven't got them. For example is the FieldLabelFont avaiable in TUniDbNumberEdit and in TUniDbDateTimePicker, but not in TUniDbEdit and TUniDBFormattedNumberEdit? Alignment is not available in TUniDbDateTimePicker and in TUniDbLookupComboBox? (Also that some controls don't have LayoutConfig published that I've as well commented in another thread.)
  8. alfr

    UniDbNumberEdit and UniDbFormattedNumberEdit

    Still not added in the later version? I assume it can't be hard to add. Can you please see to it's on the fix list for coming version?
  9. alfr

    dblookupcombobox in dbgrid

    @Freeman35 yes, I agree that in most cases this would be preferred. However in the example he was looking at and didn't understand they were using the lookup field.
  10. alfr

    SharedVariable not working with HyperServer

    ...... from link below Sessions Another important difference from classical model is that in classical model your application is able to access all available session objects while in HyperServer each Node can only access sessions which are created by that specific Node. Needless to say that each Node holds a set of sessions which are isolated from other Nodes. If you need to query all of the sessions then you need to use different methods such as saving session information in a database table. You can simply create a row in the table when session is created and remove it when session is freed. see this link more info: http://unigui.com/doc/online_help/index.html?installing-and-configuring-hyp.htm
  11. alfr

    dblookupcombobox in dbgrid

    ok, what is missing is that you also need to add a lookup field in your table1 query. This is the field that you should show in the Unidbgrid. (The CustID can be hidden) Something like the below. So in the fields editor select "New Field".
  12. alfr

    dblookupcombobox in dbgrid

    You need to specify also the datasource and datafield in the uniDbLookupcombo. They would normally be set to the same datasource as the unidbgrid. So in your case datasource should point to table1 and the datafield should be the CustID. (and the listsource should be set to the customer datasource. Keyfield = ID and ListField = Customer)
  13. alfr

    Highcharts Component

    Thanks! (I had to change from 24 to 26 on the below in the package file as I'm using a newer version of Delphi.) requires rtl, vcl, vclimg, dbrtl, soaprtl, FireDAC, FireDACCommonDriver, FireDACCommon, vcldb, uniGUI26, uniGUI26Core, uniTools26, uIndy26, bindengine, bindcomp; contains uEchoHightChart in 'source\uEchoHightChart.pas';
  14. alfr


    Sure. during/before first use - FlexCelDllInit when done/to release - FlexCelDllShutdown FlexCelDllInit Method Use this method to initialize FlexCel when encapsulating it in a dll. Note that you don't normally need to call this method, as FlexCel is initialized automatically. But when you are hosting FlexCel inside a dll instead of the main application you need to call this method before calling the methods in the dll. Currently, this method will just initialize GDI+ when running in Windows, because GDI+ can't be initialized from the dll itself. When you use this method, always call FlexCelDllShutdown before closing your app.
  15. Hi, The object TUniDbLoockupCombobox is missing the property "SelectOnFocus" as for example the object TUniDbCombobox has. (Seems to work to typecast TUniDbComboBox(unidbLookupComboBox).SelectOnFocus:=True;) but would be good if it would be visible correctly....