Forum Replies Created
-
AuthorPosts
-
New stuff in my repo – code parser for monkey2 files.
Parser is simple yet. What it can:
- Parse the first word after these keywords: “class”,”struct”,”enum”,”global”,”const”,”method”,”function”,”property”
- Parse recursively if file contains #import
- Check file last modified time before paring – to skip not modified files.
And all words from parser we can see in autocomplete list.
What todo:
- Improve parser – so it can know about scopes and all variable types (field, local, params, lambda – gradually)
- Check current scope for autocomplete
- Merge with latest monkey2 repo changes.
Even now, writing code has become much easier!
Attachments:
Works and looks fine on Windows.
deleted.
I just pushed new stuff – base auto completion support!
Now it shows keywords only, but easy to extend.
Next step 1 – write simple monkey2-parser, so we get smart completion.
Next step 2 – write code analyzer to check current scope and all variables (global, local, params), so we get pro-level ide
And between these steps – add CodeTreeView and Navigation panels (each cool ide must have).
Windows version of ted2go (dropbox)
Issue: cursor became invisible after some time. (Timer became broken? but why)
Hi. Here is an easy way to cancel progress dialogs.
In this case – for cancel building dialog.
Monkey123456App.KeyEventFilter += Lambda(event:KeyEvent)If event.Type = EventType.KeyDown And event.Key = Key.Escape_console.Terminate()event.Eat()EndifEndJust add this code into buildactions.mx2 / BuildActions class / BuildMx2 method.
Nice work, Adam
Thanks! Can you share this func?
I wrote Polygon.PointIn() func based on lines checking.
As Rect is partial case of Polygon I can use it, but want to see another solution – maybe there is more optimal solution for rotated rects.
(my func works with convex poly)
We not expected to convert string->bool like
Local b := “true” (1) or b := Bool(string) (2)
For this case other langs usually have Bool.Parse() func with different params.
However, for monkey case (2) also looks like good.
In mx2 it would be great to override To:String operator for Bool and return ‘true’/’false’.
But for IF’s str->bool conversions we expect use of rule “null or empty-string is false”.
I think – it’s good idea to continue develop inside of monkey2-fork (not separated ted2) to make merge from official easily.
And maybe Mark pull some of changes.:)
Oh.. so will use Int(boolVal) until better times.
Wow, it’s cool
What do you use to control overlapping items with mouse?
Pass correct parameters (1.0,2.5) is the best way! )
Another question: how to get type if I have only class name but not instance?
In java it’s ClassName.class keyword, but it’s a part of reflection.
What I d0:
Monkey123Method GetComponent<T>:T() Where T Extends ComponentReturn _componentsMap.Get( [T.typy] ) 'how to get type here?EndI think I can use an inner structure with stack like in ted2.Plugin class, but it’s kind of magic for me how it extract data with our template type only.
I solved it by adding method
Monkey1Method GetType:String()="typeName"into Object class and rebuilding module.
Now I get types like this:
Monkey12t_muApp_Transformt_default_Logicby simple call of myObj.GetType().
This is what I need!
Thanks for OnCreate().
Sort by priority can be useful. But all users want to use them plugins as primary and we’ll got ride of priority.
I vote for adding priority.
-
AuthorPosts
