Jump to content

Marlon Nardi

uniGUI Subscriber
  • Posts

    613
  • Joined

  • Last visited

  • Days Won

    70

Posts posted by Marlon Nardi

  1. Hi

     

    Within Async methods do you reference any visual object?

     

    I use, however I do not reference visual objects of uniGUI:

     



    TThread.CreateAnonymousThread(
    procedure()
    begin
    end).Start;

  2. Eu faço desta forma aqui para os meus sem problemas, tente desta forma:

    var
      Frm : TUniForm;
      FrmClass : TUniFormClass;
    
    ...
      FrmClass  := TUniFormClass(FindClass(vNameForm));
      
      Frm := FrmClass.Create(UniApplication);
      Frm.ShowModal();
    
    

    Lembrando de registrar sempre os form

    initialization
      RegisterClass(Tformexample);
    
  3. Herculano, verifique se voce não possui algum html o js embutido neste seu form.

    O240=new Ext.form.Canvas({id:"O240_id",ajxS:AjaxSuccess,ajxF:AjaxFailure,fieldSubTpl: [ "<canvas id=\"O240_canvas\" width=\"49px\" height=\"30px\">Your browser does not support <Canvas> element.</canvas>"],name:"O240",enableKeyEvents:true,paintMode:3,style:"background-color:#FFFFFF;",fieldStyle:"font:13px Tahoma",width:49,height:30,x:10,y:24});
    

    Este erro também ocorre se voce criar um form vazio?

  4. let the unigui generate the link:

    UniServerModule.NewCacheFileUrl(False, 'pdf', FormatDateTime('ddmmyyyyhhmm', Now)+'myfirstrel, '', URL);
    
    UniSession.AddJS('var newWin = window.open("'+URL+'"); '+
      'if(!newWin || newWin.closed || typeof newWin.closed==''undefined'') '+
      '{ alert(''Atenção, os pop-ups para esta página estão bloqueados!'');} ');
    

    newcache.png

  5. Change you code:

    TThread.Synchronize(nil,
          procedure
          begin
            MainForm.UniMemo1.Lines.LoadFromStream(ARequestInfo.PostStream); //not works :-)
            //or
            MainForm.UniMemo2.text := strRead;
            MainForm.UniMemo2.Lines.SaveToFile(Uniservermodule.FilesFolderPath + 'test.txt'); //not works :-)
          end);
    

    to example

    var  
      FS: TFileStream;   
    --
      FS := TFileStream.Create(Uniservermodule.FilesFolderPath + 'test.txt', fmCreate)
      try
        FS.Seek(0, soFromEnd);  
        FS.Write(Pointer(ARequestInfo.PostStream)^,Length(ARequestInfo.PostStream));
      finally 
        FS.Free 
      end
    

    Another detail, your call must be within an active session.

    In this case you are trying to manipulate an object that is not in a session, it is only in ServerModule.
     
    This here in the server module is not a good idea:
     
    MainForm.UniMemo2.
     
    tech-1.png

     

  6. or add in web.config:

    <rewrite>
     <rules>
      <rule name="Redirect HTTPS" enabled="true" stopProcessing="true">
        <match url="(.*)" />
        <conditions>
        <add input="{HTTPS}" pattern="^OFF$" />
        </conditions>
        <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
     </rule>
    </rules>
    </rewrite>
    
  7. ForceFit:
     

    Grid.ClientEvents.UniEvents.Values['beforeInit'] :=
        'function (sender, config) { config.forceFit = true; }';
    

    AutoSize:
     

    Grid.ClientEvents.ExtEvents.Values['store.load'] :=
        'function (sender, records, successful, eOpts) ' +
        ' { ' +
        '   sender.grid.columnManager.columns.forEach(function(col) '+
        '   { '+
        '    col.autoSize(); '+
        '   }) '+
        ' } ';
    
×
×
  • Create New...