Delphi 7 dfm 中 FormCreate 事件处理程序奇怪消失
我在 Delphi 7 中使用 Tortoise SVN,并且在提交之前我总是必须检查 dfm...但是我有一个 Delphi 7 DFM,它不知何故丢失了它的 FormCreate 和 FormShow 事件句柄!我知道在 Delphi IDE 中移动表单会导致 dfm 被修改(顶部、左侧......等),但我非常怀疑我手动删除了事件句柄......所以我想知道是否有人经历过类似的事情这个之前。请分享您的经验。谢谢。
I'm using Tortoise SVN with Delphi 7 and I always have to check the dfm before I commit... but I have a Delphi 7 DFM which has somehow lost it's FormCreate and FormShow event handles! I know that moving the form inside the Delphi IDE causes the dfm to be modified (Top, Left.. etc), but I highly doubt that I removed the event handles manually... so I'm wondering if anyone has experienced anything like this before. Please share your experience. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有时会出现这种情况,但不知道为什么。主要是在使用框架或继承的表单,以及打开/更改子框架/子表单而不打开使用它的表单时。或者类似的东西......无法重现它,但确实很奇怪。
It sometimes happens, but do not know why. Mostly when using frames or inherited forms, and opening/changing a subframe/subform without opening the forms that use it. Or something like that... Cannot reproduce it, but weird indeed.
我已经使用 Delphi 多年了,这种情况从未发生在我身上,但如果代码仍然存在,您只需双击事件(FormCreate 和 FormShow),它们就会再次分配。
I have used Delphi for many years and it has never happened to me, but if the code is still there you could just double click on the event (FormCreate and FormShow) and they will be assigned again.
我在最初勾画方法和事件结构时就经历过这一点。如果我生成事件句柄,然后继续使用空事件持有者编译或运行程序,则 CodeComplete 将删除空处理程序。在事件处理程序非空的情况下我没有遇到这个问题。
I have experienced this when initially sketching out the method and event structure. If I generate event handles, then move on and compile or run the program with an empty event holder, then CodeComplete will remove the empty handler. I have not encountered this problem in situations where the event handler is non-empty.