Well I know this is going to be something silly, but: Object Lorem=object(1) Object Ipsum=object(2) Ipsum."Object Text"=Lorem."Object Text" //incorrect arguments for (=)
Object Lorem=object(1) Object Ipsum=object(2) string LoremObjTxt=Lorem."Object Text" Ipsum."Object Text"=LoremObjTxt
strathglass - Fri Apr 08 21:17:41 EDT 2011 |
Re: Can't assign Object Text to Object Text? To answer my own question, yes ... cast: Ipsum."Object Text"=Lorem."Object Text" ""
|
Re: Can't assign Object Text to Object Text? To answer my own question, yes ... cast: Ipsum."Object Text"=Lorem."Object Text" ""
|
Re: Can't assign Object Text to Object Text? strathglass - Sat Apr 09 10:28:54 EDT 2011 To answer my own question, yes ... cast: Ipsum."Object Text"=Lorem."Object Text" ""
The perms list will give you the reason why one is not working and the other one is. If you wish to dive into that, just say so ;-) Anyway you should check if you want to have richText (i.e. formatted text parts) copied over to the other object. In this case, you can do: Ipsum."Object Text" = richText richTextWithOle Lorem."Object Text"
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Can't assign Object Text to Object Text? strathglass - Sat Apr 09 10:28:45 EDT 2011 To answer my own question, yes ... cast: Ipsum."Object Text"=Lorem."Object Text" ""
string set(Attr__ To,Attr__ From) // To,From RichTextWith OLE OK e.g. set(oTo."Object Text", oFrom."Object Text") Don't know what the returned string is; seems to be null when its OK and garbage when there was an error. Seems to me you need to surround with noError() and lastError(). noError() set(oTo."Object Text", oFrom."Object Text") string ErrMess = lastError() if (!null ErrMess)... I see that the AttrRef can indeed be a link or module attribute, but doubt that's useful.
|
Re: Can't assign Object Text to Object Text? llandale - Mon Apr 11 13:40:59 EDT 2011
Thanks Mathias and Louie.
for lookupTableCellObject in row(newLookupTableRow) do // What is wrong with this line?? Here is the error: -E- DXL: <Line:1226> incorrect arguments for (do)
{ //update each new cell in this new row as required (there should be no deleted cells in this new row):
colCount++
if (colCount>=colCntLookup)
{
errMsg="Unexpected cell count (too many) in newly added internal lookup table: expected count was " colCntLookup ""
dataLogger(logERR,errMsg)
break //skip (rest of) this invalid row
}
if (colCount==keyColPosLookup)
{ //Copy over output table's key cell value to lookup table key cell:
//first, however, we must remove any leading and trailing whitespace:
otxt=keyCell."Object Text"
if (reWhitespaceSurround otxt)
{
otxt=otxt[match 1] //this will strip off the leading/trailing white space
}
lookupTableCellObject."Object Text"=otxt "" //***OK, this is still not working, here are the two errors:-E- DXL: <Line:1243> incorrect arguments for (.); -E- DXL: <Line:1243> incorrectly concatenated tokens
}
else if (colCount==sourceColPosLookup)
{ //set the source information:
//first, we are required to remove any leading or trailing white space before copying over this information to the lookup table:
if (reWhitespaceSurround currentSource)
{
currentSource=currentSource[match 1] //this will strip off the leading/trailing white space
}
lookupTableCellObject."Object Text"=currenSource "" //***OK, this too isn't working: but this is just a typo (have to go change currenSource to currentSource), when fixed I expect it to get the same error as the other cases here!
}
else if (lookupTableStatic[colCount]!="")
{ //set the static values per the lookup table definition info:
lookupTableCellObject."Object Text"=lookupTableStatic[colCount] "" //***OK, another error here: like the first one: -E- DXL: <Line:1256> incorrect arguments for (.); -E- DXL: <Line:1256> incorrectly concatenated tokens
}
else if (lookupTableMappedFromOutput[colCount]!="")
{ //finally, copy over any mapped values:
o=getDataRowCellByColHdg(outputTableRowObject,lookupTableMappedFromOutput[colCount],outputTableColumns)
if (null o)
{
errMsg="Couldn't find mapped-from object in output table when building internal lookup table: couldn't find for column mapped from output table column '"
errMsg=errMsg lookupTableMappedFromOutput[colCount] "'"
dataLogger(logERR,errMsg)
continue //maybe only this column bad, so keep trying with rest of columns for this new row
}
lookupTableCellObject."Object Text"=o."Object Text" "" //**OK, yet another one: -E- DXL: <Line:1268> incorrect arguments for (.); -E- DXL: <Line:1268> incorrectly concatenated tokens
}
}
-E- DXL: <Line:1243> incorrect arguments for (.) -E- DXL: <Line:1243> incorrectly concatenated tokens -E- DXL: <Line:1252> incorrect arguments for (.) -E- DXL: <Line:1252> incorrectly concatenated tokens -E- DXL: <Line:1252> undeclared variable (currenSource) //(this one is my typo, oops) -E- DXL: <Line:1256> incorrect arguments for (.) -E- DXL: <Line:1256> incorrectly concatenated tokens -E- DXL: <Line:1268> incorrect arguments for (.) -E- DXL: <Line:1268> incorrectly concatenated tokens -E- DXL: <Line:1226> incorrect arguments for (do) too many messages -- suspending error reporting-I- DXL: all done with
|
Re: Can't assign Object Text to Object Text? strathglass - Tue Apr 12 21:26:41 EDT 2011
Thanks Mathias and Louie.
for lookupTableCellObject in row(newLookupTableRow) do // What is wrong with this line?? Here is the error: -E- DXL: <Line:1226> incorrect arguments for (do)
{ //update each new cell in this new row as required (there should be no deleted cells in this new row):
colCount++
if (colCount>=colCntLookup)
{
errMsg="Unexpected cell count (too many) in newly added internal lookup table: expected count was " colCntLookup ""
dataLogger(logERR,errMsg)
break //skip (rest of) this invalid row
}
if (colCount==keyColPosLookup)
{ //Copy over output table's key cell value to lookup table key cell:
//first, however, we must remove any leading and trailing whitespace:
otxt=keyCell."Object Text"
if (reWhitespaceSurround otxt)
{
otxt=otxt[match 1] //this will strip off the leading/trailing white space
}
lookupTableCellObject."Object Text"=otxt "" //***OK, this is still not working, here are the two errors:-E- DXL: <Line:1243> incorrect arguments for (.); -E- DXL: <Line:1243> incorrectly concatenated tokens
}
else if (colCount==sourceColPosLookup)
{ //set the source information:
//first, we are required to remove any leading or trailing white space before copying over this information to the lookup table:
if (reWhitespaceSurround currentSource)
{
currentSource=currentSource[match 1] //this will strip off the leading/trailing white space
}
lookupTableCellObject."Object Text"=currenSource "" //***OK, this too isn't working: but this is just a typo (have to go change currenSource to currentSource), when fixed I expect it to get the same error as the other cases here!
}
else if (lookupTableStatic[colCount]!="")
{ //set the static values per the lookup table definition info:
lookupTableCellObject."Object Text"=lookupTableStatic[colCount] "" //***OK, another error here: like the first one: -E- DXL: <Line:1256> incorrect arguments for (.); -E- DXL: <Line:1256> incorrectly concatenated tokens
}
else if (lookupTableMappedFromOutput[colCount]!="")
{ //finally, copy over any mapped values:
o=getDataRowCellByColHdg(outputTableRowObject,lookupTableMappedFromOutput[colCount],outputTableColumns)
if (null o)
{
errMsg="Couldn't find mapped-from object in output table when building internal lookup table: couldn't find for column mapped from output table column '"
errMsg=errMsg lookupTableMappedFromOutput[colCount] "'"
dataLogger(logERR,errMsg)
continue //maybe only this column bad, so keep trying with rest of columns for this new row
}
lookupTableCellObject."Object Text"=o."Object Text" "" //**OK, yet another one: -E- DXL: <Line:1268> incorrect arguments for (.); -E- DXL: <Line:1268> incorrectly concatenated tokens
}
}
-E- DXL: <Line:1243> incorrect arguments for (.) -E- DXL: <Line:1243> incorrectly concatenated tokens -E- DXL: <Line:1252> incorrect arguments for (.) -E- DXL: <Line:1252> incorrectly concatenated tokens -E- DXL: <Line:1252> undeclared variable (currenSource) //(this one is my typo, oops) -E- DXL: <Line:1256> incorrect arguments for (.) -E- DXL: <Line:1256> incorrectly concatenated tokens -E- DXL: <Line:1268> incorrect arguments for (.) -E- DXL: <Line:1268> incorrectly concatenated tokens -E- DXL: <Line:1226> incorrect arguments for (do) too many messages -- suspending error reporting-I- DXL: all done with
Perhaps you are not bothering to declare it and it is cast incorrectly in the 1st line; although I have no idea what type it would cast it to. Surely turn Auto-Declare OFF.
|
Re: Can't assign Object Text to Object Text? llandale - Wed Apr 13 15:01:24 EDT 2011
for lookupTableCellObject in newLookupTableRow ..err.. Object lookupTableCellObject for lookupTableCellObject in newLookupTableRow
|
Re: Can't assign Object Text to Object Text? llandale - Wed Apr 13 15:07:52 EDT 2011
Thanks for the input Louie. I will check to see if AutoDeclare is on or not. Object lookupTableCellObject
//get a data cell within table: Object appendFromObject //not shown here, but this is initially set to be an object within a row of a table; i.e. a regular data cell in a table (not the invisible row object) //now add a new row to my table, located after the row containing the above data cell: Object newLookupTableRow=appendRow(appendFromObject) //from my testing, appendRow() returns the last data cell added in the newly created/appended row (not the invisible row object) //finally, get invisible row object for the newly added row: newLookupTableRow=getRow(newLookupTableRow) //this returns the invisible row object for the row containing the specified data cell
//from the DXL manual (with comments added):
Object rowHead
for rowHead in table current Object do
{
Object cell
for cell in row rowHead do //rowHead is already an invisible table row header object, and they are calling row() on it, so it must be OK to do this
{
print identifier cell "\n"
}
}
|
Re: Can't assign Object Text to Object Text? strathglass - Sun Apr 17 09:45:48 EDT 2011
Thanks for the input Louie. I will check to see if AutoDeclare is on or not. Object lookupTableCellObject
//get a data cell within table: Object appendFromObject //not shown here, but this is initially set to be an object within a row of a table; i.e. a regular data cell in a table (not the invisible row object) //now add a new row to my table, located after the row containing the above data cell: Object newLookupTableRow=appendRow(appendFromObject) //from my testing, appendRow() returns the last data cell added in the newly created/appended row (not the invisible row object) //finally, get invisible row object for the newly added row: newLookupTableRow=getRow(newLookupTableRow) //this returns the invisible row object for the row containing the specified data cell
//from the DXL manual (with comments added):
Object rowHead
for rowHead in table current Object do
{
Object cell
for cell in row rowHead do //rowHead is already an invisible table row header object, and they are calling row() on it, so it must be OK to do this
{
print identifier cell "\n"
}
}
At home, got no DOORS here.
void PrintObj(Object obj, string Label)
{ print Label "\t" identifier(obj) "\t" number(obj) "\n"
}
Object rowHead
Object oTable = table(current Object)
if (null oTable) halt
PrintObj(oTable, "Table")
for rowHead in oTable do
{ PrintObj(RowHead, " Row")
Object cell
for cell in rowHead do
{
PrintObj(cell, " Cell")
}
}
|