Changes for page WebObjects with Scala

Last modified by Ravi Mendis on 2011/05/10 02:10

From version 353.1
edited by Ravi Mendis
on 2009/10/13 21:35
Change comment: There is no comment for this version
To version 356.1
edited by Ravi Mendis
on 2009/10/13 23:34
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -47,8 +47,10 @@
47 47  Scala doesn't have static variables or methods. However, a class can have a //Companion Object// that will allow you to achieve something equivalent to static variables.
48 48  One of the advantages of this approach is that it is **thread-safe**, so you don't have to worry about synchronizing access to these fields in a concurrent application.
49 49  
50 -In Java:
50 +The following is an example of the use of a //Companion Object// for Talent in Scala instead of static fields in Java.
51 51  
52 +Java:
53 +
52 52  {{code}}
53 53  
54 54  public class _Talent extends EOGenericRecord {
... ... @@ -56,7 +56,7 @@
56 56  
57 57  {{/code}}
58 58  
59 -In Scala:
61 +Scala:
60 60  
61 61  {{code}}
62 62