Class: Opine::Native::Alert

Inherits:
Alert show all
Defined in:
lib/opine/widgets/alert_osx.rb,
lib/opine/widgets/alert_win.rb

Instance Attribute Summary

Attributes inherited from Alert

#application, #text

Instance Method Summary collapse

Constructor Details

#initialize(options, &block) ⇒ Alert

Returns a new instance of Alert.



2
3
4
5
6
7
8
9
# File 'lib/opine/widgets/alert_osx.rb', line 2

def initialize(options,&block)
	super

  application.activateIgnoringOtherApps true
  alert = Cocoa::NSAlert.alloc.init.autorelease
  alert.setMessageText text
  alert.runModal
end