Hello...

I’m using scala with WebObjects/Wonder for a number of apps including a bunch 
of data loading/analyzation utilities (also exposed as services)

This works extremely well and seamlessly (thanks to some of the 
scala.collection.JavaConversions._ and other bits), but there are a couple 
things about using EO’s that I’m working around and I wonder if someone here 
has more insight into where this mismatch is happening.

Using ERXEOControlUtilities.createAndInsertObject(…) results in errors that the 
EOClassDescription cannot be found. 

Calling: 
val lab = ERXEOControlUtilities.createAndInsertObject(emrec, 
"BloodMeasurement").asInstanceOf[BloodMeasurement]
    
...will fail (

but 
val lab = new BloodMeasurement()
emrec.insertObject(lab)

… works normally (but feels so 1998)

It looks like scala is not getting the class descriptions from the model, but I 
wouldn’t expect it to care if ERXEOControlUtilities is the class that needs the 
model.

As long as I’m asking Scala questions, is there a way to use the static fields 
of the eogenerated classes without addressing them directly? (Perhaps this is 
an Eclipse issue, but the compiler doesn’t seem to know about 
BloodMeasurement.ENTITY_NAME, but it does know about 
_BloodMeasurement.ENTITY_NAME. I imagine this has something to do with how 
Scala treats “companion objects” in relation to static fields in Java, but I 
don’t know if there is a way to deal with this more elegantly (as there is with 
all of the collections and functional goodness in Scala)


Larry Mills-Gahl
[email protected]






Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to