Hi the current zenity_scale function (from the zenity package) creates a scale bar that the user can move and returns the selected value. However it only returns the selected value after closing the window. It's possible to have it so that things are done every time the slide is moved. Imagine, sliding a bar for a image contrast and have the effect on real time, then pressing ok. I can see two different implementations and I was wondering which one you find better (or maybe even suggest something different).
1) the user gets a handle and by checking the status of each call to zenity_scale, implements the code on a loop. On this approach, a call to zenity_scale will return a value each time the bar is slide, and the status is different when the user actually presses ok h = zenity_scale [val, status = zenity_scale (h) while (status == 0) ## do things with val [val, status] = zenity_scale (h) endwhile 2) zenity_scale takes a function handle as argument and the user does not have to create a loop function foo (val) # do things with val endfunction function bar (val, b, c) # do things with val endfunction [val, status] = zenity_scale (@foo) ## val will be the last value the user selected with the bar [val, status] = zenity_scale (@(x) bar (x, 3, 4)) ## val will be the last value the user selected with the bar I guess it should be possible to implement both API too. Advice and expertise are most welcome. Thanks in advance, Carnë ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev