![]() |
TGraalVar.toString
So it'd be possible to do something like this...
PHP Code:
It would probably make most sense if by default toString was: PHP Code:
Also, this would mean more compatibility with JavaScript. |
RogueShadow approves this message.
|
ya
|
Man I don't know just introduce type classes or something
|
Naturally, if we were to get toString there'd have to be toType for everything.
|
Let's keep it to stuff that may actually happen. (Provided the moons align.)
|
Wondering what you actually need this for?
|
For exactly what it is made for: providing a string alternative to an object.
obj.name can't be used in my case because the string would depend on certain properties of the object. The current alternative is making an entirely separate function, but that approach gets very messy. |
Meh, I've been thinking of making a class to extend some basic GScript stuff. Might not look all pretty but it would get the job done. It would have stuff like a destroy function that checks if the object has onDestroyed() defined or so. It could have a toString() thing too. Was also thinking of adding functions for packing and unpacking variables from objects for passing my reference, etc.
|
| All times are GMT +2. The time now is 03:42 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.