分享
 
 
 

升级到Delphi 6 - 兼容性问题之三(完)

王朝delphi·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

八. TDesignWindow 的变化

许多变化都和类TDesignWindow有关。它的声明被移到单元DesignWindows中,并且FromClosed方法被替换为DesignerClosed。以往,在FromClosed事件中可以通过访问参数Aform来访问Form。而在新的事件DesignerClosed中,我们需要访问Designer的Root属性来访问Form。

在FormClosed事件中,我们可以通过调用TDesignerSelectionList.Create 或者 TComponentList.Create来创建选择列表。而在DesignerClosed事件中作同样的事情,我们得使用IDesignerSelections接口。你可以调用CreateSelectionList函数来获得一个借口。

SelectionClosed方法的参数也和Delphi 5版本中的有所不同。

TDesignWindow changes

There have been a number of changes related to the class TDesignWindow. It has been moved to the DesignWindows unit, and its FormClosed method has been replaced by DesignerClosed. In the past, one could obtain access to the form within FormClosed by using the AForm parameter. In DesignerClosed, it is now necessary to use Designer's Root property to access the form.

In FormClosed, one would create selection lists by calling TDesignerSelectionList.Create or TComponentList.Create. To create selection lists within DesignerClosed, it is necessary to use an IDesignerSelections interface. You can create one using the CreateSelectionList function.

Parameters for the SelectionClosed method are also different from what they were in Delphi 5.

Borland wishes to thank field tester Matt Palcic for bringing these changes to our attention.

九. VCL 包的变化

一些VCL相关的包已经被重新分配到其他的包里。假如你在工程中引用了vcl50.dcp,那么你需要将这个引用改为其他单元,如vcl.dcp和rtl.dcp。

VCL package changes

The contents of some of the VCL-related packages have been redistributed into other packages. If you made references to vcl50.dcp in your project, you will need to change those references to other units, such as vcl.dcp and rtl.dcp.

Borland wishes to thank field tester Clay Shannon for bringing this change to our attention.

十. OpenGL 接口单元改到rtl.dcp中

Borland OpenGL接口单元(opengl.dcu)在Delphi 5的库单元目录中是一个独立的单元。在Delphi 6中它被合并到rtl.dcp中。这可能导致某些Delphi 5的工程升级到Delphi 6时引发一些问题。

举个例子来说。在Delphi 5的工程中,可能你会将与OpenGL单元同名的单元放置在工程目录中,以覆盖系统提供的OpenGL单元。而在Delphi 6中,假如有任何组件引用了rtl.dcp,则将导致命名冲突,得更改名称才行。

OpenGL interface unit moved to rtl.dcp

The Borland OpenGL interface unit (opengl.dcu) was an independent unit in the Delphi 5 Lib folder. It has been incorporated into rtl.dcp in Delphi 6. This may cause some problems for Delphi 5 projects ported to Delphi 6.

Here is an example. In a Delphi 5 project, it was possible to make a project-specific override of the OpenGL unit by placing a unit with the same name somewhere in your project path. The same method used in Delphi 6 causes a name conflict in any component that uses rtl.dcp also, and a name change is now required.

Borland wishes to thank field tester John Williams for bringing this change to our attention.

十一. HTTPApp.pas 单元中的一些类型声明移动到 HTTPProd.pas单元中

HTTPApp 单元中的一部分类型被移动到了HTTPProd 单元中。他们是THTMLBgColor,THTMLAlign 和THTMLVAlign。如果你的工程中使用了这些类,那么需要将引用的单元由HTTPProd改为 HTTPApp 。

Types moved from HTTPApp.pas to HTTPProd.pas

Several types in the HTTPApp unit have been moved to the HTTPProd unit. They are THTMLBgColor, THTMLAlign and THTMLVAlign. If your projects use any of these units, you should change your uses statements to refer to HTTPProd instead HTTPApp.

十二. Search 单元被删除,SearchBuf例程做了修改并被移动

单元Search在Delphi 6中不再保留。SearchBuf例程,用来在一个文本的缓冲区中定位子串,已经被移动到StrUtils单元中,并且调用的参数也发生了变化。最后一个参数改为一个TstringSearchOptions的对象。如果你的工程因为不能找到Search单元而无法编译,请将引用Search改为引用StrUtils单元。同时你应当检查对SearchBuf的调用是否符合新的语法。

Search unit removed, SearchBuf moved and changed

The unit Search no longer exists in Delphi 6. The SearchBuf routine, which locates a substring within a text buffer, has been moved to the StrUtils unit and its parameters have changed. The final parameter is now a TStringSearchOptions object. If your project won't compile because the compiler can't find the Search unit, change your uses statement to include StrUtils instead of Search. You will also want to check your SearchBuf calls to ensure that your parameters match the new syntax.

[文终]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有