Popups with more than 20 items

15 views
Skip to first unread message

Ouroubouros

unread,
Dec 4, 2011, 9:52:15 PM12/4/11
to xptemplate
When I expand a place holder with a call to ChooseStr() that has more
than 20 items in it, I get an error: "E740: Too many arguments for
function"

See the example code below for a "broken" and a "working" snippet,
where the only difference is that the "broken" snippet has a call to
ChooseStr() with 21 items and the "working" snippet has 20 items.

Is there some other way to have a place holder expand to a popup with
no limit (or a very large limit) on the number of items in it?

---

Examples:

XPT broken
`foo^
XSET foo=ChooseStr( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
'11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21' )

XPT working
`foo^
XSET foo=ChooseStr( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
'11', '12', '13', '14', '15', '16', '17', '18', '19', '20' )

dr-dr xp

unread,
Dec 21, 2011, 1:09:03 AM12/21/11
to xptem...@googlegroups.com
XPT working
XSET foo=Choose( [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22' ] )
`foo^

Use Choose() which accepts list as argument. 

On Mon, Dec 5, 2011 at 10:52 AM, Ouroubouros <deep...@gmail.com> wrote:
XPT working
`foo^
XSET foo=ChooseStr( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
'11', '12', '13', '14', '15', '16', '17', '18', '19', '20' )



--
要了几天饱饭就不记得西北风啥味了
Reply all
Reply to author
Forward
0 new messages