Skip to content

Commit

Permalink
changed UIApplication to NSApplication for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalmoksha committed Oct 7, 2016
1 parent 398070b commit d1437aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/osx/sugarcube-repl/repl.rb
Expand Up @@ -4,12 +4,12 @@ class << Repl
def window(index=nil)
if index
NSApplication.sharedApplication.windows[index]
elsif UIApplication.sharedApplication.keyWindow
UIApplication.sharedApplication.keyWindow
elsif UIApplication.sharedApplication.mainWindow
UIApplication.sharedApplication.mainWindow
elsif NSApplication.sharedApplication.keyWindow
NSApplication.sharedApplication.keyWindow
elsif NSApplication.sharedApplication.mainWindow
NSApplication.sharedApplication.mainWindow
else
UIApplication.sharedApplication.windows.select { |window|
NSApplication.sharedApplication.windows.select { |window|
window.contentView != nil && window.contentView.subviews.count > 0
}.first
end
Expand Down

0 comments on commit d1437aa

Please sign in to comment.