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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 99,412
» Latest member: hgsc88com
» Forum threads: 2,426
» Forum posts: 11,373

Full Statistics

Online Users
There are currently 886 online users.
» 2 Member(s) | 880 Guest(s)
Applebot, Bing, Google, Yandex, hgsc88com, kubetcomagency1

Latest Threads
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
Yesterday, 05:33 PM
» Replies: 1
» Views: 328
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
Yesterday, 05:31 PM
» Replies: 2
» Views: 379
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 283
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 628
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 362
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 804
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 324
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,478
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 478
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 1,183

 
  Strange problem: Sync/Async issue ?
Posted by: SorenJensen - 02-13-2020, 09:05 PM - Forum: IntraWeb General Discussion - No Replies

Hi Guys,

I have a strange problems I hope you can help me with. I'm might be looking in the wrong place, but so far I have not been able to pinpoint the actual reason for the behavior:

I have a simple form with 3 IWEdit fields and a button. All three are standard text (not using any of the new options yet), Field 1 has an OnExit event, and field 1 to 3 has one (sharing the same) OnAsyncKeyDown event. NB! In the OnAsyncKeyDown, I check if EventParams['which'] is '9' in which case I exit the event right away. If not, I set the background color of the fields 2 and 3 to ClWebWhite. Taborder is one-two-three downwards.

Field 1: Item number: Onexit event: Check table for item. If item found present name and price in the fields. If not found, show empty fields.
Field 2: Item name
Field 3: Price

Button 1: Check contents of fields: if Ok, try to save (Insert or Update) Item. If not ok, report an error and set background color of the erroneous field to clWebYellow.

AND I have JavaScript on the form looking for certain Keykombinations. If F10, do the same as clicking the button with the mouse. It works pretty well.

Simple in a way, yet with problems: 

When I tab though the fields, clicking the button with the mouse everything is working as expected. Errors are reported with a WebYellow color and next keydown, typically in the same field, resets the color to WebWhite.

When pressing F10 on the other hand, everything is being tested as if I clicked the button with the mouse, and if an error, the erroneous field is turned WebYellow. This time however, the keydown event, setting the color to WebWhite, is no longer working. Test shows the event is being handled and it is setting the background color of the field to webwhite, but regardless, the Yellow color stays. It's being told to change from Yellow to white, and act as if it do, but refuses to comply. When leaving the form and returning everything is again working as expected, until I press F10.....

How can I be, that the program is able to set the color to yellow, in the Async state, and to reset it to White, still in the Async state, and as soon as I use the F10, it can set the color to Yellow, but other events cannot change color back to white. Both the Mouse Click on the Button and the F10 makes a round trip to the server to try to save the contents, but it is as if the program looses it's ability to commit actual changes to colors in the async events, after the F10.

NB! If I deliberately perform an OnClick event after return form the F10 event, it appears to work again, so something tells me it an Sync/Async issue but I can't seem to put my finger on where or what. I hope some of you have had similar problems and have found a workaound, or workable solution.

Regards
Soren

After post edit: I forgot to mention I'm using Delphi 10.3.2 with upgrades and IW 15.1.12

Print this item

  TIWEdit as stDate in mobile browsers
Posted by: Lorbass - 02-12-2020, 10:08 PM - Forum: IntraWeb General Discussion - Replies (3)

Hello Alexandre,

an adjustment of TIWEdit seems to be necessary:
The display (align) in mobile browsers is incorrect if datatype=stDate.

Everything is ok in desktop browsers!

Thanks for checking!

Print this item

  iwfileuploader Drag-Drop count of files
Posted by: PDSBILL - 02-12-2020, 03:22 PM - Forum: IntraWeb General Discussion - No Replies

Can the IwFileUploader be modfied to capture the number of files that are DRAGGED & DROPPED so that the OnFileUploadSuccess event can
extract from the event params which file number it is processing. Even better would be something like

TotalFileCount=6
CurrentFileNumber=3

This way the program knows when the last file has been uploaded.

Bill B

Print this item

  Alexandre: One more question about safe vars.
Posted by: SorenJensen - 02-12-2020, 10:11 AM - Forum: IntraWeb General Discussion - Replies (4)

Hi Alexandre,    (all others please feel free to comment too)

In my application, in the many forms it consist of, I use a number of data manipulation functions. Like a functions to return a part of a string after a certain character in the string, or special formatting routines and so on. All small functions that only manipulates what they get, and never hold onto any data.

Over time I have built up quite a collection of functions, and with the ease of adding such a "toolbox" unit to the uses clause, and having all them functions available in the code, I must admit i have being holding on to a lot of those, instead of using the newer Windows equivalents. I have adapted many to use newer windows standards, but still keep the ease of having a function at hand, instead of writing it the windows way directly in code, every time it needed.

Some of these functions I also use in my IW application, and I have added such a unit to the uses clause of a number of the forms in the application.

My question regarding safe vars in this context is: Since these units are formless, and as such not created specifically by the form, how safe are they then ?

And if they are not safe, how do I make them safe ?

I do not want to add every one of the functions I use to the Form Class def. in every form where it is used, if I can avoid it, but will of course if I have to. In that case it would likely be as an .inc file and compiler directive.

I have attached a small example to maybe better understand what I'm referring to, though I'm pretty sure you know very well what I'm talking about.

The attached file should have been LFunks.pas but the extension was not allowed as attachment, so I renamed it LFunks.txt.

Regards
Soren



Attached Files
.txt   LFunks.txt (Size: 2.93 KB / Downloads: 8)
Print this item

  Editable Combobox ?
Posted by: SorenJensen - 02-11-2020, 08:28 AM - Forum: IntraWeb General Discussion - No Replies

Hi Guys,

I need the functionality of an editable combobox, meaning a control which is loaded with predefined values, but which also allows the user to enter a value not in the list, as if it was a normal IwEdit control. Like Delphi's Drop-Down combobox.

The IwCombobox do not seem to allow that and, at least as far as I  know, setting the editable property do not change that.

What is it I'm missing ?

Or do any of you have good proposals of how to accomplish this behavior in another way ?

Regards
Soren

Print this item

  For Alexandre: Regarding Datamodules and DB components
Posted by: SorenJensen - 02-10-2020, 12:57 PM - Forum: IntraWeb General Discussion - Replies (8)

Hi Alexandre,

This is for you, but everybody else please feel free to comment as well:

You once recommended I put the DBConnection in the UserSession, and then created a datamodule for every form I make, where DB related components should be placed. For me, as you probably all know by now, the DB related components I use is an ADO DBConnection in UserSession, and ADO the components are ADOQuery and ADOStoredproc, in the datamodules.

With my newfound knowledge of how and where to put variables, coming from other users comment on this forum (thanks to all) and going through a lot on threads in this forum, a lot of documentation on your homepage, a lot of googled information, and some of the older IW forum entries on then Embarcadero site. During all the reading I believe I am certain that ANY form I create at runtime, and any procedure and function I use, and any variable, local for a form or global in UserSession, is safe form interference from other sessions, provided everything is defined within the limits of the Form Class. That is, from Private / Public down to the END definition for the class. Local vars and procedure / function definitions are no go !!

Can you confirm that that is a correct assumption ?

Also, that the datamodule I need for a form, is included in the forms uses list, defined as dm:= {moduleclassname}; in the private section of the form class, and created in the forms create event with dm := {datamoduleclassname}.create(self); I take it that that is correct as well ?, though I do understand there are room for differences like that the datamodule do NOT HAVETO be created in the forms oncreate event, as long as it is created before it's needed, and that it can have any name, not necessarily "dm".

Finally, I have come to learn, and I am not sure you did not already tell me that long time ago, that it is vital that settings for the ADO components connection property is done in the datamodule at runtime, like in the DataModule OnCreate event, and not at design time. Other users have mentioned that as well (again thanks to you).

And that is all there is too it, I believe. Can you confirm that ?

I know ADO are not thread safe, and if I created threads within my form, I should handle threads and make them safe, but also that as long as I do not create threads, it is not necessary. The Session, and among that the ADO components, is shielded from access from other sessions.

Is there anything else I should be aware of, that you (or any of you reading this) can think of ?

I thank you a lot for the information you cave me a long time ago (9 months) and I just wish I could have remembered it all. It would have saved me from a lot of anger and extra work. But such is life. What does not kill you makes you stronger, and what you learn by trial and error, is easier remembered than written words.

Regards
Soren

Print this item

  URL param with THandler
Posted by: etwoss - 02-09-2020, 08:04 AM - Forum: IntraWeb General Discussion - Replies (3)

Hi

I use a Thandler like this:


Code:
  with THandlers.Add('/NewUser/', '', TContentForm.Create(TFrmNewUser)) do
  begin
     CanStartSession := True;
     RequiresSessionStart := True;
    end;

My url looks like:

Code:
http://127.0.0.1:8080/NewUser/$/?xxx=1

In the OnCreate of the TFrmNewUser form i coded:

Code:
  if (WebApplication.RunParams.IndexOfName('xxx') = -1) then
    param := 'no param'
  else
    param := WebApplication.RunParams.Values['xxx'];

But params stays empty.

What i'm missing?

Eric

Print this item

  Testing with IW http.sys freezes Windows
Posted by: Joao Lira - 02-08-2020, 06:37 PM - Forum: IntraWeb General Discussion - Replies (3)

Hello,

  I am testing IW with "http.sys" as a server, and for this, I converted an Indy IW server functional application to 'http.sys' according to this page. The application compiles ok, I set it to run as administrative local, it shows up normally, but when I open a web page with any browser in the application page it loads nothing and after a few seconds it freezes Windows 10 completely. After a while, it goes to Windows 10 blue screen and shows as stopping code "DPC_WATCHDOG_VIOLATION". 

  I thought it could be something not properly set in my application, so I try running the 'HttpSysDemo' application too, but it behaves the same way, freezing the computer after a few seconds.

  I tried disabling the antivirus too but to no avail. I tried the conversion using the latest IW version.

  What could cause this problem?


  Regards,
  Joao Lira.

Print this item

  IW 15.1.13 is out
Posted by: Alexandre Machado - 02-07-2020, 01:36 AM - Forum: IntraWeb General Discussion - Replies (11)

Hi guys!

New maintenance update for 15.1 is available:

https://www.atozed.com/2020/02/intraweb-15-1-13/

Don't be superstitious and go install it  Big Grin

Cheers

Print this item

  Delphi8 problem accessing https: web data - SSL
Posted by: rmwatson3rd@gmail.com - 02-06-2020, 06:16 PM - Forum: Indy - Replies (5)

I have downloaded the appropriate  DLLs and have them in the right place ... etc etc ... least I think I do.

I can access an    http    site  (without the s) ...

But I get an error with https   sites  ...  (with the s)

Specifically the error says     "could not load SSL library" .

Any suggestions, directions, etc are appreciated.

Thank you,
Bob W

Print this item