Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shoes3 to shoes4 items require changing #1200

Closed
thebenjy opened this issue Dec 9, 2015 · 4 comments
Closed

shoes3 to shoes4 items require changing #1200

thebenjy opened this issue Dec 9, 2015 · 4 comments

Comments

@thebenjy
Copy link

thebenjy commented Dec 9, 2015

shoes3 app all works fine. using shoes4 had to change the following

didn't recognised

   self.start do
        # do scrreen refresh
   end

crashed the app if button pressed

  $log_window has be initiated as a para ''
  button "Copy Log Content" do
     app.clipboard = $log_window.text unless $log_window.nil?
  end

doing a widget update (list_box) within the change event
in shoes3 the box always selected an item, in shoes4 it was blank - probably not good code anyhow so needed to change

  $ini_file_lb.change do
    # do something that included
    $ini_file_lb.items = <new list>
  end

layout changes for stacks
fonts, gaps etc were all smaller under shoes4
had a number of stacks which had a margin, drawing the objects
within the stack ended up displaying outside the stack

basic app
under shoes 3 all widgets contained within the white rectangle of the stack
shoes4 the buttons displayed on the border/outside the bottom of the rectangle

   stack :width => "98%", margin: 10 do
      background white
      flow do
        image "1.png", :margin => 0
        title "Environment"
        flow do
             $env_r_staging = radio :server, checked: true
             para "Staging (Test)       "
             $env_r_production = radio :server
             para "Production"
           end
             para "" # added in shoes 4 to make sure stack white rectangle big enough
      end #flow
    end # stack
@PragTob PragTob added this to the 4.0.0.rc1 milestone Dec 9, 2015
@PragTob
Copy link
Member

PragTob commented Dec 9, 2015

Thank you, we'll investigate those individually. I've never seen self.start - you never learn enough about the old shoes :D

We can try to get text sizes and margins closer to shoes3, which we should, but they'll never be the same.

@ccoupe
Copy link

ccoupe commented Dec 9, 2015

In Shoes3 self.start{} probably gets to app.start{}. It's a block to run after the all the widgets in partial ly evaluated Shoes.app are on screen and able to accept state settings. Some folks use a timer(0) block to do the final gui setup. It's something of a standard practice when setting the check or radio states after the Shoes.app block is loaded/evaluated but the event loop isn't really running so there's no widget to change, yet. Very much a Shoes evaluation huh? that bites everyone.

@thebenjy
Copy link
Author

thebenjy commented Dec 9, 2015

i actually prefer smaller text sizes but prob acknowledge a clean migration is required. maybe a switch to "update look n feel".
@ccoupe timer(0) seems fair approach. perhaps an alias to handle migrations?

@jasonrclark
Copy link
Member

Hey @thebenjy! I know it's been a long time, so you might not be interested still, but I've been working ahead on the various things you reported here. Appreciate the clear bug reports.

On the next to last, I've started up the beginnings of a compatibility list for Shoes 3. I'll definitely look at extending this into more of a migration guide closer to the 4.0 release, and the look-n-feel you point out will be a key element about that.

On the final sample, I've had trouble duplicating your result, but I wonder if it's because I don't have the same 1.png that it's referencing. In my Shoes 4 version when I popped some random image in, I see that the radio is very close to the left edge of the white background, so much so that the control highlighting slips over the edge, but nothing overlapping the bottom.

Here's a snapshot (with yellow background added in the remainder of the frame to help my eyes sort it out)

image

Thanks again for all the footwork, and sorry again that it took so long to get to them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants