Jump to content

alfr

uniGUI Subscriber
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by alfr

  1. Perhaps then better to use auto instead of flex on height.
  2. Have you looked at http://www.unigui.com/doc/online_help/isapi_module.htm and the 7.0 sub page? If not this is a good start.
  3. Not sure what type of file it is. but perhaps you can try with application/octet-stream or application/binary
  4. I believe you need to add the extension in the hyperserver config file. below from unigui info: [custom_mimes] mime_0_ext= mime_0_type= mime_1_ext= mime_1_type= mime_2_ext= mime_2_type= mime_3_ext= mime_3_type= mime_4_ext= mime_4_type= Custom mimes allows to add custom file types to HyperServer scope. Under normal conditions for security reason only safe file types are allowed to be transferred from the server. You can define as much as mimes needed here. New mimes can be simply added by adding a entry to CFG file. Consider you want to enable access to files with extension of "7z". You need to add below entry: mime_0_ext=7z mime_0_type=application/x-7z-compressed http://unigui.com/doc/online_help/installing-and-configuring-hyp.htm
  5. You can assign this event dynamic as well, but perhaps doesn’t suit your needs.
  6. No, not in the OnDrawColumnCell - instead in the event OnGetText for that field in the recordset that is linked to the unidbgrid datasource - see sample below
  7. Or as an option (also if other manipulation is needed) - change the case in the event handler of that field - in the recordset's field - onGetText: Text:=UpperCase(Sender.Value);
  8. 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!
  9. 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;
  10. 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
  11. One option I believe is just to input <br> In the caption where it should break.
  12. You can set Handled:=true in the onBeforeLogin event in the mainmodule to skip the loginform and get directly to the mainform.
  13. 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 1.90.0.1523 DemoLoginCookies.zip
  14. 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.)
  15. 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?
  16. @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.
  17. ...... 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
  18. 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".
  19. 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)
  20. 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';
  21. alfr

    Flexcel

    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.
  22. 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....
  23. Ok. So will it be available in a future version or something that I can implement by your instructions and code? (I'm currently using version 1.70.0.1489)
  24. Great! The week Numbers are there so really everything we need. Thanks for investigating! Is it complicated to implement?
  25. Hi, We use week numbers a lot. Our users/clients use them in the dialog with their customers. How can the uniDateTimePicker and unidbDateTimePicker be reconfigured to also show the week number (iso8601 week number) on the left side when the monthly calender is shown? Left - date picker calendar unigui - right other example from Outlook - with the week numbers marked with yellow. Below sample js script for calculating the week number. Would appreciate if someone with good knowledge in UniGui how to reconfigure the calender... function ISO8601_week_no(dt) { var tdt = new Date(dt.valueOf()); var dayn = (dt.getDay() + 6) % 7; tdt.setDate(tdt.getDate() - dayn + 3); var firstThursday = tdt.valueOf(); tdt.setMonth(0, 1); if (tdt.getDay() !== 4) { tdt.setMonth(0, 1 + ((4 - tdt.getDay()) + 7) % 7); } return 1 + Math.ceil((firstThursday - tdt) / 604800000); }
×
×
  • Create New...