Tabstrip problem - limitation?

Started by kenkrupa, January 26, 2012, 12:19:27 PM

Previous topic - Next topic

kenkrupa

Is there a known limitation on number of tabs in a tabstrip? I have one with 7 tabs. When I try to add another, I get an error when I reload it (see attached image, top). This happens the second time I reload after adding the tab, even when using a test function with minimal code. Once this occurs, any other app using ODCL is also totally bonked, getting the error in the image bottom. I need to restart AutoCAD to clear the problem. I find that I can exit and re-display the dialog repeatedly if I do not do the forced reload each time, but that's not too convenient for developing the dialog.

Running 6.0.2.3 with ACA 2012 on Win7/64.

owenwengerd

Can you give me a simple sample file with the steps to reproduce this? It's likely due to something that got corrupted in the .odcl file, so make sure you keep a copy of the "bad" file as you may not be able to reproduce the problem if you start from scratch.
Owen Wengerd (Outside The Box) / ManuSoft

kenkrupa

#2
Here is the problem file, with a simple lisp to run it (attached zip). Extract to a folder on the search path, load the .lsp, and use WOODBEAMS command to run. First time is fine, next time it gives the error. Removing the last tab stops the error.

One thing I have noticed is that I have been seeing a bogus sub-form in the list, showing the last tab twice (see image). The form does not have this tab twice, just the listing. I've been seeing this for a while now, well before attempting to add the eighth tab. If I go to the tabstrip Properties dlg, click on Tab/Pages, and OK, it goes away. But once I Save, exit, then re-open it, it comes right back. Is this something that does happen ordinarily? Or have I been seeing a symptom of a corrupted file for some time?

Any way to fix this, or do I need to start over?

owenwengerd

It looks like the problem here is due to an unnamed tab page. The property wizard is ignoring the unnamed page, then adding a tab page with a duplicate index when you add a new tab. The duplicate index is what causes the runtime problems.

I've added code to remove a duplicate tab page when loading the project, so the next build will load and display this corrupted project file without error. I've also added code to create a "Tab N" name for an unnamed tab so that it gets displayed in the list and so that adding a new page doesn't stomp on it. With this second change, opening the corrupt tab control's property wizard, then pressing [Apply] to apply any changes, should update the tab strip's TabCaptions property to give the formerly unnamed tab page a name.

Hopefully these two changes will resolve the issue by the next build. In the meantime, you can give the phantom tab a name by adding a name to the list in the Tab Captions property of the tab strip control, then saving and re-opening the project.
Owen Wengerd (Outside The Box) / ManuSoft

kenkrupa

Thank you Owen. It took me a bit more stumbling around than you described, but I did manage to straighten it out. No more error.
:)