![]() |
Quote:
|
I still hate the whole object:type thing. Would love it if it was more like Java and C#, object something;
|
Quote:
By essence, GScript is a scripting language. GScript is more close to JavaScript-like languages, rather than Java or C#. This type syntax was chose among other language syntaxes, because it is commonly-used to annotate types in ECMAScript-based languages. For example: HTML Code:
// ActionScript HTML Code:
//#GS2 Also, you lose the ability to easily import scripts from similar languages (ActionScript, JavaScript, UnityScript, TypeScript...). HTML Code:
// Java or C#. |
Encountered some issues with inheritance,
PHP Code:
PHP Code:
PHP Code:
I was going to try and do a var BaseTestObj : BaseClass = TestObj; but figured it wouldn't get me too far :) |
The class should extend something , try extends TStaticVar.
It will probably make it singleton but eh as long as you only use it once. But also GS1-3 not being a proper language, it doesn't act like proper languages. Oddly playing around, if you create the object, the class can extend it o.0 not the actual class though? PHP Code:
|
Quote:
PHP Code:
Taken from: http://wiki.graal.net/index.php/Crea...t3#as_operator It did resolve my query regarding referencing the base class..need to use 'as' operator :) |
Ahh nice :)
|
What's the point of extending if you still need to use the "as" expression? Seems rather retarded to me.
It would make sense if you used it in a foreach on an array of objects of different type. Like: "foreach (djur as Animal in this.Animals)" while this.Animals contains Dog, Cat, Parrot etc. I might just be misunderstanding something here, if so, disregard my post. |
Foreach, I did for(various item:class_type in array)
|
Quote:
As a workaround, the following code should work: PHP Code:
|
Quote:
Also welcome to the community for what time you will be staying. |
Quote:
|
He was onto me the other day, but then I lagged out
|
Are you guys hitting on each other o_O
|
Quote:
|
All times are GMT +2. The time now is 03:00 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.