Skip to content

Commit

Permalink
review from pr
Browse files Browse the repository at this point in the history
  • Loading branch information
gintama91 committed Oct 2, 2023
1 parent cc784bc commit 062bb97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions examples/para/para_text.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Shoes.app do
stack do
@note = para " your note will appear here"
@note = para " your note will appear here"

@edit_box = edit_box ""
@save_button = button "Save"
@edit_box = edit_box ""
@save_button = button "Save"

@save_button.click do
new_text = @edit_box.text
@note.text = new_text
alert("Note saved successfully!")
@save_button.click do
new_text = @edit_box.text
@note.text = new_text
alert("Note saved successfully!")
end
end
end
end
5 changes: 3 additions & 2 deletions lacci/lib/shoes/widgets/para.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def initialize(*args, stroke: nil, size: :para, font: nil, hidden: false, **html
def text_children_to_items(text_children)
text_children.map { |arg| arg.is_a?(String) ? arg : arg.linkable_id }
end
def replace(*children)

def replace(*children)
update_text_children(*children)
end

def text=(*children)
def text=(children)
update_text_children(*children)
end

Expand Down

0 comments on commit 062bb97

Please sign in to comment.