Forum Replies Created
-
AuthorPosts
-
I think will be better to add this constructor to Color struct.
Looks like we can’t add constructors via extensions.
But you can add function:
Monkey1234567Struct Color ExtensionFunction Parse:Color( hex:String )Local color:Color' parse hexReturn colorEndEndand use it this way: Local color:=Color.Parse( "#FF5588" ).
Do you want to use sdl2 and gles20 directly?
But why? You can use mojo / mojox / mojo3d modules which do all ‘dirty’ work for you.
Improved keywords capitalizer.
Now, if you were typing chars and then jump to another text line – by mouse click or up / down / left / right keys – formatter will try to fix all words in line, not just word-under-cursor.
Also disabled autocompletion inside of commented blocks (rem / end). If it was useful for anybody – please let me know.
And version bumped to v2.7.
Also decided Ted2go wasn’t that bad even if author refuses to fix my issues with left right cursor keys.
Please, explain it (again?) or create issue on github.
For windows,
very simple solution is foreach drives labels from A to Z and check if GetFileType( label+":/" )=FileType.Directory.
I just uploaded new binaries v2.7a at https://nerobot.itch.io/ted2go
- Fixes in parser.
It’s an ‘alpha’, but it should be more stable than v2.6.
Is it possible to select any hdd drive?
And drag-n-drop files would be nice.
There was a bug in process reader which raised an app crash.
You can catch it working with huge files (about 2000+ lines).
Good news – it fixed now in dev branch!
Thanks to Mark Sibly for help fixing that.
PS. I found, that “Goto declaration” works better if you are using namespaces for your code.
For example, in PromptInvasion banana, if you try to go to Entity declaration, you will jump to mojo3d.graphics.Entity class. But if you specify “Namespace inv ; Using inv..” then you will jump to Entity class inside of invasion project.
In my understanding, there is no class Tuple, it will be hidden in c++ layer.
And we can only work with its named componets.
So there is no ToString() method, if it wouldn’t be implemented directly in c++.
More importantly: How to deserialise?
And how to serialize too.
Don’t know is it possible to reflect(-ion) tuples at all to make them serializable.
Can we use the syntax for generics: Local myt:Tuple<Int,Float,MyType,etc> ?
Yes, if you write own class realization.
But it’s not our case.
There are should be code like that for named tuples:
myTupple:<name:String, x:Int, y:Int, color:Color, factor:Float>
Ps: in swift tuples is value-typed (like structs in monkey2), so when you assign them you got new instance:
Monkey1234567var someScore = ("John", 55)var anotherScore = someScoreanotherScore.0 = "Robert"println(anotherScore.0) //Outputs: "Robert"println(someScore.0) //Outputs: "John"You said about different things.
We discuss here special keyword Params (or Varargs), which is used as an addition to array type.
It has the only purpose – allow to pass varying params count, but all of them with the same type.
Would work with typles as well because they are an usual type (if will be added
):
Monkey12345Function ArrayOf<T>:T[]( items:T[] Params )Return itemsEnd' with tupleLocal arr:=ArrayOf<(Int,String)>( (1,"one"),(2,"two") )Hmm, I feel like we should fuse this concept with the tuples so the type could vary from param to param.
Can you explain that concept?
For components you can declare function with base type Component and pass any derived types.
Very cool stuff !
Idea is to hide Params.Create under the hood to simplify code.
From what I guess (based on similar threads) Mark wants to avoid syntactic sugar additions (unless they are mostly essential)
I created thit topic to ask if anybody like it and have usecases, looking at this Mark can decide to implement that or not.
-
AuthorPosts