junk

Ruby code posted
created at 02 Dec 05:12

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

  def buttonChooseFolder_clicked
    if folder = VR_Dialog.folder_box(@builder)
      if folder =~ /^#{@path}\b/
        VR_Dialog.message_box("You must select a backup path outside the project's root folder.")
      else  
        @builder['entryBackupPath'].text = folder
      end
    end  
  end

  def get_db()
    return @projects[@path].db
  end

  #todo validate
  def buttonSave_clicked
    b = @builder
    @use_other_editor = b['checkUseEditor'].active?  
    @default_editor = b['entryEditor'].text  
    @backup_path = b['entryBackupPath'].text
    spaces = b['entryTabSpaces'].text.to_i
    @tab_spaces = spaces if spaces > 0 and spaces < 9   
    projects[path].output_file = b['entryOutputFile'].text  
    projects[path].create_require = b['checkCreateRequire'].active? 
    vr_save()
    buttonCancel_clicked
  end

  def buttonCancel_clicked
    @builder['window1'].destroy
  end



# overwrite vr_save so it always saves in @home dir
#  def vr_save()
#    super(@homedb)
#  end
  
983 Bytes in 3 ms with coderay