1. win32lib setLVItemlParam
- Posted by 10963508 at europeonline.com Jul 06, 2002
- 369 views
Derek, setLVItemlParam() is global, it should't be because isnt lParam already taken for win32lib internal stuff? Also, I modified fDoLVN_ITEMCHANGED so that params [1] has row of changed item because when you click on checkbox of listview there is no easy way to tell which item's check box was clicked. ---------------------------------------------------- function fDoLVN_ITEMCHANGED(integer id, atom hWnd, atom wParam, atom lParam) ---------------------------------------------------- id = getId( fetch( lParam, NMHDR_hwndFrom )) --// Start Tone Skoda --// VOID = invokeHandler(id, w32HChange, {} ) VOID = invokeHandler(id, w32HChange, {fetch( lParam, NMLISTVIEW_iItem)} + 1 ) --// End Tone Skoda return {kReturnNow} end function
2. Re: win32lib setLVItemlParam
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 07, 2002
- 367 views
----- Original Message ----- From: <10963508 at europeonline.com> To: "EUforum" <EUforum at topica.com> Subject: win32lib setLVItemlParam > > Derek, > setLVItemlParam() is global, it should't be > because isnt lParam already taken for win32lib internal stuff? Hi 10963508, you are probably correct but it has been this way for awhile and it could break some code if changed. Also, the lParam field is only used by win32lib's sorting routine for ListViews. If somebody wants to use this field for their own purposes, there is no reason why they shouldn't be able to do that. > Also, I modified fDoLVN_ITEMCHANGED so that params [1] has row of changed > item > because when you click on checkbox of listview there is no easy way to tell > which item's check box was clicked. I see your point. However, to change the parameters for the onChange[] event is likely to break existing code. However, I can set this up for code that uses setHandler() rather than onChange[] protocol. I've done this sort of thing for the scroll event recently. In other words, if you are trapping events by calling setHandler(), your routine's third parameter, being a sequence, can receive additional parameters. But if you are using onChange[] to set the handler, then your routine's parameters are fixed and cannot be changed. --------- cheers, Derek.