malkuth Posted March 5, 2014 Share Posted March 5, 2014 Interesting with the drawable idea. Since your heading down this road anyway it seems, maybe a future custom pop up message window people can use to display an event... Link to comment Share on other sites More sharing options...
GraAingeal Posted March 5, 2014 Share Posted March 5, 2014 Hello, after installing the toolbar i get this message in the Debug Toolbar when im launching a rocket: [Exception]: NullReferenceExceptionAnd when im returning to my vessel from the tracking station i get this: KeyNotFoundException: The given key was not present in the dictionary.Is this bad? Link to comment Share on other sites More sharing options...
blizzy78 Posted March 5, 2014 Author Share Posted March 5, 2014 Hello, after installing the toolbar i get this message in the Debug Toolbar when im launching a rocket: [Exception]: NullReferenceExceptionAnd when im returning to my vessel from the tracking station i get this: KeyNotFoundException: The given key was not present in the dictionary.Need more information. Please find those exceptions in your output_log.txt, which has way more information, then post them with the complete stack trace here.As to if they're "bad": Even if they're caused by the Toolbar Plugin, they could be harmless. It's not easy to tell with too few information. Link to comment Share on other sites More sharing options...
GraAingeal Posted March 5, 2014 Share Posted March 5, 2014 NullReferenceException at (wrapper managed-to-native) UnityEngine.Component:InternalGetTransform () at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0 at SpaceCenterCamera2.UpdateTransformOverview () [0x00000] in <filename unknown>:0 at SpaceCenterCamera2.UpdateTransform () [0x00000] in <filename unknown>:0 at SpaceCenterCamera2.Update () [0x00000] in <filename unknown>:0 (Filename: Line: -1)__________________________________________________________________________________________________KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2[Vessel,MapObject].get_Item (.Vessel key) [0x00000] in <filename unknown>:0 at SpaceTracking.OnDestroy () [0x00000] in <filename unknown>:0 (Filename: Line: -1)Do you need more information? Link to comment Share on other sites More sharing options...
blizzy78 Posted March 5, 2014 Author Share Posted March 5, 2014 The stack traces do not mention the Toolbar Plugin directly, and it doesn't do anything with vessels or camera objects. So I think these are not caused by the plugin. Link to comment Share on other sites More sharing options...
GraAingeal Posted March 5, 2014 Share Posted March 5, 2014 Hmm, after removing the Toolbar Plugin the NullReferenceException is gone but the KeyNotFoundException is still happening.Can you tell me if they are bad? Link to comment Share on other sites More sharing options...
blizzy78 Posted March 5, 2014 Author Share Posted March 5, 2014 I'm afraid I can't. Link to comment Share on other sites More sharing options...
GraAingeal Posted March 5, 2014 Share Posted March 5, 2014 Ok, thanks anyway. Link to comment Share on other sites More sharing options...
Trueborn Posted March 6, 2014 Share Posted March 6, 2014 Ok, thanks anyway.It might be helpful if you include all the mods you have installed, or even better your entire output_log.txt. But if you did fully remove toolbar, it is probably caused by some other mod. Link to comment Share on other sites More sharing options...
GraAingeal Posted March 6, 2014 Share Posted March 6, 2014 It was a fresh install with no other mods than toolbar. In the meantime i tested with other mods too (every mod seperate) and some where causing the NullReferenceException and some not. But i always got the key KeyNotFoundException.I now think that the KeyNotFoundException is caused by KSP itself (I've tested without mods). It does not always appear but most of the time, thats why i first thought it was caused by toolbar.Now i tested again with toolbar and i dont get the NullReferenceException anymore but still the KeyNotFoundException. I dont know why.So i dont think toolbar is causing those messages. Link to comment Share on other sites More sharing options...
magico13 Posted March 9, 2014 Share Posted March 9, 2014 I'm trying to integrate Toolbar into my mod without a hard dependency (using the Toolbar Wrapper) but keep running into an error. It works great when I build against the .dll by the way, so thank you for that! I've changed the namespace to that of my mod and it compiles just fine, but whenever I try to actually load the game I keep getting this error:Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program\GameData\KerbalConstructionTime\Kerbal_Construction_Time.dll (this message is harmless)AssemblyLoader: Exception loading 'Kerbal_Construction_Time': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded. at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool) at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 Additional information about this exception: System.TypeLoadException: Could not load type 'Kerbal_Construction_Time.ToolbarManager' from assembly 'Kerbal_Construction_Time, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. System.TypeLoadException: Could not load type 'Kerbal_Construction_Time.GameScenesVisibility' from assembly 'Kerbal_Construction_Time, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.(Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)I'm sure it's something that I'm doing wrong, but I can't seem to figure it out.I've also got this in my main file to add the button:internal Kerbal_Construction_Time() { if (ToolbarManager.ToolbarAvailable) { Debug.Log("[KCT] Adding Toolbar Button"); KCT_GameStates.kctToolbarButton = ToolbarManager.Instance.add("Kerbal_Construction_Time", "MainButton"); KCT_GameStates.kctToolbarButton.TexturePath = KCT_Utilities.GetButtonTexture(); KCT_GameStates.kctToolbarButton.ToolTip = "Kerbal Construction Time"; KCT_GameStates.kctToolbarButton.OnClick += ((e) => { KCT_GUI.onClick(); }); } } public void OnDestroy() { if (KCT_GameStates.kctToolbarButton != null) { KCT_GameStates.kctToolbarButton.Destroy(); } }and in KCT_GameStates I have "public static IButton kctToolbarButton;"Thanks for your help! Let me know if I need to provide anything else. Link to comment Share on other sites More sharing options...
blizzy78 Posted March 9, 2014 Author Share Posted March 9, 2014 Did you set your target .NET version to 3.5? That's what KSP uses. Link to comment Share on other sites More sharing options...
magico13 Posted March 9, 2014 Share Posted March 9, 2014 Did you set your target .NET version to 3.5? That's what KSP uses.Well that was a remarkably easy fix... Thank you! Now it works perfectly fine! Link to comment Share on other sites More sharing options...
K3-Chris Posted March 9, 2014 Share Posted March 9, 2014 Why does all toolbar buttons default to hidden anyway? It's confusing and annoying to have to add each new mod's icon to the bar, they should be visible by default, most people will want to see them all or hide specific ones they don't want, not only show a few. Link to comment Share on other sites More sharing options...
softweir Posted March 9, 2014 Share Posted March 9, 2014 Given the number of buttons that some mods have (I'm looking at yooooou, MechJeb), the default of hiding all buttons may be better than revealing all.However, an even better idea might be to show all buttons but to have a Hide All facility. Link to comment Share on other sites More sharing options...
K3-Chris Posted March 9, 2014 Share Posted March 9, 2014 MJ has no buttons by default except the MJ menu one, you need to hit the small t on the window to add them as far as I know.I just put all of them in a folder with the MJ icon as the folder icon. Link to comment Share on other sites More sharing options...
blizzy78 Posted March 9, 2014 Author Share Posted March 9, 2014 MJ has no buttons by default except the MJ menu one, you need to hit the small t on the window to add them as far as I know.I have advised Sarbian to get rid of the little T because players can now choose themselves which buttons they want to see. Link to comment Share on other sites More sharing options...
K3-Chris Posted March 9, 2014 Share Posted March 9, 2014 What do you think about my suggestion to make buttons visible by default instead of hidden? I find it annoying, every time I install a mod that uses the toolbar I need to remember to show it's button to use it, just feels like it's less work hiding what you don't want than showing everything you want, seems a bit backwards currently. Link to comment Share on other sites More sharing options...
Roxette Posted March 15, 2014 Share Posted March 15, 2014 Current release 1.7.0 fails silently if there is no pre-existing toolbar-settings.dat file present. Link to comment Share on other sites More sharing options...
blizzy78 Posted March 15, 2014 Author Share Posted March 15, 2014 Current release 1.7.0 fails silently if there is no pre-existing toolbar-settings.dat file present.Works fine for me. Link to comment Share on other sites More sharing options...
Roxette Posted March 15, 2014 Share Posted March 15, 2014 Works fine for me.Apologies... more investigation revealed subtle difference in behaviour. IIRC, previous versions said hello and created the toolbar.dat all by themselves, this one does nothing unless and until another plugin requests it. i.e. if the only present plugins are built with it as an option rather than a hard dependency, until they are configured to use it, it does not create the file or show itself. Link to comment Share on other sites More sharing options...
smunisto Posted March 15, 2014 Share Posted March 15, 2014 I have a problem - Toolbar seems to have 2 instances running. https://www.dropbox.com/s/xc46vjp9btdrnul/Screenshot%202014-03-15%2022.24.37.pngI have tried searching my Game Data folder - there is just one toolbar.dll, and just one 000_Toolbar folder(aside from the secondary 000_Toolbar) in BoulderCo. Link to comment Share on other sites More sharing options...
BudgetHedgehog Posted March 15, 2014 Share Posted March 15, 2014 I have a problem - Toolbar seems to have 2 instances running. https://www.dropbox.com/s/xc46vjp9btdrnul/Screenshot%202014-03-15%2022.24.37.pngI have tried searching my Game Data folder - there is just one toolbar.dll, and just one 000_Toolbar folder(aside from the secondary 000_Toolbar) in BoulderCo.That's because you must've created another one somewhen. A couple if updates ago, blizzy made so you can have multiple ones. See the delete toolbar option in the dropdown? Click that. Link to comment Share on other sites More sharing options...
blizzy78 Posted March 16, 2014 Author Share Posted March 16, 2014 That's because you must've created another one somewhen. A couple if updates ago, blizzy made so you can have multiple ones. See the delete toolbar option in the dropdown? Click that.Yes, this. In your screenshot, the "Delete Toolbar" option is enabled. It will only ever be enabled if there is more than one toolbar (so that you cannot delete the last one.) Link to comment Share on other sites More sharing options...
blizzy78 Posted April 2, 2014 Author Share Posted April 2, 2014 Toolbar Plugin 1.7.1 is now available for download. Link to comment Share on other sites More sharing options...
Recommended Posts