小编Don*_*ddy的帖子

帧上的TMultiView会导致AV

在帧上放置TMultiview控件并尝试在IDE中重新打开该帧时会导致AV无法查看.

这是一个众所周知的问题,并向EMB报告.此问题已在新的质量门户网站上报告:https://quality.embarcadero.com/browse/RSP-9621.请注意,您需要登录才能查看此报告.对于那些没有帐户的人,以下是截至编写本报告时的情况:

在此输入图像描述

有没有人知道解决方法,或者可以提出解决方法?

delphi delphi-xe7

5
推荐指数
1
解决办法
378
查看次数

TCriticalSection TryEnter方法始终返回True

在TCriticalSection上调用TryEnter方法时,结果始终为true.当然,如果能够获得锁定,这应该只返回true?

var
  MyCritSect: TCriticalSection;

begin
  MyCritSect := TCriticalSection.Create;
  try
    //    MyCritSect.Enter;
    Writeln(BoolToStr(MyCritSect.TryEnter, True)); // This should return True
    Writeln(BoolToStr(MyCritSect.TryEnter, True)); // This should return False?
    Readln;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
Run Code Online (Sandbox Code Playgroud)

即使您取消注释该MyCritSect.Enter;行,对于两次调用TryEnter,它仍会返回True.

我正在使用Delphi XE和Windows 10.

delphi winapi

5
推荐指数
1
解决办法
682
查看次数

Node.js - 设置系统日期/时间

有没有办法从 node.js 服务器在操作系统上设置日期/时间?

有很多关于如何更改时区的示例,但我需要更改 PC 的实际日期/时间

javascript time datetime node.js

5
推荐指数
1
解决办法
8020
查看次数

从加密方法解密

我需要为旧的代码重写一个解密方法,遗憾的是原始的解密方法已经丢失,因为我们只能访问加密.

type
  TintArray = array [0 .. 1] of Cardinal;
  TKeyArray = Array [0 .. 3] of Cardinal;

const
  KeyArray: TKeyArray = (858945348, 1144282739, 828794915, 556884274);

  procedure Encipher(var V, W: TintArray);
  var
    y, z, sum, delta, a, b, c, d, n: Cardinal;
    iCounter: Integer;
  begin
    y := V[0];
    z := V[1];
    sum := 0;
    delta := $9E3779B9; // 2654435769;//0x9E3779B9;
    a := KeyArray[0];
    b := KeyArray[1];
    c := KeyArray[2];
    d := KeyArray[3];
    n := 32;
    for iCounter := n downto 1 …
Run Code Online (Sandbox Code Playgroud)

delphi encryption

0
推荐指数
1
解决办法
240
查看次数

Delphi"Not"运算符返回错误

此代码用于解析编辑器是否应该是只读的.

Code Snippit

var
TempBool : Boolean;
begin
      TempBool := (fCurrentSelectedItem as TMyCustomObject).CanEdit; //Check whether this object can be edited; TempBool resolves to True
      TempBool := not(TempBool); // Toggle the Boolean value; !!-- TempBool still resolves to True
      curredtEach.properties.ReadOnly := TempBool; // Set the read only property on the editor
end;
Run Code Online (Sandbox Code Playgroud)

TempBool解析为整数,如下所示

      // Integer(TempBool) = 0
      TempBool := (fCurrentSelectedItem as TMyCustomObject).CanEdit; 
      // Integer(TempBool) = -1
      TempBool := not(TempBool); 
      // Integer(TempBool) = -2     
Run Code Online (Sandbox Code Playgroud)

找到这个链接, 但没有帮助.

Delphi版 - XE5

操作系统 - …

delphi delphi-xe5

-2
推荐指数
1
解决办法
640
查看次数