| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 107,546
» Latest member: vsportad1
» Forum threads: 2,440
» Forum posts: 11,408
Full Statistics
|
|
|
| IWCGIRunner not working with simple .bat cgi |
|
Posted by: cprmlao@hotmail.com - 09-14-2019, 11:50 AM - Forum: IntraWeb General Discussion
- Replies (1)
|
 |
Hi, Alexandre,
I am fighting with IWCGIRunner and until now it is the winner.
I created a simple "test.bat" and I have used a click sync of a iwbutton(IWBTNACAO) . The test.bat file has this content:
Code: @echo off echo Content-type: text/plain echo. echo. echo Hi ! echo Your IP ADDRESS is %REMOTE_ADDR% and your BROWSER is %HTTP_USER_AGENT%"
First problem: IWCGIRunner is returning nothing.
Second problem: When sending a response to browser with WriteString I get an AV of "replytype already set"
Please, what is wrong?
Code: procedure TF_MyForm.IWBTNACAOClick(Sender: TObject);
begin
var
CGIRunner: TIWCGIRunner;
CGIModuleName: string;
s: string;
begin
CGIModuleName := TIWAppInfo.GetAppPath + 'wwwroot\cgi-bin\test.bat';
CGIRunner := TIWCGIRunner.Create;
try
// Set the name of the CGI module which runs our report
CGIRunner.CGIModule := CGIModuleName;
CGIRunner.Execute(WebApplication, WebApplication.Request);
// Check status result. Zero indicates success. Anything else is an error
if CGIRunner.StatusResult = 0 then
begin
s:=CGIRunner.ResponseContent.Text;
//Problem here: CGIRunner.ResponseContent.Text is empty
with WebApplication.Response do
begin
ResetReplyType;
Code := 200;
ContentType := MIME_HTML;
WriteString(s); //Problem here: Here I get an AV about ReplyType already set
end
end else
begin
WebApplication.ShowMessage('Error on test.bat: ' + CGIRunner.ErrorMessage);
end;
finally
CGIRunner.Free;
end;
end;
end;
|
|
|
| ajax Call and rawtext |
|
Posted by: joel - 09-13-2019, 01:02 AM - Forum: IntraWeb General Discussion
- Replies (4)
|
 |
iw15.1.4
I have incorporated the Monaco editor (the same editor that runs vs code) into an iw application using the ajaxCall function.
Everything works nicely when i use normal words. However, when I try to pass html data back to IW, then I get an error.
How would I pass back "raw" text using the ajaxCall function? Do I need to wrap it in something?
Here is the example.
First here is my function call on the onclick
function (e){
ajaxCall("ajaxSaveCode",
"&code='"+monaco.editor.getModels()[0].getValue()+"'",
false,
function(response){
});
return true;
}
If I try to send the following text back to IW then I get an error.
<html>
<body>
<h1>Test Header</h1>
</body>
</html>
The error that I get says
127.0.0.1:8888 says
Ajax request failed: The application server did not respond.
URL:/21341234213/$/callback?
callback=ajaxSaveCode&code='<html>
<body>
<h1>Test header</h1>
</body>
</html>'&. . . . .
As I said before if the text is just words with the html tags then it works as expected.
|
|
|
| Iwtemplateprocessor error |
|
Posted by: Anto90 - 09-12-2019, 02:06 PM - Forum: IntraWeb General Discussion
- Replies (3)
|
 |
I have the component iwtemplate processor and html template. In html I <div id = "BACKGROUND" class = "container-fluid container-fullw bg-white no-border"> {% BSRightRegion%} </div>
to recall the rad component. In the form I have iwbootstrap components (3.4.1 and intraweb 15.1.4) (there are iwbsregion, iwbstext, iwbsbutton, iwbslist). When the form start (i have not written code i only assigned the template on iwproccessorhtml component) i have the following error
Error message: List index out of bounds (6)
This is the call stack
00120BD7) [00521BD7] IW.Common.StrLists.Common.Strlists.Error $ qqrx20System.UnicodeStringi (Line 346, "IW.Common.StrLists.pas" + 1) + $ 1B
(00120E59) [00521E59] IW.Common.StrLists.Common.Strlists.TIWMinStringList.Get (Line 434, "IW.Common.StrLists.pas" + 2) + $ 12
(0035356D) [0075456D] IWTemplateProcessorHTML.TIWTemplateProcessorHTML.ProcessControl (Line 925, "IWTemplateProcessorHTML.pas" + 28) + $ A
(00338348) [00739348] IWContainerLayout.TIWContainerLayout.ProcessControls (Line 159, "IWContainerLayout.pas" + 3) + $ F
(0037081F) [0077181F] IWForm.TIWForm.RenderComponents (Line 1490, "IWForm.pas" + 2) + $ D
(0036C6F7) [0076D6F7] IWForm.TIWForm.DoGenerateForm (Line 674, "IWForm.pas" + 107) + $ 18
(0038F551) [00790551] IWAppForm.TIWAppForm.DoGenerateForm (Line 114, "IWAppForm.pas" + 2) + $ 4
(00393A97) [00794A97] IWBaseForm.TIWBaseForm.GenerateForm (Line 373, "IWBaseForm.pas" + 4) + $ 5
(0039B0DB) [0079C0DB] IWApplication.TIWApplication.GenerateActiveForm (Line 1461, "IWApplication.pas" + 24) + $ 6
(0039ABD1) [0079BBD1] IWApplication.TIWApplication.ProcessForm (Line 1314, "IWApplication.pas" + 57) + $ 6
(003E0555) [007E1555] IWServerSession.TIWServerSession.ExecuteForm $ qqrv (Line 839, "IWServerSession.pas" + 11) + $ 9
(003E0027) [007E1027] IWServerSession.TIWServerSession.DoExecuteSession $ qqrx20System.UnicodeStringo (Line 745, "IWServerSession.pas" + 68) + $ 2
(003E03DD) [007E13DD] IWServerSession.TIWServerSession.ExecuteSession $ qqrx20System.UnicodeString (Line 809, "IWServerSession.pas" + 50) + $ 7
(003CEC56) [007CFC56] IWServer.TIWServer.ExecuteUrl (Line 678, "IWServer.pas" + 90) + $ 6
(003CF164) [007D0164] IWServer.TIWServer.Execute (Line 751, "IWServer.pas" + 17) + $ 6
(003DD0BF) [007DE0BF] IWServerSession.HttpExecute $ qqrpuci (Line 95, "IWServerSession.pas" + 2) + $ 3
(0045EDAE) [0085FDAE] IW.Server.HTTPIndy.Server.Httpindy.THTTPServerIndy.DoCommandGet (Line 239, "IW.Server.HTTPIndy.pas" + 26) + $ 19
(004414B9) [008424B9] InCustomHTTPServer.TInCustomHTTPServer.GetSessionFromCookie (Line 1559, "InCustomHTTPServer.pas" + 30) + $ 10
(00440F61) [00841F61] InCustomHTTPServer.TInCustomHTTPServer.DoExecute (Line 1427, "InCustomHTTPServer.pas" + 180) + $ F
(00418AE3) [00819AE3] InContext.TInContext.Run (Line 185, "InContext.pas" + 2) + $ 7
(0041767E) [0081867E] InTask.TInTask.DoRun (Line 136, "InTask.pas" + 0) + $ 2
(0042F22E) [0083022E] InThread.TInThreadWithTask.Run (Line 626, "InThread.pas" + 1) + $ 3
(0042EBD9) [0082FBD9] InThread.TInThread.Execute (Line 378, "InThread.pas" + 43) + $ 5
(000E0EFD) [004E1EFD] System.Classes.ThreadProc $ qqrxp22System.Classes.TThread (Line 15394, "System.Classes.pas" + 18) + $ 5
(0000A824) [0040B824] System.ThreadWrapper $ qqspv (Line 24941, "System.pas" + 45) + $ 0
There appears to be an error in the IW.Common.StrLists.pas unit.
Do you confirm it?
Thank you
Andrew
|
|
|
| IWCalendar |
|
Posted by: crasaur - 09-11-2019, 08:03 PM - Forum: IntraWeb General Discussion
- Replies (3)
|
 |
I recently updated a Win32 Delphi program from XE with IW 14.0.32 to 10.3.1 with the bundled IW 14.2.10 update after I requested a bundled key.
I am using TIWCalendar and it worked fine previously. However, since the move to Rio I am unable to change the WeekStarts property of the TIWCalendar to anything but wsMonday.
If I try to change it to some other day, the weeks on the calendar will still start on Monday.
Any thoughts?
|
|
|
| SendFile |
|
Posted by: denville - 09-11-2019, 01:11 PM - Forum: IntraWeb General Discussion
- No Replies
|
 |
C++ Builder XE7 (32-bit build)
IW 15.0.22
WebApplication->SendFile( SelFspec, true );
Any attempt to download a file from the browser fails.
For example, SelFspec = "SYS_LOG-2019.txt"
Browser (Firefox and Chrome) error:
File copy Failed. The file "/sam-dat/logs/SYS_LOG-2019.txt.tmp" could not be created. The system cannot find the path specified
Help ?? Thanks
Sorry, just re-read the note "Some reminders about SendFile" - now seems to be working with my installed versions of Chrome and Firefox.
|
|
|
|