Opened 16 years ago
Closed 15 years ago
#710 closed enhancement (fixed)
implicit member "this" in NameBlock
| Reported by: | Jorge | Owned by: | Víctor de Buen Remiro |
|---|---|---|---|
| Priority: | high | Milestone: | OOP Implementation |
| Component: | OOP | Version: | 2.0.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
It could be very useful if every instance of a NameBlock had an implicit member "this" being a reference to "it self", similar to the this reserved word "this" in C++. This feature could make easy the collaboration between instances.
Change History (3)
comment:1 Changed 16 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 Changed 15 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:3 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.

Sorry, this problem was resolved a few weeks ago.
//Example of using implicit private member _this NameBlock a = [[ Text _.name = "a"; Text getName(Real unused) { _this::_.name } ]]; //User cannot overwrite _this due to it's a reserved word NameBlock b = [[ Text _.name = "b"; NameBlock _this = a; Text getName(Real unused) { _this::_.name } ]];