I have defined (setq VN 5) and wish to use it, calling (in this case ), a view with
(tblsearch "view" VN) but the tblsearch is not working. Can anyone help with the correct form?
Thanks for any help.
Solved! Go to Solution.
Solved by cadffm. Go to Solution.
Thanks dbhunia. That did work, but the whole routine inspects the view table, and calls views, then provides prompts according to the outcome. For the prompts, I am using messages such as:
(prompt (strcat "\n View " (rtos VN)" restored))
which works with (setq VN 5) but not (setq VN "5"), which returns:
error: bad argument type: number "5"
@Anonymous schrieb:
I have defined (setq VN 5)
a view with (tblsearch "view" VN) but the tblsearch is not working
With an error "Argumenttyp: stringp 5" what means "STRING wanted, but get 5" ?
The name of a view (the name of ALL NAMED OBJECTS) are STRINGs, but your symbol 'VN' refer to a number, an INTeger. The internal predicat-function for strings (stringp) returns NIL, nil nothing false fails.
Pretty basic knowledge and one reason more to learn the error messages, very usefull to find own mistakes.
Problem is known now, let's solve it.
What is the real name of your view, "5" ?
(tblsearch "VIEW" (itoa VN)) if VN is ever an integer
or
(tblsearch "VIEW" (rtos VN 2 0)) if sometimes integer, sometime real
Sebastian
Ok.....
I did not Noticed your >>This<< post.......
In this case @cadffm solution would solve the problem.......
As for the syntax
(tblsearch table-name symbol [setnext])
symbol
Type: String
Symbol name to be searched for. This argument is not case-sensitive.
Can't find what you're looking for? Ask the community or share your knowledge.