Viktor, I guess you didn't see my other "never mind" email as it went out about six minutes before you sent this. I arrived at the same conclusion. Duh.
But now I'm running out of heap space when I try to compile. I shut everything down, rebooted. Still breaks. I pulled out all the code I'd just added. Still breaks. Tried another app -- that works no problem. What could I have done to make it run out of heap space on compile? Anyone else run into this? Nothing in the warnings seems to be of any use at all. Chas. [WARNING] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space [WARNING] at scala.StringBuilder.<init>(StringBuilder.scala:33) [WARNING] at scala.StringBuilder.<init>(StringBuilder.scala:41) [WARNING] at scala.tools.nsc.symtab.Names$Name.decode(Names.scala:390) [WARNING] at scala.tools.nsc.symtab.Symbols$Symbol.nameString(Symbols.scala:1224) [WARNING] at scala.tools.nsc.symtab.Symbols$Symbol.toString(Symbols.scala:1261) [WARNING] at scala.tools.nsc.backend.icode.Members$Local.toString(Members.scala:305) [WARNING] at java.lang.String.valueOf(String.java:2615) [WARNING] at scala.StringBuilder.append(StringBuilder.scala:234) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.indexOf(GenJVM.scala:1526) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genBlock$1$1.apply(GenJVM.scala:914) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genBlock$1$1.apply(GenJVM.scala:866) [WARNING] at scala.Iterator$class.foreach(Iterator.scala:414) [WARNING] at scala.runtime.BoxedArray$AnyIterator.foreach(BoxedArray.scala:45) [WARNING] at scala.Iterable$class.foreach(Iterable.scala:256) [WARNING] at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24) [WARNING] at scala.tools.nsc.backend.icode.BasicBlocks$BasicBlock.foreach(BasicBlocks.scala:130) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genBlock$1(GenJVM.scala:866) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genBlocks$1(GenJVM.scala:789) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genCode(GenJVM.scala:1413) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genMethod(GenJVM.scala:592) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genClass$4.apply(GenJVM.scala:216) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genClass$4.apply(GenJVM.scala:216) [WARNING] at scala.List.foreach(List.scala:834) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genClass(GenJVM.scala:216) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:55) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:55) [WARNING] at scala.Iterator$class.foreach(Iterator.scala:414) [WARNING] at scala.collection.Map$$anon$6.foreach(Map.scala:123) [WARNING] at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase.run(GenJVM.scala:55) [WARNING] at scala.tools.nsc.Global$Run.compileSources(Global.scala:574) [WARNING] at scala.tools.nsc.Global$Run.compile(Global.scala:667) [WARNING] at scala.tools.nsc.Main$.process(Main.scala:73) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE Viktor Klang wrote: > > > On Fri, Mar 20, 2009 at 11:43 AM, Charles F. Munat <[email protected] > <mailto:[email protected]>> wrote: > > > Not really. What I want to do is have the object tell me what it is. > Unless I'm really misunderstanding isInstanceOf, I have to iterate > through all the possibilities. Plus, my brain is probably just fried, > but I'm not seeing how to use it in a match, so I'm having to run > through a bunch of if statements. I know there's a better way. Just > can't see it at 3:45 AM. > > > But you wrote: ". But then as I'm looping through them, I want to find out > what type of event they really are." > > so when you're looping through them, if you're doing pattern-matching > you could probably just: > > case x : MySubEvent => blah(x) > case y : MyOtherSubEvent => blugh(y) > case _ => ohSnap()! > > > > > > Chas. > > Viktor Klang wrote: > > > > > > On Fri, Mar 20, 2009 at 9:37 AM, Charles F. Munat <[email protected] > <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>>> wrote: > > > > > > I have a BaseEvent object from which various other events > (e.g. Seminar) > > inherit. I want to pull them all out in a query, so they come > out as > > BaseEvents. But then as I'm looping through them, I want to > find out > > what type of event they really are. There is an "event_type" > column in > > the database, but I don't know how to get at that. > > > > > > Don't fancy "isInstanceOf"? > > > > > > > > > > Anyone know offhand how to get the class of the objects? This > is in Lift > > with JPA/Hibernate. > > > > Thanks, > > Chas. > > > > > > > > > > > > -- > > Viktor Klang > > Senior Systems Analyst > > > > > > > > > > > -- > Viktor Klang > Senior Systems Analyst > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
