Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 8

Delete keyname From Registry

I have an option that allows the user to save favorites to the registry. I also have the option for the user to delete items from the favorite list. My problem is that when the user selects to delete an item from the favorite list, it deletes all the items. There is probably an easier way to do this but here is my code.
Function DelFav(keyname as String) 
Print"ITEM TO DELETE>>>>"keyname
rComma = CreateObject("roRegex", ",", "") ' split on comma

if sec.Exists("list") 
listemp=rComma.Split(ReadFav())  'READ FAVORITE LIST FROM REGISTRY
for each line in listemp    'SEARCH REGISTRY FOR CHANNEL TO REMOVE FROM FAVORITES[/font][/size]
if line=keyname
  ?"FOUND*******"  'IF FOUND SKIP
end for
writereg("favorite","list",arraytostring(list))  'SAVE TO REGISTRY

End function
0 Kudos
1 REPLY 1\
Level 8

Re: Delete keyname From Registry

Please ignore the post. Went out of channel and came back in and everything seems to be working as intended. Sorry.
0 Kudos