valentina for director question

Bart Pietercil bart.pietercil at gmail.com
Thu Sep 6 05:19:48 CDT 2007


Hi David,

as former Director user, I might be able to help out:

On 6-sep-07, at 11:33, Ruslan Zasukhin wrote:

> On 6/9/07 8:14 AM, "DAVID CARUSO" <dcaruso3 at verizon.net> wrote:
>
> Hi David,
>
>> basically what I am trying to do is to make a list
>> and display a "window" of that list.
>> I take the song data and sort it by artist, then I want to
>> scroll through this list displaying a set number at a time.
>>
>> I literal terms if I had this list on paper and had another piece  
>> of paper
>> that had a "window" cut in it that showed 9 lines of this list,  
>> and I want
>> to
>> slide this "window" up and down the list based on what artist I was
>> looking for, centered on this artist, but showing some above and  
>> below
>> this centered artist.
>>
>> the catch being that some of the artist in this list could be  
>> "locked out"
>> so the list still being linear, but with some records not being  
>> shown.
>>
>> example:
>> say I have artist 1,2,3,4,5,6 in a numeric linear list they would be
>> 1,2,3,4,5,6.  but if I have artist 4 locked out, then the list  
>> becomes
>> 1,2,3,5,6,7. so if I am using a "position" to keep track of where  
>> I am
>> at in the artist list the fourth position is actually the fifth  
>> artist.  and
>> the fourth artist that is locked out could be unlocked, so this
>> would further screw with "position".
>>
>> so the idea was to build the cursor without  the "locked out" artist
>> and then find the record position of my "centered" artist, so as to
>> then build my list of nine artist to display on the screen. 4  
>> artist above
>> the centered artist and 4 artist below.  and by adding to or  
>> subtracting
>> from my "position" i would then scroll through this cursor.
>>
>> what do i need to do to accomplish this?



It looks to me that you need to create build your cursor as Ruslan  
suggest and then translate the cursor info into a
Director list where each item in the list is a record. The record  
itself is translated into a property list like.
To this property list (record) you can add your own property  
#lockedstatus which can be 0 or 1

  To give you an idea this would look liket this
[[#recid:1,#name:"Deep Purple",#Album:"Whatever",#lockedstatus:0], 
[#recid:1,#name:"Deep Purple",#Album:"Another",#lockedstatus: 
0],.....and so on]
What you essentially are doing is rebuild the cursor in RAM for Director

Now you can scan over it with a simple loop structure

For i = 1 to myRecordList.Count
	if myRecordList[i].LockedStatus = 0 then
		do whatever is needed to display
		maybe build a new list with the records to display and pass that  
list to your screen draw routine ?
	end if
end For




hth

Bart





More information about the Valentina mailing list