wahorger
Joined: 13 Oct 2014 Posts: 1225 Location: Morrison, CO, USA
|
Posted: Sun Aug 18, 2024 1:24 pm Post subject: Edit Cells (%lv) |
|
|
The attachment of data to a %lv using the %ud format code is inconsistent when [edit_calls] is being used. The short program below shows this.
When a cell is edited, the 'BEGIN_EDIT' reason is given, the attached data is present in user_data. However, when the 'END_EDIT' of "KEY_DOWN' reason is invoked, the user_data is no longer valid (i.e. zero).
Code: |
winapp
PROGRAM tester
IMPLICIT NONE
CHARACTER*20 items(4)
INTEGER sel(3),view,i
integer,external:: my_func
items(1)='|Header_100|_50'
items(2)='|AItem1|Data1'
items(3)='|BItem2|Data2'
items(4)='|BItem3|Data3'
sel(1)=0;sel(2)=0;sel(3)=0;view=1
do i=1,4
print *,items(i)
end do
i = winio@('%^lv[edit_cells]%ud&',300,200,items,4,sel,view,my_func,loc(items))
i = winio@('')
END program TESTER
integer function my_func()
use mswin
integer(7):: user_data
user_data = clearwin_info@('USER_DATA')
print *,'User Data is:',user_data,' Reason:',trim(clearwin_string@('CALLBACK_REASON'))
my_func = 1
end |
|
|