When creating a Flexotask class using the 'Change->Create...' option in some cases an error message 'Invalid contents specified' appears, and the resulting class file does not implement the Flexotask interface methods as expected. The problem can be reproduced as follows:
1) select a timing grammar (i choose the stream grammar)
2) insert a flexotask and 'create' its implementation class (this will go well)
3) insert a new flexotask (but refrain from specifying the implementation class) and connect it to the one created in 2) -- the task from 2) being the source of the connection.
4) now, 'create' the implementation class of the task created in 3) and the error will appear
This happens because the incoming connection has not been assigned a data type. If a data type is assigned to the incoming connection before creating the implementation, the bug does not happen. The dilemma in fixing this is figuring out what is the right behavior. In fact, the first task also has an incorrect implementation because it was generated assuming the task has no connections and later one was added. We do not claim that the implementation will change in this case, but the user must understand the need to change it. Basically, my assumption originally is that the "Create" option would only be used after the rest of the graph was more or less specified (all of the connections and their types). Right now, there is no way to really know this and give the user good diagnostics (I agree he should get some diagnostics, not what happens now). There are some warning signs: (1) if a task has no connections at all, that is suspicious. The first task create operation might have done well to post a warning like "this task has no connections, do you really want to generate the implementation now, or specify the connections first?" (2) if a task has connections which have not been assigned data types, that is probably an error (the dialog should refuse to do a "Create" until this, at least, is corrected). The dialog box that has the "Create" button should also have maybe some tooltip text or something saying that this option is most useful if done after all the connections of the task have been created and given types.