我需要导入一些XML模式.
在Delphi中,我将使用XML数据绑定向导从模式生成Pascal代码.Delphi Prism中
有类似的东西可以避免编写所有这些样板代码吗?
在"德尔福棱镜","德尔福棱镜资源"或"德尔福棱镜的代码片断"兜底几乎没有什么好的网站在所有有没有什么好的编程网站()有一些不错的量的代码段和教程德尔福棱镜谷歌搜索?
提前致谢!
我是Delphi Prism 2011的新手.在哪里可以找到编写和测试基本Hello,世界类型网站的分步说明?我需要编写,运行和调试一个简单的网站,以了解IDE的工作原理,并确保包括与Microsoft IIS的链接的安装是正确的.提供相同信息的备用教程也没问题.谢谢.
我有两个类 - 基类和继承类如下.
基类:
TAlarm = class(System.Object)
private:
protected:
public:
constructor (tag:TTagname);
end;
Run Code Online (Sandbox Code Playgroud)
继承类:
TAlarmMsg = class(TAlarm)
public
constructor (aname:string);
method GetAlarmMsg:string; override;
method SendMsg(msg:string);
end;
Run Code Online (Sandbox Code Playgroud)
构造函数:
constructor TAlarm(tag:TTagname);
begin
Tagname := tag;
end;
constructor TAlarmMsg(aname:string);
begin
inherited TAlarm(aname); <========Here is my problem.
name := aname.ToCharArray;
end;
Run Code Online (Sandbox Code Playgroud)
无论我使用继承的构造函数调用什么或怎么调用,我在编译源文件时都会收到以下错误消息.
- 在继承的构造函数完成之前无法访问Self.和/或 - 在基类中找不到合适的构造函数,因此需要手动调用inherited
顺便说一下,我花了半天时间研究这个问题,并在网上找到了很好的信息.到目前为止没有任何帮助.我甚至在Delphi Prism Wikipedia(http://prismwiki.embarcadero.com/en/Constructors)上找到了直接讨论构造函数的网页.
那么,你会如何正确地做到这一点?谢谢,
我正在将用Delphi 2007 .Net编写的应用程序迁移到Delphi Prism,这是替换TStringList和TStrings类的最佳选择吗?
提前致谢.
再见.
我需要在Delphi XE中访问这个Delphi Prism类库中的方法"Auth":
namespace ClassLibrary1;
interface
uses
System,
System.IO,
System.Security.Cryptography,
System.Runtime.InteropServices,
System.Text;
type
ConsoleApp = public class
private
class method hashMe(input: string): string;
class method Encrypt(clearText: string; Password: string; Salt: array of byte; iteration: Integer): string;
class method Encrypt(clearData: array of byte; Key: array of byte; IV: array of byte): array of byte;
class method Encrypt(clearData: array of byte; Password: string; Salt: array of byte; iteration: integer): array of byte;
class method Decrypt(cipherText: string; Password: string; Salt: array of byte; …Run Code Online (Sandbox Code Playgroud) 我需要有一个工具条标签,它的背面颜色在运行时会发生变化,但无论我做什么.它只是不会改变它的背景颜色,即使它们可以选择改变它的背景颜色.为什么这样,如何在运行时或设计时间内更改其backcolor属性?
提前致谢,
在Delphi Prism中,我需要在单个语句中将ListBox中的objectcollection分配给ArrayList.到目前为止我还没有找到任何解决方案.
在Delphi中,我就是这样做的.
theUser.Groups.Assign(ListBox1.Items);
Run Code Online (Sandbox Code Playgroud)
Groups是Delphi中的TList和Delphi Prism中的ArrayList.当我试图在delphi prism中做同样的事情时,它给了我以下错误.
"Groups.TGroupList"不包含表达式"theUser.groups.Assign"中"Assign"的定义
如果ArrayList没有接受objectcollection的方法,那么我将遍历ListBox项中的每个对象并将其添加到ArrayList.
你会怎么做?
提前致谢.
这个问题可能看似重复,但我在测试程序时遇到了这个问题,我对你如何解决它感到困惑.
我有一个winform,它有一个表单结束事件.在这种情况下,我弹出一个消息框,询问用户"你确定要关闭窗口吗?" 如果他们按下"是"按钮,应用程序将关闭窗口并阻止其按预期处理.所以,我可以再打开它.但是,如果他们没有按下任何按钮,它仍会关闭窗口,但现在窗户已被丢弃.因此,当我尝试再次打开它时,它引发了一个异常,"无法访问已处置的对象".当没有按下按钮时,我希望winform保持打开状态而不是处理掉.
这是我的代码:
method PPMain.PPMain_FormClosing(sender: System.Object; e: System.Windows.Forms.FormClosingEventArgs);
begin
if MessageBox.Show('Are you sure you want to close the window?','PPMain',MessageBoxButtons.YesNo) = DialogResult.Yes then
begin
e.Cancel := true;
Hide;
end
else
e.Cancel := false;
end;
Run Code Online (Sandbox Code Playgroud)
我想,因为你必须设置e.Cancel = true来关闭窗口并告诉它隐藏,做相反的事情(e.Cancel = false并且没有隐藏)将阻止winform关闭和被处理.
你是如何解决这个问题的?
预先感谢,
我正在将用Delphi 2007编写的应用程序迁移到Delphi Prism,这是替换TList类的最佳选择吗?
提前致谢.
再见.
delphi-prism ×10
delphi ×6
oxygene ×5
.net ×2
arraylist ×1
backcolor ×1
class ×1
constructor ×1
delphi.net ×1
formclosing ×1
inherited ×1
listbox ×1
object ×1
properties ×1
tlist ×1
toolstrip ×1
tstringlist ×1
winforms ×1
xml ×1
xsd ×1