discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you write to a widget from a Python file in an OOT?


From: Jeff Long
Subject: Re: How do you write to a widget from a Python file in an OOT?
Date: Sat, 23 Oct 2021 21:27:33 -0400

Don't try to set the GUI display from within a block, if that's what you are trying to do. If you have an entry called "I_Gain", then there should already be a set_I_GAIN() function in the top block.

How to call set_I_Gain() depends on what you are trying to do. If you want to set it over the network or from another process, follow Paul's recommendation and use XMLRPC.

But, from the image attached, it looks like you just want to set the gain via a chooser and display it in the entry? In that case, just put "Change_I_Gain" (the name of the chooser) in the value field for I_Gain and it should be set whenever you choose a new value.

On Sat, Oct 23, 2021 at 9:03 PM Elmore's <wa4ywm@comcast.net> wrote:
I had asked this question earlier in a different form but did not receive a response so I am trying a different approach using a greatly simplified flowgraph to illustrate my point.
 
I have attached the three pertinent files.
 
Test is an OOT module. I want to be able to trigger a callback set_IGain (which works) and write a value to the I_Gain GUI Entry (which doesn’t work). I have tried various imports, setting of variables and any other scheme that I could think of. I have not included any specific piece of code in the callback.
 
This seems like such a simple thing to do but nothing works. I get various errors or nothing is written when I eliminate the errors. I must be missing a basic point.
 
Please help me get over this hump.
 
Jim

Virus-free. www.avg.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]