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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 97,235
» Latest member: 32winmecom1
» Forum threads: 2,426
» Forum posts: 11,370

Full Statistics

Online Users
There are currently 1302 online users.
» 9 Member(s) | 1289 Guest(s)
Applebot, Bing, Facebook, Google, 32winmecom1, agarwalpackersus, c168world3, Dataqix, g28comnet1, gg888vnnet, mu88neofficial, Salonsoftware, xoso66689com1

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

 
  Maintaining a list of TIWFrames and descendants of TIWFrame
Posted by: ScottWGast - 05-04-2018, 01:09 PM - Forum: IntraWeb General Discussion - Replies (5)

I have a single form and many frames that descend from TIWFrame:

TIWFrame->TIWFrameBase
TIWFrame->TIWFrameBase->TIWFrameGRID
TIWFrame->TIWFrameBase->TIWFrameCRUD

TIWFrameBase includes some new properties and a few IW components
TIWFrameGRID includes ado dataset grid, controls, buttons
TIWFrameCRUD includes ado dataset, edit controls, buttons

and would like to store these varying TIWFrames in a collection where they can be
retrieved as needed.  The program will know the index of the desired frame and it will know the desired frame's type. 

My initial thought was to create an array of TIWFrameBase, but complained when I tried to insert a TIWFrameGRID into the array. 

My gut tells me that this should be super simple and I'm a little ticked off I can't figure it out, even with Google.

TIA for your help.
Scott

Print this item

  IDE is throwing emsedge250.bpl error after manual Indy installation
Posted by: steve_goa - 05-03-2018, 10:10 PM - Forum: Indy - Replies (4)

Using: Delphi 10.2.3

I've downloaded, built and installed the latest Indy VCL sources from repository and installed in a custom folder location. Prior to doing this, I uninstalled existing Indy components and deleted existing bpl, dcu and dcp files that came with Indy as part of the Delphi distribution. However now when starting the IDE, its showing error messages. One of these errors is:

Code:
---------------------------
bds.exe - Entry Point Not Found
---------------------------
The procedure entry point @Idcustomhttpserver@TIdCustomHTTPServer@$bctr$qqrp25System@Classes@TComponent could not be located in the dynamic link library C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\emsedge250.bpl.
---------------------------
OK   
---------------------------


Another error following this says its cannot load Devart UniDAC DataSet Manager (I also have Devart components installed).

How can I resolve this error?

TIA.

Print this item

  Dealing with Local Time
Posted by: lfeliz - 05-03-2018, 04:45 PM - Forum: IntraWeb General Discussion - Replies (1)

Hello,

Developing an app where users may be in different time zones. In past I never worried about this as system date time stamps matched local time of users.    Now I am looking at  using   Postgres datetime type with time zone support  and need best option for ensuring I have the correct local session time.   Assuming all time is saved as  UTC .

To make maters more interesting it could be case where   driver leaves pt A at  5AM Pacific Time and gets to location at  6PM Pacific time  ( 6 PM Mountain Time) as it crossed a time zone.  The initial  user makes all entries based on   Pacific Time.

User at destination looks at system,  the time would then display for him i mountain time (his local time zone).

Should I set time zone based on setting in user profile or should I get it from the browser setting and have it be dynamic to allow mobile devices to work if user is mobile and goes between timezones. I have some sample code that I will update this ticket with to show what app currently does , but find that it sometimes does not work as desired.


Cheers!

Print this item

  Indy TCPServer/TCPClient
Posted by: wzehntner - 05-03-2018, 02:44 PM - Forum: Indy - Replies (9)

Hello,

We have developed a thread-based TCPServer-application running on company machine (Windows 7) with fixed IP and fixed Port.
We also developed a standalone TCPClient application distributed to our customers.
We are now planning to change this Client-Server model to use SSL encryption (a server certificate does exist).

Can you please point me to some sample code how to implement SSL on server and on client  side.

Thanks in advance,
Wolfgang

Print this item

  WebApplication.FormCount
Posted by: cyracks - 05-01-2018, 12:19 PM - Forum: IntraWeb General Discussion - Replies (1)

Hello,

could you please help me on how to iterate over all forms included in the application.

Code:
// for i:=0 to UserSession.WebApplication.FormCount-1 do
for i:=0 to WebApplication.FormCount-1 do
begin
   OutputDebugString(PChar(WebApplication.Forms[i].Name));
end;

Code above lists only active or already opened forms. Forms that were not opened are not listed.


Regards, 
Tomaž

Print this item

  How to send POST data to a webserver?
Posted by: BosseB - 04-30-2018, 09:56 PM - Forum: Indy - Replies (19)

This is a continuation of a thread at Embarcadero forum, which no longer responds to my input...


Background:
I have programmed an embedded IoT device (ESP8266) for which I have created a configuration application using FPC/Lazarus with Indylaz (Indy 10).
All of this works fine after some help from Remy L.
But there is one thing I also want to incorporate in the config application and this is firmware update via the network of the IoT device.
The ESP8266 has libraries with a lot of functions including web firmware updating, which I have included in my system.
It works as a simple web server operating on the http port of the IoT device, one simply opens the URI http://<ip address of IoT>/firmware and a minimal form is presented where there are two buttons, one file select button to select which firmware file to use and an Update button which starts the firmware update process.

The form presented by the IoT device on the URI shown above has the following html source:

Code:
<html><head><title>The ESP8266 web updater</title></head>
     <body><b>WiFi module firmware updater</b>
     <br>Select firmware file, then click the Update button!<br>
     <form method='POST' action='' enctype='multipart/form-data'>
                  <input type='file' name='update'>
                  <input type='submit' value='Update'>
               </form>
         </body></html>

The code I have used in Lazarus to try and send the data as a web browser would do looks like this after a brief discussion with Remy:
Code:
function TConfigCommHandler.UploadFirmware(FileName: string; URL: string): boolean;
var
  HTTP: TIdHTTP;
  Src: TIdMultipartFormDataStream;
begin
  Result := false;
  if not FileExists(FileName) then exit;
  HTTP := TIdHTTP.Create;
  try
    Src := TIdMultipartFormDataStream.Create;
    try
      Src.AddFile('update', FileName);
      try
        HTTP.Request.Username := FUserName;
        HTTP.Request.Password := FPassword;
        HTTP.Post(URL, Src);
        Result := true;
      except
        on E: Exception do
          FLastError := 'Exception: ' + E.Message;
      end;
    finally
      Src.Free;;
    end;
  finally
    HTTP.Free;
  end;
end;

Behavior:
When I use the form in Firefox and select the file then hit Update, the result is directly shown on the IoT device's debug serial port by a message that it has started the update. Then when the file data has been fully received and verified the IoT device resets and the new firmware starts running. This works fine but involves a web browser...

When I use the method above then there is no error message or such generated, and there is also no debug message from the IoT device saying that update is in progress. In fact once the method is done nothing has happened on the IoT device. It looks like the IoT server is quietly disregarding the call.

So something is clearly missing here, but what?
How does one simulate the action of a form submission in a web browser but using Indy components in a FPC/Lazarus program?

Print this item

  Need help implementing Base64Encode/DecodeBytes
Posted by: RaelB - 04-30-2018, 05:07 PM - Forum: Indy - Replies (2)

Hello,

Can someone help me implement these functions (in Delphi XE4)


function Base64EncodeBytes(Input: TBytes): TBytes;
function Base64DecodeBytes(Input: TBytes): TBytes;

Could be using Indy or Soap.EncdDecd.

Thank you
Rael

Print this item

  CSS & IE11
Posted by: JalcoJohn - 04-30-2018, 03:38 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi Guys, I've developed an application that uses Style Sheets, each form has the same CSS file and each component has it's CSS property set to an entry in the CSS file.

All works brilliantly in Chrome, Firefox & Opera but Internet Explorer just won't play ball and doesn't seem to apply anything from the CSS file.  My experience of CSS/HTML is limited and I guess IE doesn't like something in my CSS.

Any ideas or pointers would be much appreciated, I'm pulling my hair out.

Thanks

Print this item

  (possible) bug with TIdMessageBuilderHtml
Posted by: johnmay - 04-30-2018, 09:43 AM - Forum: Indy - Replies (3)

First of all, thanks for the new forum. It is unclear whether the community.embarcardero.com is a replacement for forums.embarcardero.com but all I see is that community is working and forums is not. Anyway, onto the possible bug.

In the example:

Quote:with TIdMessageBuilderHtml.Create do
try
PlainText.Text := 'plain text goes here';
FillMessage(IdMessage1);
finally
Free;
end;

It says that if PlainTextCharset and PlainTextContentTransfer are not specified it uses default values. The above generates:

Quote:Content-Type: text/plain; charset=us-ascii

plain text goes here

Good so far.

If I add some Unicode stuff:

Quote:with TIdMessageBuilderHtml.Create do
try
PlainText.Text := 'äüø';
FillMessage(IdMessage1);
finally
Free;
end;

Generates:

Quote:Content-Type: text/plain; charset=utf-8

äüø

It seems to use 8bit encoding - which is good... except... Content-Transfer-Encoding: 8bit (or maybe binary) is missing as it is using 8bit content in this case.

I can fix the problem by adding PlainTextContentTransfer := '8bit' or specifying PlainTextContentTransfer := 'quoted-printable' but the problem may be the default behavior of TIdMessageBuilderHtml which should specify this automatically, yet it doesn't. I noticed though that it does so for multipart messages but not for plain-text ones.

Based on the documentation (http://www.indyproject.org/Sockets/Blogs...16.EN.aspx), it should by default use quoted-printable if nothing is specified. And that does work for multipart messages.

I also tried to set the PlainTextCharset explicitly to utf-8 and not set PlainTextContentTransfer and same problem happens and causes an issue with some servers. It is probably the best to always specify the Content-Transfer-Encoding

RFC2046 -Note that if the specified character set includes 8-bit characters and such characters are used in the body, a Content-Transfer-Encoding header field and a corresponding encoding on the data are required in order to transmit the body via some mail transfer protocols, such as SMTP [RFC-821].

Print this item

  How your Cosmos OS looks like?
Posted by: fanoI - 04-29-2018, 12:31 PM - Forum: COSMOS - Replies (1)

This my "prototype" of Ocelot using Codepage 437 to do "graphic" in text mode:

[Image: Oh_My_Dir.png]

How your OS looks like?

Print this item