Torrent upload ratio not updated on Synology DS212+
I think that your configuration is OK.
The solution could be to configure the option that stop to seed files when they are completed.
Go to configuration option of the Download Station, menu BT, in the section "Stop Task Automatically", and in the second combo box (propagating time...) select "Forever".
Related videos on Youtube
Lawrence
Updated on September 18, 2022Comments
-
Lawrence over 1 year
I'm having a simple tkinter two frame application with a
Label
,Entry
andButton
widget and I want to access aStringVar()
ofFrameOne
with aEntry
andButton
ofFrameTwo.
If have seen a lots of examples of code, but do not get how this is been done in my example below. Many programmers are using a controller. If I would use a controller, I end up from an error to another. For example:
FirstFrame = FrameOne(mainWindow)` TypeError: __init__() missing 1 required positional argument: 'controller'
Which I completely understand, because I do not pass anything into the new 'controller' class argument when calling the Frame class. But I do not know what I should pass into this to solve it. Perhaps it is also caused by the lack of knowledge of using class variables (any literature tips are welcome).
The same counts for the solution to inherit
FrameOne
intoFrameTwo
. I bump into the same amount of errors applying to my code.Another thing is that many programmers have examples of two frames that are not visible at the same time, while in my example I have two frames underneath each other at the same time.
An different related issue that I have is, what if the label widget of
FrameOne
was aText
widget? How do I access the widget fromFrameTwo
.I could make it work with globals, but I do not want to use such writing and I will keep the access widget problem anyhow.
Please find my code below:
import tkinter as tk class AppWindow(): def __init__(self, master): self.master = master master.title("Test Application") master.geometry("1060x680") master.grid_propagate(False) class FrameOne(tk.Frame): def __init__(self, parent): super().__init__() self["borderwidth"]=5 self["relief"]="ridge" self.LabelText = tk.StringVar() self.LabelText.set("It is not working yet") self.testlabel = tk.Label(self, textvariable=self.LabelText) self.testlabel.grid(row=1, column=1) class FrameTwo(tk.Frame): def __init__(self, parent): super().__init__() self["borderwidth"]=5 self["relief"]="ridge" self.testentry = tk.Entry(self) self.testentry.insert("end", "This should be working") self.testentry.grid(row=1,column=1) self.testbutton = tk.Button(self, text="Test the label", command=self.updatelabel) self.testbutton.grid(row=1,column=2) def updatelabel(self): FrameOne.LabelText.set(self.testentry.get()) #HOW TO FIX THIS CODE THE RIGHT WAY? #Create a window as defined in the AppWindow class mainWindow = AppWindow(tk.Tk()) #Create a Frame as defined in class FrameOne FirstFrame = FrameOne(mainWindow) FirstFrame.grid(row=0, column=0) #Positioning Frame on Window #Create a Frame as defined in class FrameOne SecondFrame = FrameTwo(mainWindow) SecondFrame.grid(row=1, column=0) #Positioning Frame on Window
-
Josh Clark about 4 yearsWhat does happen when you click the button?
-
Bryan Oakley about 4 years@martineau: I wish you wouldn't recommend that code to beginners. It's terrible as a learning tool, and has led to countless questions on this site.
-
stovfl about 4 yearsDoes this answer your question? how-would-i-access-variables-from-one-class-to-another
-
Lawrence about 4 yearsUnfortunately, it doesn't. I have read it and it inheritates one class into another. But in my code I already inheritating the tk.Frame. I get an error when I inheritate another class. In my test example, Brian provided me the simples, but correct answer (below).
-
-
Lawrence about 4 yearsThanks a lot. How could I have missed this... Thank you for the PEP8 too.