BUG #1 2.3 alpha
- Posted by euman at bellsouth.net Dec 04, 2001
- 448 views
You can not have a variable in your main program that gets its value from an external include file? Take this for instance "txtbuf" will cause a crash in euphoria because it has not been assigned a value...WM_NOTIFY may have been called but Im very sure TVN_ITEMEXPANDING has not. include file treeview.ew global function filltvitem(atom Item, atom mask, atom state) mypoke4(tvitem + tvitem_hItem,Item) mypoke4(tvitem + tvitem_mask,mask) mypoke4(tvitem + tvitem_stateMask, state) txtbuff = myalloc(256) mypoke4(tvitem + tvitem_pszText,txtbuff) mypoke4(tvitem + tvitem_cchTextMax,256) return txtbuff end function main program atom txtbuf elsif iMsg = WM_NOTIFY then elsif id = TreeView1 then iMsg = mypeek4s(lParam + NMHDR_code) if iMsg = TVN_ITEMEXPANDING then hItem = mypeek4u(lParam + NMTVHDR_itemNew) if mypeek4s(lParam + NMTVHDR_action) = TVE_EXPAND then itxtbuff = filltvitem(hItem, TVIF_TEXT, 0) item = SendMessage(id, TVM_GETITEM, 0, tvitem) path = {peek_zstring(txtbuff)} CRASH * CRASH * CRASH Euman