motaz / turbobird

FireBird admin tool
http://code.sd/turbobird
57 stars 28 forks source link

Views/right click, Display View DDL gives error message instead of expected form #13

Closed reiniero closed 10 years ago

reiniero commented 10 years ago

Error message: Failed to create win32 control, error: 0 : The operation completed succesfully Occurs on development version as well as release version TurboBird for Win32 1.0.2

motaz commented 10 years ago

It works fine in Linux, may be it is a bug in Lazarus/Windows version

reiniero commented 10 years ago

If I comment out this part: fmViewView.Parent:= ATab; fmViewView.Left:= 0; fmViewView.Top:= 0; fmViewView.BorderStyle:= bsNone; fmViewView.Align:= alClient; fmViewView.SynSQLSyn1.TableNames.CommaText:= GetTableNames(dbIndex); fmViewView.Caption:= 'View DDL: ' + AViewName; ATab.Caption:= fmViewView.Caption; fmViewView.edName.Caption:= AViewName; ATab.Tag:= dbIndex;

GetViewInfo(dbIndex, AViewName, Columns, ViewBody);
fmViewView.seScript.Lines.Clear;
fmViewView.seScript.Lines.Text:= 'create view "' + AviewName + '" (' + Columns + ')' + LineEnding + ViewBody;
PageControl1.ActivePage:= ATab;

it works - although of course it is shown as a separate form Once I uncomment the fmViewView.Parent:= ATab; and leave the rest commented, the error returns. So perhaps something to do with the tab not supporting a complex form like this?

reiniero commented 10 years ago

The bug also occurs on a Windows 2000 machine but does NOT occur when running under wine (Debian unstable)

motaz commented 10 years ago

which lines do you comment exactly?

reiniero commented 10 years ago

I found out it is enough to comment out just fmViewView.Parent:= ATab; in order to avoid getting the error message.

FYI reported this on the Lazarus list as well.

motaz commented 10 years ago

did you commit your work, to let me see how does it looks like.

reiniero commented 10 years ago

Yes, I'm talking about the last commit where commenting out the single line fmViewView.Parent:= ATab; hides the bug.

motaz commented 10 years ago

This bug happens only with fmViewView? what about other forms?

reiniero commented 10 years ago

Yes, it does, and no, I haven't seen it with other forms.

reiniero commented 10 years ago

Fixed. Asked for clarification re AlphaBlend on Lazarus list.