More AppendTable fun

Trying work around the 255 limit by creating multiple tables. Previously I have always just appended to a 2 row table but trying this code I am getting the column width error message:

/* create a single table

intRowCount = Cint(vwAllForLookup.AllEntries.Count + 1)

Call rtBody.AppendTable(intRowCount,7)

Interesting if I rem the intRowCount and just try:

Call rtBody.AppendTable(2,7)

It all works - this seems to be reproducable, so is it a bug?

Andy

Subject: More AppendTable fun

How has inRowCount been declared? (ie. What data type was it assigned?). Also if you haven’t already put in ‘Option Declare’ in the Declarations section of your code to ensure consistency / spelling of variables is correct.

Subject: More AppendTable fun - Now with NSD Failure!

Good call and thanks for the feedback - Option Declare is now the default in 6.5.4 (I’ve been coding since V3) all vars match up, this code fails:

Dim intRowCount As Integer, intColCount As Integer

intRowCount = 0

intColCount = 7 'fixed number of columns

'/* create a single table

intRowCount = Cint(vwAllForLookup.AllEntries.Count) + 1

Call rtBody.AppendTable(intRowCount, intColCount )

This code also fails:

intRowCount = Cint(vwAllForLookup.AllEntries.Count) + 1

Call rtBody.AppendTable(intRowCount, 7)

This code works:

Call rtBody.AppendTable(2, 7)

Attempting the same thing with an added column styles array caused an NSD fault (6.5.4 on windows xp) with over 60 lines in the callstack.

############################################################

FATAL THREAD 1/17 [ NLNOTES:0a24:0a28]

FP=0x0013d0bc, PC=0x6265ac17, SP=0x0013d048, stksize=116

EAX=0x0000400c, EBX=0x00000000, ECX=0x0558b350, EDX=0x00000000

ESI=0x0558b270, EDI=0x0558b350, CS=0x0000001b, SS=0x00000023

DS=0x00000023, ES=0x00000023, FS=0x0000003b, GS=0x00000000 Flags=0x00010293

Exception code: c0000005 (ACCESS_VIOLATION)

############################################################

Subject: RE: More AppendTable fun - Now with NSD Failure!

for the NSD, need more infos, post the lines just under your stack,

JYR

Subject: RE: More AppendTable fun - Now with NSD Failure!

You asked for it…

@[ 1] 0x6265ac17 nlsxbe.ANotes::ANFormatFromAInstanceArray+135 (0,558b350,13d0fc,13d10e)

@[ 2] 0x62692f96 nlsxbe.ANRTItem::ANRTAppendTable+198 (13d5dc,4fcc9ac,4fd2538,0)

@[ 3] 0x62692b21 nlsxbe.ANRTItem::ANDispatchMethod+417 (13d5dc,13d5ac,83bea3c,13d5dc)

@[ 4] 0x62642ffa nlsxbe._ANCLASSCONTROL@16+2074 (3f9778,109,13d590,13d5dc)

@[ 5] 0x62643309 nlsxbe._tag_NotesADTControl::ClassControl+25 (4fd2564,3f9778,109,13d590)

@[ 6] 0x600590e2 nnotes.LSsInstance::AdtCallBack+226 (3f9778,626427e0,109,83bea20)

@[ 7] 0x6007005d nnotes.LScObjCli::ProdMethodCall+61 (83be9e0,556,830f70c,10005)

@[ 8] 0x6006ff54 nnotes.LSsThread::AdtDoProdCallout+164 (558b080,83be9e0,10005,830f6c0)

@[ 9] 0x6006fe6f nnotes.LSsThread::AdtCallMethod+47 (6,8310068,1,558b080)

@[10] 0x60022ae4 nnotes.LSsThread::NRun+6516 (558b080,3f3ec0,3f9778,13d740)

@[11] 0x60023286 nnotes.LSsThread::Run+182 (558b080,13d728,61a9acce,3f9778)

@[12] 0x600b461a nnotes.LSsInstance::Resume+26 (3f9778,3f3df8,0,3f3ec0)

@[13] 0x61a9acce nnotesws.LSEcInstance::StepClientScript+110 (3f3df8,4f108bc,3f3df8,0)

@[14] 0x611a85d3 nnotesws.LSEcInstance::Resume+243 (3f3df8,0,4f108bc,0)

@[15] 0x61a9b009 nnotesws.LSEcInstance::DebugClientScript+169 (3f3df8,75511f4,2,13d82c)

@[16] 0x61a995f4 nnotesws._LSEDebugCommand@12+20 (3f3df8,75511f4,2,13d9fc)

@[17] 0x61a99572 nnotesws._LSEDebugStepInto@8+18 (3f3df8,75511f4,4f108bc,63a8ba4)

@[18] 0x615bf97d nnotesws.CLSDDocument::DebugScript+205 (4f108bc,2,80000000,66)

@[19] 0x615c2df9 nnotesws.CDebuggerPaneSubprogram::ExecuteScript+217 (77e5ef4,2,66,0)

@[20] 0x615c251e nnotesws.CDebuggerPaneSubprogram::WMCtrlNotify+78 (63a8ba4,5f0226,66,13db3c)

@[21] 0x615c224b nnotesws.CDebuggerPaneSubprogram::SubMessageProc+955 (63a8ba4,111,80000041,6902a0)

@[22] 0x61184904 nnotesws._MainWndProc@16+6932 (5f0226,111,80000041,6902a0)

[23] 0x77d48734 USER32.GetDC+109 (61182df0,5f0226,111,80000041)

[24] 0x77d48816 USER32.GetDC+335 (0,61182df0,5f0226,111)

[25] 0x77d4b89b USER32.GetParent+364 (8465e8,872558,80000041,6902a0)

[26] 0x77d5f3e3 USER32.SendMessageA+73 (5f0226,111,80000041,6902a0)

@[27] 0x6118ab52 nnotesws._BmpButtonWndProc@16+2866 (63cb8a4,202,0,b0027)

[28] 0x77d48734 USER32.GetDC+109 (6118a020,6902a0,202,0)

[29] 0x77d48816 USER32.GetDC+335 (0,6118a020,6902a0,202)

[30] 0x77d489cd USER32.GetWindowLongW+295 (13e2ec,0,13e2a4,77d5e097)

[31] 0x77d48a10 USER32.DispatchMessageW+15 (13e2ec,77d5f39a,0,13e2ec)

[32] 0x77d5e097 USER32.IsDialogMessageW+219 (5f0226,9089f0,77e5ef4,7a0230)

@[33] 0x612ce535 nnotesws.ModelessWindowDispatch+229 (0,3f3df8,4f108bc,75653f4)

@[34] 0x612ce7bf nnotesws._NEMMainLoopIDE@8+271 (0,0,75653f4,4f108bc)

@[35] 0x615bfda9 nnotesws.CLSDDocument::LoadObject+169 (0,75653f4,1,4f108bc)

@[36] 0x615bf853 nnotesws.CLSDDocument::AddScriptObject+435 (4f10900,90dc6f4,1,1)

@[37] 0x615beef1 nnotesws.CLSUIDocument::RunScript+369 (4f108bc,1d3,13e37c,609fa9ac)

@[38] 0x605be51c nnotes.CRawActionLotusScript::Run+700 (11a,4f108bc,0,11a)

@[39] 0x605bac06 nnotes.CRawAction::Run+54 (0,75511f4,0,13e554)

@[40] 0x605ba7c3 nnotes.CRawAction::Execute+275 (7551614,0,13ed3c,605b7254)

@[41] 0x605b7526 nnotes.CAssistant::RunAlone+22 (5fe48f4,75511f4,75511f4,0)

@[42] 0x605b7254 nnotes.CAssistant::Run+3796 (1ac4,13ef90,1235b78,13f054)

@[43] 0x615b053d nnotesws._RunAssistantEx@28+493 (5b92cc0,4ef9002,0,0)

@[44] 0x615b0340 nnotesws._RunAssistant@20+32 (5b92cc0,0,0,0)

@[45] 0x61a8880d nnotesws.CAgentDocSelection::Command+77 (516965c,13f054,40280005,0)

@[46] 0x612cd01b nnotesws.CSelectionManager::ProcessCommand+1179 (1,40280005,0,0)

@[47] 0x612cca2e nnotesws._ProcessWMCommand@8+174 (40280005,0,13f458,61182df0)

@[48] 0x61183eaf nnotesws._MainWndProc@16+4287 (1017c,111,40280005,0)

[49] 0x77d48734 USER32.GetDC+109 (61182df0,1017c,111,40280005)

[50] 0x77d48816 USER32.GetDC+335 (0,61182df0,1017c,111)

[51] 0x77d4c63f USER32.IsWindowUnicode+161 (61182df0,1017c,111,40280005)

[52] 0x77d4e905 USER32.CallWindowProcA+27 (61182df0,1017c,111,40280005)

[53] 0x03a925ad ncodesnip._GetFileVersion@4+5501 (3a92f30,1017c,111,40280005)

[54] 0x77d48816 USER32.GetDC+335 (0,3a92f30,1017c,111)

[55] 0x77d489cd USER32.GetWindowLongW+295 (13f7c0,0,13f7e0,61221f28)

[56] 0x77d48a10 USER32.DispatchMessageW+15 (13f7c0,61221c60,61180000,1)

@[57] 0x61221f28 nnotesws._NEMMainLoop@4+712 (401000,12f0cc,152384,0)

@[58] 0x0040156d NLNOTES._WinMain@16+1389 (400000,0,152384,1)

@[59] 0x00401dfa NLNOTES._WinMainCRTStartup+308 (12f0cc,7c90ee18,7ffdc000,805502fa)

[60] 0x7c816d4f KERNEL32.RegisterWaitForInputIdle+73 (401cc6,0,78746341,20)

Subject: More AppendTable fun

In 7.0.1, similar results.

Call body.AppendTable(rowCount%,columnCount%) - works fine.

Where the following (copied from the help DB) -

Dim styles(1 To 3) As NotesRichTextParagraphStyle

For i% = 1 To 3 Step 1

Set styles(i%) = session.CreateRichTextParagraphStyle

styles(i%).LeftMargin = 0

styles(i%).FirstLineLeftMargin = 0

styles(i%).RightMargin = RULER_ONE_INCH * 1.5

Next

Call body.AppendTable(rowCount%, columnCount%, , , styles) - Kills Notes

Subject: RE: More AppendTable fun

Thanks for that - have you had any luck with mixed vars in table creation?

e.g.Call body.AppendTable(rowCount%,7)

Subject: RE: More AppendTable fun

Just got back from vacation…

Did you have any luck getting your problem sorted out? Only other thing I can think of for now was are you sure that the first value in the AppendTable call is greater than zero?

Alex