The script I have works for previous versions of DOORS, but breaks for DOORS 9.5. Specifically when I'm trying to create a new module by using:
create(string name, string desc, int mapping [,bool display])
This is the error I'm receiving:
create module failed: No access to create item
I believe you are missing a variable in there,
create(string name, string desc, string prefix, int absno [,bool display])
I am using 9.3.0.5 but I think it's the same for 9.5. Also I would double check that you have write access to the folder you are in and that you are not using the name of a module that already exists (deleted modules count). Try F5 to refresh and make sure one didn't get created already.
When I run the following code in DOORS v9.5,
Module lnkmod = create("Link Module", "This is a link module.", manyToMany, true)
it works and I get a new link module. Your error points to an access rights problem, as Steve suggested.
Related
In validator I would like to get uri of all model files.
I can get name only of current file (e.g myDsl1.mydsl) but I would like to get uri of other files too (e.g myDsl2.mydsl, myDsl3.mydsl).
Can this be done in validator or I should create new classes/methods for seeing this files?
You can access the Xtext index IResourceDescriptions via IResourceDescriptionsProvider. You can ask IResourceDescriptions for getAllResourceDescriptions which you may have to filter for project.
to use std visibility meachinsm check out IContainer.Manager with getVisibleContainers/getContainer and IContainer.getResourceDescriptions´. Check out DefaultGlobalScopeProvider` for sample usage.
I have class Match that has a list of other classes of type Team. Upload of new document (Match) to Firestore is only possible if the list is empty. Once there is Team item in the list, attempt to add it to Firestore throws 'Invalid argument: Instance of 'Team''. Team class only contains simple fields, no other classes.
Exception is thrown from StandardMessageCodec.writeValue
Update:
I am using cloud_firestore: ^0.8.2, and calling
await firestore.collection('matches').document(match.id).setData(match);
since there is no other method that would allow for upload other than setData (accepting Map), I have tried for match.teams (List):
'teams' : teams (List)
'teams' : encode to json completely (String)
'teams' : encode individual Team items and add to collection (List)
1st option will fail, second will create a single string document member and third will create an array of strings inside member, none of which is what I want - create an array of team objects inside document
To Completely solve the above problem, follow the following steps:
Steps:
Use json_serializable plugin (link: https://pub.dev/packages/json_serializable)
At the following class level json_serializable annotation to your Match class (note the options)
part 'match.g.dart'; //actual file will be automatically generated
#JsonSerializable(anyMap: true, explicitToJson: true)
Do the same(in 2 above) for your Team class(you can ignore the option: explicitToJson):
part 'team.g.dart'; //will be automatically generated
#JsonSerializable(anyMap: true)
in your terminal or console (at the root of your project), run: flutter pub run build_runner build to generate all the necessary: *.g.dart files (i.e. match.g.dart, team.g.dart) for your serialized class files
[pc-name]:[project_root_dir] [username}$ flutter pub run build_runner build
I really hope this helps solve your problem completely as it did mine.
Reference: https://flutter.dev/docs/development/data-and-backend/json
After help from Gunter that pointed to me that such data composition is not supported, I figured it out - List of specific objects needs to be transformed into a List of Map
This question was asked and answered in 2012. Unfortunately, none of the answers work with Grails 3.3.8 and the Fields plugin. I tried ${raw(value)} and whatever I could find. It still shows things like <b>Hello </b> <em>world</em>. ${raw(value)} is recommended in the latest Grails documentation here
I'm stuck and will appreciate any ideas.
OK, this is how one does it:
First, you need Unbescape. Add this to build.gradle:
compile "org.unbescape:unbescape:1.1.6.RELEASE" // to unbescape html
Next do grails create-tag-lib Unbescape. Here's your whole tag lib class:
import org.unbescape.*
import org.unbescape.html.*
class UnbescapeTagLib {
static defaultEncodeAs = [taglib:'text']
//static encodeAsForTags = [tagName: [taglib:'html'], otherTagName: [taglib:'none']]
static final namespace = 'ubs'
def unescape = {attrs, body ->
out << HtmlEscape.unescapeHtml(body.call().toString())
}
}
Now create a directory called 'show' and inside that a directory called 'description'. This is of course in your views directory for the particular domain object. Description is the name of the field. Inside the directory 'description' create a file called _displayWidget.gsp. This is what the file looks like:
<ubs:unescape>${raw(value)}</ubs:unescape>
Calling the raw function on value returns a org.grails.taglib.TagBodyClosure object which is passed to your tag lib. That's why you have to do a call on the body and turn the result to a String in your tag lib.
This is easy to implement if one knows how to do it, but finding out how to do it was not easy. The documentation is not good. The Fields plugin really complicated things a lot. Before Fields, this was easy to do.
I have some problems to configure iReports, I´m using iReport4.8.0 (I tried iReport4.7.1 before and the same problem happened) and grails ggts 3.0.0.
I have a domain class called Consulta in a package called consultas, I want to list them and create a report using ireports, I´ve followed the steps I found in a book: Beginning Groovy
and Grails From Novice to Professional CHAPTER 9 it says that create a report from groovy clases is very easy (in theory it is) you just have to create a jar with the classes compiled and place it in the reports lib directory, then select "javabeans set data source option from data connections where the only field to fill is the name, it says to set the others blank, when I test it an error pop-up appears saying ClassNotFoundError, I'm sure there are some missing steps but i don't know which.
in my consulta controller I have this code:
def report ={
def consultas = Consulta.list()
chain(controller: "jasper", action: "index", model: [data: consultas], params:params)
}
and I think jassper plugins are OK.
I need to use DXL to loop through all modules in our database and find out which Rational Change Template each module is using, and possibly switch it to a different one. Can't find any documentation on Change API for DOORS.
I had to contact IBM directly to get this information. But here it is if anyone else needs to do it.
Skip cfgData = createString
string current_template = ""
getModuleConfigurationData(m, cfgData)
find(cfgData, CSINT_CONFIG_USE_TEMPLATE, current_template)
delete cfgData
At this point current_template has the file name of the template that it is configured for. This can be used to compare to existing templates and verify it is set correctly.
Also, if an update is necessary the following function will save the skip list back to the configuration.
put(cfgData, CSINT_CONFIG_USE_TEMPLATE, new_template)
cmSaveModuleConfigurationData(m, cfgData)