![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Версия 1.72
Кладов © (2003-04-21 20:04:00)
News from 21-Apr-2003
KOL and MCK news (v1.72):
[-]MCK: function NeedFree did not used to decide if to genearate
Add2AutoFree for created objects. Thanks to Boguslaw Brandys for a bug
report.
[-]KOL: asm version of TThread.Destroy fixed to close Handle in case
when AutoFree is set to true.
[-]KOL: RepeatInterval property fixed for bitbtn control (on a single
click, was clicked twice).
[+]KOL: if conditional symbol ALL_BUTTONS_RESPOND_TO_ENTER is defined
in project options, all buttons (and bitbuttons too) respond to ENTER
as well to SPACE key, and unlike to property AllBtnReturnClick this
does not affect Applet.OnMessage.
[-]KOL: OpenSaveDialog fixed for case of multiple files selection
followed by single file selection. Thanks to Vadim Petrov.
[-]KOL: Aligning of controls fixed for initially invisible forms.
[-]KOL: list view column image index -1 fixed.
Other news:
[+]EmuZWin 2.0 application added (the emulator of the old machine
Spectrum48/128 for Windows9x/ME/NT/2K/XP). See in Applications
section.
Юрий (2003-04-28 18:43:00) [1]Исправить следует ForceDirectories (не создаёт директории в случае их отсутствия) на следующий вариант:
function ForceDirectories(Dir: String): Boolean;
var S: String;
begin
if Length(Dir) = 0
then Result := False
else begin
Dir := ExcludeTrailingPathDelimiter(Dir);
S := ExtractFilePath(Dir);
if (Length(Dir) < 3) or DirectoryExists(Dir) or (S = Dir)
then Result := True
else Result := ForceDirectories(S) and CreateDir(Dir);
end;
end;
В KOL 1.72 так:
function ForceDirectories(Dir: String): Boolean;
begin
Result := FALSE;
// Copied from unit FileCtrl:
if Length(Dir) = 0 then Exit;
Dir := ExcludeTrailingPathDelimiter(Dir);
if (Length(Dir) < 3) or DirectoryExists(Dir)
or (ExtractFilePath(Dir) = Dir) then Exit; // avoid "xyz:\" problem.
if not ForceDirectories(ExtractFilePath(Dir)) then Exit;
Result := CreateDir(Dir);
end;
А в VCL так:
function ForceDirectories(Dir: string): Boolean;
begin
Result := True;
if Length(Dir) = 0 then
raise Exception.CreateRes(@SCannotCreateDir);
Dir := ExcludeTrailingBackslash(Dir);
if (Length(Dir) < 3) or DirectoryExists(Dir)
( ExtractFilePath(Dir) [7]Исправить следует ForceDirectories (не создаёт директории в случае их отсутствия) на следующий вариант:
function ForceDirectories(Dir: String): Boolean;
var S: String;
begin
if Length(Dir) = 0
then Result := False
else begin
Dir := ExcludeTrailingPathDelimiter(Dir);
S := ExtractFilePath(Dir);
if (Length(Dir) < 3) or DirectoryExists(Dir) or (S = Dir)
then Result := True
else Result := ForceDirectories(S) and CreateDir(Dir);
end;
end;
В KOL 1.72 так:
function ForceDirectories(Dir: String): Boolean;
begin
Result := FALSE;
// Copied from unit FileCtrl:
if Length(Dir) = 0 then Exit;
Dir := ExcludeTrailingPathDelimiter(Dir);
if (Length(Dir) < 3) or DirectoryExists(Dir)
or (ExtractFilePath(Dir) = Dir) then Exit; // avoid "xyz:\" problem.
if not ForceDirectories(ExtractFilePath(Dir)) then Exit;
Result := CreateDir(Dir);
end;
А в VCL так:
function ForceDirectories(Dir: string): Boolean;
begin
Result := True;
if Length(Dir) = 0 then
raise Exception.CreateRes(@SCannotCreateDir);
Dir := ExcludeTrailingBackslash(Dir);
if (Length(Dir) < 3) or DirectoryExists(Dir)
or (ExtractFilePath(Dir) = Dir) then Exit; // avoid "xyz:\" problem.
Result := ForceDirectories(ExtractFilePath(Dir)) and CreateDir(Dir);
end;
Centronix (2003-04-26 15:35:00) [2]
Хм... насчет OnMessage не пробовал, а в AttachProc они не приходят...
Кладов (2003-04-25 20:12:00) [3]
> WM_MOUSEHOVER и WM_MOUSELEAVE, однако они никак не используются
> (даже если назначен обработчик OnMouseEnter/OnMouseLeave).
> Нельзя ли сделать так, чтобы контрол начинал получать эти
> сообщения после обращения к какому-либо из вышеуказанных
> свойств ?
Так он и получает эти сообщения. Просто назначьте свой пустой обработчик, если он вам как таковой не нужен, а перехватывайте в OnMessage. Разве не так?
Centronix (2003-04-25 18:30:00) [4]
И еще одно небольшое предложение: в кол определены сообщения WM_MOUSEHOVER и WM_MOUSELEAVE, однако они никак не используются (даже если назначен обработчик OnMouseEnter/OnMouseLeave). Нельзя ли сделать так, чтобы контрол начинал получать эти сообщения после обращения к какому-либо из вышеуказанных свойств ? Например для использования в приаттаченой процедуре (AttachProc()).
Centronix (2003-04-24 13:29:00) [5]Не работает функция ForceDirectories (в рекурсивной цепочке последняя функция всегдавозвращает False).
Надо что-то вроде этого:
function ForceDirectories(Dir: string): Boolean;
begin
Result := Length(Dir) > 0;
If not Result then Exit;
Dir := ExcludeTrailingPathDelimiter(Dir);
If (Length(Dir) < 3) or DirectoryExists(Dir) or
( ExtractFilePath(Dir) [3]
Не работает функция ForceDirectories (в рекурсивной цепочке последняя функция всегдавозвращает False).
Надо что-то вроде этого:
function ForceDirectories(Dir: string): Boolean;
begin
Result := Length(Dir) > 0;
If not Result then Exit;
Dir := ExcludeTrailingPathDelimiter(Dir);
If (Length(Dir) < 3) or DirectoryExists(Dir) or
(ExtractFilePath(Dir) = Dir) then Exit; // avoid "xyz:\" problem.
Result := ForceDirectories(ExtractFilePath(Dir)) and CreateDir(Dir);
end;
Кладов (2003-04-22 20:57:00) [6]
> [Hint] Package "MirrorKOLPackage" does not use or export
> "kol.WndProcBtnReturnClick"
пославлю и там IFDEF. Просто тестировал последний раз с включенной у себя опцией ALL_BUTTONS_RESPOND_TO_ENTER.
BaRToV (2003-04-21 21:41:00) [7]
[Hint] Package "MirrorKOLPackage" does not use or export "kol.WndProcBtnReturnClick"