[CM] A question about GUI rpogramming for SND

cristopher pierson ewing cewing@u.washington.edu
Wed, 25 May 2005 11:59:06 -0700 (PDT)


I'm playing around with modifying some of the GUI stuff in my copy of snd 
and adding a few new widgets for tasks I perform often.  I have a few 
questions that have come up.

It appears from my experimentation that all the elements of a gui widget 
must be defined and loaded at start-up.  In other words, if I have a 
widget that is a slider with a minimum and a maximum value, those values 
must be defined when the program is loaded.  Is this true?

If so, is there any way that I can modify the default values for a slider, 
say, when the window containing it is opened?

Here's a concrete example.

In Dave Phillips' marks-menu.scm, there is a dialog for playing between 
two marks.  The marks to play between are chosen using sliders.  The 
initial boundary values for these sliders are hard-coded into the dialog 
as 0 and 25.  I routinely place up to 75 or 100 marks in a soundfile. Is 
there a way that I can have the window dialog, when it is called, look to 
see what the largest mark number is for the currently selected sound and 
channel and adjust the maximum value of the slider to match that value? 
In other words, if I have 37 marks in a sound and I open the 
play-between-marks dialog from the menu, the sliders go from 0 to 36?

Just curious.

Thanks,

Cris

********************************
Cris Ewing
CME and Telehealth Web Services
University of Washington
School of Medicine
Work Phone: (206) 685-9116
Home Phone: (206) 365-3413
E-mail: cewing@u.washington.edu
*******************************