ID:79063
 
Resolved
Fixed in 452
BYOND Version:451
Operating System:Windows XP Home
Web Browser:Firefox 3.5.2
Status: Resolved (452)

This issue has been resolved.
Descriptive Problem Summary:
The input procedure seems to return null when a verb-path is selected from a list.

Code Snippet (if applicable) to Reproduce Problem:
mob
verb
say(msg as text)
world << msg

takeVerb()
var/list/players[0]
for(var/client/c)
if(c.key)
players += c.mob
var/mob/choice = input(src, "Who would you to take a verb from?","Take Verb") as null|mob in players
if(choice)
/* var/list/p_verbs[0]
for(var/p in choice.verbs)
p_verbs += "[p]" */

var/remove = input(src, "What verb would you like to take from [choice.name]?","Take Verb") as null|anything in choice.verbs
src << "You selected [remove]"
if(choice && remove)
choice.verbs -= remove


Expected Results:
input() should return the selected verb-path.

Actual Results:
The return value is null.

Does the problem occur:
Every time? Or how often? Every time
In other user accounts? N/A
On other computers? N/A

When does the problem NOT occur?
Other path related selections (typesof(/obj)) work correct.

Workarounds:

mob
verb
say(msg as text)
world << msg

takeVerb()
var/list/players[0]
for(var/client/c)
if(c.key)
players += c.mob
var/mob/choice = input(src, "Who would you to take a verb from?","Take Verb") as null|mob in players
if(choice)
var/list/p_verbs[0]
for(var/p in choice.verbs)
p_verbs += "[p]"
var/remove = input(src, "What verb would you like to take from [choice.name]?","Take Verb") as null|anything in p_verbs
src << "You selected [remove]"
if(choice && remove)
choice.verbs -= remove

Storing the verb path as text in a list and having the text return instead works fine.
Funny enough, you do not even have to use text2path on the result, like the reference suggest.
input() does not support all data types, but now procs/verbs have been added to the list of types it supports, so input() from a list of verbs is now possible.