Version 1.0
Copyright ©1997 Martin Prusa, Inolab
TInoURL is a component for handling Uniform Resource Locator. It has properties which represent parts of an URL address.
Property | Type | Description |
BackSlashAllowed | boolean | Is a back slash ("\") allowed in the URL ? If this property is set to False, the component will automatically replace all back slashes in the URL. State of this property also affects the result of the IsURLValid method. |
MachineName | string | Part of a URL address. e.g. : www.myserver.com |
Path | string | part of a URL address. e.g. : /mydirectory/index.html. It is possible to use "/mydirectory" as well as "mydirectory". |
Port | string | Part of a URL address. If you know what ports are, you will be able to use this property properly. Iif you don't know , you don;t have to use this property at all. It isnot a neccessary part of an address. Port value can be for instance "72" or "80" . Don't use the ":" character in this property before the port value (write "80" not ":80"). |
ProtocolName | string | Part of a URL address. e.g : http:// or ftp://. It is better to set the ProtocolType property instead of setting this property directly because this may lead to various errors like wrong spelling of the protocol name (e.g " fpt://" instead of "ftp://).However, it is possible to write to this property directly. |
ProtocolType | TProtocolType | Protocol type. See above. |
URL | string | The URL address. e.g : http://www.myserver.com:80/mydirectory/index.html |
Method | Type | Descritpion |
Open | Procedure | Tries to open the URL in the implicit browser. |
IsURLValid : Boolean | Function | Checks the URL whether it is not empty and so on.. See the source code. |
Clear | Procedure | Empties the properties |
TProtocolType = (ptFile, ptHTTP, ptHTTPs, ptFTP, ptGopher, ptMailTo, ptNews, ptTelnet, ptWais, ptUnknown);
1. Fill the URL property with an URL address
2. The component will automatically break the URL into several parts represented by the
propertties. This works in design time, too.
Example :
Let's fill the URL property with this text :
http://www.myserver.com:72/directory
That's all. The component now divides the URL to the parts and fills the properties.
Now you can, for example, change the ProtocolType to ptFTP. ProtocolName chenges
immedietly and the URL too.
This also works in the reverse direction : Fill in the parts of a URL
(MachineName,ProtocolType...) and the component makes the URL.
THE INFORMATION AND CODE PROVIDED HEREUNDER (COLLECTIVELY REFERRED
TO AS "SOFTWARE") IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MARTIN PRUSA BE LIABLE FOR ANY DAMAGES
WHATSOEVER INCLUDING DIRECT,INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS
OR SPECIAL DAMAGES, EVEN IF MARTIN PRUSA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR
CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
You can contact me via email : inolab@mbox.vol.cz
Copyright ©1997 Martin Prusa, Inolab. All rights reserved.