[futurebasic] TWM and Lists

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2007 : Group Archive : Group : All Groups

From: "Dennis J. Fast" <dfast@...>
Date: Tue, 06 Mar 2007 21:34:17 -0800
I used TWM to create a list, used the functions in the ListBox.INCL in the
project file that TWM generated.

I do not see how to update what the list displays. I send info to list, but
list is not visually updated until I click on it.

I can add and delete rows, but no update of what is on screen until a click
in list. Delete also does not clear the row visually at all.

Any help would be very gracious of you. Thanks in advance.

Purpose of program is for students to do computations on ASC and CHAR$.
Type ABC123, click compute, click list. Code should appear J321. Both should
appear in list as last item in list in column 1 and 2.
Eventually I will keep info in 2-d array, alphabetize the list each
add/delete/edit, allow typing a license and find in list, and load/save to
file.
Excellent lesson on searching, sorting, arrays, file i/o etc.

Had everything working great in ProgGenerator and PPC version. But STR#Lists
don't work in Carbon/Appearance, or so FB tells me when I try. I want to
also use these techniques for a "Wheel of Fortune" game next month.

Using latest version of FB and OSX 10.4.6 and TWM 167.


local fn AddPlate (  Plate as str255, Code as str255 )
	myNumRows++
	fn ListAddRow(  _ListPlates, myNumRows, 1 )
	fn ListSetCell( _ListPlates, myNumRows, 1, Plate )
	fn ListSetCell( _ListPlates, myNumRows, 2, Code )
	fn ListSelectOne(_ListPlates, myNumRows, 1)
end fn
-------------------
local fn DeletePlate
	myCell = fn ListGetSelect(_ListPlates)
	myRow = myCell.v%
	myNumRows--
	fn ListDeleteRow(_ListPlates, myRow, 1)
end fn