Errors from embedded Designer when switching to other embedded forms in our application
If the user is working on the Calc or Data tabs and then chooses to
select another of our forms to work on, which effectively replaces the
embedded form in a panel (the Designer) with another form, then when
returning to the Designer they get an error. If you look down the stack
down it seems to be related to SetParent getting called. Any ideas on
how to get around this?
exception class : EListError
exception message : List index out of bounds (0).
main thread ($a1c):
0048c679 +019 HireTrackNX.exe Classes TList.Get
0109cbfe +00e HireTrackNX.exe raTreeVw
TraReportListView.GetProgramType
0109df9d +025 HireTrackNX.exe raTreeVw
TraCodeExplorer.GetCurrentProgramType
0109ff2c +034 HireTrackNX.exe raIDE
TraCodeManager.Edit
010a0d59 +04d HireTrackNX.exe raIDE
TraCodeManager.ListViewChangeEvent
0055b313 +02f HireTrackNX.exe ComCtrls
TCustomListView.Change
0055b04c +d20 HireTrackNX.exe ComCtrls
TCustomListView.CNNotify
00f66be7 +00b HireTrackNX.exe ppTreeVw 3776 +1
TppListView.CNNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
0055b4bf +073 HireTrackNX.exe ComCtrls
TCustomListView.WndProc
004f80c8 +024 HireTrackNX.exe Controls
TControl.Perform
004fc6e3 +023 HireTrackNX.exe Controls DoControlMsg
004fd15d +00d HireTrackNX.exe Controls
TWinControl.WMNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
766f96c0 +047 USER32.dll SendMessageW
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
76707945 +016 USER32.dll
CallWindowProcA
0058b292 +0ee HireTrackNX.exe VCLFixPack
TContextMenuFixWinControl.DefaultHandler
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
0055b4bf +073 HireTrackNX.exe ComCtrls
TCustomListView.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
76706175 +047 USER32.dll SendMessageA
00439c50 +020 HireTrackNX.exe CommCtrl
ListView_SetItemState
00557697 +067 HireTrackNX.exe ComCtrls
TListItem.SetState
0055bc44 +014 HireTrackNX.exe ComCtrls
TCustomListView.SetSelected
00558de0 +138 HireTrackNX.exe ComCtrls
TCustomListView.CreateWnd
004fb6fa +016 HireTrackNX.exe Controls
TWinControl.CreateHandle
004ff180 +01c HireTrackNX.exe Controls
TWinControl.HandleNeeded
004ff18d +005 HireTrackNX.exe Controls
TWinControl.GetHandle
00557b2f +003 HireTrackNX.exe ComCtrls
TListItems.GetHandle
00557ce8 +084 HireTrackNX.exe ComCtrls
TListItems.SetUpdateState
00557c59 +00d HireTrackNX.exe ComCtrls
TListItems.BeginUpdate
00f680ea +02a HireTrackNX.exe ppTreeVw 4954 +6
TppCustomReportExplorer.TreeViewChangeEvent
0109dcc4 +038 HireTrackNX.exe raTreeVw
TraCodeExplorer.TreeViewChangeEvent
00551350 +040 HireTrackNX.exe ComCtrls
TCustomTreeView.Change
00550e47 +8d7 HireTrackNX.exe ComCtrls
TCustomTreeView.CNNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
005510f8 +084 HireTrackNX.exe ComCtrls
TCustomTreeView.WndProc
004f80c8 +024 HireTrackNX.exe Controls
TControl.Perform
004fc6e3 +023 HireTrackNX.exe Controls DoControlMsg
004fd15d +00d HireTrackNX.exe Controls
TWinControl.WMNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
766f96c0 +047 USER32.dll SendMessageW
76707945 +016 USER32.dll
CallWindowProcA
0058b292 +0ee HireTrackNX.exe VCLFixPack
TContextMenuFixWinControl.DefaultHandler
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
005510f8 +084 HireTrackNX.exe ComCtrls
TCustomTreeView.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
76706175 +047 USER32.dll SendMessageA
00439dcf +00f HireTrackNX.exe CommCtrl
TreeView_SelectItem
0054da8a +03a HireTrackNX.exe ComCtrls
TTreeNode.SetSelected
0055047b +00b HireTrackNX.exe ComCtrls
TCustomTreeView.SetSelected
0054f98a +18e HireTrackNX.exe ComCtrls
TCustomTreeView.CreateWnd
004fb6fa +016 HireTrackNX.exe Controls
TWinControl.CreateHandle
004fb9c0 +074 HireTrackNX.exe Controls
TWinControl.UpdateShowing
004fb9ee +0a2 HireTrackNX.exe Controls
TWinControl.UpdateShowing
004fbba1 +0e5 HireTrackNX.exe Controls
TWinControl.UpdateControlState
004fae1c +0b8 HireTrackNX.exe Controls
TWinControl.InsertControl
004f6c2c +03c HireTrackNX.exe Controls
TControl.SetParent
0050082d +04d HireTrackNX.exe Controls
TWinControl.SetParent
004de130 +07c HireTrackNX.exe Forms
TCustomForm.SetParent
01204f9f +04f HireTrackNX.exe FormDisplayManager_U 868 +18
TFormDisplayManager.DockForm
0120389c +03c HireTrackNX.exe FormDisplayManager_U 295 +10
TFormDisplayManager.ActivateForm
01205a28 +058 HireTrackNX.exe FormDisplayManager_U 1127 +12
TFormDisplayManager.ItemSelect
00d70c2a +01a HireTrackNX.exe CustomItemsContainer 1904 +2
TCustomItemsContainer.ListItemSelect
00d6acf3 +023 HireTrackNX.exe GDIPBase 1984 +5
TCustomBaseList.DoItemSelect
00d60e3e +01a HireTrackNX.exe GDIPCustomItem 1047 +2
TCustomItem.DoInternalItemSelect
00d61df8 +034 HireTrackNX.exe GDIPCustomItem 1750 +7
TCustomItem.SetState
00d61204 +040 HireTrackNX.exe GDIPCustomItem 1225 +8
TCustomItem.DoMouseUp
00d662c0 +038 HireTrackNX.exe GDIPImageTextButtonItem 400 +1
TImageTextButtonItem.DoMouseUp
00d6971e +092 HireTrackNX.exe GDIPBase 908 +8
TCustomBaseList.DoMouseUp
00d71361 +1dd HireTrackNX.exe CustomItemsContainer 2176 +81
TCustomItemsContainer.MouseUp
004f8d44 +02c HireTrackNX.exe Controls
TControl.DoMouseUp
004f8dc6 +076 HireTrackNX.exe Controls
TControl.WMLButtonUp
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
766f7bc5 +00a USER32.dll
DispatchMessageA
004e67f8 +0fc HireTrackNX.exe Forms
TApplication.ProcessMessage
004e6832 +00a HireTrackNX.exe Forms
TApplication.HandleMessage
004e6b27 +0b3 HireTrackNX.exe Forms
TApplication.Run
018dee63 +293 HireTrackNX.exe HireTrackNX 409 +92
initialization
select another of our forms to work on, which effectively replaces the
embedded form in a panel (the Designer) with another form, then when
returning to the Designer they get an error. If you look down the stack
down it seems to be related to SetParent getting called. Any ideas on
how to get around this?
exception class : EListError
exception message : List index out of bounds (0).
main thread ($a1c):
0048c679 +019 HireTrackNX.exe Classes TList.Get
0109cbfe +00e HireTrackNX.exe raTreeVw
TraReportListView.GetProgramType
0109df9d +025 HireTrackNX.exe raTreeVw
TraCodeExplorer.GetCurrentProgramType
0109ff2c +034 HireTrackNX.exe raIDE
TraCodeManager.Edit
010a0d59 +04d HireTrackNX.exe raIDE
TraCodeManager.ListViewChangeEvent
0055b313 +02f HireTrackNX.exe ComCtrls
TCustomListView.Change
0055b04c +d20 HireTrackNX.exe ComCtrls
TCustomListView.CNNotify
00f66be7 +00b HireTrackNX.exe ppTreeVw 3776 +1
TppListView.CNNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
0055b4bf +073 HireTrackNX.exe ComCtrls
TCustomListView.WndProc
004f80c8 +024 HireTrackNX.exe Controls
TControl.Perform
004fc6e3 +023 HireTrackNX.exe Controls DoControlMsg
004fd15d +00d HireTrackNX.exe Controls
TWinControl.WMNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
766f96c0 +047 USER32.dll SendMessageW
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
76707945 +016 USER32.dll
CallWindowProcA
0058b292 +0ee HireTrackNX.exe VCLFixPack
TContextMenuFixWinControl.DefaultHandler
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
0055b4bf +073 HireTrackNX.exe ComCtrls
TCustomListView.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
76706175 +047 USER32.dll SendMessageA
00439c50 +020 HireTrackNX.exe CommCtrl
ListView_SetItemState
00557697 +067 HireTrackNX.exe ComCtrls
TListItem.SetState
0055bc44 +014 HireTrackNX.exe ComCtrls
TCustomListView.SetSelected
00558de0 +138 HireTrackNX.exe ComCtrls
TCustomListView.CreateWnd
004fb6fa +016 HireTrackNX.exe Controls
TWinControl.CreateHandle
004ff180 +01c HireTrackNX.exe Controls
TWinControl.HandleNeeded
004ff18d +005 HireTrackNX.exe Controls
TWinControl.GetHandle
00557b2f +003 HireTrackNX.exe ComCtrls
TListItems.GetHandle
00557ce8 +084 HireTrackNX.exe ComCtrls
TListItems.SetUpdateState
00557c59 +00d HireTrackNX.exe ComCtrls
TListItems.BeginUpdate
00f680ea +02a HireTrackNX.exe ppTreeVw 4954 +6
TppCustomReportExplorer.TreeViewChangeEvent
0109dcc4 +038 HireTrackNX.exe raTreeVw
TraCodeExplorer.TreeViewChangeEvent
00551350 +040 HireTrackNX.exe ComCtrls
TCustomTreeView.Change
00550e47 +8d7 HireTrackNX.exe ComCtrls
TCustomTreeView.CNNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
005510f8 +084 HireTrackNX.exe ComCtrls
TCustomTreeView.WndProc
004f80c8 +024 HireTrackNX.exe Controls
TControl.Perform
004fc6e3 +023 HireTrackNX.exe Controls DoControlMsg
004fd15d +00d HireTrackNX.exe Controls
TWinControl.WMNotify
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
766f96c0 +047 USER32.dll SendMessageW
76707945 +016 USER32.dll
CallWindowProcA
0058b292 +0ee HireTrackNX.exe VCLFixPack
TContextMenuFixWinControl.DefaultHandler
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
005510f8 +084 HireTrackNX.exe ComCtrls
TCustomTreeView.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
77640107 +02b ntdll.dll
KiUserCallbackDispatcher
76706175 +047 USER32.dll SendMessageA
00439dcf +00f HireTrackNX.exe CommCtrl
TreeView_SelectItem
0054da8a +03a HireTrackNX.exe ComCtrls
TTreeNode.SetSelected
0055047b +00b HireTrackNX.exe ComCtrls
TCustomTreeView.SetSelected
0054f98a +18e HireTrackNX.exe ComCtrls
TCustomTreeView.CreateWnd
004fb6fa +016 HireTrackNX.exe Controls
TWinControl.CreateHandle
004fb9c0 +074 HireTrackNX.exe Controls
TWinControl.UpdateShowing
004fb9ee +0a2 HireTrackNX.exe Controls
TWinControl.UpdateShowing
004fbba1 +0e5 HireTrackNX.exe Controls
TWinControl.UpdateControlState
004fae1c +0b8 HireTrackNX.exe Controls
TWinControl.InsertControl
004f6c2c +03c HireTrackNX.exe Controls
TControl.SetParent
0050082d +04d HireTrackNX.exe Controls
TWinControl.SetParent
004de130 +07c HireTrackNX.exe Forms
TCustomForm.SetParent
01204f9f +04f HireTrackNX.exe FormDisplayManager_U 868 +18
TFormDisplayManager.DockForm
0120389c +03c HireTrackNX.exe FormDisplayManager_U 295 +10
TFormDisplayManager.ActivateForm
01205a28 +058 HireTrackNX.exe FormDisplayManager_U 1127 +12
TFormDisplayManager.ItemSelect
00d70c2a +01a HireTrackNX.exe CustomItemsContainer 1904 +2
TCustomItemsContainer.ListItemSelect
00d6acf3 +023 HireTrackNX.exe GDIPBase 1984 +5
TCustomBaseList.DoItemSelect
00d60e3e +01a HireTrackNX.exe GDIPCustomItem 1047 +2
TCustomItem.DoInternalItemSelect
00d61df8 +034 HireTrackNX.exe GDIPCustomItem 1750 +7
TCustomItem.SetState
00d61204 +040 HireTrackNX.exe GDIPCustomItem 1225 +8
TCustomItem.DoMouseUp
00d662c0 +038 HireTrackNX.exe GDIPImageTextButtonItem 400 +1
TImageTextButtonItem.DoMouseUp
00d6971e +092 HireTrackNX.exe GDIPBase 908 +8
TCustomBaseList.DoMouseUp
00d71361 +1dd HireTrackNX.exe CustomItemsContainer 2176 +81
TCustomItemsContainer.MouseUp
004f8d44 +02c HireTrackNX.exe Controls
TControl.DoMouseUp
004f8dc6 +076 HireTrackNX.exe Controls
TControl.WMLButtonUp
004f843b +2bb HireTrackNX.exe Controls
TControl.WndProc
004fc597 +4fb HireTrackNX.exe Controls
TWinControl.WndProc
004fbcc0 +02c HireTrackNX.exe Controls
TWinControl.MainWndProc
0049a8e0 +014 HireTrackNX.exe Classes StdWndProc
766f7bc5 +00a USER32.dll
DispatchMessageA
004e67f8 +0fc HireTrackNX.exe Forms
TApplication.ProcessMessage
004e6832 +00a HireTrackNX.exe Forms
TApplication.HandleMessage
004e6b27 +0b3 HireTrackNX.exe Forms
TApplication.Run
018dee63 +293 HireTrackNX.exe HireTrackNX 409 +92
initialization
This discussion has been closed.
Comments
This is not a known issue. How are you toggling between embedded
controls? Please create a simple example demonstrating this behavior
and send it in .zip format to support@digital-metaphors.com and we will
take a look at it for you.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Far too much work to isolate this in a sample project (isn't that
normally the case?), but the method we call (DockForm) before all the RB
code kicks in that quote called stack is simply assigning a form that
hosts the designer (in a panel) to a scrollbox. I've pasted it below
along with the method we use to host the Designer in a form's panel:
procedure TFormDisplayManager.DockForm(aCustomItem : TCustomItem);
var lForm : TForm;
lFormMonitor : TFormMonitor;
begin
lFormMonitor := GetFormMonitorObject(aCustomItem);
// ignore if form is floating
if assigned(lFormMonitor) and (lFormMonitor.FormDockState =
fdsFloating) then
begin
ToggleDummyPanels;
exit;
end;
lForm := TForm(aCustomItem.ItemObject);
if lForm.BorderStyle <> bsNone then
lForm.BorderStyle := bsNone;
if GetDestinationHost = MainScrollBox then
lForm.Parent := MainScrollbox else
lForm.parent := CompareScrollbox;
AdjustFormDimensions;
ToggleDummyPanels;
end;
procedure TnavReportExplorerForm.DisplayDesigner;
var
lHostForm : TForm;
lDesignerHostIntf : InxDesignerHost;
lMainFormIntf : IMainFormInterface;
begin
Application.MainForm.GetInterface(IMainFormInterface, lMainFormIntf);
lHostForm :=
TFormDisplayManager(FormsManager.FormDisplayManagerList[lMainFormIntf.DesktopActivePage]).FindForm('TnxRBDesignerForm',
0, FFormsManagerDesignerItem);
if not assigned(lHostForm) then
lHostForm :=
FormsManager.LoadandDisplayNewForm(lMainFormIntf.DesktopActivePage,
'TnxRBDesignerForm');
if assigned(lHostForm) then
if lHostForm.GetInterface(InxDesignerHost, lDesignerHostIntf) then
begin
lDesignerHostIntf.Designer := ListView.ReportExplorer.Designer;
lDesignerHostIntf.Designer.ShowInPanel(lDesignerHostIntf.HostPanel);
// lDesignerHostIntf.Designer.Form.MainMenu.CurrentDock.Parent
:= lHostForm;
end;
end;
Unfortunately I'm going to need an example in order to track this issue
down. Perhaps you can use the following example as a starting point to
recreate it.
http://www.digital-metaphors.com/rbWiki/End-User/Designer/How_To...Show_the_Designer_in_Panel
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com