Karel Universe Drag and Drop Editing System V2 FAQ

This page gives simple instructions for just about everything you can do with the Karel Universe V2 system.

Definitions:

delete/backspace means "delete" on the PC and "delete or backspace " on the Mac
Option/alt means "alt" on the PC and "option" on the Mac

How do I:

Save my work

It is done automatically.

Add an Abstract Class

Hit the New Class tab, then select Abstract Class rather than Ordinary Class. The structures tree now contains items to add abstract methods. Select the superclass as usual.

Add an Interface

Hit the New Class tab, then select Interface. The structures tree now contains items to add abstract methods.

Create a class that implements an interface

Hit the New Class tab then select the interface from the popup. You can only implement one interface (or NONE) here, though that is not a Java restriction.

Create an interface that extends another

Hit the New Class tab and select Interface. Then select the interface to extend from the popup list. Note that the dialog says "implement" though a new interface will properly be extend an existing one.

Create a new object or robot.

Drag the icon in the types tree (top of the left pane) into your program at the place in which you want it to appear. If it is legal to drop the icon, you will see a green (or blue) hi light. The drop will occur immediately after the hi lighted spot. You will be prompted via dialog for the name and any needed arguments. Each icon in the types tree has a sub tree that will show you the features of objects of that kind. Click to open the sub trees.

Send a message to an existing object or robot

Find the robot or object in the instance tree (middle of the left pane). Open its methods or predicates sub-tree by clicking. Choose the message you want to send and drag it into the program.

Delete a statement from a program.

Click the statement to hi light it. Then hit the delete/backspace key.

Undo a previous operation

Hit the undo button at the top of the main window. Note that if it isn't "lit" there is nothing to undo. If it is lit then you will undo the latest "undoable" command, though this might not be the last thing you did. In particular, if you insert an assignment (undoable) but then modify it before you enter any other undoable, hitting undo will remove the assignment. Note that hovering the mouse over the undo button will show you what will be undone. Note also that the system keeps a stack of undoable commands so you can work backwards through (some of) your actions.

Change the left or right side of an assignment statement

Double click the assignment. Fill in the dialog.

Delete a Class or Interface

Double-click the class/interface first (header) line. Select "Remove this class and quit" (but nothing else) and hit the Save button. The system will quit, but when you restart the class will not be present. Note that this might be useful if you make a serious error when creating the class or interface. Note also that the files have not been erased (see the project directory), but only removed from the active project as defined in the project .vkp file.

Change the superclass of an existing class, change its name, etc

You can't

Delete a Method from a Class

Select its header with the mouse and then hit the delete/backspace key.

Delete a statement from a task or method

Select it and hit the delete/backspace key.

Show real Java syntax in the code window

This is a startup option in the initial dialog. Note that it isn't really 100% Java, but is close.

Add a parameter to a method or a constructor

Option/alt-doubleClick the header of the method or Constructor. Choose a type and a name.

Remove a parameter from a method or constructor or rename it.

Double Click the header and make choices in the resulting dialog.

Create an if/else statement

First create an if statement (dragging). Then add the else clause to it (dragging again). Drag in a predicate (or true/false) for the test.

Change the number of times a loop iterates

Double click the statement's first line (loop...). Fill in the dialog.

Run a program

Hit the run button at the top. A Stop Run button will appear in case you need to terminate the execution. Note that compiling your program is done automatically. It is not a separate step here.

Step through a program, one statement at a time

First hit "Initialize Step by Step". Then hit the "Run Highlighted Statement" button repeatedly. The program statement to be executed next is highlighted in the task window. Note that you cannot step into your own instructions. They are treated as atomic units here.

Create a world/Read a world/Save a world

Hit the World Builder button at the top. You can create a world and save it to a file. You can also open a world saved earlier.

Use the files I create here in a more "professional" IDE, such as Eclipse

Find the project directory. It is shown whenever you run in the first log message. Copy the files from there that end in .java to the new environment.

See the highlighting. I have a color vision deficiency

Select safe colors in the startup dialog. It may be better, though there are a small number of people who see neither red/green distinctions nor orange/blue ones. If you are really stuck here, write to me. It would be easy for me to tailor a special version for your needs.