Questions tagged as 'self'

1
answer

Metaprogramming with ruby, methods with SELF

Good evening ... I come from other languages somewhat different to Ruby, like C / C ++, JAVA ... And I missed a little while trying to understand the difference of the following methods: Class teste def novo "1" end def...
asked by 13.06.2017 / 04:26
2
answers

Is it possible for a Closure (Swift) to capture reference of the instance of the object that executes it?

I'm passing a closure to an object's property, and within the closure I'd need to reference the instance of the object that will execute the closure. Example: typealias validator : ()->Bool class Field : NSObject { var name...
asked by 21.11.2016 / 14:23
0
answers

Why does the method gain another object?

Follow the script. var indice = 0; class Numeros { constructor() { this.indice = 0; this.exibir(); } exibir() { var quadro = document.getElementsByClassName("quadro"); document.write(this);...
asked by 10.06.2018 / 18:11
1
answer

Compile error when registering information in a struct and a substruct

I have a problem with my C code. My goal is to register categories in my first struct, which happens without problems. Then I want to register some subcategories for each category, which causes the following problem in the code: main.c|45|erro...
asked by 30.12.2018 / 01:32