Jump to content

RobYost

uniGUI Subscriber
  • Posts

    207
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by RobYost

  1. I have a test case that will fail, and I will upload it if you want.  But it turns out the problem is that I am adding 

    UniSession.AddJS(' document.getElementById("'+ MainmForm.framEntity.lblCompanyName.JSName+'_id").style.fontSize = "12px";');
    
    

    During the create of the frame.

     

    If I add a button to set the style after it is created it works.

     

    If I add a timer after the frame is created to set the style that also works.

     

    I don't like either of these options, is there a better event I should use?

    • Upvote 1
  2. Thank you

     

     
    UnimLabel1 -> ClientEvents -> UniEvents -> ...
    function beforeInit(sender, config)
    {
        config.style = "text-align:center; color:green;";
    }

    This works.  

     

    How would I add this to a component?  So it could be set from properties within the component.

  3. Mobile Edit and Lable are missing the Font property.  I am not very familiar with writing components, but if someone could give me direction on how to do it, I would like to try to make a descendant of TunimEdit that has a font, etc.

     

    I am also thinking of starting a group wiki where we could collaborate by adding properties to existing controls.

     

     

    For example, I have done something very simple; add a Dirty flag to TUnimEdit.

    unit mUniRyEdit;
    interface
    uses
      System.SysUtils, System.Classes, uniGUIBaseClasses,
      uniGUIClasses, unimEdit;
    
    type
      TmUniRyEdit = class(TUnimEdit)
      private
        FDirty: Boolean;
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        property Dirty: Boolean read FDirty write FDirty default False;
      end;
    
    procedure Register;
    
    implementation
    procedure Register;
    begin
      RegisterComponents('UniYostPak', [TmUniRyEdit]);
    end;
    end.

    But I would like to learn to do more.

     

    Any help would be appreciated.

     

    -Rob

     

     

  4. I have a form and can change the style of labels on it with:

    UniSession.AddJS(' document.getElementById(' + aForm.Name + '.' + TUnimEdit(aForm.Components[i]).Name +
            '.getId( )).style.fontSize = "14px";');
    

    But now I have a frame on a form and I have tried several things

    UniSession.AddJS(' document.getElementById("'+ MainmForm.framEntity.lblCompanyName.JSName+'_id").style.fontSize = "12px";');
    

    Yields: Cannot read property 'style' of Null

    UniSession.AddJS(' document.getElementById(MainmForm.framEntity.lblCompanyName.getId( )).style.fontSize = "12px";');
    

    Yields: Cannot read property 'lblCompanyName' of undefined

     

     

  5. I have it working with https:  Thanks for your help.

     

    But it does not work with http:

     

    Should I write a little program that listens to port 80 and redirects to 443

     

    Like this example:

    http://forums.unigui.com/index.php?/topic/5709-redirect-and-close-session/

     

     

    PS - To clarify.  If I type in the address without any http at the begining just demo.simple-landlord.com it does not work.  I have to explicitly type https://demo.simple-landlord.com

     

    I have used other sites that automatically redirect it to https

     

    Is this something I can do on the server? (windows server 2016) 

  6. Thanks I got it working.

     

    Is it possible to know how they got to my server?

     

    For example did they type in

    demo.simple-landlord.com   or

    login.simple-landlord.com

     

    These are set to two different ip addresses, but alias to the same one.

  7. I have simple-landlord.com with GoDaddy.

     

    I have demo.simple-landlord.com forwarded to a dedicated server on OVH    myIP:8000/?demo=true

    I have login.simple-landlord.com forwarded to a dedicated server on OVH    myIP:8000

     

    I bought a SSL Certificate from SSLPoint which resells Comodo certificates (89 per year)

     

    The certificate is labeled:  Positive SSL WildCard       *.simple-landlord.com  1 year Expiry Date 05.06.2018

     

    I downloaded the certificates and received:

     

    AddTrustExternalCARoot.crt

    COMODORSAAddTrustCA.crt

    COMODORSADomainValidationSecureServerCA.crt

    STAR_simple-landlord_com.crt

     

    I have no idea what to do.  One of the options when I right click on these files is Install Certificate.

     

    I looked at the configure SSL Parameters in the UniGui help, but it references:

    cert.pem

    key.pem

    root.pem

     

     

    I also have Private key, this starts with -----BEGIN PRIVATE KEY----- ends with -----END PRIVATE KEY----- and has a bunch of gibberish in between.

     

    Can anyone help me?

     

     

     

     

  8. I think I figured it out.

     

    Add to the Uses

      {$IFDEF RELEASE}
      SvcMgr,
      ServiceModule in 'Service\ServiceModule.pas' {SimpleLandlordService: TUniGUIService},
      {$ELSE}
      Forms,
      {$ENDIF }
     
    Below the begin:
    {$IFDEF RELEASE}
      if not Application.DelayInitialize or Application.Installing then
        Application.Initialize;
      Application.CreateForm(TSimpleLandlordService, SimpleLandlordService);
      Application.Run;
    {$ELSE}  //WHAT EVER YOU CURRENTY HAVE BELOW
      Application.Initialize;
      Tsm.Create(Application);
      Application.Run;
    {$ENDIF}

    I still need to do more testing.

     

    But it looks like my logging to CodeSite doesn't work when I run it as a service.

    -UPDATE: it works to my logfile, but not to the live viewer.  But that is a codesite limitation

  9. I have a project that is a stand alone exe.

     

    I would like to keep it that way for debugging, but I would like to set an $DEFINE to build it as a service.

     

    Is there something written up that would help me do this?

  10. I put my demo up on a remote server today.  14 of you logged in.  Thank you for that.

     

    Twice it crashed.

     

    I looked at the server logs but they didn't help me.

    SimpleLandlord.exe: 00001D34: 14:43:50 []:>--------------------------------------------------------------<
    SimpleLandlord.exe: 00001D34: 14:43:50 [Tsm]:Server First Init.
    SimpleLandlord.exe: 00001D34: 14:43:50 [Tsm]:Erasing Cache Folder...
    SimpleLandlord.exe: 00001D34: 14:43:50 [Tsm]:Cache Folder Erased. <0> Files deleted.
    SimpleLandlord.exe: 00001D34: 14:43:51 [Tsm]:Starting HTTP Server...
    SimpleLandlord.exe: 00001D34: 14:43:51 [Tsm]:HTTP Server Started. Port: 8000
    SimpleLandlord.exe: 00001A54: 14:43:51 [127.0.0.1]:EUniSessionException : Invalid session or session Timeout. : Addr: $0000000000A2560A
    SimpleLandlord.exe: 00001A54: 14:43:51 [127.0.0.1]:EUniSessionException : Invalid session or session Timeout. : Addr: $0000000000A2560A
    SimpleLandlord.exe: 00000E88: 14:45:13 [72.239.166.123]:EStringListError : List index out of bounds (-1) : Addr: $0000000000000001
    SimpleLandlord.exe: 00000E88: 14:46:08 [72.239.166.123]:EStringListError : List index out of bounds (-1) : Addr: $0000000000000001
    SimpleLandlord.exe: 00001140: 15:16:20 [72.239.166.123]:EUniSessionException : Invalid session or session Timeout. : Addr: $0000000000A2560A
    SimpleLandlord.exe: 00000DA0: 16:41:54 [72.239.166.123]:EUniSessionException : Invalid session or session Timeout. : Addr: $0000000000A2560A
    SimpleLandlord.exe: 000015E8: 17:40:25 [172.58.169.253]:EUniSessionException : Invalid session or session Timeout. : Addr: $0000000000A2560A
    SimpleLandlord.exe: 00000258: 19:23:45 [127.0.0.1]:EUniSessionException : Invalid session or session Timeout. : Addr: $0000000000A2560A
    SimpleLandlord.exe: 000023E8: 21:16:10 []:>--------------------------------------------------------------<

    I think this is when it happened.  Can someone explain this to me? Or is there a way to turn extra logging?

    Any help would be appreciated.

  11. I am trying to use the keypress event to disallow some keys in a TUniDateTimePicker.

     

    But even if I use:

    procedure TfraTIncome.edtDatePaidKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    begin
        Key := 0;
    end;
    
    procedure TfraTIncome.edtDatePaidKeyPress(Sender: TObject; var Key: Char);
    begin
        Key := #0;
    end;

    It still lets me type anything.

  12. I just purchased a dedicated server and am trying to deploy my program.

     

    I installed the latest runtime

    Copied over my release folder

    double clicked my program.

     

    The UniGui server icon come up.

    When I try to connect to it I get:

    Error loading MIDAS.DLL

     

    This is a just installed Windows Server 2016, with nothing else installed except Filezilla and Firefox.

     

    What else needs to be done?

  13. Yes the demo does the same thing.  But after further testing it is only happening on one of my PC's. A laptop running windows 10.  Firefox 52.0.2

     

    It shows a blank UrlFrame.  Then downloads the pdf.  If you click on the PDF it looks correct.

  14. I just purchased Fast Reports.  I am able to create a report and put it in a UniURLFrame.  On Chrome this pops up a window with the report and the option to download or print.

     

    But on FireFox it just downloads the report (pdf file).  Is there any way to override Firefox's default functionality and have it display the window with the report?

     

    BTW I bought the enterprise version version because it asked if I needed to do web printing, but this seems to work without using any of the web printing functionality.  Did I only need the Standard or Professional version?

×
×
  • Create New...