I was debugging a new feature in the Linkage program and the program seemed to hang. I couldn’t select anything. I thought it was a symptom of debugging but now a user has reported the same problem, I think. I’m trying to figure out what I did recently that could cause this sort of thing. A loop in the code that keeps looping forever would do this. Do I find every loop and add a count limit to it?

So you ask: “What is this new feature?”

It’s a message underneath the toolbar text entry box for entering dimensions. Here’s some images that explain it pretty well:

image    image    image    image

When you type in a number or pair of numbers in that box, they are interpreted as the things described below. Enter and angle and the angle changes. There is only ambiguity in a few situations and those situations require more info typed into the box. For instance, to scale the entire set of selected elements, enter a number followed by a percent sign. The percent sign tells the program to do the scaling. And to rotate, enter an angle followed by an asterisk. There’s no way to type in a “degrees” symbol so I opted to use the asterisk for this. The angle will be used to rotate the entire selection even if three connectors are selected.

I also added a message in the status bar to show stretch and rotate information when selections are being stretched or rotated:

image    image

One thing I am not sure about is the coordinate space used in the Linkage program. Angles are all positive moving counterclockwise to match math angles. This is different from angles in a compass that are positive moving clockwise. I never felt comfortable with the fact that there are two different angle directions in the world and how that could have happened centuries ago.

You can’t see the mouse pointer in the last two images above – it is stretching the selection in the first image and rotating it in the second.

As for the bug? I’m trying to edit mechanisms until I can make it happen again. My thought is that the problem happens when the software is doing something complicated like deleting links that are fastened to other links, or something like that.