Recommend Me


Mercredi 20 juin 2007

BD-Cast #2


DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2
DB-Cast #2

#  AppController.rb #  FadeWindow # #  Created by greg on 19/06/07. #  Copyright (c) 2007 Grégoire Lejeune. All rights reserved. require 'osx/cocoa' class AppController < OSX::NSObject   ib_outlet :windows   def initialize     @timer        = nil     @appTerminate = false   end   def awakeFromNib     OSX::NSApp.setDelegate( self )   end   def applicationShouldTerminate( sender )     if @appTerminate       return true     else       @timer = OSX::NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( 0.07, self, :fadeOut, nil, true )       return false     end   end   def fadeOut( theTimer )     if @windows.alphaValue > 0.0       @windows.setAlphaValue( @windows.alphaValue - 0.2 )     else       @timer.invalidate       @windows.close       @appTerminate = true       OSX::NSApp.terminate( self )     end   end end
• • •

Un commentaire »

  1. [...] C’est ici… • • • [...]

    Ping par greg.rubyfr.net»Blog Archive » BD-Cast #2 — Mercredi 20 juin 2007 @ 18:06

RSS des commentairesTrackBack URI

Laisser un commentaire

You must be logged in to post a comment.

Powered by: WordPress • Template adapted from the Simple Green' Wench theme - RSS