Giter Club home page Giter Club logo

shoes3's Introduction

THIS REPO IS NO LONGER ACTIVE!

Looking for continuing Shoes 3 support (CRuby-based)? Try https://github.com/shoes/shoes3

Looking for new development with Shoes 4 (JRuby)? Try https://github.com/shoes/shoes4

    ((( |||_| ///\ [[[_ (((
     ))) || |  \\/  [[_  )))
  an artsy any-platform app kit
      http://shoesrb.com

About Shoes

Shoes is the best little DSL for cross-platform GUI programming there is. It feels like real Ruby, rather than just another C++ library wrapper. If Gtk or wxWidgets is Rails, Shoes is Sinatra.

Let me tell you a story about Shoes

Way way back in the day, there was a guy named _why. He created a project known as Hackety Hack to teach programming to everyone. In order to reach all corners of the earth, _why decided to make Hackety Hack work on Windows, Mac OS X, and Linux. This was a lot of work, and so _why decided to share his toolkit with the world. Thus, Shoes was born.

Everybody loved Shoes and many apps were made. But, one day, _why left. In his memory, Team Shoes assembled, and carried on making Shoes. They released Shoes 3 in late summer 2010.

So what do these Shoes look like?

Here's a little Shoes app. It's a stopwatch!

Shoes.app height: 150, width: 250 do
  background rgb(240, 250, 208)
  stack margin: 10 do
    button "Start" do
      @time = Time.now
      @label.replace "Stop watch started at #@time"
    end
    button "Stop" do
      @label.replace "Stopped, ", strong("#{Time.now - @time}"), " seconds elapsed."
    end
    @label = para "Press ", strong("start"), " to begin timing."
  end
end

Here's what it looks like:

shoes timer

Pretty simple! For more samples, the manual, and a free book, check out the Shoes website.

Using Shoes

If you'd like to use Shoes to develop some apps... awesome! It's super easy: Just go to the downloads page on the Shoes website and download a copy of Shoes for your platform. Mac OSX, Windows, and Linux supported!

After you install Shoes, run it! You'll get a window like this:

shoes main window

You can then open any .rb file with Shoes code inside by choosing "Open an App." It'll open it up and run it, right away.

Once you're happy with your app, you can choose "Package an App" to wrap up your app as a .exe, .app, or a .run. Then you can share it with someone without a pair of Shoes to call their own.

Making your own Shoes

You can make your own pair of Shoes with a little bit of elbow grease. Since there are different instructions on each platform, we've got a page up on the Shoes development wiki about it. It's right here.

Shoes Around the Web

If you want to keep up to date with what's going on with Shoes, you can find us in various places:

Helping out with Shoes

So you'd like to lend a helping hand, eh? Great! We'd love to have you. To submit a patch to Shoes, just fork us, and send a pull request.

If you don't have any ideas yourself, take a look at the Issue tracker and see if anything strikes your fancy. If you need help working on something, don't be afraid to post to the mailing list about it!

Be sure to peer into the Shoes Wiki for instructions on how to get the source code to build, and to learn more knowledge that will come in handy if you want to help out!

If you're not a programmer, you can help Shoes by talking about it! Blog posts, tweets, tell your neighbors, call your grandma, whatever! Share Shoes with everyone!

shoes3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shoes3's Issues

System clipboard not working

The system clipboard does not work from/to Shoes on Windows. It does work properly on MacOS X 10.9+ and 10.6 (custom build).

TEST SCENARIOS
TEST (1):

  • Run the Shoes script below using Shoes
  • Open Notepad, write some text, select it and copy it to the system clipboard
  • Click on paste button in the Shoes script

EXPECTED RESULT Should paste the previously selected text into the Shoes script

TEST (2):

  • Click on copy button in the Shoes script
  • Return to the Notepad application and paste from the system clipboard

EXPECTED RESULT Should paste this is a Shoes string. into Notepad.

TEST (3)

  • Go back to the Shoes script and click on paste

EXPECTED RESULT Should paste this is a Shoes string. into the Shoes script.

Shoes.app(:title => "Copy and Paste", :width => 450, :height => 250) {
   button "copy" do
      self.clipboard = "this is a Shoes string."
   end
   button "paste" do
      para clipboard()
   end
}

Opening Shoes Splash and Shoes Manual programmatically crashes

Cobbler was missing the feature to be able to go back to splash screen rather than quitting Shoes entirely. Unfortunately, it is not possible to add this feature right now because calling Shoes.splash crashes Shoes. Works fine on MacOS X.

Shoes.app {
   button("splash")  { Shoes.splash and close }
   button("manual")  { Shoes.show_manual and close }
   button("console")  { Shoes.show_log and close }
   button("file")  { Shoes.show_selector and close }
   button("cobbler")  { Shoes.cobbler and close }
   button("package")  { Shoes.app_package and close }
   button("shy")  { Shoes.package_app and close }
}

Shoes Minor and Tiny version unavailable

Shoes::VERSION and Shoes::REVISION both currently returns 3. The second one should return 2 since it is clearly stipulated:

Shoes::REVISION is the Subversion revision number for this build.

There is currently no way to obtain the tiny version of Shoes. Shoes::VERSION should either return 3 or full version, or perhaps Shoes::FULL_VERSION should be available.

Missing in the manual Shoes > Built-in > _Built-in Constants_:

Shoes::VERSION
Shoes::RELEASE_TYPE
Shoes::RELEASE_BUILD_DATE

Scrolling with mousewheel on a scrollbar within a stack is not working

A scrollbar associated with a stack when using :scroll => true will not allow mouse scroll to scroll up and down. On Windows, it is possible to scroll with the mouse when the cursor is over the scrollbar. On MacOS X, it doesn't scroll with the mouse either way.

Shoes.app {
   stack(:height => app.slot.height, :scroll => true) {
      (0..100).each { |n| para "#{n}\n" }
   }
}

SHOES APP SCROLLBAR
The scrollbar is fully scrollable when it is on Shoes.app level.

Shoes.app {
   stack {
      (0..100).each { |n| para "#{n}\n" }
   }
}

Styles will not allow to position a window

Shoes App, Window and Dialog cannot be positioned using styles such as :left and :top as demonstrated in the following code snippet.

Shoes.app(:title => "Window Positioning", :left => 0, :top => 0) {}

Shoes Console should support autoscroll down

Shoes Console will not scroll down automatically when a new entry is displayed, which would be what one expects from a terminal-like debugging window.

The following code snippet behaves interestingly.

TEST SCENARIO

  • Run the script below
  • Open Shoes console (alt-/)
  • When the text goes beyond the window's height, scroll down few times quickly.

For a moment it will scroll down automatically.

Shoes.app {
   (0..100).each { |n|
      timer(n) { info n }
   }
}

Atypical scenario leads to a runtime error

Shoes.app(:title => "Causing a Runtime Error!", :width => 450, :height => 250) {
   stack { keypress { |key| info key } }
}

TEST SCENARIO

  • Run the script above using Shoes
  • Open Shoes console (alt-/)
  • Go back to the script window
  • Open Shoes manual (alt-?)
  • Go back to the script window
  • Press few letters, they should appear in Shoes console
  • Close Shoes console

image

list_box not appending items

When you try to append items to a list_box like it is a hash, nothing happens. Here is the code sample of this issue.

list

Enriching Shoes experience with interactive ruby

Shoes currently does not provide _runtime debugging facilities_ other than using Shoes Console, which is not interactive. Allowing access to IRB would greatly help in quick testing and possibly interacting with existing Shoes.APPS. It may also stimulate further development on expert-irb.rb.

IMPLEMENTATION

Focus is not working

The focus method does not work unless called using a timer (see workaround). The elements edit_box and list_box will not work at all (see limitations).

Shoes.app {
   e = edit_line
   e.focus
}

TEMPORARY WORKAROUND

Shoes.app {
   e = edit_line

   timer(0) { e.focus }
}

LIMITATIONS
The following code demonstrates that even with the workaround edit_box and list_box do not focus. It iterates through the array of elements that support focus method and invoke focus on each of them by an increment of time.

Shoes.app {
   e = []
   e << button("button")
   e << edit_box
   e << edit_line
   e << radio
   e << check
   e << (list_box :items => [1, 2, 3])

   (0..e.size - 1).each { |n|
      timer(n * 5) {
         info "#{n * 5} seconds: #{e[n].class}"
         e[n].focus
      }
   }
}

Removing QUIT_ALERT() and QUIT_ALERT_MSG() macro in ruby.h

The macro QUIT_ALERT() is not used in a manner that would warrant the usage of macros and may increase the difficulty of debugging. Moving the code into world.c:shoes_start() is suggested. QUIT_ALERT_MSG() is never referred into the code.

Command line help missing or incomplete

Shoes on Windows will not display command line help when typing shoes.exe -h. The new cshoes.exe does indeed display the help as expected. It is recommended to use a MessageBox to display the help on the windowed version of Shoes for Windows.

Additionally, Shoes on MacOS X displays an incomplete version of help when ran from the command line using Shoes.app/Contents/MacOS/shoes -h as shown here:

Usage: shoes [options] (app.rb or app.shy)
    -m  Open the built-in manual.
    -v  Display version info.

Whereas cshoes.exe -h on Windows displays a more exhaustive list:

Usage: shoes [options] (app.rb or app.shy)
    -m, --manual                     Open the built-in manual.
        --old-package                (Obsolete) Package a Shoes app for Windows,
 OS X and Linux.
        --cobbler                    Maintain Shoes installation
    -p, --package                    Package Shoes App (new)
    -g, --gem                        Passes commands to RubyGems.
        --manual-html DIRECTORY      Saves the manual to a directory as HTML.
        --install MODE SRC DEST      Installs a file.
        --nolayered                  No WS_EX_LAYERED style option.
    -v, --version                    Display the version info.
    -h, --help                       Show this message

start, finish, hover, leave events are not referring to the correct self for Shoes App, Window and Dialog

Shoes App, Window and Dialog will not receive the proper self reference on start, finish, hover and leave events. They will instead receive Shoes, of class Shoes, that _does not respond to instance_methods_ and such. The stack in the code below is the only one behaving properly.

Shoes.app(:title => "Shoes Events", :width => 450, :height => 250) {
   start { |n| para "Shoes: #{n}\n" }
   hover { |n| para "Shoes (hover): #{n}\n" }
   leave { |n| para "Shoes (leave): #{n}\n" }
   window(:title => "Window Events", :resizable => false) {
      start { |n| para "Window: #{n}\n" }
      hover { |n| para "Window (hover): #{n}\n" }
      leave { |n| para "Window (leave): #{n}\n" }
   }
   dialog(:title => "Dialog Events", :resizable => false) {
      start { |n| para "Dialog: #{n}\n" }
      stack {
         start { |n| para "Stack: #{n}\n" }
         finish { |n| alert "Stack: #{n}\n" }
         hover { |n| para "Stack (hover): #{n}\n" }
         leave { |n| para "Stack (leave): #{n}\n" }
         para "Hover over me!"
      }
   }
}

Uninstall shoes on linux

Add a desktop menu to un-install script for Linux that removes the desk top menu entries and Shoes ~/.shoes/federales/*

edit_line and edit_box swallows keypress events

Both edit_line and edit_box does not allow keypress events. It is not possible to handle keypress within an edit_line or edit_box once it is focused and the Shoes.app keypress event is ignore once the focus is on either one.

TEST SCENARIO

  • Run the script below
  • Type few keys, alt-keys, etc.
  • Check the keys are displayed
  • Click on the edit line
  • Type few keys, alt-keys, etc.

_EXPECTED RESULT_ the keys should pass through keypress, as it does on Windows.

Shoes.app {
   edit_line
   keypress { |n| para n }
}

Shoes.app contents unavailable outside its scope

The contents of any given Shoes.app is unavailable outside its scope, regardless of the manner it is referenced (variable, Shoes.APPS, etc). For example, on Windows, Shoes.app(3) can refer to its own contents using Shoes.APPS[1] but not access contents to other app listed in Shoes.APPS. On MacOS X, Shoes.app(2) can access to contents of Shoes.app(1) whereas Shoes.app(3) cannot. Other tests have proven that it is possible to add slots and elements to an existing Shoes app.

This issue seriously limits the ability to interact amongst Shoes.APPS but also when using IRB for fast prototyping or modifying a running Shoes app. _BE AWARE_ The Shoes Console output is different on Windows than MacOS X (and likely Linux too); platform specific implementation may cause the slight differences.

The Shoes script is available below after the console outputs.

SHOES CONSOLE ON WINDOWS

Info in <unknown> line 0 | 2015-01-26 10:35:38 -0500
contents: [(Shoes::Types::Stack), (Shoes::Types::Para)]

Info in <unknown> line 0 | 2015-01-26 10:35:38 -0500
Shoes.APPS[0].contents: [(Shoes::Types::Stack), (Shoes::Types::Para)]

Info in <unknown> line 0 | 2015-01-26 10:35:38 -0500
stack contents [(Shoes::Types::Para)]

Info in <unknown> line 0 | 2015-01-26 10:35:38 -0500
Shoes.app(3)>>Shoes.APPS[1].contents: [(Shoes::Types::Flow)]

Error in <unknown> line 0 | 2015-01-26 10:35:38 -0500
Shoes.app(2)>>Shoes.APPS:
undefined method `dump' for nil:NilClass
C:/Program Files (x86)/Shoes/lib/shoes/inspect.rb:126:in `inspect'
contents_not_available.rb:22:in `inspect'
contents_not_available.rb:22:in `block in <main>'
eval:1:in `instance_eval'
eval:1:in `block in <main>'
-e:1:in `call'

Error in <unknown> line 0 | 2015-01-26 10:35:38 -0500
Shoes.app(2)>>Shoes.APPS[0]:
undefined method `contents' for (Shoes::Types::App "Shoes")
contents_not_available.rb:28:in `method_missing'
contents_not_available.rb:28:in `block in <main>'
eval:1:in `instance_eval'
eval:1:in `block in <main>'
-e:1:in `call'

Info in <unknown> line 0 | 2015-01-26 10:35:38 -0500
Shoes.app(2)>>Shoes.APPS: [(Shoes::Types::App "Shoes"), (Shoes::Types::App "Shoes"), (Shoes::Types::App "Shoes"), (Shoes::Types::App "Shoes")]

Error in <unknown> line 0 | 2015-01-26 10:35:38 -0500
Shoes.app(2)>>Shoes.APPS[0]:
undefined method `contents' for (Shoes::Types::App "Shoes")
contents_not_available.rb:10:in `method_missing'
contents_not_available.rb:10:in `block (2 levels) in <main>'
eval:1:in `instance_eval'
eval:1:in `block in <main>'
-e:1:in `call'

SHOES CONSOLE ON MACOS X

Info in <unknown> line 0 | 2015-01-26 10:43:12 -0500
contents: [(Shoes::Types::Stack), (Shoes::Types::Para)]

Info in <unknown> line 0 | 2015-01-26 10:43:12 -0500
Shoes.APPS[0].contents: [(Shoes::Types::Stack), (Shoes::Types::Para)]

Info in <unknown> line 0 | 2015-01-26 10:43:12 -0500
stack contents [(Shoes::Types::Para)]

Info in <unknown> line 0 | 2015-01-26 10:43:12 -0500
Shoes.app(2)>>Shoes.APPS: [(Shoes::Types::App "Shoes"), (Shoes::Types::App "Shoes")]

Info in <unknown> line 0 | 2015-01-26 10:43:12 -0500
Shoes.app(2)>>Shoes.APPS[0].contents: [(Shoes::Types::Stack), (Shoes::Types::Para)]

Error in <unknown> line 0 | 2015-01-26 10:43:12 -0500
undefined method `contents' for (Shoes::Types::App "Shoes")
contents_not_available.rb:20:in `method_missing'
contents_not_available.rb:20:in `block in <main>'
eval:1:in `instance_eval'
eval:1:in `block in <main>'
contents_not_available.rb:18:in `call'
contents_not_available.rb:18:in `app'
contents_not_available.rb:18:in `<main>'
/Users/ian/Downloads/Shoes.app/Contents/MacOS/lib/shoes.rb:470:in `eval'
/Users/ian/Downloads/Shoes.app/Contents/MacOS/lib/shoes.rb:470:in `visit'
eval:1:in `<main>'

SHOES SCRIPT

@app = Shoes.app {
   s = stack { para "stack paragraph" }
   para "paragraph"
   info "contents: #{contents}"
   info "Shoes.APPS[0].contents: #{Shoes.APPS[0].contents}"
   info "stack contents #{s.contents}"
   Shoes.app {
      info "Shoes.app(2)>>Shoes.APPS: #{Shoes.APPS}"
      begin
         info "Shoes.app(2)>>Shoes.APPS[0].contents: #{Shoes.APPS[0].contents}"
      rescue Exception => e
         msg = e.backtrace.join("\n")
         error "Shoes.app(2)>>Shoes.APPS[0]:\n#{e.message}\n#{msg}"
      end
   }
}

Shoes.app {
   flow { para "flow paragraph" }
   info "Shoes.app(3)>>Shoes.APPS[1].contents: #{Shoes.APPS[1].contents}"
   begin
      info "Shoes.app(3)>>Shoes.APPS: #{Shoes.APPS}"
   rescue Exception => e
      msg = e.backtrace.join("\n")
      error "Shoes.app(2)>>Shoes.APPS:\n#{e.message}\n#{msg}"
   end
   begin
      info "Shoes.app(3)>>Shoes.APPS[0].contents: #{Shoes.APPS[0].contents}"
   rescue Exception => e
      msg = e.backtrace.join("\n")
      error "Shoes.app(2)>>Shoes.APPS[0]:\n#{e.message}\n#{msg}"
   end
}

Shoes.show_log

Shoes console not wrapping up text

Shoes console is not wrapping up text preventing a user to read all the information when it exceeds the width of the window. This issue on Linux is currently undetermined.

Shoes.app(:title => "Shoes Console Unwrapped", :width => 450, :height => 250) {
   info Shoes.instance_methods
   para "Check Shoes console (alt-/)"
}

Shoes on MacOS X
capture d ecran 2015-01-08 a 04 14 24 am

Shoes on Windows

image

Styles for Window and Dialog are the same

Window and Dialog are essentially the same styles. It would be expected that a dialog box is similar to an alert but with more control on its contents, for which minimize and maximize buttons are hidden and with the possibility to be modal or not. Shoes Manual clearly states that dialog should be given a dialog box look.

dialog(styles) { ... } » Shoes::App

Opens a new app window (just like the window method does,) but the
window is given a dialog box look.

SAMPLE CODE

Shoes.app(:title => "Window and Dialog") {
   window(:title => "Window", :width => 250, :height => 100) {
      para "Some text\n"
      button("ok")
   }
   dialog(:title => "Dialog", :width => 250, :height => 100) {
      para "Some text\n"
      button("ok")
   }
}

Para does not handle array and hash properly

Shoes has a strange way to interpret values at runtime. The reasonable expectation is that values should be changed in the order they are changed in the code. See the example below to get a better idea of the issue. This issue does not affect MacOS X — the size of the array Shoes::FONTS are respectively 492, 492 and 493 when tested with a slightly modified version of the code below.

TEST

Shoes.app {
   para Shoes::FONTS
   para "\n"
   para "#{Shoes::FONTS}\n"
   font "#{DIR}/fonts/Lacuna.ttf"
   para "#{Shoes::FONTS}\n"
}

EXPECTED RESULT the first Shoes::FONTS should be empty.

ACTUAL RESULT

Lacuna Regular
[]
["Lacuna Regular"]

Shoes App, Window and Dialog finish events are not working

Shoes App, Window and Dialog finish events are not working. The following code should cause an alert to pop up when each window is closed but the finish event is never fired up.

Shoes.app(:title => "Shoes Events", :width => 450, :height => 250) {
   start { |n| para "starting #{n}\n" }
   finish { |n| alert "finishing #{n}" }
   window(:title => "Window Events", :resizable => false) {
      finish { |n| alert "finishing #{n}" }
   }
   dialog(:title => "Dialog Events", :resizable => false) {
      finish { |n| alert "finishing #{n}" }
   }
}

TEMPORARY WORKAROUND

Shoes.app(:title => "Shoes Events", :width => 450, :height => 250) {
   start { |n| para "starting #{n}\n" }
   stack { finish { |n| alert "finishing #{n}" } }
}

keypress doesn't handle non-modifier combination keys

Keypress currently handles keys and modifier combination keys well. It is possible to make all kind of combinations with ctrl/cmd, alt and shift or all of those together. Normal key combinations is however impossible to catch, such as pressing left and up key at the same time, or two or more letters.

Why should we care? Games sometimes require handling such key combinations.

Shoes.app {
   keypress { |n| para n }
}

Using clipboard is confusing

The usage of clipboard is confusing and not as advertised. Shoes manual stipulates that clipboard = aString will store aString into the system clipboard. Unfortunately, it is not possible to use as stipulated and it is necessary to use self.clipboard.

Moreover, a method clipboard() is used to retrieve the content of the system clipboard. The usage would be best either one rather than a mixed way, either clipboard()/clipboard(aString) or clipboard/clipboard=.

Shoes.app(:title => "Copy and Paste", :width => 450, :height => 250) {
   button "copy" do
      self.clipboard = "this is a Shoes string."
   end
   button "paste" do
      para clipboard()
   end
}

Gtk2 Themes

Something from my wish list: Shoes should support user specified Gtk2 themes on Windows. Maybe some magic code in Cobbler to install the Gtk2 theme engine (exe /registry stuff) in the system. And associate Shoes (or even a Shoes packaged app) with a particular theme.

Fontconfig error: Cannot load default config file

Shoes.exe and cshoes.exe display this error on the console:

Fontconfig error: Cannot load default config file

Potential solution is to provide a fonts.conf file and including it in the Shoes directory and/or (perhaps) define environment variable FONTCONFIG_FILE to the fonts.conf path and name. On *NIX platforms, it is likely properly set to /etc/fonts/fonts.config or something alone this line.

Click event not working when a scroll bar is scrolled down

The click event is not working when there is a vertical scroll bar scrolled down (slightly or entirely).

_TEST SCENARIOS_
TEST (1)

  • Run the script below
  • Open Shoes console (alt-/)
  • Click anywhere in the window
  • Check Shoes console

EXPECTED RESULT the button number and coordinates displayed in Shoes console.

TEST (2)

  • Scroll down
  • Click anywhere in the window
  • Check Shoes console

EXPECTED RESULT the button number and coordinates displayed in Shoes console.

CURRENT RESULT nothing is displayed.

TEST (3)

  • Scroll all way up
  • Click anywhere in the window
  • Check Shoes console

EXPECTED RESULT the button number and coordinates displayed in Shoes console.

Shoes.app {
   click { |n, l, t| info "#{n}, (#{l}, #{t})" }
   (0..100).map { [*('A'..'Z')].sample(rand(25) + 1) }.each { |n|
      para n
   }
}

Restructure Wiki.

The current wiki pages are seriously out of date for how Shoes 3.2 works. I have a rough outline. Comments?

Newbies - Leave as is

Pointers to the manuals, tutorials

Intermediate (Ruby aware)

Change the page names and links, but otherwise OK enough (for now)

Shoes developer (introduces Tight vs Loose Shoes)

Rake files - two sections

* Basic rake build, rake clean cycle and discuss targets
* Details to read after installing dependencies. Describes general Shoes rake file concepts  

Linux Dependencies.

  • Install dev libs
  • Build Loose Shoes.
  • Build Tight Shoes.
  • Ruby requirements. How to build ruby.

OSX Dependencies.

* Homebrew
* Build Loose Shoes.
* Build Tight Shoes.
* Ruby requirements. How to build Ruby.

Windows (mingw) Dependencies

* Installing Ruby and Devkit
* Installing the pre-compiled dlls and headers
* Build Loose Shoes
* Build Tight Shoes

Cross compiling with Ubuntu [debian]

* Setting up schroots
* Setting up qemu for arm
* Setting up for MinGW

I'm not a fan of markdown

Multiple invocations

From a blog comment, Luka would like

There is something I'd like to suggest in a new version of federales. I'd like it if it had one more option when shoes are started, something like test-mode which would open a new window from where you will start your app. That window will stay opened so you can check your progress with one click. It should be easy to get done, windows like this would open when you click 'test-mode' in the main menu of shoes.

Shoes.app do
button "Test" do
load @app
end
end

Content and scrollbar are not displayed properly

The content and scrollbar are not displayed properly when the height of the window is greater than the screen resolution on MacOS X 10.6.8 (custom built Shoes).

mac os x server 10 6-2014-12-28-19-32-33

Shoes.app(width: 800, height: 1400) do
   (1..100).each do |n|
      para "Filling up space #{n}\n"
   end
end

Antivirus causes Shoes to be sandboxed and reload

Avast! on Windows might cause any Shoes app, Shoes itself and Shoes manual to close and reload. It might also attempt to sandbox the NSIS installer.

Recommended solutions:

Further references:
https://blog.avast.com/2012/03/20/autosandbox-why-are-you-annoying-me/

Shoes console and manual should support system clipboard and save file

The current implementation of Shoes console and manual does not provide advanced features that would be useful for real world usage, such as, copy to clipboard and save to file features. Select text with the mouse could be useful as well.

For example, a copy button and a save button to the left of run this button in the manual and left to clear button in the console.

Pango-WARNING couldn't load font

Shoes unveils a series of warnings emitted by Pango library on Windows.

(cshoes.exe:2456): Pango-WARNING **: couldn't load font "Lacuna Not-Rotated 17.3
33984375px", falling back to "Sans Not-Rotated 17.333984375px", expect ugly outp
ut.

Recap from #46:

  • MacOS X and Linux version have a launch script handling Pango dynamic setup.
  • Includes pangorc, pango.modules, pango-querymodules files.
  • Windows version doesn't need all the DLLs required by Pango, so those are not included.
  • Windows version might need setting up Pango at installation time in https://github.com/Shoes3/shoes3/blob/master/platform/msw/base.nsi.

TESTING LACUNA FONT

Shoes.app {
   font "#{DIR}/fonts/Lacuna.ttf"
   para "#{Shoes::FONTS}\n"

   para "THIS IS A NORMAL FONT | this is a normal font\n"
   para "THIS IS A LACUNA FONT | this is a lacuna font\n", :font => "Lacuna Regular"
}

_CONSOLE OUTPUT_

(shoes.exe:9868): Pango-WARNING **: couldn't load font "Lacuna Not-Rotated 16.0009765625px", falling back to "Sans Not-Rotated 16.0009765625px", expect ugly output.

_RENDERING_
image
The rendering seems to work despite the warning.

visit is not working

The Shoes Manual on page Furthermore > Internet contains links to Shoes github, blogs, mailing list, etc. The code in https://github.com/Shoes3/shoes3/blob/master/lib/shoes/help.rb uses visit to open a web browser on the given URL. _This doesn't work on Windows but does work on MacOS X._

Also, The Shoes Manual stipulates that visit is intended to load Shoes application rather than web pages.

visit(url: a string)
Changes the location, in order to view a different Shoes URL.

Absolute URLs (such as http://google.com) are okay, but Shoes will be expecting a Shoes application to be at that address. (So, google.com won't work, as it's an HTML app.)

Shape code sample in Shoes Manual is not working

The Shoes Manual code sample for shape(left, top) { ... } in _Slots > Art_ section is not working. Shoes Console is reporting that the constant PI is not initialized.

Error in <unknown> line 0 | 2015-01-25 13:20:02 -0500
uninitialized constant PI
<main>:4:in `block (2 levels) in <main>'
<main>:2:in `call'
<main>:2:in `shape'
<main>:2:in `block in <main>'
eval:1:in `instance_eval'
eval:1:in `block in <main>'
<main>:in `call'
<main>:in `app'
<main>:in `<main>'
C:/Program Files (x86)/Shoes/lib/shoes/help.rb:215:in `eval'
C:/Program Files (x86)/Shoes/lib/shoes/help.rb:215:in `run_code'
C:/Program Files (x86)/Shoes/lib/shoes/help.rb:64:in `block (4 levels) in dewikify_code'
-e:1:in `call'

edit_box does not support scrollbar related methods

Shoes edit_box does not respond to scroll_top, scroll_max, scroll_height, scroll and gutter.

image

Shoes.app {
   @p = para
   stack do
   [edit_line, edit_box].each { |n|
      [:scroll_top, :scroll_max, :scroll_height, :scroll, :gutter].each { |m|
         @p.text += "#{n.class}##{m}: #{n.respond_to?(m)}\n"
      }
      @p.text += "\n"
   }
   end.hide
}

Background is overflowing on scrollbar when using a stack

The background declared in a stack is overflowing when a scrollbar is present. This issue is not present when background is declared on Shoes.app. A _potential solution_ could be to change the Z order of the scrollbar to ensure it is on top.

SETTING BACKGROUND ON A STACK
image

Shoes.app {
   stack(:top => 20) {
      [black, blue, red, green].each { |n|
         stack(:height => 80) { background n }
         stack(:height => 80) {}
      }
   }
   para
}

SETTING BACKGROUND ON SHOES APP
image

Shoes.app {
   background red
   (0..21).each { para [*('A'..'Z')].sample(rand(25) + 1), "\n" }
}

Kernel#puts is not working

Kernel#puts is swallowed by Shoes and not displayed in the Shoes console. Windows newest cshoes.exe will however display puts accordingly to the calling console (cmd) but Shoes will not on MacOS X. This issue on Linux is currently undetermined.

Shoes.app(:title => "Copy and Paste", :width => 450, :height => 250) {
   para "Check Shoes console (alt-/)"
   puts "This should be displayed in Shoes console."
}

TEMPORARY WORKAROUND

module Kernel
   def puts(str)
      info str
   end
end

Shoes.app(:title => "Copy and Paste", :width => 450, :height => 250) {
   para "Check Shoes console (alt-/)"
   puts "This should be displayed in Shoes console."
}

Shy tmpdir removal removes content but not directory

Fix 33c041c removes the content of the tmpdir created by a Shy app but not the directory itself.

TEST SCENARIO on Windows

  • Open a file browser on %TEMP%
  • Open a Shy file with Shoes
  • Check %TEMP% for the presence of a directory named shoes-<Shyname>.<random number>
  • Close the Shy app
  • Check %TEMP% again

EXPECTED RESULT shoes-<Shyname>.<random number> should be entirely removed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.