Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: View problems
Topic Summary:
Created On: 5-Jul-2004 10:49
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 5-Jul-2004 10:49
User is offline View Users Profile Print this message


Alexander Lundh

Posts: 8
Joined: 28-Jun-2004

Hi all
I know this topic has been up more than once before, but I've read all the old
posts and still cant manage to save my views.

here's some of my code;

---------Start---------
void insertColumn(int i, string attr, string t, int w){
insert column i
attribute(column i, attr)
width(column i, w)
title(column i, t)
}

void createNewModule(string name){
templateModule = create(name, "Template Module","template-", 500, true)
set(templateModule, read|modify|delete|control, "xallu")

current = templateModule

create object type "String" attribute "ModuleName"
create object type "String" attribute "Version"
create object type "String" attribute "ChangeOrder"
create object type "String" attribute "Date"
create object type "String" attribute "Affected"
create object type "String" attribute "Info"

zeroView(templateModule) //delete's all existing columns

insertColumn(0, "Object Identifier", "ID", 70)
insertColumn(1, "ModuleName", "Module Name", 70)
insertColumn(2, "Version", "Text", 70)
insertColumn(3, "ChangeOrder", "Change Order", 70)
insertColumn(4, "Date", "Date", 70)
insertColumn(5, "Affected", "Pages Affected", 70)
insertColumn(6, "Info", "Info", 100)

refresh current
save view "saveView"
}

---------End---------

What happends is that I get an error at save (last line) saying
<> incorrectly concatenated tokens
<> incorrect arguments for function (save)

I've tried with different approaches, such as this example (found on the forum);

---------Start---------

string viewName="Comments view"
ViewDef vd

// Insert your code here to set the columns and save the view
save view viewName

// Get a handle on the newly created viewDef
vd=get view viewName

// Insert code to set the view options
useCurrent(vd, false)
useWindows(vd, false)
useFiltering(vd, false)
useSorting(vd, false)
useShowExplorer(vd, true)
useLevel(vd, true)

// Save the viewDef for the view
save(view viewName, vd)
---------End---------

but I allways end up with the same errors at save,
What is the problem?
Report this to a Moderator Report this to a Moderator
 7-Jul-2004 17:18
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Didn't really look at the code. Can you manually overwrite the view or perhaps you can "C"reate a view but cannot "M"odify it?
Report this to a Moderator Report this to a Moderator
 8-Jul-2004 08:49
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I ran your code Alex, but I can't reproduce the errors.

Is the code on the forum EXACTLY what you are running?



-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 8-Jul-2004 11:01
User is offline View Users Profile Print this message


Alexander Lundh

Posts: 8
Joined: 28-Jun-2004

yes, its a copy.
Im running DOORS v7.0
Perhaps it is a rights- issue as Louie Landale suggested
Will look into that.
thanks for the help
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.