User Profile

Collapse

Profile Sidebar

Collapse
madita1212
madita1212
Last Activity: Nov 10 '15, 10:32 AM
Joined: Nov 10 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • madita1212
    replied to Wrong selected Item with surselection
    in Ruby
    Solution:

    Code:
    def show_project
      # updates the status of the chosen project 
      chosenList    = $list.curselection()
      chosenItem    = chosenList[0]
      $proj_name    = $list.get(chosenItem)
      $status.value = "Project chosen: #{$proj_name}"
    end
    See more | Go to post

    Leave a comment:


  • madita1212
    started a topic Wrong selected Item with surselection
    in Ruby

    Wrong selected Item with surselection

    *curselection

    So I am very new to Ruby and Tk and I have a Problem, which solution I didn't find after hours of research:

    I have a directory which contains many projects.
    With the following code I insert the names of the existing projects into a Listbox:

    Code:
    $projects = Dir.entries("#{Dir.pwd}/projects")[2..-1] 
    $projects.each {|f| $list.insert 'end', f}
    I created...
    See more | Go to post
    Last edited by madita1212; Nov 10 '15, 07:11 AM. Reason: *Typo
No activity results to display
Show More
Working...