◆◆◆◆◆IntraWeb学习笔记◆◆◆◆◆希望与大家共同学习、提高 (100分)

A

abc_xp

Unregistered / Unconfirmed
GUEST, unregistred user!
IntraWeb学习笔记
注:本人是一只大菜鸟,学习Delphi也只不过是兴趣爱好,
前几日在大富翁看有几个贴子说IntraWeb可以很方便地制作
网页,今天试用了一下,发现的确是个好东东。
以下是我的学习过程:

11.17
1、看了一下DEMO和HELP,发现INTRAWEB可以编译成三种模式:
①独立模式:编译后的文件就是一个服务器,也就是不用依靠
IIS就可以运行,在IE的地址栏里输入http://localhost:8888/demo.exe/start
就可以运行了。
其中start可以要TIWServerController的StartCmd属性中设定,如果为空就不用加了。
②ISAPI模式:依靠IIS运行,在IE地址栏中输入http://localhost/iw/demo.dll/start
iw为一虚拟目录,要设置其权限为“执行(包括脚本)”方能运行。
③Apache模式:我没试过
******
*建议*
******
大家在练习的时候可以用“独立模式”,用ISPAI模式地话,只要一访问,那个DLL就会加载
到内存,十分麻烦。
******
疑问一
******
不知能不能编译成CGI模式?如果你要用在免费空间地话,独立模式和ISAPI肯定不能用。
2、看了HELP后发现,可以用模板,巨爽
在程序所在的目录建一个名为Templates的目录,里面放HTML模板。模板文件名必须与窗体名一样,
也就是说如果formMain窗体要使用模板地话,模板名必须为formMain.html。
formMain上有一名为EditName的TIWEdit组件,在模板的某上位置打入 {%EditName%},那么
{%EditName%}所在的位置就是EditName显示的位置。
哈哈,这样你可以十分方便地定制网页的布局了。
******
疑问二
******
TIWServerController有一属性为TemplateDir,从字面意思上可以知道这是定义模板存放目录地,
但是不管我如何改,都不起作用?不知为何?
3、如果你要在程序中调用某文件,可以在程序所在目录下建一名为files的目录,把这些文件放在
此目录下即可。
4、从HELP中得知,如果要在两个页面之间进行切换,可以这样写:
formMain1.hide;
TformMain2.create(WebApplication).Show;//这样写不是动态地创建吗?难道程序一运行只创建
主窗体?其它窗体要动态创建??
******
疑问三
******
但是这样地话,必须在formMain1中USE formMain2
如果我又要从formMain2切换回formMain2,是不是一定要在formMain2中USE formMain1?????
这样不是两个unit相互引用了吗?
不知该如何写????哪位兄弟知道地话支会俺一声
5、
******
疑问四
******
看了HUBDOG写的“人力资源”的例子
因为好多窗体的框架都是相同地,他先定义了一个窗体的基类TformBase,在创建其它窗体的时候
都是从此基类继承过来地:TformMain2=class(TformBase),我可以理解类的继承,但就是不知道
这样的TformMain2如何地创建?(我是不是很菜啊……)
哪位兄弟知道地话还忘告诉我一声,在此 先谢过了!!(我要你step by step地讲,否则我听不懂地)
hubdog的这个例子可以在www.playicq.com下载
******
疑问五
******
用intraweb写的网页不能“后退”????哪位知道如何解决?
对了,近一段时间我在看李维的《DELPHI5.X分布式应用电子商务篇》,今天用了INTRAWEB后发现它比
WebSnap要方便得多,是不是那本书可以不看了?第二章我快看结束了,这两章的例子都实现了。

6、今天就看到这里,我要睡觉了
---------------------------------------
以上东东是我随手写地,没有整理,很乱,希望大家能看得懂。
第一次写这样的东东,大家随便看吧……
其实我把学习的过程写下来只是想起到一个抛砖引玉的作用,
^^^^^^^^
当然还有两个目的:
①希望正在使用IntraWeb和将要用它的朋友可以得到一点启发,不要重复其它人的弯路;
②出于“私”的目的,希望各位大侠也能写点心得什么地,好让我等菜鸟学习。

再次声明:本人是一只大菜鸟,有不对的地方还请大侠指正。
QQ 107710715
 
我我也要开始学习INTRAWEB了!!
 
我觉得对于大多数的WEB项目来说,intraweb不是很好的解决方案,其实说到底也并不是
IntraWeb,而是CGI,ISAPI的问题,举例说,ISAPI如果出了问题,IIS就得重启,因此
调试时也得先以其他方式写了,最后改成ISAPI。因此Delphi中其他的如WebBroker,Web-
Snap等也是同样的问题。
上面是我的一点愚见,希望得到指正。
 
IntraWeb一直没有去用,不过前几天在看EWF,感觉IntraWeb很多低反复都比EWF强,不过样子
有些老土~~~:)
 
YoungSun,说得很对,还是编译成CGI比较保险,不过效率低
只不过用IntraWeb比较简单
 
IntraWeb比较适合中小型的企业应用,当应用规模很大的时候,还是必须建立一个详细的
Web Service解决方案。不过这东西的确好用,比ASP简单多了。
 
5. 如果你已建立了baseform, 打开New Items页, 选择你做的工程,
再选择baseform, 有个Inherit选项, OK就可以了.

2. 这是Help中找到的, 希望有用.
TemplateDir specifies the directory that template files must be placed in.
To use a template file, use a TIWTemplateProcessorHTML component and set the forms LayoutManager property.
If TemplateDir is blank, a Template subdirectory of the application directory will be used as a default.
Do not write to this property while user sessions are active.
 
十分感谢xiao78
我试试
 
******
疑问五
******
用intraweb写的网页不能“后退”????哪位知道如何解决?
答:
在TIWServerController有一个HistoryEnable属性,把它设置为TRUE后可以后退
但是后退后的页面上的连接不起作用了
 
可以嘛,听课
 
下面的几个FQ已经有人贴过了,看了一个,十分不错,借来一用
还有:哪位兄弟知道intraWeb的新闻组的地址?

When I compile my application with Delphi 6, I get an error message saying: "InGlobal" was compiled with a different version of System.rtl
You need to make sure you have Delphi 6 Update Pack 2 installed. If you have already installed the Update Pack previously, re-install.
--------------------------------------------------------------------------------
When I upload my standalone EXE to the webserver and try and access it, the browser prompts me with a Save dialog
IntraWeb standalone applications are not CGI's. They are standalone executables that have a built-in web server. To access the IW application you need to specify the following URL:
http://your_ip_address:port_assigned
where port_assigned is the port that is set in the ServerController in your project.
--------------------------------------------------------------------------------
How can I convert my stand alone application to ISAPI in Delphi?
Lets take the Guess demo as an example:
program Guess;
uses
IWInitStandAlone, Main in 'Main.pas' {formMain: TIWFormModuleBase},
ServerController in 'ServerController.pas' {IWServerController: TDataModule};
{$R *.res}
begin
IWRun(TFormMain, TIWServerController);
end.
Change the program clause to library.
Chage IWInitStandAlone in the uses clause to IWInitISAPI.
Your project file should now look like this:
library Guess;
uses
IWInitISAPI, Main in 'Main.pas' {formMain: TIWFormModuleBase},
ServerController in 'ServerController.pas' {IWServerController: TDataModule};
{$R *.res}
begin
IWRun(TFormMain, TIWServerController);
end.

--------------------------------------------------------------------------------
How can I convert my ISAPI application to stand alone in Delphi?
Lets take the GuessDLL demo as an example:
library GuessDLL;
uses
IWInitISAPI,
ServerController in 'ServerController.pas' {IWServerController:
TIWServerControllerBase},
Main in 'Main.pas' {formMain: TIWFormModuleBase};
{$R *.RES}
begin
IWRun(TFormMain, TIWServerController);
end.
Change the library clause to program.
Change IWInitISAPI to IWInitStandAlone
Your project file should now look like this:
program GuessDLL;
uses
IWInitStandAlone,
Main in 'Main.pas' {formMain: TIWFormModuleBase},
ServerController in 'ServerController.pas' {IWServerController:
TDataModule};
{$R *.res}
begin
IWRun(TFormMain, TIWServerController);
end.

--------------------------------------------------------------------------------
How can I convert my stand alone application to ISAPI in C ++ Builder?
Open your bpr file in a text editor such as NotePad.
Locate the line that says:
<PROJECT value="MyProject.exe"/>
Change the EXE to DLL
3. Locate the line that says
-tW -tWM"/>
and add "D" after the first W
4. Locate the line that says
<ALLOBJ value"c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
and change c0w32.obj to c0d32.obj
5. Save the changes and open the updated project file in C++ Builder
6. Change IWInitStandAlone to IWInitISAPI in the uses clause.
7. Build the project
--------------------------------------------------------------------------------
What are the A-Team and TeamZed designations I see on some newsgroup post signatures?
Please see the A-Team page and the TeamZed pages.
--------------------------------------------------------------------------------
When I install IntraWeb I receive an error about not being able to install into Delphi 5 but I have never installed Delphi 5 or have removed it since then
. What is wrong?
Another major software vendor has a problem with their install that creates a Delphi 5 registry key even if Delphi 5 is not installed. To fix the problem:
Run regedit and remove this key: HKEY_LOCAL_MACHINE//Software/Borland/Delphi/5.0
Run the IntraWeb install again.
--------------------------------------------------------------------------------
How can I install my IntraWeb application in Apache?
After you have created the DSO, you may find Apache Shared Modules of use. This is an article by Brian Long which includes information on installing Apache DSOs. You can deploy applications you create using Apache Shared Modules on either Win32 or Linux Apache web servers with IntraWeb.
--------------------------------------------------------------------------------
Can I develop for Linux?
Yes, using Kylix 2 or 3 you can deploy in standalone mode, or as an Apache DSO.
--------------------------------------------------------------------------------
How can I have an ISAPI and a stand alone version of my application?
Create two project files with different names, but include the same main unit and other required files. Both the Guess/GuessDLL and Fishfact/FishfactDLL demos demonstrate this.
--------------------------------------------------------------------------------
I am trying to use ADO or some other COM component and I get an error about CoInitialize must be called?
Set InitializeCOM to True in your application's server controller.
--------------------------------------------------------------------------------
Why are fonts messed up in some browsers?
Most computers are set for small fonts. Since all rendering is based on the servers representation if a user has large fonts, the rendering will be slightly off. End users should use small fonts, or alternatively the developer should leave sufficient space around each component to compensate for the offset. Large fonts can be used if templates are used.
--------------------------------------------------------------------------------
Do I need a web-server to run IntraWeb?
This answer depends on how you deploy your IntraWeb application.
If you deploy using ISAPI, then
yes you will need a web server which supports ISAPI such as Microsoft IIS or Omni HTTP.
If you deploy using the stand alone method, then
no you will not need a web server because a specialized web-server is provided by IntraWeb. However, most people will want to run it in conjunction with a normal web server to serve static pages and graphics, but this is not required.
--------------------------------------------------------------------------------
Will I have any conflicts with our primary web server?
Web servers run on the default HTTP port 80. Unless the web-server has been configured to run on the IntraWeb application port or vice versa, there will not be any conflicts.
--------------------------------------------------------------------------------
Can I use Secure Sockets Layer (SSL) with IntraWeb and my IntraWeb applications?
IntraWeb when deployed as ISAPI can be used with SSL by using the SSL features of the hosting webserver.
When deployed in stand alone mode, IntraWeb can also support SSL. However, some countries disallow the use of strong methods of encryption. It depends on the location where the application is to be run. Atozed Software do
es not provide any rights or licenses to use strong encryption methods. However, IntraWeb can support SSL if the OpenSSL dynamic link libraries (DLL's) for Indy are installed. do
wnload SSL Libraries.
For instructions on setting up an IntraWeb stand alone server to use SSL please see the SSL section in the IntraWeb Manual.
--------------------------------------------------------------------------------
Can I use the IntraWeb web-server as our primary web-server?
It is not recommended. The IntraWeb server provided in the package is a specialized server for running IntraWeb applications only. For web-servers, other products are available such as the Apache web-server that can be do
wnloaded for both Windows and Linux and is freely available.
If the primary focus of the website is the IntraWeb application, the web-browser can be automatically redirected to the IntraWeb server.
Apache can be redirected by modifying its configuration file. Microsoft IIS can process a redirect by editing adding a virtual directory and redirect in IIS Manager.
Another option is to use an HTML page containing a meta-tag:
<META HTTP-EQUIV="Refresh" CONTENT="x;
URL="http://<server name>:4321/start/<app name>/"">
Where x is the number of seconds to wait in the HEAD section of the HTML do
cument such as:
<HTML><HEAD><TITLE>Redirecting to Our Application Server</TITLE><META HTTP-EQUIV="Refresh" CONTENT="3;
URL=http://www.yourcompany.com:4321/FishFact/start"></HEAD><BODY><P>You should be redirected to our application server in three seconds. If you are not redirected, please <A HREF="http://www.yourcompany.com:4321/FishFact/start">follow this link to go to our application server</A>.</P></BODY></HTML>
--------------------------------------------------------------------------------
What IP addresses do
es my IntraWeb server listen on?
IntraWeb servers listen on all of the active IP addresses on the machine.
--------------------------------------------------------------------------------
How can I install a new IntraWeb program as a service?
Copy the executable file to the destination machine. From a command prompt run the executable with the "-install" parameter. This installs it as a service. Proceed to the Service applet in the Control Panel to set the startup. If running as a standalone application, by just copying it to the destination machine and starting it is sufficient.
--------------------------------------------------------------------------------
How can I update an IntraWeb program after I have deployed it?
First, stop the IntraWeb application service. Upload the newer version and restart the service. If running as a standalone, simply replace the existing file after stopping it, and then
restart the application.
--------------------------------------------------------------------------------
How can I completely remove an IntraWeb service from my server?
Stop the IntraWeb application service. From a command prompt run the executable with the "-uninstall" parameter. Finally, delete the executable.
--------------------------------------------------------------------------------
Can users run an IntraWeb application through their firewalls?
Firewalls normally block unknown ports and only leave commonly used ports open (such as port 80). However, most firewalls allow all HTTP traffic to pass through regardless of what port they use. This is do
ne by using an HTTP proxy. Therefore, IntraWeb is compatible with nearly all firewalls your users may be using.
--------------------------------------------------------------------------------
What do
I do
if I do
not have permission to install my IntraWeb application on Windows NT or Windows 2000?
The IntraWeb applications must be installed from an administrator account. Contact your network administrator.
Note: This is only true for the stand alone versions of IntraWeb. The ISAPI versions can be installed by any user with upload access.
--------------------------------------------------------------------------------
Why do
es the port that the application runs on keep changing?
The evaluation version of IntraWeb picks the port at random. When the product is purchased, fixed port numbers can be specified in the Server Controller.
--------------------------------------------------------------------------------
Does IntraWeb support visual form inheritance?
Currently, IntraWeb do
es not support visual form inheritance. However as of 4.0.11 IntraWeb do
es support TFrame and is more flexible than visual form inheritance in most situations.
--------------------------------------------------------------------------------
Does IntraWeb support TFrame?
IntraWeb introduces support for TFrame in version 4.0.11.
--------------------------------------------------------------------------------
How do
I control the session timeout?
Set the SessionTimeout property in the application's ServerController.
--------------------------------------------------------------------------------
Why when debugging using the IDE and Netscape 4 is the application is slow on the development machine and the task manager shows 100%?
This is a known problem between Netscape and the Delphi IDE. Task switch to your application when hitting a button in Netscape and it will respond. This only occurs when running from the Delphi IDE.
--------------------------------------------------------------------------------
When when using Internet Explorer is there a delay when I first click on a button?
The first time you click on a button or other submittable item in Internet Explorer and Internet Explorer has just recently been started, Internet Explorer pauses for 1 to 2 seconds and loads its Javascript libraries. Notice that this only happens on the first click, and subsequent actions are much quicker.
--------------------------------------------------------------------------------
I have installed IntraWeb but I receive an error "procedure entry point @Systemcrispi@initializtion$qqrv could not be located".
This situation occurs on system which had IntraWeb 3.0 installed prior to installing 3.1 or later. IntraWeb 3.0 was license to Nevrona and the installer was maintained by Nevrona. IntraWeb 3.0 do
es not completely uninstall itself and thus conflicts with IntraWeb 3.1.
To solve this problem perform the following steps:
Close all versions of Delphi
Uninstall IntraWeb 3.0
Uninstall IntraWeb 3.1
Search your complete file system for *intraweb*.bpl and *intraweb*.dcp - Delete all versions of this file.
Reinstall IntraWeb 3.1
--------------------------------------------------------------------------------
When I run my application it fails to work from Internet Explorer. IE fails to connect to host when launched. What is wrong?
Installation of a different browser (Netscapte 6.1, etc.) can alter the IE web settings which previously existed. Restoring IE to its original settings should resolve the problem. To restore the settings, open IE, select Tool | Internet Options | Program and click on Reset Web Settings.
--------------------------------------------------------------------------------
If I buy the developer edition, can I upgrade to the enterprise edition later?
Yes. You may upgrade from developer to enterprise for the difference in price plus $25 USD.
To upgrade use this order form.
--------------------------------------------------------------------------------
Why do
es IE give me a Javascript error and when I look at the javascript its incomplete?
Its a bug in IE. We have traced this with a network tracer and also see it on internet sites with IE. One thing we have noted is that it seems to only happen when IE is launched via a URL or the Execute (which uses a URL) in stand alone mode. Use the "Copy URL to Clipboard" function and open IE manually, then
open the URL on the clipboard and it will work perfectly.
--------------------------------------------------------------------------------
Can I use GIFs in my application?
Yes, but with some special considerations. GIFs cannot be used in commercial software in most cases, but there is a way around it.
GIF images were free. then
Unisys said "we have a patent on the LZW compression that GIF uses". A judge then
granted them the right to charge license fees. This was an idiotic decision as Unisys left their patent undefended for about 15 years and waited until it was in widespread use. You can read more about this at BurnAllGifs and GNU.org.
You can however use GIFs with IntraWeb by using TIWImageFile. With TIWImageFile IntraWeb merely passes the raw file data through to the web browser and do
es not compress or uncompress the GIF.
TIWImageFile can ignore the GIF at design time, or you can install a GIF processor into Delphi to display it at design time.
Below is a list of free GIF processors for Delphi to enable this. Just install them into any package that is loaded at design time. Some of them come with their own packages.
TGIFImage by Anders Melander
List of GIF processors at Torry's
The above restriction do
es not apply in all countries. For those countries that it do
es apply this should get you around the restriction, but the software you use to create the GIFs may have special restrictions when used to create GIFs for use on the internet.
We are not lawyers, but we know that IntraWeb's portion of your GIF puzzle is legal in all countries, however your other portions of the GIF puzzle are your legal responsibility.
--------------------------------------------------------------------------------
Why can I not use ShowModal?
IntraWeb requires that control be returned to its handling routines. Since ShowModal effectively blocks the program flow, control cannot be returned. Thus ShowModal cannot be used in an IntraWeb application, as it will cause the program to freeze. Instead merely display an IntraWeb form wtih an Ok or Close button which calls the Release method.
In essence though, since your IntraWeb application occurs in a single browser window typically, all forms are "modal".
--------------------------------------------------------------------------------
When using the BDE, I get the following error when starting my web application: "An error occurred while attempting to initialize the Borland Database Engine (error $2B05)"
Please see this article on the Borland Community website.
--------------------------------------------------------------------------------
Is source code available for IntraWeb?
Source code is available under certain conditions and as a seperate purchase.
--------------------------------------------------------------------------------
Why did the chicken cross the road?
Some people say "To get to the other side.". We however are not really sure why the chicken crossed the road. It shall remain a mystery to the world.
 
news://news.atozedsoftware.com/atozedsoftware.intraweb
 
我只想通过intraweb components实现DatePicker,该怎样做?
 
DatePicker是何意思 ?
 
选择日期组件
 
to fox
我现在还没有在哪个网页上看到过有像普通DELPHI程序那样的datepicker组件的效果
好像很难啊
 
aspx可以实现datepicker
 
顶部