Jump to content

zilav

uniGUI Subscriber
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by zilav

  1. Delphi supports calling REST services for example. Node.js has plenty of libraries to implement REST server. So create a REST web service in node and use it from Delphi. Or vice versa. UniGUI is kind of irrelevant here.

  2. Node.js is just an executable running on server, not any different to php for example. Choose the exchanging interface and format (REST, XML, plan json, your own custom one) and implement it in both unigui and node to communicate.

  3. Is it possible to add a shortcut property like ServerModule.DebugShutdownKey, so when DebugHook <> 0 and the keys are pressed, unigui will shutdown itself?

    I run unigui dozens of times per day, and every time need to select with mouse a tray icon, right click for popup menu, then click Shutdown. Quite annoying really when you do that again and again, day after day.

  4. Купил, работает как часы. Уже больше 3 лет использую без нареканий под IIS.

    В унигуи, на мой взгляд, только одна проблема - высокие требования к качеству связи. Если в сети идет потеря пакетов, то при работе в унигуи программа будет часто вылетать по "session timeout", и пользователю придется входить заново.

  5. Greetings!

     

    All my uni apps work in mfPage, insert frames and rarely open a single form with ShowModal for some user input, and I don't care where user can drag that window. But unigui still generates ajax events for all actions even if they are not needed for app to function properly.

    So is it possible to create some EventOptions in ServerModule where selected event types can be swiched off to speed up? I'm sure there are other non essential events out there besides form's position that are not required by every application.

    For another example I don't need real position and size of controls on my forms and frames if user resizes browser window since browser alings everything itself, so would like to disable all such events too.

    What I try to achieve is smooth appearance and work of full page apps like this one

    http://www.tradatel.com/RankingFGCLM/

    while now you can notice huge delays in repainting.

  6. Is it possible when UniColumn.CheckBoxField.Autopost = True to show DBGrid.LoaingMask if it is set? Posts can take time on large databases.

     

    By the way, I get a typecast exception from unigui when UniColumn.CheckBoxField.BooleanFieldOnly = False and DisplayValues = '' if I want to show only checkboxes without any labels. Can be workarounded by using spaces DisplayValues = ' ; ' (happens with fmsoft_unigui_plus_pro_0.97.0.1085_beta)

     

  7. For 10, I prefer to put the list grid and other controls on a panel. When showing detail frame I make this panel invisible and show detail on top of it, when closing detail frame I make list visible again. Less queries opened, reduced delay and immediate update of changed fields in the list (if using Post on the same dataset as in list). Good for mfPage full screen applications to use all the available browser space instead of messing with forms and their size.

    • Upvote 1
  8. It has already been posted several times how to autowidth columns, I made a helper function

    procedure UniDBGridAutoWidth(aGrid: TUniDBGrid; aFieldName: string = '');
    var
      s: string;
      i: Integer;
    begin
      if aFieldName = '' then
        s := 'sender.headerCt.forceFit=true;'
      else with TStringList.Create do try
        Delimiter := ';';
        StrictDelimiter := True;
        DelimitedText := LowerCase(aFieldName);
        for i := 0 to Pred(aGrid.Columns.Count) do
          if IndexOf(LowerCase(aGrid.Columns[i].FieldName)) <> -1 then
            s := s + Format('columns[%d].flex=1;', [i]);
      finally
        Free;
      end;
    
      if s <> '' then
        aGrid.ClientEvents.ExtEvents.Add(Format(
          'beforereconfigure=function beforereconfigure(sender, store, columns, oldStore, the, eOpts)' +
          '{%s}', [s])
        );
    end;
    
    

    Pass a field name to autowidth, or several field names separated with ';'.

    If you don't pass any fields, all of them will have autowidth relating to their width set in designer.

    • Upvote 3
  9. I can't set DBGrid.Grouping.Collapsible to True in the latest 1085 build, and if I try to collapse grid using this js code

        UniSession.AddJS(DBGrid1.JSName + '.view.features[0].collapseAll();')
    
    

    it causes visual glitches (repeatable '+' signs) in group's headers. Did I miss something?

  10. however

    given that the URL is only a string, how do I tell it to display (fetch the image) instead of displaying a string?

    Create calculated widestring field, and use html tags

    DataSet.FieldByName('calc_youtube').AsString := Format('<img src="%s">', [DataSet.FieldByName('youtube_url').AsString]);
    
×
×
  • Create New...