Jump to content

stas

uniGUI Subscriber
  • Posts

    489
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by stas

  1. Hello Stas,

     

    I added dictionaries in Spanish, but still works only in English.

    Should I set on something else?

     

    Adan

    Hello

    1.Download

    http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.spa.tar.gz

    and Extract in [Program]\tessdata\

     

    2.Add IOUtils,TYpes to uses list

    3. Clear UniComboBox1.Items

    4. Add to FormCreate this text

    var Dir:TDirectory;

    Files:TStringDynArray;

    i:integer;

    begin

    Files:=Dir.GetFiles(UniServerModule.StartPath+'\tessdata','*.traineddata');

    for i := Low(Files) to High(Files) do

    UniComboBox1.Items.add(ChangeFileExt(ExtractFileName(Files),''));

    UniComboBox1.ItemIndex:=UniComboBox1.Items.Count-1;

    end;

    You can check result in

    http://db.kontora.ua/recognize.dll

  2. But to be safe, it's required to save changes, close project, open project and then compile (previously saved source).

     

    If you will compile to EXE and immediately comment the line out (for DLL), defunct DLL may arise.

     

    It's strange behavior in some Delphi IDE versions.

    Add this lines to dpr

    {$ifndef UNIGUI_VCL}

    {$E dll}

    {$else}

    {$E exe}

    {$endif}

  3. Как лучше организовать чат обмен сообщениями между пользователями.

    Основной вопрос как обновлять информацию, через таймер дергать постоянно БД не хочется.

    Какие есть простые варианты реализации?

    Добрый вечер, предположим у Вас есть уже такой чат в стандартном приложении (не унигуи), причем организован он не через сокеты, а посредством базы данных.

    Как Вы будете поступать в этом случае ?

  4. QR-code recognition by zbar
    http://zbar.sourceforge.net/
    You can view demo by http://db.kontora.ua/web/qr.dll
    You can download source and addinitional libraries from http://db.kontora.ua/web/qr.zip

    Regards
    P.S. Updated by full (i hope ) unicode support
    P.P.S Updated by pdf417 create and recognize.
    pdf417decode library
    http://sourceforge.net/projects/pdf417decode/
    modified by Javded http://forums.unigui.com/index.php?/user/1112-javded/
    pdf417encode library
    Copyright 2003 by Paulo Soares.
    http://sourceforge.net/projects/pdf417lib/

    post-19-0-23084700-1351929630.jpg

    • Like 1
  5. As I said .. is possible to replace the 'standard' dialog with one custom made ?

     

    Thanks !!

     

    Rober

    You can access to UploadForm after UniFileUpload.Execute by UniSession.FormList.Last and designed this form in runtime as you want.

    example

    UniFileUpload1.Execute;

    F:=TUniForm(UniSession.FormsList.Last);

    ch:=TUniCheckBox.Create(F);

    ch.Caption:='Check me';

    ch.Parent:=F;

    F.Height:=F.Height+ch.Height;

    ch.Align:=alBottom;

  6. Всем привет, в проекте часть функционала поместили в пакет, есть ли у кого нибудь опыт использования пакетов в uniGUI?? я столкнулся с проблемой, появляется ошибка на серверной стороне(на клиенте ошибок нет), ошибка возникает после срабатывания SessionTimeOut, изображение ошибки прикрепил, после возникновения ошибки exe перестает отвечать на запросы пользователей, никто не может войти в программу, после закрытия сообщений об ошибке, все начинает работать нормально, до следующего раза( exe не перезапускался).

    У кого нибудь есть идеи что это такое и как с этим бороться?

    Спасибо.

    Три вопроса

    Bpl стандартные или самописные ?

    А если компилировать без Bpl такая ошибка возникает ?

    Судя по всему используется OLE или COM ?

  7. I get error FastReport print on web:

     

     

     

     

    The error caused by the following line:

    frmFRDataModule.frxReport1.LoadFromFile(s);

     

     

     

    procedure TMainForm.UniBitBtn1Click(Sender: TObject);
    var s,fn:string;
    FormUrlView1: TFormUrlView;
    begin
    
      s:= ExtractFilePath(Application.ExeName) + 'report\customer.fr3' ;
    if WebMode then 
    begin
      fn:= 'R-' +FormatDateTime('hhmmss.zzz', Now()) +'.pdf'; // Create a unique name for report.
      frmFRDataModule.frxReport1.PrintOptions.ShowDialog := False;
      frmFRDataModule.frxReport1.ShowProgress:=false;
      frmFRDataModule.frxReport1.PrintOptions.ShowDialog:=false;
      frmFRDataModule.frxReport1.EngineOptions.SilentMode:=True;
      frmFRDataModule.frxReport1.EngineOptions.EnableThreadSafe := True;
      frmFRDataModule.frxReport1.EngineOptions.DestroyForms := False;
      frmFRDataModule.frxPDFExport1.Background:=True;
      frmFRDataModule.frxPDFExport1.ShowProgress:=False;
      frmFRDataModule.frxPDFExport1.ShowDialog:=False;
      frmFRDataModule.frxPDFExport1.FileName := UniServerModule.LocalCachePath + fn;
      frmFRDataModule.frxPDFExport1.DefaultPath := '';
      frmFRDataModule.frxDBDataset1.DataSet:=ADOQuery1;
      frmFRDataModule.frxReport1.DataSet:=frmFRDataModule.frxDBDataset1;
      frmFRDataModule.frxReport1.PreviewOptions.AllowEdit:=False;
      frmFRDataModule.frxReport1.LoadFromFile(s);
      frmFRDataModule.frxReport1.PrepareReport(); // Create Report
      frmFRDataModule.frxReport1.Export(frmFRDataModule.frxPDFExport1); // Export Report
      FormUrlView1:=TFormUrlView.Create(UniApplication);
      FormUrlView1.URLFrame.URL := UniServerModule.LocalCacheURL + fn; // Displayed on UniURLFrame
      FormUrlView1.Show;
    end else
    begin
      frmFRDataModule.frxReport1.Clear;
      frmFRDataModule.frxDBDataset1.DataSet:=ADOQuery1;
      frmFRDataModule.frxReport1.DataSet:=frmFRDataModule.frxDBDataset1;
      frmFRDataModule.frxReport1.LoadFromFile(s);
      frmFRDataModule.frxPDFExport1.EmbeddedFonts:=True;
      frmFRDataModule.frxReport1.ShowReport;
    end;
    
    end;
    

     

    What should I do ?

    Remove DialogPage From REport

    <TfrxDialogPage Name="DialogPage1" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Tahoma" Font.Style="0" Height="200" ClientHeight="166" Left="265" Top="150" Width="300" ClientWidth="292"/>

  8. Because the file name is the same, but its content has been modified. It is like a .pas file: you have one with a conrecte and normally fixed name in your project, but you change its content when you need.

     

    Two examples of real nuisance we had:

     

     

    Real example 1:

     

    once a lot of forms were developed with one concrete theme and icons set, i.e. Picol icon set, we need to change it all to another theme and another icon set, i.e. Fugue icons set, visually very different.

     

    Instead of using original icons name, we use our own name convention, so changing icons is as simple as mapping file names. Our icons file names are exaclty the same, but their contents have been changed with the substitution.

     

     

    Real example 2:

     

    once a lot of forms were developed with a theme and one icon set as provided to speed up develpment, many original icons doesn't meet exactly what you want, i.e. size of some details, their color or their edge contrast, so you have to retouch those icons and reload them in a kind of "refine" stage.

    Hello, In Web-mode TUniImageList can Assign images from TImageList

    example UniImageList1.Assign(ImageList1)

    but TUnitoolButton could not affect this changes in run-time, but you can assign images to uniimagelist before create form

    see example

    Runtime.zip

  9. Hello,

     

    It seems to be a problem with the function "SendStream" to download files when I want use extensions not usefull, like ".cfg".

     

    I use the following code:

    S := TStringStream.Create('abcdefg');
    try
     UniSession.SendStream(S, 'file.cfg');
    finally
     S.Free;
    end;
    

     

    If I use the extension default ".txt", then the download sucessfull ocurrs, but when I use an extension like ".cfg", the download doesen't starts.

    I have tested with Chrome, Internet Explore and FireFox and the same in all.

     

    Someone have this problem?

    Thanks.

    Hello,

    Try

    procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);

    begin

    MimeTable.AddMimeType('cfg', 'application/cfg');

    end;

×
×
  • Create New...