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)...
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?
...
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...
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...
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?
...
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 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 ...
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 ...
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...