- Fixed problem with DOM-checking the 'limit' pseudo-attribute (thanks to
  Barton Meeks).
This commit is contained in:
Paul Beckingham 2011-10-29 23:40:35 -04:00
parent f7b593e958
commit 01087c0ff4
3 changed files with 22 additions and 9 deletions

View file

@ -60,6 +60,7 @@ The following submitted code, packages or analysis, and deserve special thanks:
Paolo Almeida Paolo Almeida
Michelle Crane Michelle Crane
Greg Grossmeier Greg Grossmeier
Barton Meeks
Thanks to the following, who submitted detailed bug reports and excellent Thanks to the following, who submitted detailed bug reports and excellent
suggestions: suggestions:

View file

@ -223,6 +223,8 @@
+ Fixed burndown chart y-axis height calculation (thanks to Ben Boeckel). + Fixed burndown chart y-axis height calculation (thanks to Ben Boeckel).
+ Fixed missing recurrence values in zsh completion script (thanks to Ben + Fixed missing recurrence values in zsh completion script (thanks to Ben
Boeckel). Boeckel).
+ Fixed problem with DOM-checking the 'limit' pseudo-attribute (thanks to
Barton Meeks).
------ old releases ------------------------------ ------ old releases ------------------------------

View file

@ -1072,8 +1072,9 @@ const A3 A3::expand (const A3& input) const
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Convert: 1-3,5 7 // Convert: 1-3,5 7 92bea814-2e3f-487b-92a1-3286dd1a7eda
// To: (id=1 or id=2 or id=3 or id=5 or id=7) // To: (id=1 or id=2 or id=3 or id=5 or id=7 or
// uuid=92bea814-2e3f-487b-92a1-3286dd1a7eda)
const A3 A3::sequence (const A3& input) const const A3 A3::sequence (const A3& input) const
{ {
A3 sequenced; A3 sequenced;
@ -1281,6 +1282,8 @@ bool A3::is_attr (Nibbler& n, Arg& arg)
// Most attributes are standard, some are pseudo-attributes, such as // Most attributes are standard, some are pseudo-attributes, such as
// 'limit:page', which is not represented by a column object, and // 'limit:page', which is not represented by a column object, and
// therefore not stored. // therefore not stored.
// I suspect this is auto-vivifying context.columns["limit"]. Bugger.
Column* col = context.columns[name]; Column* col = context.columns[name];
if (col) if (col)
arg._type = Arg::type_id (col->type ()); arg._type = Arg::type_id (col->type ());
@ -1345,7 +1348,8 @@ bool A3::is_attmod (Nibbler& n, Arg& arg)
*/ */
arg._raw = name + '.' + modifier + ':' + value; arg._raw = name + '.' + modifier + ':' + value;
arg._type = Arg::type_id (context.columns[name]->type ()); Column* col = context.columns[name];
arg._type = col ? Arg::type_id (col->type ()) : Arg::type_pseudo;
arg._category = Arg::cat_attmod; arg._category = Arg::cat_attmod;
return true; return true;
} }
@ -1457,7 +1461,8 @@ bool A3::is_dom (Nibbler& n, Arg& arg)
{ {
result = format (id) + '.' + name; result = format (id) + '.' + name;
arg._raw = result; arg._raw = result;
arg._type = Arg::type_id (context.columns[name]->type ()); Column* col = context.columns[name];
arg._type = col ? Arg::type_id (col->type ()) : Arg::type_pseudo;
arg._category = Arg::cat_dom; arg._category = Arg::cat_dom;
return true; return true;
} }
@ -1472,7 +1477,8 @@ bool A3::is_dom (Nibbler& n, Arg& arg)
is_attribute (name, name)) is_attribute (name, name))
{ {
arg._raw = uuid + '.' + name; arg._raw = uuid + '.' + name;
arg._type = Arg::type_id (context.columns[name]->type ()); Column* col = context.columns[name];
arg._type = col ? Arg::type_id (col->type ()) : Arg::type_pseudo;
arg._category = Arg::cat_dom; arg._category = Arg::cat_dom;
return true; return true;
} }
@ -1484,10 +1490,14 @@ bool A3::is_dom (Nibbler& n, Arg& arg)
name.length () && name.length () &&
is_attribute (name, name)) is_attribute (name, name))
{ {
arg._raw = name; if (name != "limit")
arg._type = Arg::type_id (context.columns[name]->type ()); {
arg._category = Arg::cat_dom; arg._raw = name;
return true; Column* col = context.columns[name];
arg._type = col ? Arg::type_id (col->type ()) : Arg::type_pseudo;
arg._category = Arg::cat_dom;
return true;
}
} }
n.restore (); n.restore ();