fixed instant termination of gtk message handling

git-svn-id: trunk@5023 -
This commit is contained in:
mattias 2004-01-06 15:20:19 +00:00
parent 265047a736
commit 07363fc274
3 changed files with 24 additions and 12 deletions

View File

@ -610,6 +610,9 @@ var i, ParamCount, Len, Offset: integer;
CurTypeIdentifier: string;
OldInput: TFindDeclarationInput;
CurExprType: TExpressionType;
{$IFDEF CTDEBUG}
CurParamName: string;
{$ENDIF}
begin
{$IFDEF CTDEBUG}
writeln('[TEventsCodeTool.CreateExprListFromMethodTypeData] START');
@ -630,6 +633,11 @@ begin
// skip ParamName
Len:=ord(TypeData^.ParamList[Offset]);
{$IFDEF CTDEBUG}
SetLength(CurParamName,Len);
if Len>0 then
Move(TypeData^.ParamList[Offset+1],CurParamName[1],Len);
{$ENDIF}
inc(Offset,Len+1);
// read ParamType
@ -643,7 +651,8 @@ begin
{$IFDEF CTDEBUG}
writeln('[TEventsCodeTool.CreateExprListFromMethodTypeData] A ',
' i=',i,'/',ParamCount,
' Ident=',CurTypeIdentifier
' ParamName=',CurParamName,
' TypeIdent=',CurTypeIdentifier
);
{$ENDIF}

View File

@ -3429,24 +3429,24 @@ begin
if not NewIdentIsMethod then begin
if MessageDlg('Incompatible Identifier',
'The identifier "'+NewValue+'" is not a method.'#13
+'Press OK to undo,'#13
+'press Ignore to force it.',mtWarning,[mbOk,mbIgnore],0)=mrOk
+'Press Cancel to undo,'#13
+'press Ignore to force it.',mtWarning,[mbCancel,mbIgnore],0)<>mrIgnore
then
exit;
end;
if not NewMethodIsPublished then begin
if MessageDlg('Incompatible Method',
'The method "'+NewValue+'" is not published.'#13
+'Press OK to undo,'#13
+'press Ignore to force it.',mtWarning,[mbOk,mbIgnore],0)=mrOk
+'Press Cancel to undo,'#13
+'press Ignore to force it.',mtWarning,[mbCancel,mbIgnore],0)<>mrIgnore
then
exit;
end;
if not NewMethodIsCompatible then begin
if MessageDlg('Incompatible Method',
'The method "'+NewValue+'" is incompatible to this event.'#13
+'Press OK to undo,'#13
+'press Ignore to force it.',mtWarning,[mbOk,mbIgnore],0)=mrOk
'The method "'+NewValue+'" is incompatible to this event ('+GetName+').'#13
+'Press Cancel to undo,'#13
+'press Ignore to force it.',mtWarning,[mbCancel,mbIgnore],0)<>mrIgnore
then
exit;
end;

View File

@ -1028,7 +1028,7 @@ procedure TGtkObject.SendCachedGtkMessages;
FixWidget:=GetFixedWidget(MainWidget);
end;
end else break;
until false;
until Application.Terminated;
{ if any client area was resized, which MainWidget Size was already in sync
with the LCL, no message was sent. So, tell each changed client area to
@ -1047,7 +1047,7 @@ procedure TGtkObject.SendCachedGtkMessages;
end else begin
break;
end;
until false;
until Application.Terminated;
List.Free;
{$IFDEF VerboseSizeMsg}
@ -1336,7 +1336,7 @@ begin
SendCachedGtkMessages;
// then handle our own messages
while true do begin
while not Application.Terminated do begin
// fetch first message
vlItem := fMessageQueue.FirstMessageItem;
if vlItem = nil then break;
@ -1364,7 +1364,7 @@ begin
end;
// proceed until all messages are handled
until not PendingGtkMessagesExists;
until (not PendingGtkMessagesExists) or Application.Terminated;
end;
{------------------------------------------------------------------------------
@ -8417,6 +8417,9 @@ end;
{ =============================================================================
$Log$
Revision 1.445 2004/01/06 15:20:19 mattias
fixed instant termination of gtk message handling
Revision 1.444 2004/01/03 11:57:48 mattias
applied implementation for LM_LB_GETINDEXAT from Vincent