Forum Replies Created
-
AuthorPosts
-
I think, properties X/Y are unnecessary in vec2, need to remove them.
IMO, If there is no logic in setter/getter then we should not use properties at all.
And how to control plugins collisions?
For documents – if I write my own plugin for catch .cpp files I see that it does’t work because of plaintext plugin which catch cpp too.
The same problem is facing if I want to write my own keys filter for keys which filters other plugin.
@degac, you can write your logic inside of
ted2 / monkey2document.monkey2 / Monkey2DocumentView / OnKeyEvent()
IMO, writing plugins for key processing isn’t usefull, because to use this plugins you must use PluginTextView, and so you will get working of all these keyfilters or nothing.
What should I do if I want to add support for cpp-coding and replace some filters, for example, replace monkey comments to cpp comments?
Thinking in this key, I plan to write base textview for all code langs (named CodeTextView). Inside this view I put specific key processing, codeformatter-plugin (capitalize and so on) – extendable for any langs, highlighter-plugin and keywords-plugin. These plugins will rely on the file type.
This interface:
Monkey1234Interface IDependsOnFileTypeMethod GetFileTypes:String[]()Method GetMainFileType:String()Endhelps us to check plugin for suitability for opened file.
Also using of plugins has some limitations – if you need to get data from file while initialize plugin – inside of method New() – you get “Memory access violation” error.
(in my case – I need to read keywords from json)
Anyway, plugin system is great!
(I’ll post my version when complete it)
So,
1.
Local point:=TransformPointToView( event.Location,Null )
and event.Location is the same position.
Also, this position is relative to view which mouse is over.
2.
dropView := FindViewAtWindowPoint(point) – isn’t null, but I don’t know what is it. I press mouse on TreeView, then get that^ dropView and check it via
Monkey123Local tree := Cast<TreeView>(dropView)Print "is tree: "+String(tree<>Null)' output> is tree: 0 <-- WHY?Probably, FindViewAtWindowPoint expecting of global position but we put local. Don’t know how to make it global.
3.
event.View property – not null but not my TreeView. when it assigning?
4.
When I drag mouse to TextField and up it – don’t see MouseUp event inside TextField.
5.
MouseEnter / MouseLeave – doesn’t works.
The one way is to open Task Manager on Windows to see increasing memory.
I tried it, and dropView isn’t null, but how to check type of this view to debug? and type of any variable?
If I up mouse at TextVew and check it with
Monkey1Local tv := Cast<TextView>(droppedView)then ‘tv’ is null.
And what about App.MouseView property?
UPD: I can’t catch MouseUp for MainWindow because event was eaten by some child.
Thanks for App.MouseEventFilter += OnMouseEventFilter.
I want to write just
Print “b: “+b
The Timer class is what I’m looking for, thanks!
Hi, Adam. Greate work!
You modified base mojox classes to bring functionality. Is it good idea? Why don’t extend them?
For example, use own
Monkey1class CodeTextDocument extends TextDocumentand put CodeTreeView inside it.
Base TextDocument need to be extended for common text operation only, not for code processing.
-
AuthorPosts