gtk2 interface: temporarily disabled Memo.SelStart and SelLength if the memo strings are not yet created, even if an handle exists.

git-svn-id: trunk@21115 -
This commit is contained in:
vincents 2009-08-06 09:54:27 +00:00
parent 60e6d7e7ad
commit 2a16a46258

View File

@ -206,6 +206,10 @@ begin
if not WSCheckHandleAllocated(ACustomEdit, 'SetSelStart') then
Exit;
// temporary fix, exit is Lines is not a TGTk2MemoStrings
if not (TCustomMemo(ACustomEdit).Lines is TGtk2MemoStrings) then
exit;
MemoStrings := TCustomMemo(ACustomEdit).Lines as TGtk2MemoStrings;
MemoStrings.QueueCursorMove(NewStart);
end;
@ -218,6 +222,10 @@ begin
if not WSCheckHandleAllocated(ACustomEdit, 'SetSelLength') then
Exit;
// temporary fix, exit is Lines is not a TGTk2MemoStrings
if not (TCustomMemo(ACustomEdit).Lines is TGtk2MemoStrings) then
exit;
MemoStrings := TCustomMemo(ACustomEdit).Lines as TGtk2MemoStrings;
MemoStrings.QueueSelectLength(NewLength);
end;