Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 93,104
» Latest member: ht66ukcom1
» Forum threads: 2,419
» Forum posts: 11,358

Full Statistics

Online Users
There are currently 762 online users.
» 0 Member(s) | 759 Guest(s)
Applebot, Bing, Google

Latest Threads
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
7 hours ago
» Replies: 8
» Views: 1,589
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 64
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 450
Looking for UI Design Tip...
Forum: Delphi General Discussion
Last Post: chrisjordon232
08-06-2026, 05:17 AM
» Replies: 0
» Views: 129
TIWjQDBGrid DateFormat
Forum: IntraWeb General Discussion
Last Post: brushbuny
08-05-2026, 03:31 AM
» Replies: 2
» Views: 1,514
Simply convert PeerIp to ...
Forum: Indy
Last Post: DidierMenant
08-04-2026, 03:50 PM
» Replies: 2
» Views: 292
New CGDevTools build is a...
Forum: CGDevTools
Last Post: lfeliz
08-04-2026, 12:03 AM
» Replies: 2
» Views: 1,449
IW 16.2.0 Missing librari...
Forum: IntraWeb General Discussion
Last Post: JuergenS
07-31-2026, 09:44 AM
» Replies: 6
» Views: 1,408
CSS file not reloading af...
Forum: IntraWeb General Discussion
Last Post: CharlieDunn
07-29-2026, 10:02 AM
» Replies: 3
» Views: 549
Datatables question
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
07-28-2026, 04:34 AM
» Replies: 2
» Views: 359

 
  A little teaser
Posted by: Alexandre Machado - 07-24-2023, 06:48 AM - Forum: IntraWeb General Discussion - No Replies

This is what:

   

And this is what it does:

   

   

By the way, this is a Discord channel. It could be also a Telegram channel, or an email client.  Big Grin

Coming soon

Print this item

  TIWVideo
Posted by: troberts - 07-21-2023, 09:46 PM - Forum: IntraWeb General Discussion - Replies (10)

Hi,

I have tried the new TIWVideo component in IW15 and got it working. I am wondering if it can support a live video stream (either rtsp or multi-part jpeg)?

Thanks,
Tim

Print this item

  Intraweb caching JavaScript files (Priority support)
Posted by: valmeras - 07-20-2023, 09:57 PM - Forum: IntraWeb General Discussion - Replies (7)

I am using Intraweb 15.3.10 with C++ Builder 10.2.3
I am using Bootstrap 5.3 templates with my Intraweb application.
The template loads some JavaScript files:
      <script src="bootstrap-js/bootstrap.bundle.min.js"></script> 
      <script src="wysiwyg-editor/dist/js/wysiwyg.js"></script> 


Both Js files are in the wwwroot and Templates folders. Unfortunately I noticed that even if the Js is modified, Intraweb is using an old version.
The changes I make in wysiwyg.js are not reflected in the Browser during the execution of the program. When running the browser is showing the code below for a click on a button:

                            content += '<div class="form-group form-group-sm">';
                            content += '    <div class="form-row">';
                            content += '        <label class="col-xs-12 col-sm-4">Class:</label>';
                            content += '        <div class="col-xs-12 col-sm-8">';
                            content += '            <input type="text" class="form-control" id="urlClass" placeholder="CSS class name..." />';
                            content += '        </div>';
                            content += '    </div>';
                            content += '</div>';



But the real code in the Js file is below:

            content += '<div class="mb-3">';
            content += '    <div class="row mb-3">';
            content += '        <label class="col-12 col-sm-4">Tile:</label>';
            content += '        <div class="col-12 col-sm-8">';
            content += '            <input type="text" class="form-control" id="urlTile" placeholder="Title of link..." />';
            content += '        </div>';
            content += '    </div>';
            content += '</div>';


So the 2 codes which are supposed to be from the Js file are different!!
It is not related to the browser because I cleared the cache and tried 2 different browsers.

So it is Intraweb which is caching the wrong version and using it ignoring the changes I am making!
In the browser, the Js version used is located at http://localhost:20300/wysiwyg-editor/dist/js/wysiwyg.js

I tried to relocate the application cachedir, TIWTemplateCache::Instance->ClearCache(). But nothing is resolving the issue!

So, where is Intraweb is getting this old and wrong version from?

Print this item

  Icons in TIWURLWindow
Posted by: JuergenS - 07-18-2023, 04:27 PM - Forum: IntraWeb General Discussion - Replies (6)

Hi Alexandere,

i want to cache .jpg, .png, .gif and .ico graphics in a TIWURLWindow component.

Unfortunately, this only works with the first 3 graphic types.

Icons are NOT displayed in the TIWURLWindow component, instead the graphics file is downloaded to the user's machine without prompting.

Is there an explanation ?

Regards
Jürgen



Attached Files
.zip   IconInURLWindow.zip (Size: 24.9 KB / Downloads: 2)
Print this item

  Refactoring old code
Posted by: Alexandre Machado - 07-18-2023, 05:54 AM - Forum: IntraWeb General Discussion - Replies (2)

An IntraWeb user asked me some help to refactor an old IW application that he is maintaining, written by someone else. I asked him permission to publish parts of the code because I find it valuable to learn a thing or two.

This is the original code (with some variable name changes so it can't be back traced):

Code:
function CreateSelectHtml(var idComboBox, key, year, enabled, action: String):String;
var
  html: WideString;
  qryList: TFDQuery;
begin
  Result     := '';
  qryList := TFDQuery.Create(Nil);
  qryList.Connection := Controller.ConexaoEscola;
  try
    qryList.close;
    qryList.sql.Clear;
    qryList.SQL.Add(' Select distinct ');
    qryList.SQL.Add('   A.grade ');
    qryList.SQL.Add(' , A.code ');
    qryList.SQL.Add(' , A.description');
    qryList.SQL.Add(' FROM ESCW019 A ');
    qryList.SQL.Add(' WHERE A.year = :year');
    qryList.ParamByName('year').AsString := year;
    qryList.Open;


    html := '';

    html := html + '<select class="comboselect2"  id="'+idComboBox+'" style="width:100%"  '+enabled+' onchange='+action+'>' + SLineBreak;
    if key = '' then
      html := html + '   <option value="" selected="selected">Select</option>' + SLineBreak
    else
      html := html + '   <option value="" >Select</option>' + SLineBreak;

   qryList.First;
    while not qryList.Eof do
    begin
    if (key <> '') and (qryList.FieldByName('code').AsString = key) then
      html := html + '        <option value="'+qryList.FieldByName('code').AsString+'" selected="selected">'+qryList.FieldByName('desc').AsString+'</option> ' + SLineBreak
    else
      html := html + '        <option value="'+qryList.FieldByName('code').AsString+'">'+qryList.FieldByName('desc').AsString+'</option> ' + SLineBreak;
      qryList.Next;
    end;
      html := html + '</select> ' + SLineBreak;
    qryList.Close;

    Result := html;

  finally
    qryList.Free;
  end;
end;

He asked me what I would consider to change in code like this.

Here's my code review rant list  Big Grin

1- There is no reason to use WideStrings. WideString should be used in COM and when calling Windows API directly. Other than that, no reason.

2- Setting the SQL: Each time qryList.SQL.Add() is called, a whole bunch of methods and events are triggered. Some events may even trigger Database requests (we never know). Don't do this. Set the SQL at once using a single Add() or, what I do, qryList.SQL.Text := 'bla bla bla'

3- String concatenation in a loop: Always a bad idea. You can get better performance using something like our TStrBuilder (declared in unit IW.Common.StrBuilder)

4- Using FieldByName() inside a tight loop. FieldByName performance has improved but it won't ever be as efficient as having the field reference to use directly. Use FieldByName() 1 time to get the field reference and then use it inside the loop.

5 - DataSet loop: As a rule of thumb, use DataSet.DisableControls..DataSet.EnableControls when looping a DataSet. You possibly don't know the implementation details of the DataSet. In this case you don't know if DisableControls will improve the performance or not. It does make a big difference in ADO DataSets, for instance.

6- One query field is not used at all

7 - Several statements have no reason to exist. Query.Close before destroying it, SQL.Clear just after creating the query, and various others.

Tomorrow I'll publish the code I wrote to replace this, keeping the same functionality and method signature.

Print this item

  Product Support
Posted by: jimmy11 - 07-12-2023, 05:19 AM - Forum: IntraWeb General Discussion - Replies (8)

Hi,
Aside from this forum, do you have any other line of support? If yes (hopefully) can someone please let me know?
Thanks

Print this item

  Another nice demo published
Posted by: Alexandre Machado - 07-11-2023, 09:49 PM - Forum: IntraWeb General Discussion - Replies (1)

Hi guys,

We've just published another demo that is extensively requested by our users.

https://github.com/Atozed/IntraWeb/tree/...orProgress

Basically it shows how to use together an IWMonitor and a IWProgressBar to display the progress of a long duration task executed by a background thread.

The demo is simple but complete. There are several features working nicely together to do what it does.

Please notice that even though the IWMonitor requests data from the server (the completed percentage of the process) there is no session locking going on here. The request/response cycle lightweight and very fast.

Enjoy  Big Grin

Print this item

  Another nice demo published
Posted by: Alexandre Machado - 07-11-2023, 02:27 AM - Forum: IntraWeb General Discussion - No Replies

Hi guys,

We've just published another demo that is extensively requested by our users.

https://github.com/Atozed/IntraWeb/tree/...orProgress

Basically it shows how to use together an IWMonitor and a IWProgressBar to display the progress of a long duration task executed by a background thread.

The demo is simple but complete. There are several features working nicely together to do what it does.

Please notice that even though the IWMonitor requests data from the server (the completed percentage of the process) there is no session locking going on here. The request/response cycle is lightweight and very fast.

Enjoy  Big Grin

Print this item

  Odd behavior with grid controls created at runtime
Posted by: PaulWeem - 07-10-2023, 12:06 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi Alexandre,

I have an odd behavior with grid controls created at runtime.

In the attached example, I have two grids.
Grid1 is filled in the OnCreate of the Form, Grid2 is filled when the corresponding button is clicked.

When changing the controls in Grid1, clicking the Check Button shows the actual state(s) / value(s) of the Grid1 controls in Memo1.
But after changing and checking the controls in Grid2, Memo2 still shows the original state(s) / value(s) of the controls Grid2.

My questions:
1. Is this by design (I hope not)?
2. Am I doing something wrong?
3. Is this a bug and can it be fixed?

This not only applies to an IWGrid but also to an IWDBGrid.

I’m using Delphi 11.3 with IntraWeb 15.3.10.

Hope you can help me!

Cheers, Paul



Attached Files
.zip   GridControls.zip (Size: 92.28 KB / Downloads: 2)
Print this item

  IntraWeb 15.3.10 is out!
Posted by: Alexandre Machado - 07-10-2023, 09:31 AM - Forum: IntraWeb General Discussion - No Replies

There is a new update available:

https://www.atozed.com/2023/07/intraweb-15-3-10/

Also don't forget to check the new demo that we have just released: 

https://www.atozed.com/forums/thread-3363.html

Enjoy  Big Grin

Print this item