New editor version for testing

Started by tzachs, Sun 08/07/2012 22:43:48

Previous topic - Next topic

RickJ

tzachs: found a couple of apparent bugs ..

1. No default templates n your distribution so can't create a new game.  Perhaps at least provide a blank template.

2. Loading a game from a previous AGS version (3.2.0), editor doesn't detect, inform, or perform upgrade. 

3. When  testing the game from the editor, in a windowed mode, the screen flashes black (more than once) before going back to normal and running the game.

4. Running the compiled version (i.e. the exe) gives an error complaining about font-0.
   (Isn't there anything anyone can do about not being able to clip the error messages out of the message box?)

tzachs

Quote from: RickJ on Sat 14/07/2012 20:50:07
2. Loading a game from a previous AGS version (3.2.0), editor doesn't detect, inform, or perform upgrade. 
I'll add an information message when loading the game.

Quote from: RickJ on Sat 14/07/2012 20:50:07
3. When  testing the game from the editor, in a windowed mode, the screen flashes black (more than once) before going back to normal and running the game.
Hmm, that doesn't happen to me, I can't think of anything that I've done that can cause that.
Maybe it's related to #4.

Quote from: RickJ on Sat 14/07/2012 20:50:07
4. Running the compiled version (i.e. the exe) gives an error complaining about font-0.
   (Isn't there anything anyone can do about not being able to clip the error messages out of the message box?)
Also doesn't happen to me, can you provide a screenshot with the error message?

Crimson Wizard

Quote from: RickJ on Sat 14/07/2012 20:50:07
(Isn't there anything anyone can do about not being able to clip the error messages out of the message box?)
You actually can do that, just press Ctrl+C when the error window has focus.
Unless there's some error with error window ;)

RickJ

Quote from: tzachs on Sat 14/07/2012 21:26:10
Quote from: RickJ on Sat 14/07/2012 20:50:07
3. When  testing the game from the editor, in a windowed mode, the screen flashes black (more than once) before going back to normal and running the game.
Hmm, that doesn't happen to me, I can't think of anything that I've done that can cause that.
Maybe it's related to #4.
I just checked, it also happens using AGS3.2.1.  I didn't remember this happening before either.  But I am running on Win7-Dell-x64 now?  Any ideas?

Quote from: tzachs on Sat 14/07/2012 21:26:10
Quote from: RickJ on Sat 14/07/2012 20:50:07
4. Running the compiled version (i.e. the exe) gives an error complaining about font-0.
   (Isn't there anything anyone can do about not being able to clip the error messages out of the message box?)
Also doesn't happen to me, can you provide a screenshot with the error message?
Turns out I copied the exe out of the _Debug folder to the compiled folder to get this error.  If I turnoff debug mode and rebuild AGS puts the proper exe in the compiled folder and it works as it should.  Sorry for the false alarm.

Crimson Wizard

Does that flickering happen when you use DirectDraw5 renderer or Direct3D 9? I had certain troubles with DD5 on Windows 7, including graphic corruption in some games.

RickJ

@CW:  That was it!  Changed from DD5 to D3D9 and all works perfectly now.  Thank you so much...

RickJ

Found a couple of things you may want to look at.  They are probably not due to your changes but anyway  ...

1.  Add object to a room.  Double click blue cup to get sprite dialog.  Use sprite dialog to add a sprite folder (yeah I know WTF do that?). Folder gets added but now go to Sprite manager it's not there.  Go back to the add sprite dialog and it is there. 

2.  Add a room and then delete it.  Add another room and sometimes get a crash; other times get message "room4.crm already exists, overwrite?", click yes and all is well     

tzachs

Quote from: RickJ on Mon 16/07/2012 01:44:51
2.  Add a room and then delete it.  Add another room and sometimes get a crash; other times get message "room4.crm already exists, overwrite?", click yes and all is well     
It is probably due to something I did, but I can't reproduce it.
I suspect that the "room already exists" message is because the crash you had before happened before AGS deleted the file, so if you can provide a screenshot of the crash error message (or more details on the crash), it would be appreciated.

I fixed the other bug, will release a new version once we figure out this bug..

Crimson Wizard

#28
I somehow made the Project Explorer disappear and never appear again.
When I opened the Editor it said something about corrupted tree in the XML document. Unfortunately I did not save the message because I thought was related to game project, and that project was saved by different version of editor (the one that I compiled). Minutes later I realized that something is not right, but it was too late.
Anyway, when I opened the editor next time, it worked normally except one thing - there was no Project Explorer and it won't display even though it was enabled in Windows menu (I tried unchecking/rechecking menu item and restarting editor several times).
Guided rather by intuition I deleted the Layout.xml and editor returned to default. :/


//-------------------------------
EDIT:
Regarding RickJ's bug report. I could reproduce that:
1. Create a new room.
2. IMPORTANT: open new room's script.
3. Do not edit anything. Close room's script.
4. Delete room.
5. Create room with the same number again. Editor will say:
Quote
The file 'room3.asc' has been modified externally. Do you want to reload it?
Say "Yes".
6. Crash:

Quote
Error: Ð"осÑ,уп к ликвидированному объекÑ,у невозможен.
Имя объекÑ,а: "ScintillaControl".
Version: AGS 3.2.2.112

System.ObjectDisposedException: Ð"осÑ,уп к ликвидированному объекÑ,у невозможен.
Имя объекÑ,а: "ScintillaControl".
   Ð² System.Windows.Forms.Control.CreateHandle()
   Ð² System.Windows.Forms.Control.get_Handle()
   Ð² Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg, IntPtr wParam, IntPtr lParam)
   Ð² Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg)
   Ð² Scintilla.ScintillaControl.get_IsReadOnly()
   Ð² AGS.Editor.ScintillaWrapper.SetText(String newText, Boolean clearModified)
   Ð² AGS.Editor.ScintillaWrapper.SetText(String newText)
   Ð² AGS.Editor.ScriptEditor.PromptUserThatFileHasChangedExternally()
   Ð² AGS.Editor.ScriptEditor.Events_FileChangedInGameFolder(String fileName)
   Ð² AGS.Editor.EditorEvents.FileChangedInGameFolderHandler.Invoke(String fileName)
   Ð² AGS.Editor.EditorEvents.OnFileChangedInGameFolder(String fileName)
   Ð² AGS.Editor.AGSEditor._fileWatcher_Changed(Object sender, FileSystemEventArgs e)
   Ð² System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e)
   Ð² System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
   Ð² System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   Ð² System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

(Sorry for cyrillics, but I am not going to translate that ;))

SpeechCenter

Great additions!

However, I tried loading my plugin with it and it doesn't work so your changes break backwards compatibility.

Certainly part of the problem is changing EditorContentPanel base class, it's now not UserControl and obviously plugins depend on it (since they also implement panels that derive from it). Some of the base methods don't exist now and this will require some code changes to keep the plugins compatible (I know my plugin will).

Are there any other changes that break backwards compatibility? While it's fixable, the main problem this will create is the requirement to maintain a different version of the plugins for different AGS versions. It may make sense in a major release (version 4), but not when we talk about 3.2.1 vs. 3.2.2.
So I think it's important to make sure only new methods are added and not change plugin exposed base classes or existing available methods.

Besides the technical difficulty this creates, why do we really need the document windows to be dockable? I understand why the other Windows should be, but why all the ones showing content? Note that if the goal is to mimic VS then the content Windows do not dock the same way as the other Windows. So if we really think it's needed, I'd go the same direction Microsoft did.


SpeechCenter

I ran ApiChange on AGS.Types.dll and these are the problems I see:
Changes that will definitely break backwards compatibility

  • ContentDocument 2 constructors now have an additional parameter. Need instead to keep existing constructors and add new ones, plugins will almost always create such a class.
  • EditorContentPanel change base class. As I mentioned in previous message this is a major problem. I believe it should still derive from UserControl and if we want to add docking functionality to documents, the editor should use another class that contains the EditorContentPanel which implements the docking. Also note that the dll you used is MIT licensed, which is fine, but requires copyright notice. It's better to have only the editor depend on it and not AGS.Types so it will be easier to include AGS.Types with plugins and also it sounds to me like a better design to refrain from adding specific editor GUI elements to this DLL

Changes that may break backwards compatibility

  • Removal of RoomList - I'm not sure this is really in use since it doesn't really have a lot of functionality, but if plugins do use it they'll break
  • Change BaseListSelectTypeConverter<T> to BaseListSelectTypeConverter - this affects this type and several derived types. Again, I understand why the change but if any plugin does anything related to this class or derived classes then it may break
  • BaseFolderCollection - change in generic parameter names to something more descriptive, maybe it will be ok (didn't test), but it is possible it breaks compatibility, needs to be tested with a plugin that uses this class
  • IToXml - use in Character, GUI, Script, InventoryItem, UnloadedRoom - I really don't know if keeping the method name but just changing it to be from an interface breaks anything (didn't test) and it's possible a plugin really has to call this method which is rare. Still worth verifying

So in short, I think the first 2 items are definitely a priority to fix before merging and the rest should be tested
Here are the full results of the run.
QuoteAGS.Types.dll has 76 changes
   Removed 2 public type/s
      - public class AGS.Types.BaseListSelectTypeConverter<T>
      - public class AGS.Types.RoomList
   Added 11 public type/s
      + public class AGS.Types.BaseListSelectTypeConverter
      + public class AGS.Types.DialogFolder
      + public class AGS.Types.CharacterFolder
      + public interface AGS.Types.ISourceControlProvider
      + public class AGS.Types.UnloadedRoomFolder
      + public class AGS.Types.GUIFolder
      + public class AGS.Types.ScriptFolder
      + public class AGS.Types.InventoryItemFolder
      + public class AGS.Types.DockData
      + public class AGS.Types.ScriptAndHeader
      + public interface AGS.Types.IGlobalVariablesController
   public class AGS.Types.UnloadedRoom
      + interface: AGS.Types.IToXml
      + interface: System.IComparable
      + public virtual void ToXml(XmlTextWriter writer)
      + public virtual int CompareTo(Object other)
      - public void ToXml(XmlTextWriter writer)
   public class AGS.Types.FontTypeConverter
      Base type changed: AGS.Types.BaseListSelectTypeConverter`1<AGS.Types.Font> -> AGS.Types.BaseListSelectTypeConverter
   public class AGS.Types.BaseFolderCollection<T,U>
      + protected List<TFolder> _subFolders
      + protected List<TFolderItem> _items
      - protected List<U> _subFolders
      - protected List<T> _items
      + public TFolder CreateChildFolder(String name)
      + public virtual IList<TFolder> get_SubFolders()
      + public IList<TFolderItem> get_Items()
      + public IEnumerable<TFolderItem> get_AllItemsFlat()
      + public void Clear()
      + public bool MoveFolderUp(TFolder folder)
      + public bool MoveFolderDown(TFolder folder)
      + public int GetAllItemsCount()
      + public void Sort(Boolean recursive)
      + public void RunActionOnAllFolderItems(Action<TFolderItem> action)
      + public void .ctor(XmlNode node,XmlNode parentNodeForBackwardsCompatability)
      + protected TFolder CreateFolder(XmlNode node)
      + protected TFolderItem CreateItem(XmlNode node)
      + protected virtual string get_RootNodeName()
      + protected virtual void FromXmlBackwardsCompatability(XmlNode parentNodeForBackwardsCompatability)
      + protected void Init(String name)
      + protected TFolderItem FindItem(EqualsDelegate<TFolderItem,TFolder,TId> isItem,TId id,Boolean recursive)
      - public virtual IList<U> get_SubFolders()
      - public IList<T> get_Items()
      - protected U CreateFolder(XmlNode node)
      - protected T CreateItem(XmlNode node)
   public class AGS.Types.ViewFolder
      + public virtual AGS.Types.ViewFolder CreateChildFolder(String name)
   public class AGS.Types.EditorContentPanel
      Base type changed: System.Windows.Forms.UserControl -> WeifenLuo.WinFormsUI.Docking.DockContent
      + protected virtual void OnClosing(CancelEventArgs e)
   public class AGS.Types.AudioClipTypeConverter
      Base type changed: AGS.Types.BaseListSelectTypeConverter`1<AGS.Types.AudioClip> -> AGS.Types.BaseListSelectTypeConverter
   public interface AGS.Types.IAGSEditor
      + public void set_SourceControlProvider(ISourceControlProvider value)
   public class AGS.Types.Character
      + interface: AGS.Types.IToXml
      + public virtual void ToXml(XmlTextWriter writer)
      - public void ToXml(XmlTextWriter writer)
   public class AGS.Types.GUI
      + interface: AGS.Types.IToXml
   public class AGS.Types.AudioClipTypeTypeConverter
      Base type changed: AGS.Types.BaseListSelectTypeConverter`1<AGS.Types.AudioClipType> -> AGS.Types.BaseListSelectTypeConverter
   public class AGS.Types.Script
      + interface: AGS.Types.IToXml
      + public virtual void ToXml(XmlTextWriter writer)
      - public void ToXml(XmlTextWriter writer)
   public class AGS.Types.InventoryItem
      + interface: AGS.Types.IToXml
      + public virtual void ToXml(XmlTextWriter writer)
      - public void ToXml(XmlTextWriter writer)
   public class AGS.Types.RoomListTypeConverter
      Base type changed: AGS.Types.BaseListSelectTypeConverter`1<AGS.Types.Font> -> AGS.Types.BaseListSelectTypeConverter
   public class AGS.Types.ContentDocument
      + public AGS.Types.DockData get_PreferredDockData()
      + public void set_PreferredDockData(DockData value)
      + public string get_TreeNodeID()
      + public void set_TreeNodeID(String value)
      + public string get_IconKey()
      + public void set_IconKey(String value)
      + public void .ctor(EditorContentPanel control,String name,IEditorComponent owner,String iconKey)
      + public void .ctor(EditorContentPanel control,String name,IEditorComponent owner,String iconKey,Dictionary<string,object> propertyGridObjectList)
      - public void .ctor(EditorContentPanel control,String name,IEditorComponent owner)
      - public void .ctor(EditorContentPanel control,String name,IEditorComponent owner,Dictionary<string,object> propertyGridObjectList)
   public class AGS.Types.Dialog
      + interface: AGS.Types.IToXml
      + public virtual void ToXml(XmlTextWriter writer)
      - public void ToXml(XmlTextWriter writer)
   public class AGS.Types.AudioClipFolder
      + public virtual AGS.Types.AudioClipFolder CreateChildFolder(String name)
   public class AGS.Types.Game
      + public AGS.Types.CharacterFolder get_RootCharacterFolder()
      + public AGS.Types.DialogFolder get_RootDialogFolder()
      + public AGS.Types.ScriptFolder get_RootScriptFolder()
      + public AGS.Types.InventoryItemFolder get_RootInventoryItemFolder()
      + public AGS.Types.GUIFolder get_RootGUIFolder()
      + public AGS.Types.UnloadedRoomFolder get_RootRoomFolder()
From 1 assemblies were 2 types removed and 17 changed.

Monsieur OUXX

Would it be possible to base this Editor branch on Alan Drake's one (the one that has programming facilitators, such as code collapsing, etc.).
That would be pretty much the ultimate edition.

Also, can you say if it's possible to revert a project saved in that version to a "regular" AGS? What become of the script/resources folders for example?
 

dbuske

What if your blessings come through raindrops
What if your healing comes through tears...

tzachs

A new version is up (in the first post) with lots of fixes.
There were a lot of changes, so I wouldn't be surprised if there are more bugs, please help me find them!

Quote from: RickJ on Sat 14/07/2012 20:50:07
1. No default templates n your distribution so can't create a new game.  Perhaps at least provide a blank template.
2. Loading a game from a previous AGS version (3.2.0), editor doesn't detect, inform, or perform upgrade. 
Fixed!

Quote from: RickJ on Mon 16/07/2012 01:44:51
1.  Add object to a room.  Double click blue cup to get sprite dialog.  Use sprite dialog to add a sprite folder (yeah I know WTF do that?). Folder gets added but now go to Sprite manager it's not there.  Go back to the add sprite dialog and it is there. 
Fixed!

Quote from: Crimson Wizard on Mon 16/07/2012 21:05:30
I somehow made the Project Explorer disappear and never appear again.
Fixed!
Well, sort of. I couldn't reproduce the corrupted tree error message, but I did find a scenario where you can vanish a window. Basically if you exit AGS when the window was floating, the Docking Suite apparently doesn't save/load it correctly, and then it doesn't get shown.
The fix is to see when it doesn't get shown and open it as a floating document. It's not perfect, it still won't load the floating documents exactly as you closed them, though.

Quote from: Crimson Wizard on Mon 16/07/2012 21:05:30
Regarding RickJ's bug report. I could reproduce that:
Fixed!
Great job on the exact reproduction scenario, that really really helped.


Quote from: SpeechCenter on Tue 17/07/2012 18:15:38
I ran ApiChange on AGS.Types.dll and these are the problems I see:
Ooooh, great tool!
I actually wasn't aware at all about breaking plugins, I falsely assumed that only interfaces are exposed and that I'm safe as long as I don't touch them.

Quote from: SpeechCenter on Tue 17/07/2012 18:15:38
Changes that will definitely break backwards compatibility

  • ContentDocument 2 constructors now have an additional parameter. Need instead to keep existing constructors and add new ones, plugins will almost always create such a class.
  • EditorContentPanel change base class. As I mentioned in previous message this is a major problem. I believe it should still derive from UserControl and if we want to add docking functionality to documents, the editor should use another class that contains the EditorContentPanel which implements the docking. Also note that the dll you used is MIT licensed, which is fine, but requires copyright notice. It's better to have only the editor depend on it and not AGS.Types so it will be easier to include AGS.Types with plugins and also it sounds to me like a better design to refrain from adding specific editor GUI elements to this DLL
Fixed!
The Types dll doesn't know about the docking suite and uses new interfaces, EditorContentPanel is a user control again, and ContentDocument has the 2 constructors back.
Can you please check your plugin with the new version and see that it works?
Thanks.

Quote from: SpeechCenter on Tue 17/07/2012 18:15:38
Changes that may break backwards compatibility

  • Removal of RoomList - I'm not sure this is really in use since it doesn't really have a lot of functionality, but if plugins do use it they'll break
  • Change BaseListSelectTypeConverter<T> to BaseListSelectTypeConverter - this affects this type and several derived types. Again, I understand why the change but if any plugin does anything related to this class or derived classes then it may break
  • BaseFolderCollection - change in generic parameter names to something more descriptive, maybe it will be ok (didn't test), but it is possible it breaks compatibility, needs to be tested with a plugin that uses this class
  • IToXml - use in Character, GUI, Script, InventoryItem, UnloadedRoom - I really don't know if keeping the method name but just changing it to be from an interface breaks anything (didn't test) and it's possible a plugin really has to call this method which is rare. Still worth verifying
I'm hoping we're safe here, but I'll do a plugin marathon when I get some more free time to make sure.

Quote from: SpeechCenter on Mon 16/07/2012 21:31:15
Besides the technical difficulty this creates, why do we really need the document windows to be dockable? I understand why the other Windows should be, but why all the ones showing content? Note that if the goal is to mimic VS then the content Windows do not dock the same way as the other Windows. So if we really think it's needed, I'd go the same direction Microsoft did.
Actually that's a feature I miss in Visual Studio when I want to do a delicate refactoring job that requires moving code between classes...
Also, in AGS it's a very common scenario (at least for me) to be switching back and forth from the room designer to the script in order to write down locations, or from the sprites to the script to get the sprite numbers.

Quote from: Monsieur OUXX on Wed 18/07/2012 09:27:44
Would it be possible to base this Editor branch on Alan Drake's one (the one that has programming facilitators, such as code collapsing, etc.).
That would be pretty much the ultimate edition.
I definitely hope we'll get there. Call me naive (and CW will probably yell at me for saying this  ;) ), but I'm still waiting for CJ giving permissions to people and Alan among them...

Quote from: Monsieur OUXX on Wed 18/07/2012 09:27:44
Also, can you say if it's possible to revert a project saved in that version to a "regular" AGS? What become of the script/resources folders for example?
It's possible with some manual work.
The new xml format simply has <CharacterFolder> / <ScriptFolder> / etc around the various items to indicate which items belong to which folder.
By removing the folder elements from the xml you can get it back to a flat folder-less state like the 'regular' AGS knows how to deal with.

Quote from: dbuske on Wed 18/07/2012 13:55:26
The download link is down.
Tested the new link, should be fine now.

BigMc

Quote from: tzachs on Wed 18/07/2012 22:12:03
Quote from: Monsieur OUXX on Wed 18/07/2012 09:27:44
Would it be possible to base this Editor branch on Alan Drake's one (the one that has programming facilitators, such as code collapsing, etc.).
That would be pretty much the ultimate edition.
I definitely hope we'll get there. Call me naive (and CW will probably yell at me for saying this  ;) ), but I'm still waiting for CJ giving permissions to people and Alan among them...

Why don't you join the other developers on github? Alan is already there. As long as you agree that you both did good changes there really shouldn't be a problem.

Crimson Wizard

#35
Quote from: tzachs on Wed 18/07/2012 22:12:03
Call me naive (and CW will probably yell at me for saying this  ;) ), but I'm still waiting for CJ giving permissions to people and Alan among them...
I won't yell. My intent was to push you towards releasing public beta, but that's what you just did.
I do believe there should be a message by CJ made in public, since it's kinda weird that he told he is not going to participate in development further only in PM.
(Well, I believe Calin knows about that too - he did mention that when we spoke few months ago).
On other hand, people change their plans all the time. Maybe he will reappear after a while to take the AGS back...

By the way, regarding Alan's Editor changes. How much work it would be to allow Editor users select a colour scheme? Personally I like the darker colours more (much better for my eyes) but that does not mean everyone will appreciate hard-coded scheme.

SpeechCenter

Hey tzachs,

Great refactoring job, I managed to load the plugin and it loads without a problem.

I encountered a problem when closing a plugin window and trying to reopen it. The way it used to work was that AGS would not dispose the window when closing the document, essentially giving the plugin the choice of whether to destroy the window or just hide it. This allowed me to easily keep the GUI content the same (filter, scroll location, etc). Now I get this error so it seems the ContentDocument is disposed. Should I change anything or can you keep 3.2.1 behavior here too? This is the exception I get.

QuoteError: Cannot access a disposed object.
Object name: 'DockingContainer'.
Version: AGS 3.2.2.112

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'DockingContainer'.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Form.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel(DockPanel value)
   at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Show(DockPanel dockPanel, DockState dockState)
   at WeifenLuo.WinFormsUI.Docking.DockContent.Show(DockPanel dockPanel, DockState dockState)
   at AGS.Editor.DockingContainer.Show(IDockingPanel panel, DockData dockData)
   at AGS.Editor.TabbedDocumentManager.SetActiveDocument(ContentDocument pane, Boolean updatePaneOrder)
   at AGS.Editor.frmMain.AddOrShowPane(ContentDocument pane)
   at AGS.Editor.GUIController.AddOrShowPane(ContentDocument pane)
   at AGS.Plugin.SpeechCenter.SpeechCenterComponent.AGS.Types.IEditorComponent.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

After trying to restart I get an error that prevents from loading the editor:
System.InvalidOperationException: Invalid Content: ActiveContent must be one of the visible contents, or null if there is no visible content
(this is from Loadlayout while reading xml and exception is in DockPane.set_ActiveContent)

Something else which is odd when I keep the windows open, sometimes when I double click the plugin icon (while its pane is open, but another one is currently displayed) it doesn't focus on its pane. It's not simple to reproduce, I need to open many other documents and switch between them to make this happen. I didn't debug it to see if the plugin is called, but what I do is call IAGSEditor.GUIController.AddOrShowPane with the existing content document in IEditorComponent.CommandClick for the root node id, so maybe the event is not called or AddOrShowPane changed.

Since I played with the editor a little, here are a few notes:

  • Some Windows: output, find results and call stack have an 'x' to close that pane info (was there before the change), but the docking window already has this, so I don't think it's needed, the whole gray band can be removed and provide more screen real-estate
  • I would try to make the docking tool window header (Explorer Window, Properties, Output, etc) maybe 1-2 pixels smaller in height, the header is usually less important, but currently it's the same size as any other GUI element
  • Scripts - It's a good idea to group the script and header. I think it's better to have the script open when double clicking the parent (and then not expand when double clicking). In the majority of the cases developers would like to edit the script and could expand to edit the header now there's an extra step to reach it.
  • I think it's better to have the output window default layout docked at the bottom of the content documents and not the main window to allow the properties and project tree more space. Anyway, if you move that output docking window it's very difficult (maybe impossible) to return it to dock at the full width of the main window so it makes sense even from that aspect to change the default

tzachs

#37
New version in the first post.

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
I encountered a problem when closing a plugin window and trying to reopen it.
Fixed.

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
After trying to restart I get an error that prevents from loading the editor:
Fixed (I think).

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
Something else which is odd when I keep the windows open, sometimes when I double click the plugin icon (while its pane is open, but another one is currently displayed) it doesn't focus on its pane.
Fixed (I think).

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
Some Windows: output, find results and call stack have an 'x' to close that pane info (was there before the change), but the docking window already has this, so I don't think it's needed, the whole gray band can be removed and provide more screen real-estate
Removed the extra header. For some reason when you start it, there's still an empty line there, but once you dock it out and in again it goes away.
I have no idea why, might be a bug in the docking suite.

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
I would try to make the docking tool window header (Explorer Window, Properties, Output, etc) maybe 1-2 pixels smaller in height, the header is usually less important, but currently it's the same size as any other GUI element
I didn't find a way to achieve that. I can change the font but the height remains the same, so I didn't see the point and also it was harder to read the title.

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
Scripts - It's a good idea to group the script and header. I think it's better to have the script open when double clicking the parent (and then not expand when double clicking). In the majority of the cases developers would like to edit the script and could expand to edit the header now there's an extra step to reach it.
I didn't find a simple way to do this. I could open up the editor but not avoid the expand. The problem is that the OnBeforeExpand event is triggered before the double click event and doesn't have a distinction between an expand caused by a double click and a regualr expand. So it's either going with windows messages (and I don't want to go there due to Mono compatability issues) or using timing calculations, or detecting the click location and deducting if the + was clicked or not, all of those are messy hacks and I didn't think the feature was important enough to justify it.

Quote from: SpeechCenter on Thu 19/07/2012 03:36:48
I think it's better to have the output window default layout docked at the bottom of the content documents and not the main window to allow the properties and project tree more space.
I've attached a default layout.xml which does that.
I didn't find a way to do this programatically, though (well, I guess I could by saving the layout file as a resource and using it as a default, but again, messy), so if you delete the file it will be as it was.

Quote from: BigMc on Wed 18/07/2012 22:25:41
Why don't you join the other developers on github? Alan is already there. As long as you agree that you both did good changes there really shouldn't be a problem.
I might do that for the next set of changes.
But for now I'll go with CW's plan.

Quote from: Crimson Wizard on Wed 18/07/2012 22:27:45
By the way, regarding Alan's Editor changes. How much work it would be to allow Editor users select a colour scheme? Personally I like the darker colours more (much better for my eyes) but that does not mean everyone will appreciate hard-coded scheme.
If we want to do it properly, I think it will take some work.
I'll open up an issue for the editor with my suggestion, so we can discuss it further over there.
Edit: Issue is here.

Crimson Wizard

There's something I wanted to have for a long time (unless already implemented): a keyboard shortcut to switch between script header and source. Is there one? If not may that be added?

RickJ

tzachs:  I have been experimenting with docking to see two files side by side (.asc and .ash for example).  It's really nice to be able to do that but I can only get one file in the second editor pane.  Would you consider adding a feature to your version that would allow two multi-tab editor panes.  That would be a great feature to have, IMHO.

SMF spam blocked by CleanTalk