toplevel

Where are methods defined at the ruby top level?

EDIT: this post only applies to Ruby 1.9 Hi, At the toplevel method definition should result in private methods on Object, and tests seem to bear this out: def hello; "hello world"; end Object.private_instance_methods.include?(:hello) #=> true Object.new.send(:hello) #=> "hello world" However, the following also works (at toplevel)...

How to access a toplevel entity in ruby, from inside a module which defines the same name.

Inside a module I have a class named Process. module M Process= Class.new Process::wait(0) end This raises NoMethodError. How do I access the toplevel Process from inside the module? Is this at all possible, without renaiming my class? ...

Windows Forms: Unable to Click to Focus a MaskedTextBox in a Non TopLevel Form

Like the title says, I've got a Child form being shown with it's TopLevel property set to False and I am unable to click a MaskedTextBox control that it contains (in order to bring focus to it). I can bring focus to it by using TAB on the keyboard though. The child form contains other regular TextBox controls and these I can click to f...

How to run python top level/interpreter with file input?

I've always wondered how to do this, it's useful for manual unit testing of individual python scrips. Say I had a python file that did something, and I wanted to run it in the top level, but after it finishes, I want to pick up where it leaves off. I want to be able to use the objects it creates, etc. A simple example, let's say I have...

How do I make it so a two top level widgets can't be open simultaneously?

I have a top level widget that is created when a button is pressed. How do I make it so when that same button is pressed again, while the top level widget is still open it simply moves the top level widget into focus? ...

A real top level window with Qt ?

Hello, i use the last Qt version for a projet and the QProcess : http://doc.qt.nokia.com/4.6/qprocess.html. I have a question - i want to lauch program from my application by using QProcess . I want to display a QGraphicsView transparent on full screen over the launched program. For the moment: i hide the view, launch the program, slee...

I Need a little help with Python, Tkinter and threading

I have a Python script which uses Tkinter for the GUI. My little script should create a Toplevel widget every X seconds. When I run my code, the first Toplevel widget is created successfully, but when it tries to create a second one the program crashes. What I am doing is using the after method to call the function startCounting every ...

Inconsistent behaviour when attempting to highlight C# TextBox

I'm building a C# WinForms program, and my textboxes do not allow the user to highlight the text consistently throughout the program. In some places, the highlighting works normally: you type something in the box, click and drag over some text, and it highlights where you dragged. In other places, clicking and dragging does not select ...

Saving my running toplevel for later

Hi, When working in the ocaml or ghci toplevels I often build up a significant "context" for want of a better word, values bound, functions, modules loaded, and so on. Is there a way to save all of that and reload it later so I can continue exactly where I left off? Or better yet, dump out the entire lot as a text file that could be rel...