[Gambas-user] Tracked down - one cause of Signal 11 crash (2.99 build 1200)
richard terry
rterry at ...1822...
Fri Mar 21 09:17:58 CET 2008
This is just my sloppy coding, but the program didn't baulk with an error
message, it just died with signal 11.
In this routine, I set up a few observors to overide the events on an
embedded form, for some toolbuttons, texteditors, comboboxes,
In this case, at the top of the form I declare:
DIM ipagecount AS Integer
DIM hTabStrip AS TabStrip
DIM hCtrl AS Control
DIM hChildCtrl AS control
DIM hTextEdit AS TextEdit
DIM hTextbox AS TextBox
DIM hCombo AS ComboBox
DIM hToolbutton AS ToolButton
DIM page AS frmTextEditor
ipagecount = WorkspaceEditor.children.Count
Newpage = NEW frmTextEditor
EditorPages.add(Newpage, ipagecount)
WorkspaceEditor.Add(NewPage)
Then later down when I'm looking for all the combo's on one of my toolbars, I
stuffed up by having copied a few lines of code, and not substituted the
hToolbutton for hCombo > which caused the signal 11 and crashed the program.
-----------------------------------------------------------------------------------------------------
FOR EACH hCtrl IN NewPage.HBoxEditorToolBar.Children
IF hCtrl IS ComboBox THEN
hCombo = hCtrl
hObs = NEW Observer(hToolbutton) AS "Editor_ComboCtrl"
END IF
NEXT
-------------------------------------------------------------------------------------------------------
Not sure if this is any use, but I would have expected the program to just
stop at that line, not crash.
Regards
Richard
More information about the User
mailing list