I have no idea how to debug this
Posted: 28 May 2015, 06:34
Ok this is a weird issue, im not even sure i can explain it properly. I have this XAML...
I stripped lots of stuff out to try and debug my problem, but the nineslice image in the StatementNode template gives me an error, an error having nothing to do with nineslice images...
ASCII_Normal is a image i use for portraits, it works fine and frankly there isno longer any code int this xaml that should touch that resource. I'm at a complete loss for what is wrong here, it not making any sense whatsoever. If i remove the nineslice from the statement node template, no error. The nineslice in the startnode has no issue displaying correctly.
I present a StartNode and i see the nineslice and the button, i click the button to display the StatementNode and boom, error. An error that has no relation to the nineslice image.

Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:nodes="clr-namespace:FrozenWalrus.StoryManager.Nodes"
xmlns:local="clr-namespace:FrozenWalrus.MVVM"
xmlns:noesis="clr-namespace:Noesis.UserControls"
x:Name="StoryRoot">
<Grid.Resources>
<ResourceDictionary>
<!-- Start Node -->
<DataTemplate DataType="{x:Type nodes:StartNode}">
<Grid>
<noesis:NineSlice
Image="../../_Textures/GUI/ChatBubble2.png"
LeftSlice="15" RightSlice="30"
TopSlice="21" BottomSlice="15"/>
<Button Margin="50" Content="Start" Command="{Binding DataContext.GoToStoryNodeCommand, ElementName=StoryRoot}" CommandParameter="{Binding Next}" />
</Grid>
</DataTemplate>
<!-- Statement Node -->
<DataTemplate DataType="{x:Type nodes:StatementNode}">
<noesis:NineSlice Image="../../_Textures/GUI/ChatBubble2.png" LeftSlice="15" RightSlice="30" TopSlice="21" BottomSlice="15"/>
</DataTemplate>
</ResourceDictionary>
</Grid.Resources>
<Grid>
<ContentPresenter Content="{Binding CurrentNode}" />
</Grid>
</Grid>
Code: Select all
Exception: Resource ASCII_Normal not found
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:21)
Noesis.UIRenderer.Noesis_UpdateRenderer (Int32 rendererId, Double timeInSeconds) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:145)
Noesis.UIRenderer.Update (Double timeInSeconds, AntialiasingMode aaMode, TessellationMode tessMode, TessellationQuality tessQuality, RendererFlags flags, Boolean enableMouse, Boolean enableTouch, Boolean enablePostProcess, Boolean flipVertically) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:129)
NoesisGUIPanel.LateUpdate () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:203)
I present a StartNode and i see the nineslice and the button, i click the button to display the StatementNode and boom, error. An error that has no relation to the nineslice image.