Questions tagged as 'classes'

2
answers

Object of a class in another Java class

Hello, Is it possible to have the object of the class that instantiated in the instantiated class? Eg: (Incorrect syntax, just a guess) public class Classe2 { // Metodos e vetores da classe } Instance of Class2 in Class1...
asked by 16.06.2015 / 01:13
1
answer

How to make a class interfere in another with python [closed]

I'm trying to make a switch in kivy style, when one is true, the other is false, but when I change a variable in the first class, it is not changed in the second, and remains with the original value. Explicating: c = 'NADA' class A():...
asked by 22.11.2018 / 00:56
2
answers

How to inherit a pygame class?

When I run this code (this is the current integer code, ie only 3 lines): import pygame class sp(pygame.sprite): pass I get:    TypeError: module () takes at most 2 arguments (3 given) I would like to inherit this class to create...
asked by 17.09.2018 / 03:42
2
answers

Calling functions in ngClass

I would like to call functions in ngClass. I can only call the function, and if I want to call other classes it does not catch, its just put the function in the class it can call (ng-class="styleClass (5)"), but I want some classes always and ot...
asked by 30.07.2018 / 20:20
1
answer

Doubts about Python methods and classes

I have the Login class and created an instance of it in the Main class, with the instance I'm calling the start method, however in the start method when clicking the 'Log in' button the method 'show_entry_fields' is not executed correctly. When...
asked by 22.08.2018 / 00:33
1
answer

Parking class in Python

I'm learning to program in Python. At this point I need to implement a class that has the following characteristics: A class called parking, which simulates the operation of a parking lot. - The class receives an integer and determines...
asked by 09.06.2018 / 17:35
1
answer

Why is the text label unchanged?

I have the class of a screen, which contains a text label, the code loads an xml containing the objects. tela.py: #!/usr/bin/python3 import gi import modulo_arquivos import os gi.require_version("Gtk", "3.0") from gi.repository import Gt...
asked by 26.02.2018 / 21:00
2
answers

CSS - How to remove lines around the button?

Good morning, I have a question to remove the border when clicking on the button .. If somebody knows and can help I thank:) CSS:@charset"utf-8"; /* CSS Document */ body { font-size:16px; color:#000; } .imagem_1 { position:a...
asked by 31.01.2018 / 17:53
1
answer

Change an attribute of a base class by the C ++ derived class

I have a problem involving inheritance in C ++, I can not change an attribute of a base class eg: // classe base class Base { vector(string) Names; //coloquei entre parenteses porque por algum motivo o string desaparece quando coloco da m...
asked by 23.01.2018 / 21:28
1
answer

Instantiate class with variable

There is a way to instantiate a class in JavaScript with a variable of type string , for example: class User { constructor() { this._name = 'Luiz'; } get name() { return this._name; } } const className = 'Use...
asked by 20.01.2018 / 15:23