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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 523
» Latest member: Alain.verdier
» Forum threads: 736
» Forum posts: 3,676

Full Statistics

Online Users
There are currently 68 online users.
» 2 Member(s) | 63 Guest(s)
Bing, Google, Yandex, Jose Nilton Pace, MJS@mjs.us

Latest Threads
15.1.7?
Forum: IntraWeb General Discussion
Last Post: SWTwo6
2 hours ago
» Replies: 0
» Views: 8
Publishing IW XV through ...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 4
» Views: 57
Warning from Datatables
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 2
» Views: 76
Error handling
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 3
» Views: 47
URLBase without trailing ...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 6
» Views: 99
PRevenitng a session from...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 3
» Views: 45
Radio Group Item Index
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 2
» Views: 63
Access Violation when usi...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 3
» Views: 48
IWFileUploader and drag&d...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 1
» Views: 20
IWBootstrap app and Apach...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
3 hours ago
» Replies: 1
» Views: 24

 
  Access Violation when using Frames in IW15
Posted by: RichardS - 10-17-2019, 10:06 AM - Forum: IntraWeb General Discussion - Replies (3)

Hi - I am trying to track down an AV I get when using frames in an IW 15 application. These are inherited frames, and I have quite a number on the main IW form. The AV happens when a certain sequence of steps is followed.

The Delphi compiler simply tries to open IWApplication.pas when the error happens so of course I can't see quite what's going on, and if the error is in my construction or something in IW itself - my hunch is the latter, but perfectly possible I'm doing something wrong.

If I supply a zip of the source code with steps to reproduce, could somebody at AtoZed look at it for me? The application is confidential so would rather send it to you direct rather than upload here.

I've tried the latest IW 15.1.15 and on both Seattle and Rio IDEs with same results.

Thanks
Richard

Print this item

  Publishing IW XV through a TMG 2010 firewal
Posted by: SWTwo6 - 10-16-2019, 06:57 PM - Forum: IntraWeb General Discussion - Replies (4)

So, my latest adventure in thoroughly abusing Intraweb

I have a version in IW 11 that is published through a Microsoft Forefront 2010 TMG firewall, which works fine, but when I try to publish the same app produced in IW15 through the same firewall rules it's not working - the only js error I'm receiving is about the manifest.json file, but any buttons on my TMS grids - they just cause the website to hang, as if awaiting a response.

Does anyone know what is likely to have changed between IW XI and IW XV that I would need to update my firewall rules for?

Print this item

  TIWJQueryWidget: documentation and example
Posted by: lillux82 - 10-16-2019, 03:52 PM - Forum: IntraWeb General Discussion - Replies (3)

Hi everybody!
I'm searching on the web about documentation and examples of TIWJQueryWidget but i find nothing.
I need to display a barcode in a intraweb page, and i found this:
http://codeverge.com/embarcadero.delphi....ev/1049775
but i'm not be able to use tiwjquerywidget

thanks in advance

ps. sorry everybody for my english

Stefano

Print this item

  IW15 FileUplader and GetUploadedFileMimeType
Posted by: cprmlao@hotmail.com - 10-16-2019, 01:37 PM - Forum: IntraWeb General Discussion - Replies (1)

Hi,
Intraweb XIV iwfileuploader demo has  the next code. 
It seems 'GetUploadedFileMimeType' is contained inm IWFileCheck.pas not present in the folder.
What is the equivalent to 'GetUploadedFileMimeType' in IW 15?
Regards, Luiz

Code:
procedure TIWForm7.IWFileUploader5AsyncUploadCompleted(Sender: TObject;
  var DestPath, FileName: string; var SaveFile, Overwrite: Boolean);
var
  CurDir: string;
  MimeType: string;
begin
  // get the app path
  CurDir := TIWAppInfo.GetAppPath;

  MimeType := GetUploadedFileMimeType;

  // save in the same application directory, with the same name of the original file. Overwrite if it already exists.
  IWFileUploader5.SaveToFile(FileName, CurDir + FileName, True);

  // Inform IWFileUploader that we are taking care of file saving ourselves
  SaveFile := False;
end;

Print this item

  Error handling
Posted by: SWTwo6 - 10-16-2019, 12:16 PM - Forum: IntraWeb General Discussion - Replies (3)

In IntraWeb XI, I was able to use the URLReposnders to use a self-registered Error page, that I could then run code on. I'm trying to work out the best way to replicate this behaviour in IWXV

I don't want to use a static page or a template, because I want to run my own code on the page. I've tried using a TerminateAndRedirect on the OnException, but it doesn't appear to have any effect (it is being called, but the browser still gets sent to the Intraweb error page)

Can anyone point me in the right direction?

Print this item

  Minimal SSL TCPClient and server, VCL
Posted by: logihouse - 10-15-2019, 08:48 PM - Forum: Indy General Discussion - Replies (6)

Minimal SSL TCPServer and client
I am using delphi version 10.3.1 .
No certificate, it is not mandatory.
No errormessages, but only rubbish received in ServerExecute. Works fine when UseSSL = false;
Any ideas?

Place a button on an empty form, and link it to Button1Click.

Code:
unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uIdContext, IdContext,
  IdServerIOHandler, IdSSL, IdSSLOpenSSL, IdBaseComponent, IdComponent,
  IdCustomTCPServer, IdTCPServer, Vcl.StdCtrls, IdIOHandler, IdIOHandlerSocket,
  IdIOHandlerStack, IdTCPConnection, IdTCPClient;

type
  TForm1 = class(TForm)
    Server: TIdTCPServer;
    Client: TIdTCPClient;
    cSSL: TIdSSLIOHandlerSocketOpenSSL;
    Button1: TButton;
    SSL: TIdServerIOHandlerSSLOpenSSL;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure ServerExecute(AContext: TIdContext);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

const usessl = false;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Client.Connect;
  Client.IOHandler.WriteLn('test');
  Client.Disconnect;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Server:= TIdTCPServer.Create;
  Server.DefaultPort := 443;
  Client:= TIdTCPClient.Create;
  Client.Host := 'Localhost';
  Client.Port := 443;
  Server.OnExecute := ServerExecute;
  if UseSSL then
  begin
    cSSL:= TIdSSLIOHandlerSocketOpenSSL.Create;
    SSL:= TIdServerIOHandlerSSLOpenSSL.Create;
    SSL.SSLOptions.Mode := sslmServer;
    SSL.SSLOptions.VerifyMode := [];
    SSL.SSLOptions.VerifyDepth  := 0;
    SSL.SSLOptions.SSLVersions := [sslvSSLv2..sslvTLSv1_2];
    TIdSSLIOHandlerSocketBase(cSSL).PassThrough := false;
    cSSL.SSLOptions.Mode := sslmClient;
    cSSL.SSLOptions.VerifyMode := [];
    cSSL.SSLOptions.VerifyDepth  := 0;
    cSSL.SSLOptions.SSLVersions := [sslvSSLv2..sslvTLSv1_2];    // Avoid using SSL}
    Server.IOHandler := SSL;   // TIdServerIOHandlerSSLOpenSSL
    Client.IOHandler := cSSL;  // TIdSSLIOHandlerSocketOpenSSL
  end;


  Server.Active := true;
end;

procedure TForm1.ServerExecute(AContext: TIdContext);
var s : string;
begin
  s :=  aContext.Connection.IOHandler.Alldata;
  s := s;
end;

end.

Print this item

  Warning from Datatables
Posted by: matija - 10-15-2019, 08:53 AM - Forum: IntraWeb General Discussion - Replies (2)

I create my HTML table (datatables.net) include IWLabel raw text

<table id="mytable" class="table table-hover table-striped table-condensed dt-responsive nowrap" width="100%" cellspacing="0">
...
</table>

I have in my HTML template {%mytable%} and this style:
<style>
.sunday {
  background-color: red !important;
}

</style>

After view IWLabel send (color row with red which are sunday):

WebApplication.CallBackResponse.AddJavaScriptToExecute
        ('$(document).ready( function () {'
        + 'var table = $("#mytable").DataTable({'
        + '"createdRow": function(row, data, dataIndex)'
        + '{ if (data[2] == "sun") {$(row).addClass("sunday");} }'
        + '});'
        + '}) ');


After AddJavaScriptToExecute get it:
DataTables warning: Non-table node initialisation (SPAN). For more information about this error, please see http://datatables.net/tn/2

Print this item

  PReventing a second tab from opening the same session
Posted by: SWTwo6 - 10-14-2019, 11:29 AM - Forum: IntraWeb General Discussion - Replies (1)

How do?

I don't want to use the session ID in the URL, as we want to support users bookmarking the page easily, and  we need cookies enabled to allow the back button GlobalIntercept functionality to work as advertised, so I'm unable to use either of the "Mutliple independant sessions" options.


Is there any method by which I can force the session to only be valid in one browser window or tab at a time? Either by preventing a second tab from loading, or disabling the first tab on loading a second?

Print this item

  URLBase without trailing '/'
Posted by: MJS@mjs.us - 10-13-2019, 07:17 PM - Forum: IntraWeb General Discussion - Replies (6)

While switching a project to http.sys I noticed some odd behavior while testing (but http.sys is not the issue, problem also occurs in Indy mode).  

If you use 'URLBase' and reference the url without a trailing '/' the main page will load and the url in the browser will now display a trailing '/'.  If you reference the url again without a trailing '/the main page will load but a new session is created instead of using the original one.  In my case I just bookmarked the app without the '/' and I was able to create a couple hundred orphaned sessions with one minute of clicking the link.  I created a new, default IW project and the result is the same. A work around is to use an 'IWServerControllerBaseBeforeNewSession' event but then you get 404 without the trailing '/', not ideal.

[Image: 2019-10-13_13-42-01.png]

Print this item

  TIWTreeView
Posted by: pdinsd - 10-13-2019, 10:35 AM - Forum: IntraWeb General Discussion - No Replies

Is there anyway to disable a node from being clickable? I have a treeview where some nodes are info only, and should not be clickable.

Print this item