![]() |
Quote:
Wondering if it would be possible to have this.foo = public function () also, or something similar. Defining functions using this method in a TStaticVar results in a function inaccessible error in RC. Currently it is a bit of a pain to have to define a public function and copy it, if the functions you are defining are different for each object. |
Quote:
Quote:
|
I can't seem to get function objects to work as expected:
PHP Code:
PHP Code:
Do function objects only work on this. variables? |
Quote:
But so far all I've witnessed object functions to be usable with is this. prefix. I tried it with temp and it didn't work for the most part, I'll make sure to test that out again, but I think it should work in general tho. E: Definitely only useable with this. prefix. The question is if this is so limited, can we get some more effective or in-depth uses of pointer functions. At this time I don't really see the use. |
if ( func( "blah" ) )
vs. this.funct = func(); if ( this.funct( "blah" ) ) Any other uses? That doesn't make any sense to me. |
Quote:
PHP Code:
PHP Code:
|
Point is, this limits the amount of functions you catch and call.
|
Quote:
|
I honestly think this is useless and is just causing confusion. I get it, but at the same time it still confuses me
|
I find that the most practical thing about this function thing if for sorting... Basically, passing the function the depicts which value is greater.
|
Quote:
Quote:
They are very useful for controlling functions at execution time, and they are a lot more organised in event-driven system. |
Quote:
|
Quote:
Quote:
Quote:
|
Quote:
It is something I used in my mud system, you construct all mud objects in a single array and return the object reference with the function. Having a master list prevents the object from being destroyed because of lack of references. Though I don't know what Graal does when all references are removed, I expect it similar to Java. |
Quote:
|
All times are GMT +2. The time now is 05:34 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.