Hi,
I'm having a problem with MappedEnums.
Here is my enumeration:
object WatchingState extends Enumeration {
val RequestedInfo = Value(1, "Requested Info")
...
}
My mapper has:
object state extends MappedEnum(this, WatchingState)
I want to do this:
val w:WatchingState.type#Value =
mapper.state.is
I got the .type#Value thing from
http://stackoverflow.com/questions/2364555/referring-to-a-enumeration-value-type-in-a-method-signature
but the compiler says non:
[error] /Users/channing/Code/work/workspace-3.5/cmiex/web/src/main/
scala/com/cmiex/web/model/User.scala:64: type mismatch;
[error] found : com.cmiex.web.model.WatchingState#Value
[error] required: com.cmiex.web.model.WatchingState.Value
[error] val w:WatchingState.type#Value =
mapper.state.is
[error] ^
So I tried this:
val w:WatchingState#Value =
mapper.state.is
But no:
[error] /Users/channing/Code/work/workspace-3.5/cmiex/web/src/main/
scala/com/cmiex/web/model/User.scala:64: not found: type WatchingState
[error] val w:WatchingState#Value =
mapper.state.is
[error] ^
and this:
val w:WatchingState.Value =
mapper.state.is
Nope:
[error] /Users/channing/Code/work/workspace-3.5/cmiex/web/src/main/
scala/com/cmiex/web/model/User.scala:64: type mismatch;
[error] found : com.cmiex.web.model.WatchingState#Value
[error] required: com.cmiex.web.model.WatchingState.Value
[error] val w:WatchingState.Value =
mapper.state.is
[error] ^
Completely stumped, what am I doing wrong.
Channing