Help, I'm totally stumped.

I’m baffled as to why this doesn’t work.

local e = vgui.Create( "DTextEntry", d_main )
e:SetEnterAllowed( true )
function e:OnEnter()
 e:SetValue( "" )
e:SetValue( "test" )

That’s literally it. I just want to empty a DTextEntry upon the user pressing enter, and it doesn’t work. The box initializes correctly with “test” as the value, both “before” and “after” print correctly, but the value does not get set to empty. It doesn’t matter what I put in the quotes, it simply does not set the value. I’m super confused and it appears that no one else on the internet has had this issue. Help please!

Use :SetText( “” )

Well the girlfriend came home and dragged me out to do errands, but when I get back I’ll be sure to test it. Thanks a bunch!

edit: Worked perfectly, thanks m8!