Class: Rad

Inherits:
ArcadiaExt
  • Object
show all
Defined in:
ext/ae-rad/ae-rad.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inspectorObject (readonly)

Returns the value of attribute inspector.



13
14
15
# File 'ext/ae-rad/ae-rad.rb', line 13

def inspector
  @inspector
end

#libsObject (readonly)

Returns the value of attribute libs.



11
12
13
# File 'ext/ae-rad/ae-rad.rb', line 11

def libs
  @libs
end

#paletteObject (readonly)

Returns the value of attribute palette.



12
13
14
# File 'ext/ae-rad/ae-rad.rb', line 12

def palette
  @palette
end

Instance Method Details

#load_libsObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'ext/ae-rad/ae-rad.rb', line 27

def load_libs
  @libs = ArcadiaLibs.new(self)
  libs = conf('libraries').split(',')
  libs.each{|lib|
    if lib
      begin
        require conf('libraries.'+lib+'.source')
        @libs.add_lib(
        ArcadiaLibs::ArcadiaLibParams.new(
        conf('libraries.'+lib+'.name'),
        conf('libraries.'+lib+'.source'),
        conf('libraries.'+lib+'.require'),
        eval(conf('libraries.'+lib+'.collection.class')))
        )
      rescue Exception
        msg = "Loading lib "+'"'+lib+'"'+" ("+$!.class.to_s+") "+" : "+$! + " at : "+$@.to_s
        if Tk.messageBox('icon' => 'error', 'type' => 'okcancel',
          'title' => '(Rad) Libs', 
          'message' => msg) == 'cancel'
          raise
          exit
        else
          Tk.update
        end
      end
    end
  }
end

#on_build(_event) ⇒ Object



14
15
16
# File 'ext/ae-rad/ae-rad.rb', line 14

def on_build(_event)
  load_libs
end

#show_radObject



18
19
20
21
22
23
24
25
# File 'ext/ae-rad/ae-rad.rb', line 18

def show_rad
  if @palette.nil?
    @palette = Palette.new(self)
    @inspector = ObjiController.new(self)
  else
    float_frame(0).show
  end
end