scala-2.7.7

Illegal inheritance compilation error using Scala 2.7.7 and LIFT 1.1-SNAPSHOT

I am using JDK 1.6.0_16, and Scala 2.7.7, compiling with maven. I do mvn clean compile and I get four errors, but they are identical, in different models: [ERROR] C:\Users\owner\workspace\ResumeApp\src\main\scala\jblack\resumeapp\lift\ model\ContactInfoModel.scala:13: error: illegal inheritance; [INFO] self-type jblack...

Strange behavior: Scala Actors 2.7.7 vs. 2.8-Snapshot

I'm an 18 years old trainee and I'm discovering scala which I like very much :-). To get familiar with the scala actors I wrote a small simulation with some gears and one controller. The ActorApplication creates N gears with random speed. The controller calculates a synchronization speed and starts the gear-actors. The gears synchronize ...

Scala type inference failure on "? extends" in Java code

I have the following simple Java code: package testj; import java.util.*; public class Query<T> { private static List<Object> l = Arrays.<Object>asList(1, "Hello", 3.0); private final Class<? extends T> clazz; public static Query<Object> newQuery() { return new Query<Object>(Object.class); } public Query(Class<? ext...

Stuck at "Hello World" with IntelliJ IDEA 9.0.1 for Scala

I've been using Eclipse since 2.x and IDEs in general for over 20 years (since Turbo Pascal and Turbo C in the late '80s!). (that preamble is supposed to imply, "I'm not an idiot" ... but doesn't sound so smart as I read it... LOL :-] ) Now I'm trying to use the Scala debugger in IntelliJ 9.0.1. I've resigned myself to an old standby, ...

How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?

I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far. I've been able to edit programs (within syntax highlighting and completion... yay!). But I'm unable to run even the simplest "Hello World". This was the original error: Scala signature Pr...

initialising a 2-dim Array in Scala

(Scala 2.7.7:) I don't get used to 2d-Arrays. Arrays are mutable, but how do I specify a 2d-Array which is - let's say of size 3x4. The dimension (2D) is fixed, but the size per dimension shall be initializable. I tried this: class Field (val rows: Int, val cols: Int, sc: java.util.Scanner) { var field = new Array [Char](rows)(cols) ...

How to extract valid email from larger string in Scala

My scala version 2.7.7 Im trying to extract an email adress from a larger string. the string itself follows no format. the code i've got: import scala.util.matching.Regex import scala.util.matching._ val Reg = """\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b""".r "yo my name is joe : [email protected]" match { case Reg(e) => println("matc...

idiomatic property changed notification in scala?

I'm trying to find a cleaner alternative (that is idiomatic to Scala) to the kind of thing you see with data-binding in WPF/silverlight data-binding - that is, implementing INotifyPropertyChanged. First, some background: In .Net WPF or silverlight applications, you have the concept of two-way data-binding (that is, binding the value of ...