You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eu encontrei um problema ao tentar utilizar a classe XTemplate de um
TExtFormComboBox.
a biblioteca aplica os seguintes filtro na string objetivando obter suas partes.
re = /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,
nameRe = /^<tpl\b[^>]*?for="(.*?)"/,
ifRe = /^<tpl\b[^>]*?if="(.*?)"/,
execRe = /^<tpl\b[^>]*?exec="(.*?)"/,
e o extpascal gera o seguinte código:
tpl: "<tpl for='.'><div class='x-combo-list-item'>{persLastName},
{persFirstName}</div></tpl>",
então quando se aplica o filtro for="(.*?)" não se encontra nada, pois a
string está escrita com for='.', ou seja, precisa trocar o ' por ".
# What steps will reproduce the problem?
1.
2.
3.
# What is the expected output? What do you see instead?
# What version of the product are you using? On what operating system?
- extPascal: rev.XXX
- extJS: v.X.X.X
- compiler: FPC X.X.X
- OSes: XXXXX, XXXXX, XXXXX
# Please provide any additional information below.
- related discussion thread:
http://groups.google.com/group/extpascal/browse_thread/thread/xxxxxxxxxxx
- related FPC issue:
http://bugs.freepascal.org/view.php?id=xxxx
Original issue reported on code.google.com by jonatas....@gmail.com on 18 Jun 2010 at 5:45
The text was updated successfully, but these errors were encountered:
I solved this using this code:
procedure TExtFormComboBox.SetFTpl(Value : String); begin
FTpl := Value;
if (Value[1]='"') then
JSCode('tpl:' + Value)
else
JSCode('tpl:' + VarToJSON([Value]));
end;
Tpl := '"<tpl for=\".\"><div
class=\"x-combo-list-item\">Nome:{name}</div></tpl>"';
I know that this is not the perfect solution but it's works;
Original comment by jonatas....@gmail.com on 18 Jun 2010 at 8:37
Original issue reported on code.google.com by
jonatas....@gmail.com
on 18 Jun 2010 at 5:45The text was updated successfully, but these errors were encountered: