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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 512
» Latest member: mgkoohestani
» Forum threads: 672
» Forum posts: 3,348

Full Statistics

Online Users
There are currently 35 online users.
» 2 Member(s) | 31 Guest(s)
Bing, Yandex, brsoft, OronzoConte

Latest Threads
component property check ...
Forum: IntraWeb General Discussion
Last Post: SorenJensen
49 minutes ago
» Replies: 2
» Views: 18
Loop components questions
Forum: IntraWeb General Discussion
Last Post: SorenJensen
1 hour ago
» Replies: 2
» Views: 20
How to have more than one...
Forum: IntraWeb General Discussion
Last Post: DanBarclay
Yesterday, 10:01 PM
» Replies: 4
» Views: 53
IW 15.1.5 with source cod...
Forum: IntraWeb General Discussion
Last Post: kudzu
Yesterday, 03:10 PM
» Replies: 3
» Views: 38
lambda functions with cla...
Forum: IntraWeb General Discussion
Last Post: kudzu
Yesterday, 01:37 PM
» Replies: 14
» Views: 498
Possibile errors in IWBoo...
Forum: IntraWeb General Discussion
Last Post: Anto90
Yesterday, 11:03 AM
» Replies: 6
» Views: 208
Question regarding genera...
Forum: IntraWeb General Discussion
Last Post: SorenJensen
Yesterday, 11:01 AM
» Replies: 0
» Views: 11
New property ServerContro...
Forum: IntraWeb General Discussion
Last Post: JuergenS
Yesterday, 09:24 AM
» Replies: 13
» Views: 538
Is there ntlm/kerberos au...
Forum: Indy General Discussion
Last Post: rlebeau
09-16-2019, 11:44 PM
» Replies: 1
» Views: 11
Ajax server error with ce...
Forum: IntraWeb General Discussion
Last Post: bob9999
09-15-2019, 05:09 PM
» Replies: 13
» Views: 409

 
  component property check ?
Posted by: SorenJensen - 10 hours ago - Forum: IntraWeb General Discussion - Replies (2)

Hi All,

Having the component loop working for a form, I want to use it to change some properties for individual components, based on user prefs.

How can I check for the presence of a certain property, like font, which is not something all components have ?

Using "if (selv.Components[i] as TIWCustomControl) is TIWLabel ..." requires IWCompLabel to be present in the Uses clause. 

If I want to check if the component has a font property, how can I do that without refering to the component type ?

And will it be possible to set, say font.size, for all IWLabels, IWButtons and IWEdits on the form, without having to include all the types in the uses clause ?

I'm trying to create a general procedure I can call in each forms create event, to avoid having to put all the code in every form.

Advises and examples are gracefully accepted

Regards
Soren

Print this item

  Loop components questions
Posted by: SorenJensen - 10 hours ago - Forum: IntraWeb General Discussion - Replies (2)

Hi All,

Maybe my understanding of IWForms versus VCL forms lacks a lot, but could anyone please explain why it is that

"for i := 0 to self.componentcount -1 do" compiles ok and
"for i := 0 to TIWForm1.componentcount -1 do" fails with: Componentcount "inaccessible" here

Isn't self and tiwform1 one and the same in this case ?

Regards
Soren

Print this item

  Question regarding general stylesheet
Posted by: SorenJensen - Yesterday, 11:01 AM - Forum: IntraWeb General Discussion - No Replies

Hi All,

I'm trying to implement a general style sheet, so that all elements have the same font family and font size, and wonder if it is sufficient to define which style sheet to use, in ServerController. If style sheet is not defined for other forms, will they all  forms in the projct use the sheet defined for ServerController ?

OR.. is it necessary to specifically define a style sheet for each form ?

Regards
Soren

Print this item

  IW 15.1.5 with source code, file(s) not found
Posted by: aimpera - Yesterday, 08:56 AM - Forum: IntraWeb General Discussion - Replies (3)

Hi,
1) Installed IW 15.1.5 ( iw15.1.5.exe )
2) Copy source code ( content of IWSource15.1.5_20190914.zip ) on same directory, now I have this structure:
   

With Delphi RIO 10.3.2,
Open Design\Intraweb_15_D10_3.dproj, build => OK

Open Design\dclIntraweb_15_D10_3.dproj, build => KO, error:

"[dcc32 Fatal Error] dclIntraweb_15_D10_3.dpk(65): F1026 File not found: '..\..\private\design\IWDsnFormWebsite.pas'"
dclIntraweb_15_D10_3.dpk(65): Unit 'IWDsnFormWebsite' is used by 'IWRegister'error 


And I see that all \private\design\*.* file are missing...

What's wrong?

Best Regards, Alfredo.

Print this item

  How to have more than one modal dialog?
Posted by: magosk - 09-16-2019, 11:31 AM - Forum: IntraWeb General Discussion - Replies (4)

Hi,

in one of our web applications we have a base frame we use for showing modal dialogs. The base frame contains a TIWModalWindow component with IWFrameRegion as its ContentElement, as well as common code for logging and language support. In descendant frames we add visual elements, decide which buttons to use (e.g. OK & Cancel), add code to the ModalWindow.OnAsyncClick event handler etc. A using form creates such a frame (at runtime) when it wants to show it and calls a method ShowModal() of the frame (which sets Visible = True and calls ModalWindow.Show()). This has worked nicely.

Now we have a form where we want to be able to show more than one modal dialog (although not at the same time). You should be able to change data in the GUI of dialog 1, close it, open dialog 2, do some changes, close it and reopen dialog 1 with your earlier changes retained, etc. However, the rendering fails as soon as I try to open the second dialog. I have attached a simplified example project that demonstrates this. I have tried various things in the OnAsyncClose event handler such as setting Parent to nil for the frame, setting ModalDialog.ContentElement to nil, calling ModalWindow.Reset() etc. but with no luck.

Is there a way of having more than one modal dialog "in memory" like we want here? Has it something to do with multiple instances of the TIWModalWindow component? Please advice on what we need to change in order to solve this problem.

Best regards

Magnus Oskarsson



Attached Files
.zip   ModalDialogTest.zip (Size: 5.75 KB / Downloads: 1)
Print this item

  Is there ntlm/kerberos authentication for Indy Http Server?
Posted by: X-Cite! - 09-16-2019, 07:04 AM - Forum: Indy General Discussion - Replies (1)

Is there ntlm/kerberos authentication for Indy Http Server?

Print this item

  IWCGIRunner not working with simple .bat cgi
Posted by: cprmlao@hotmail.com - 09-14-2019, 11:50 AM - Forum: IntraWeb General Discussion - No Replies

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;

Print this item

  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.

Print this item

  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

Print this item

  IWModalWindow no longer shows content
Posted by: mauriv - 09-12-2019, 12:45 PM - Forum: IntraWeb General Discussion - Replies (3)

Hi, after upgrading from version 14 to 15 IWModalWindow no longer shows the assigned content.

I currently use Delphi 10.2.3 and IntraWeb 15.1.4. I tried to install previous versions but the problem persists.

Print this item