Wiki

root/cobra/trunk/Tests/100-basics/034j-set-property.cobra

Revision 2636, 0.6 KB (checked in by Charles.Esterbrook, 7 weeks ago)

JVM back-end progress.
credit:hopscc

  • Property svn:eol-style set to native
Line 
1#.require. jvm
2namespace Test
3    class Test
4        def main is shared
5            # this would be ideal but its deprecated
6            # maybe use to test Attributes/Annotations when add handling for them
7            #d = Date()
8            #minutes = d.minutes    # d.getMinute
9            #d.minutes = minutes    # d.setMinute
10            #print d
11           
12            fd = Java.Beans.FeatureDescriptor()
13            fd.name = 'Polly'
14            fd.shortDescription = 'Polly wolly Doodle'
15            #print 'FeatureDescriptor: [fd.getName], [fd.getShortDescription]'
16            name = fd.name
17            fd.name = '[name]nu'
18            #print 'FeatureDescriptor: [fd.getName], [fd.getShortDescription]'
19            assert fd.name == 'Pollynu'
20            assert fd.shortDescription == 'Polly wolly Doodle'
21
Note: See TracBrowser for help on using the browser.