On 4/7/21 12:25 PM, Nicklas SB Karlsson wrote:
Den 2021-04-06 kl. 17:59, skrev Ralph Stirling:
I seem to be plagued by things that I thought I had working
but which now do not. The current one is gladevcp.
I have Raspbian installed on a 3B+, with Linuxcnc 2.8.1
and an RIP install of 2.9.0-pre available.
Glade-3 is version 3.8.6
Python is 2.7.16
The HAL components and pixmaps are installed in both
/usr/share/glade3 and /usr/local/share/glade3.
However, when I run glade-3 I get no HAL widgets in
the left panels, and when I open a ui I was working on
a couple of weeks ago, I get big orange boxes saying
the element is unavailable where I had HAL widgets
placed before. I get a ton of warnings from Glade along
the lines of:
You have to run:
. scripts/rip-environment
before you start glade-3 otherwise it will not find the widgets, guess it set
some path or so.
I didn't have to run rip-environment??? When I started up 'glade interface
designer' all the widgets were there.
I think you will want a handler -- and have it update a label .. I have only written one small python script (last week)
- but
With something like this in it:
def on_increase_button_pressed(gtkobj,data=None):
gtkobj.set_label(gtkobj.get_label +1 )
and something similar to decrement - but what I wrote above - I haven't tested - almost certain to have something wrong
in it. You will probably have to jump through some hoops to change a different label for a different object than the
one you are pressing??
What I found hard (first time to write python) was to find the USEFUL
attributes and methods for the object.
I used various bits I found on the web - not really happy with any - I ran
some Something like
pprint() with the getmembers() function in the built-in inspect module:
from inspect import getmembers
from pprint import pprint
pprint(getmembers(yourObj))
- but there isn't a great built in function I could find that would give me only the bits below the object in a way that
made sense to me - sort of a haystack of inherited bits to sift through.
--
--------------------------------------------------------------------------------
Karl Schmidt EMail k...@lrak.net
3209 West 9th Street Ph (785) 979-8397
Lawrence, KS 66049
--------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users