Widget implementation to create own widget

First time to create own widget. When I add new widget and run it, it show message “Widgetset … does not contain implementation …”. Any tutorial to do the implementation? I would like to extend some javascript to the Textfield.