Tom, thanks for trying it out - as you said, its work in progress, so bear with us.
Am 09.12.2010 um 20:45 schrieb Thomas Powderly: > re: GladeVCP flexibility > > HAL widgets respect the hal data types ( the data is numeric ) > > GladeVCP has a large number of non Hal widgets, > and these can have strings and lists > because general toolkits know user dialogs are not always numeric Well, in fact all Gtk widgets as known to glade. Yes, it's not always clear to me either wether I should choose the HAL flavor or the Gtk flavor. So far - if I know e.g. a button only drives internal state of the program, I use the Gtk button to avoid unnecessary HAL pins. Otherwise, use a HAL widget. For some HAL widgets there's no direct non-hal equivalent either, like Leds, Bars, Gremlin (which sports no HAL pins at all ;-) Other than that, I'm currently discovering the proper way to do such programs myself. It's a long rope and I like those.. > you cant use strings in Hal, thats ok, (cant have strings on pins) > but you cant communicate with users only in numbers, > so the widget tk's have pictures, and text and lists of texts I dont see this as necessarily limited to HAL I/O although thats builtin like in pyvcp. It gives a lot of flexibility for good user interfaces as opposed to a collection of switches and displays. For instance, interacting with EMC is straightforward and useful. This wasnt possible with PyVCP. What is particularly useful is the fact that Chris and Pavel recently have fixed O-word subroutine calls from MDI mode. This squashed the long-standing 'no G38.x probing in O-word subs' bug as well. What does work now is sending a couple of '#<_name> = value' parameters from Python via MDI to EMC, and call a O-word subroutine file. This is as good as it gets - no, you cant send an axis letter as parameter to a O-word sub but that's a basic limitation of the G-code language. Here's an unpolished example how this is done: http://git.mah.priv.at/gitweb/emc2-dev.git/tree/c3220db419c1e452200a6d099c0910eee18ab684:/share/gladevcp/examples/by-widget/combobox and its actually useful. > > its tricky moving from pictures to numbers ( from fuzzy to crisp ) > i hope the toolkits stay flexible so we're not bound in the future Tk shows signs of age, Gtk has lots of widgets, a good underlying object system (GObject) and is here to stay for a while, I guess. > My first GladeVCP attempt was a widget to choose one of several data > sets by index, > like a row of data in a DB of technology. > I wanted to display a set and let the user "live" adjust them > ("live adjustment" doesnt change the stored technology, just allows > experienced operators to tweak some parms in a run ) If you tried the HAL_ComboBox I suffer with you - Pavel and I discovered how to edit this in glade (non-obvious but powerful, see the youtube link) only yesterday. > Reading and writing data files is new territory for an EMC user > interface right now. > Selecting data from a list ("fast","medium","Slow" or > "Spade,Cbore,Cdrill,ReamDry") requires lotsafoo to resolve into a > number. I think we got it down to very simple - you *can* have a ComboBox dropdown which shows text labels, and sets HAL pins from a second, invisible column in this list. Example in http://git.mah.priv.at/gitweb/emc2-dev.git/tree/c3220db419c1e452200a6d099c0910eee18ab684:/share/gladevcp/examples/by-widget/combobox > I dont mind that the result needs to be numeric ( the pin that > communicates to HAL), > but I hope the tools needed to implement such stay available, that we > dont build in limits at this early stage. The ComboBox HAL widget is an 1:1 clone of the Gtk ComboBox except for the column property which tells it which column to use for the number output. Other than that, PyGTK documentation applies. > > I realize GladeVCP is just evolving right now, > new docs are being written > (http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HalWidgets) > That page shows a radiobutton with text labels like 'Chocolate', or > 'Strawberry'... > tho the output pin will be numeric (1 or 2 I'd suppose ) > and the email lists mention that labels can be mixed data (%s%0.3f to > resolve to "coreTemp = 0.123k")... I should have used the 'bananas' radiobutton, and it should have been selected to indicate the example's usefulness in the first place ... > nice stuff :) thanks, appreciated! please dont hesitate to shout if you find bugs or misfeatures. Once this stabilizes and is considered useful, I'll engage on proper documentation with LyX. -m ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers