Notifications
Clear all

[Closed] Split windows problem

Hola,
Im making some changes in the way I use the mxs-editor, mainly adding a outliner and a treeview explorer / project manager. So far so good. I got the outliner working nicely and the explorer /project manager is easy to get done. So far it just a proof of concept so the code is a bit messy and the gui is fugly, but the main idea is there:

Bigger picture

Then I decided to try to implement a split view of the code windows, detaching a tab using setParent trough c# to a dotnetpanel. That doesn’t work so good, you can open and edit scripts in the panel, but the rest of the mxs-editor in the other panel stops working 100%. All the changes you make in the original panel is changed in the new panel (makes sense), and you cant see or edit scripts in the original panel.

Bigger picture

Is there a more elegant way of doing this? I’ve found this snippet, is it applicable? I.e can you edit the scintilla-editor?

6 Replies

That’s very cool I hope you can get this working

 JHN

This is something I’m very interested in, will you release it publicly?
Wish I could help you out, but I don’t understand how to implement the scintella control in a dotnet and also have the lexer working as well.
Great job so far!

-Johan

Hi, sorry for the late reply, been busy with school assignments lately. I got some time to work on this before my exams. If there is interest for it, I will of course make it public.
I’ve been thinking about some new features. One of them is adding an option for opening a new text panel with c#-syntax highlighting so you could write custom assemblies and compile them right in the editor.
If anyone want to help just send me an email : )

Bumping this : )
Still need some help with the split window issue.

Also,
managed to get the c#/vb editor to work:

Bigger picture
Compiling executables and assemblies is a breeze, but I want to have the ability to compile to memory, and I am trying to assign an instance of the compiled results to a global variable in max:


ManagedServices.MaxscriptSDK.ExecuteMaxscriptCommand("Global " + _MaxGlobalName + " = ::mXSExtendedForm.CompilerResults.CompiledAssembly.CreateInstance(" + identifier + ")");

This seems so cumbersome, assigning a max global variable in c# that looks up a dotnetobject’s variable. The idea is that you compile your code and uses the max global variable in your script to access the compiled results. Is there a more simpler way to do this?

Wow… that is very very cool

Thanks Matthew!

Disregard my last question. I found out that you don’t explicitly need to create an instance of the in memory compiled results . You could just refer to it directly in max, logically.
Informative illustration attached