William Brown wrote:
> The charts need to be listed as thumbnail sized buttons.
Up to 60 of them? Yowza, that seems like a lot of buttons to have on
screen.
> The user selects the ones he/she wants and they appear
> elsewhere in order of selectionn on the screen. When the
> user selects the button he/she goes to that chart.
I'm missing something - what exactly happens when the user clicks a chart
button? Do they appear elsewhere in order of selection, or do they send the
user to that chart?
> It would also be helpful if the forward and back buttons on
> the individual screens he/she calls up reflect the new order.
You should set up & maintain a list for the user's 'chart order'. Start out
with an empty list, and add a chart each time the user clicks on a chart
button. You could also read from that order when the user clicks a forward
or back button, to determine where to go next.
> In other words the user selects his/her chart order and then
> goes to a screen in the middle of the sequence he/she has
> selected. The forward and back arrows now move him/her to the
> charts next to this chart and follow the sequence of his list.
Right. This will be very straightforward if you use a list.
Are your charts all in separate .dirs, or are they external files that you
read into a single .dir? Assuming a chart's 'name' (onscreen descriptor) is
different from its actual filename, you should use a property list that
holds at least two pieces of info for each chart -- a chart name and its
filename. Start out with an empty list, then when the user clicks a chart
button, add that set of data, for that particular chart, to the list. That
becomes your 'chart order', and you can refer to it every time the user
clicks a forward/back button.
lsChartOrder = [:]
When a user clicks a button to add a chart to their personal 'order', you
add a dataset for that chart to the list:
on addNewChart, strChartName, strChartFileName
-- 1. see if the user has already added this one
bAlreadyExists = lsChartOrder.getaProp( strChartName )
-- 2. bail if it's already there
if not( voidP( bAlreadyExists )) then exit
-- 3. add it, since we now know it's not already there
lsChartOrder.addProp( strChartName, strChartFileName )
end
You'll need to set up lsChartOrder as a global variable, or better yet (much
better & my personal preference), as a RAM-resident object. Then,
regardless of what .dir you're in, the chart order will be accessible.
Next, you'll need to add functions for accessing chart names or filenames
from the list:
on getAChartName intWhichChart
return lsChartOrder.getPropAt( intWhichChart )
end
on getAChartFileName intWhichChart
return lsChartOrder[ intWhichChart ]
end
Note that I've left error checking, such as verifying that intWhichChart is
within lsChartOrder's valid range, up to you. At that point, when you need
a particular set of chart data, you get them like this:
-- perhaps attached to a NEXT button
on mouseUp
-- I'll leave this implementation up to you also
currentChartPositionInOrder = currentChartPositionInOrder + 1
-- get the next chart's data
nextChartName = getAChartName( currentChartPositionInOrder )
nextChartFileName = getAChartFilename( currentChartPositionInOrder )
-- go there
go movie nextChartFileName
member("chartDescriptor").text = nextChartname
end
Well I didn't intend to write this much, but it appears I have. This is a
totally simple implementation, but it should get you started.
Hope this helps,
Rob
/*********************************
* Rob Wingate, Software Human *
* http://www.vingage.com *
* mailto:[EMAIL PROTECTED] *
*********************************/
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]