Angus Leeming <[EMAIL PROTECTED]> writes:
| On Saturday 31 March 2001 12:06, Lars Gullik Bjønnes wrote:
| > vector<string> const ControlToc::getTypes() const
| > {
| > vector<string> types;
| >
| > Buffer::Lists const tmp = lv_.view()->buffer()->getLists();
| >
| > Buffer::Lists::const_iterator cit = tmp.begin();
| > Buffer::Lists::const_iterator end = tmp.end();
| >
| > for (; cit != end; ++cit) {
| > types.push_back(cit->first.c_str());
| > ^^^^^^^^^^
| > This looks strange. Just use cit->first.
| > }
| >
| > return types;
| > }
|
| The dangers of cut-and-paste. Thank you.
|
| > I do not get why getType() is needed.
|
| Because the inset does not store "TOC", "algorithm", "figure" or "table" but
| rather stores "tableofcontents", "listofalgorithms", "listoffigures" or
| "listoftables". The inset is inserted as a specific TOC, algorithm, figure
| inset, so when the popup is launched it should display the appropriate info.
|
| I know this is sub-optimal, but it's meant to be a start not a
| finish.
The problem is that you don't know that the float types "figure" or
"table" exist. And certainly not "algorithm". It is now possible to
dynamically create new float types. And even TOC will be wrong when we
begin support in chapter tocs.
So... it seems that the inset is storing the wrong value... the latex
command should at any accord not be visilbe outside the inset.
--
Lgb