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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 100,735
» Latest member: mega888downloaddco
» Forum threads: 2,427
» Forum posts: 11,374

Full Statistics

Online Users
There are currently 1174 online users.
» 5 Member(s) | 1163 Guest(s)
Applebot, Bing, DuckDuckGo, Facebook, Google, Yandex, cellfastcomco1, mega888downloaddco, sunwicom, u88eucc, v9betexpert

Latest Threads
KanBan like behaviour
Forum: IntraWeb General Discussion
Last Post: lfeliz
Yesterday, 06:54 PM
» Replies: 0
» Views: 27
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:33 PM
» Replies: 1
» Views: 461
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:31 PM
» Replies: 2
» Views: 519
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 369
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 737
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 434
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 942
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 395
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,682
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 567

 
  TIWUserSession or TUserSession
Posted by: bruce.eglington@usask.ca - 08-19-2020, 08:59 PM - Forum: IntraWeb General Discussion - Replies (4)

I have some SA programs that have worked for years and am in the process of moving to a different host system which runs in a virtual machine. Some of my Intraweb 15 programs run fine but others crash every night on the VM, even though, to the best of my knowledge I designed them all the same way and they never did so on the old physical machine. Original code was developed in Intraweb 5 with changes where forced on me during compiling since then as I have moved to more recent versions of Intraweb.

I am wondering whether part of the issue may be due to the way I use TUserSession rather than TIWUserSession in many cases because I have multiple datamodules in each program.

What exactly is the purpose and difference between a UserSession and a IWUserSession. Recent examples in the Intraweb documentation use a UserSessionUnit which is mostly based on TIWUserSession and declare links to datamodules within this. Is it better to do things this way or should it not matter?

Any suggestions for ways to improve or implement a currently preferred way to do things would be appreciated. I have also noted in various documentation that since IW 14 one should declare the aSession as a descendent of TIWUserSession with (nil, aSession) but, since I use UserSessions, this does not compile.

My current general program structure is to have, say, two datamodules with definitions something like the following

unit datamodule1;
interface
uses
  various items listed here;
type
  Tdatamodule1 = class(TDataModule)
    various data components;
  private
  public
  published
  end;

function datamodule1: Tdatamodule1;

implementation

use
  various items here;

function datamodule1: Tdatamodule1;
  Result := TUserSession(WebApplication.data).datamodule1;
end;

various procedure here;

end.


In the ServerController unit I have:

unit ServerController;

interface
uses
  datamodule1name, datamodule2name,
  various other items listed here;
type
  TIWServerController = class(TIWServerControllerBase)
    procedure IWServerControllerBaseNewSession(aSession: TIWApplication);
    procedure IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
    various data components;
  private
  public
  end;

  TUserSession = class(TComponent)
  public
    MainForm : TMainForm;
    datamodule1 : Tdatamodule1;
    datamodule2 : Tdatamodule2;
    various other usersession items defined here;
  end;

  function UserSession: TUserSession;
  function IWServerController: TIWServerController;

implementation

uses
   various items defined here;

function IWServerController: TIWServerController;
begin
  Result := TIWServerController(WebApplication.Data);
end;

function UserSession: TUserSession;
begin
  Result := TUserSession(WebApplication.Data);
end;


procedure TIWServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
begin
  vMainForm := TMainForm.Create(WebApplication);
end;

procedure TIWServerController.IWServerControllerBaseNewSession(aSession := TIWApplication);
begin
  aSession := TUserSession.Creat(nil);
end;


procedure TUserSession.Destroy;
begin
  various items get destroyed here;
  inherited Destroy;
end;

end.

Print this item

  Show highres image scaled in ModalWindow
Posted by: PaulWeem - 08-19-2020, 07:54 PM - Forum: IntraWeb General Discussion - Replies (7)

Hi all,

I'm using IW 15.2.12 and Delphi 10.3.3, but I doubt if this has anything to do with my challenge.

As you all may know, when you open an URL to a high resolution image, this image opens in the browser and the image is scaled to the browser so that it's completely showing.
I would like to achieve the same result, but then in a ModalWindow. But when opening the same highres image URL in a ModalWindow, the image is shown in real size.

Is there a way to show this highres image scaled in a ModalWindow?

Thanks in advance for your tips/solutions!

Cheers, Paul

Print this item

  Multiple AVs in 15.2.12
Posted by: JuergenS - 08-19-2020, 02:08 PM - Forum: IntraWeb General Discussion - Replies (3)

Hi Alexandre,

when I exit the IW debug dialog after starting an application in the browser and closing it again, I now get an AV with IW 15.2.12.
In the application itself I get AVs in many places, I am now back to IW 15.2.11.

C++ Builder 10.4

Anwender-WEB-Server (Indy - x86)
Build Date: Aug 12, 2020
IntraWeb Version: 15.2.12
32-bit Server on 64-bit Windows
HTTP Server is active on port: 80

Call stack from IW debug dialog
:766b9962 KERNELBASE.RaiseException + 0x62
:3224f7c6 CC32270MT.___raiseDebuggerException + 0x1a
:3224e190 ; C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\CC32270MT.DLL
:00c18189 __ExceptionHandler + 0x1E
:772771b4 ; ntdll.dll
:772639e6 ntdll.KiUserExceptionDispatcher + 0x26
:00b333c1 Iwhtmlcontainer::TIWHTMLContainer::InternalSetTabOrder + 0x21
:00b4a13e ; setTabOrder
:00b3347b ; AfterParentChanging
:00b30d83 ; SetParent
:00b349d6 ; Dispose
:00b493c9 ; Dispose
:00b3086a Iwvclbasecontainer::TIWBaseContainer::~TIWBaseContainer() + 0x1A
:0084C857 System::TObject::Free(Self=????)
:00b493c9 ; Dispose
:00b3086a Iwvclbasecontainer::TIWBaseContainer::~TIWBaseContainer() + 0x1A
:0084C857 System::TObject::Free(Self=????)
:00b493c9 ; Dispose
:00b3086a Iwvclbasecontainer::TIWBaseContainer::~TIWBaseContainer() + 0x1A
:0084C857 System::TObject::Free(Self=????)
:00b493c9 ; Dispose
:00b3086a Iwvclbasecontainer::TIWBaseContainer::~TIWBaseContainer() + 0x1A


System.pas

procedure TObject.Free;
begin
// under ARC, this method isn't actually called since the compiler translates
// the call to be a mere nil assignment to the instance variable, which then calls _InstClear
{$IFNDEF AUTOREFCOUNT}
  if Self <> nil then
    Destroy;
{$ENDIF}
end;

Regards
Juergen

Print this item

  JQGRID documentation ?
Posted by: SorenJensen - 08-18-2020, 02:44 PM - Forum: IntraWeb General Discussion - No Replies

Hi everyone,


Where do you suggest I can learn more about the JQGRID components ?


Regards
Soren

Print this item

  Process PHP with TIdHTTPServer
Posted by: kbriggs - 08-17-2020, 08:45 PM - Forum: Indy - Replies (3)

I know how to create a simple web server using TIdHTTPServer and serve .htm files. But what if I wanted to be able to handle .php files like IIS or Apache would? I assume I would need to download the thread-safe Windows binaries for PHP. Then what? A user requests a link with a .php extension. How do I send the .php file contents (with URL parameters) to the PHP processor, wait for it to spit back any output, and send that output back to the user?

Print this item

  Intraweb Function Call from HTML
Posted by: amit.walters - 08-17-2020, 05:50 PM - Forum: IntraWeb General Discussion - Replies (7)

I was using bootstrap components to make responsive size adjustable web application but the problem I am getting is all the component calls client side java script as far as I understood. 
it can call Java script Function written in the same page or it redirects to another page.
But can I call a custom function written in C++ in my web application as I can call it within the web application.

Print this item

  No wrap for IWcheckbox
Posted by: bruce.eglington@usask.ca - 08-17-2020, 03:48 PM - Forum: IntraWeb General Discussion - No Replies

Is there any way to achieve the same behaviour as nowrap for TIWCheckboxes? i.e. i have text associated with a checkbox and want to ensure that the text does not wrap at run time.

Print this item

  Custom Request Header
Posted by: ebob42 - 08-17-2020, 12:45 PM - Forum: IntraWeb General Discussion - No Replies

It is possible to add a custom header to each request?

Using IW 15.2.12 with Delphi 10.3.3 (planning to move to 10.4 soon for this project).

The reason I'm asking is that a customer of mine has mutiple servers, and a load balancer who will send customers to one of these servers based on some criteria in the request header. We were thinking of a way to add the IW session ID to the request header. Or some other means of identification. But I have no idea how to programmaticlaly add something to the request header. And nut just for regular "Click" events, but also for the AsSync events of course.

I hope soemthing is possible, thanks in advance.

Groetjes, Bob Swart

Print this item

  IW Web App Monitoring
Posted by: ShaneStump - 08-16-2020, 08:53 PM - Forum: IntraWeb General Discussion - Replies (5)

Howdy All!

I have a certain customer that after 8 to 10 hours of heavy use, my web application crashes with an EAccessError. 

The stack trace doesn't show anything useful.

If I had to guess, I would guess a possible memory leak but unfortunately FASTMM is practically useless for C++ Builder 10.2.3 and I gave up years ago trying to get it to work (just google my name with FASTMM).

Any how, I was wondering if anyone has written a module or application that monitors a web application for memory usage and somehow restarts it with a command line batch file if necessary?

Or does anyone have any other solution?

Big K - will IW17 have any built-in ability to take a make an IW web application be able to run in multi-process / multi-thread mode as a way of load balancing / restarting processes?

Thanks,

Shane

Print this item

  IWDBGrid refresh
Posted by: softdev85 - 08-13-2020, 04:25 PM - Forum: IntraWeb General Discussion - No Replies

Hello,
my problem is
i populate my IWDBGrid by database

when i click on dbgrid row my row is selected
and all fields of this row populate dbedit,
everything is ok.

but i want select good item of some dbcombox
how can i have good item selected in my combobox ?

thank's for your help
best regards

Print this item