Re: BUG #1 2.3 alpha
- Posted by euman at bellsouth.net Dec 04, 2001
- 409 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 Sorry, left out this very important part! after I declare txtbuf as an atom and before the code below I do have include treeview.ew > > 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 Looking at the scope rules page I found this "In Euphoria, every symbol must be declared before it is used" which it is!!! Doesnt say anything about assigning a value before it's actually needed...< Euman