Tkinter var trace

I'm writing code creating a class that represents a group form (ArticoloForm), taking dynamically attributes from a dictionary passed in init method. When group form button is pressed, an article is created and added to attribute articles of this cla...
more »

2017-08-17 17:08 (1) Answers

Root class of all classes in Swift?

The Apple's developer documentation says: NSObject is The root class of most Objective-C class hierarchies, from which subclasses inherit a basic interface to the runtime system. I wonder what is the root class of all classes in Swift in the ...
more »

2017-08-17 12:08 (1) Answers

Polymorphism and Inheritance definitions in C#

I am trying to learn about main pillars of OOP. When I was reading Inheritance definition in Microsoft docs. there were this part: Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other ...
more »

2017-08-17 11:08 (2) Answers

Set attribute on class but not on instances

I'm creating some custom classes in Python and I was wondering if there was any way to define an attribute on a class without having all of its instances inherit the attribute. For example: class Foo(): def bar(): pass Foo.bar # would...
more »

2017-08-17 08:08 (2) Answers

Declare object inside class header

In my one class, I need to declare some objects (timer objects) inside of the header file. class machine { public: machine(); private: timer buttonPressed; // this compiles timer buttonPressed(1000); //this does not c...
more »

2017-08-16 20:08 (0) Answers

python pass variable between two imported classes

So, I will go straight to the point, and will insert code at the end, but the main problem is that I'm working on a python file (using kivy for a pseudo GUI), the thing is that i have separate files for each screen so they will work as separate apps ...
more »

2017-08-15 22:08 (1) Answers

C++ class function fails to change variables

When calling buildingname.damagebuilding(34) the currenthealth would only decrease temporarily, the first print prints 100 the second prints 66 but after calling damagebuilding again it's reset to 100 again. currenthealth isn't set anywhere else but ...
more »

2017-08-15 22:08 (1) Answers

Making objects iterable?

I'm trying to iterate over each row in a list of lists, append an element from each row to a new list, then find the unique elements in the new list. I understand that I can do this easily with a for loop. I'm trying a different route because I want...
more »

2017-08-15 21:08 (3) Answers