摘要:
program singletontest;
uses forms, mainfrm in mainfrm.pas {form1}, singletonfrm in singletonfrm.pas {form2};
{$r *.res}
begin application.initialize; application.createform(tform1, form1); applica......
摘要:
在delphi.net中,vcl.net有两点蛮遗憾的:1.不能使用ado(dbgo),不过据李维说本月的delphi8.1将会有这个组件。2.不能使用ado.net和bdp,这将是我这片文章的主题。 在borland的delphi交流区内,曾经看到danny说过,"在delphi.net中vcl.net可以调用winform组件,同样winform也可以调用vcl.net组件"。 为了验证第一......
singleton之我见
先与大家说说什么是singleton模式的,它中文意应该为单一模式,但好别扭,也不知道是谁翻译的 29796428(qiubole) 12:26:46 【程序编程相关:
ShadowStar Fast Edit】 【推荐阅读:
2004.11.30.Managing 】它属于创建模式的一种 【扩展信息:
ShadowStar CodeFast 】 29796428(qiubole) 12:27:00 主要的作用就是确实一个类有且只有唯一的一个实例 29796428(qiubole) 12:27:10 这在实际当中,其实还是有一些用处的 29796428(qiubole) 12:27:41 比如,当前用户这个类,我们就应该只保证其只有一份 29796428(qiubole) 12:27:57 一般我们在写程序的时候,经常会为某一个类,或某一个窗体定义一个全局变量 29796428(qiubole) 12:28:06 但有了这个变局变量会带来很多的问题 29796428(qiubole) 12:28:28 一是,无法使用方便的命名空间(这在delphi中是没有的,没这概念) 29796428(qiubole) 12:28:39 二是,无法控制它的多次创建 29796428(qiubole) 12:28:53 利用singleton模式就能很好的解决这个问题 29796428(qiubole) 12:29:11 我们都知道,在delphi中,只有类方法,而没有类变量 29796428(qiubole) 12:29:25 所谓的类方法,就是其它如c++或java叫的静态方法 29796428(qiubole) 12:29:35 ...
下一页 摘要:
defproj.cfg__ default configuration which compiled by all projects
defproj.dof__default configuration of all projects.
delphi command-line compilerthe command-line compiler lets you invoke all the ......