Im fairly new to programming and was wondering if anyone could point me in the right direction?
Im trying to take the users input and use that to find that word in the dictionary e.g If I type in “jeff” itll look in the dictionary and tell me “12” because cluthaTable[“jeff”] = “12”;
cluthaTable = {}; cluthaTable["jeff"] = "12"; local defaultField local function textListener( event ) if ( event.phase == "ended" or event.phase == "submitted" ) then -- Output resulting text from "defaultField" --print( event.target.text ) -- Saves the input as a var for looking up name local test = event.target.text print(test) end end -- Create text field defaultField = native.newTextField( 150, 150, 180, 30 ) defaultField:addEventListener( "userInput", textListener )
Any and all help is much appreciated, Thank you in advance.