当我按下TSpeedButton时我想要执行一个动作,而当同一个按钮被"未按下"时我想要执行另一个动作.我知道没有onunpress事件,但有什么简单的方法可以让我在按下不同的按钮时执行操作?
procedure ActionName.ActionNameExecute(Sender: TObject);
begin
PreviousActionName.execute(Sender);
//
end;
Run Code Online (Sandbox Code Playgroud)
看起来太笨重了.
我一直在使用TBucketList和TObjectBucketList来满足我所有的哈希需求,但从未体验过切换桶的数量.我依稀记得Data Structures类中的含义,但有人可能会详细阐述Delphi中这个特定类的细微差别
The following table lists the possible values: Value Number of buckets bl2 2 bl4 4 bl8 8 bl16 16 bl32 32 bl64 64 bl128 128 bl256 256
我有一个非常大的设置表单,我想填充一个类的数据.所以我做了很多
Edt1.text := ASettings.FirstThing;
Run Code Online (Sandbox Code Playgroud)
我想避免
Edt1.onchange := nil;
Edt1.text := ASettings.FirstThing;
Edt1.onchange := edt1Onchange;
Run Code Online (Sandbox Code Playgroud)
如何更改文本框中的文本并回避onchange事件.
使用Delphi 7 IDE进行调试时,如何在程序文件/ borland/delphi7/source文件夹中进入代码?
听起来像一个愚蠢的问题,但询问的头脑想要调试.(并不是说我认为源代码有什么问题,我只是想知道为什么第9000次我不能将TJpegImage分配给TjpegImage).
如果我有一个
While not terminated do
begin
doStuff;
end
Run Code Online (Sandbox Code Playgroud)
在Delphi XE2线程的execute方法中循环,我想不要让它变成我所有的翻牌.
我该怎么称呼
在Delphi 7中,它很简单,我称之为Sleep(X),其中X与我认为该线程的有趣程度成反比.
但是现在,我有了
SpinWait(X);
Run Code Online (Sandbox Code Playgroud)
其中调用YieldProcessor X的次数
和
Yield;
Run Code Online (Sandbox Code Playgroud)
它调用windows函数"SwitchToThread".
我应该使用其中任何一个还是应该设置线程的优先级?
我正在将一个tcsh脚本转换为bash,遇到障碍因为我不完全确定>>&做什么
wget --output-document=/dev/null "http://somewebsite.org" >>& /root/wget.log
Run Code Online (Sandbox Code Playgroud)
我确实阅读了man-page http://linux.die.net/man/1/tcsh,但不确定"诊断路由"是什么意思,可能是stderr ......
所以,只是为了绝对肯定,它是否与做:
wget --output-document=/dev/null "http://somewebsite.org" 2>>&1 /root/wget.log
Run Code Online (Sandbox Code Playgroud)
在一个bash脚本?
标题应该说明一切,然后我可以在Joel测试中再巩固2个标记.
我已经使用makefile和python脚本实现了构建自动化,我理解了基础知识和选项.
但是,我怎么能,这个阅读博客的新人说服我的队列内在的功效呢?
假设我有一个通用的垂直市场应用程序,我想将它打包为两个单独的程序aaa.exe和bbb.exe.有没有办法使用Delphi链接器创建一个与DPR名称不同的EXE/DLL文件?
我不能只重命名该文件,因为我收到此错误
bbb.exe - Unable to to locate component
This application has failed to start because aaa.exe was not found.
Re-installing the application may fix this problem.
现在一般来说,我可以重命名可执行文件,但不能重命名.感谢您的评论,指出我在这方面的愚蠢.有一个问题,显然不是正常问题,甚至可能不一定与Delphi有关.
我正在使用Delphi 7(如果有可能在2007/2009,这将是很棒的,因为我需要更多的饲料升级)
之间有什么区别:
procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
if ABool1 <> ABool2 then
ShowMessage('Yeah, they''re not the same');
end;
Run Code Online (Sandbox Code Playgroud)
和
procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
if ABool1 XOR ABool2 then
ShowMessage('Yeah, they''re not the same');
end;
Run Code Online (Sandbox Code Playgroud) Delphi的最后几个版本中存在一个已知错误,在编译大型项目时导致内存泄漏,我认为它没有解决方法,如果我想知道的话.
但是,如果这只是一个没有解决方案的问题,那么如何为这种情况设计构建服务器呢?
我可能需要让构建服务器在构建之间重新启动并从中断处继续,但这看起来很麻烦.