Ninji
Newbie
Posts: 2
Joined: Tue Oct 04, 2016 7:53 pm

This type of CollectionView does not support changes (...)

Tue Oct 04, 2016 8:00 pm

I get an error that says "This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.. Do you wish to know more?". This is the stack trace that appears when I click on "Yes":

Image

After that, the program gets stuck in a window that says "Please wait... Loading SIML file : BIOS.siml..." (BIOS.siml is my siml file). This is the code It's trying to parse:

XML Code

<?xml version="1.0" encoding="utf-8"?>
<Siml>
  <Concept Type="public" Name="BIOS">
     <Model>
      <Pattern>
        <Item>HI</Item>
        <Item>HELLO</Item>
        <Item>GREETINGS</Item>
        <Item>YO</Item>
      </Pattern>
      <Repeat>
      	<Response>
	        	<If User="Repeat:Is-Partial">
	        		<Item>Hello again, <User Get="NAME" />.</Item>
	        	</If>
	        	<Random>
		          <Item>Hello there <User Get="NAME" />!</Item>
		          <Item>Hi there <User Get="NAME" />!</Item>
		          <Item>Hi!</Item>
		          <Item>Yo!</Item>
		          <Item>Sup!</Item>
				</Random>
	      </Response>
      </Repeat>
    </Model>
  </Concept>
</Siml>
This error happens when I try to save a siml file with said code, or when I try to load a project with a file with said code.

I'm using SYN BOT STUDIO 1.53 BETA.

JeffersonStack
Pro
Posts: 44
Joined: Fri Apr 05, 2013 1:20 am

Re: This type of CollectionView does not support changes (..

Tue Oct 04, 2016 9:40 pm

Repeat element cannot be used inside a Model as its Parent element is always an Siml element. So the entire SIML code fails.

The Repeat tag is used to check Repeated Model activation instead of repeated pattern activation. You can use a variable to keep track of pattern activation.

I tried to replicate what you've just done and it literally broke my Bot Studio :D

Fix your code by opening that SIML File in Notepad or something instead of Bot Studio. Replace your code with the following and restart Syn Bot Studio. ;)

SIML Code

<Siml xmlns:Think="http://syn.co.in/2014/siml#think">
  <Concept Name="BIOS">
    <Model>
      <Pattern>
        <Item>HI</Item>
        <Item>HELLO</Item>
        <Item>GREETINGS</Item>
        <Item>YO</Item>
      </Pattern>
      <Response>
        <If User="Greeted" IsEmpty="true">
          <Random>
            <Item>Hello there <User Get="NAME" />!</Item>
            <Item>Hi there <User Get="NAME" />!</Item>
            <Item>Hi!</Item>
            <Item>Yo!</Item>
            <Item>Sup!</Item>
          </Random>
          <User Think:Set="Greeted" Value="True" />
        </If>
        <Else>Hello again, <User Get="Name" /></Else>
      </Response>
    </Model>
  </Concept>
</Siml>

Ninji
Newbie
Posts: 2
Joined: Tue Oct 04, 2016 7:53 pm

Re: This type of CollectionView does not support changes (..

Wed Oct 05, 2016 3:20 am

Thanks for correcting my code. I assumed there was something wrong with it, since I'm still learning SIML. It's exactly the fact that the IDE breaks completely when there is an error what made me post this issue in the "Report Bugs" section, as the program gets stuck in the loading screen when this happens.

In fact I also got another error when copying your code, because I didn't copy the Siml tag (I just copied the model and pasted it into my concept), and the same thing happen. The IDE told me there was an error in the file because 'Think' was undeclared, I pressed "No", then the IDE got stuck in the loading message. Copying the code exactly as you have it doesn't give me any problems (And it works as intended).

It doesn't happen, however, when I forget to close a tag, or there is something wrong with a tag (It just displays the error, and that's it).

User avatar
Fantom
Help & Support
Posts: 304
Joined: Fri Oct 25, 2013 9:20 pm

Re: This type of CollectionView does not support changes (..

Wed Oct 05, 2016 4:40 am

Thanks for reporting this bug in Bot Studio. As the provided solution has worked for you, we will (in our next update) make sure Bot Studio can withstand invalid parsing exceptions raised by Syn Bot class library.

Return to “Report Bugs and Issues”

Who is online

Users browsing this forum: No registered users and 1 guest