Newbie question regarding constructor confusion in Oxygene for Java

these days, i am learning Oxygene and fascinated about how oxygene language itself is so flexible.
my question is…
When i look at the code of cubes live wallpaper example(one of Android example)

there’s code like this.
CubeEngine nested in CubeWallpaper1 = public class(WallpaperService.Engine)

public
constructor (wallpaperService: CubeWallpaper1);

and the code works fine. but simply i don’t understand why the constructor requires CubeWallpaper1 argument.

the android api reference about WallpaperService.Engine said
there’s only one public constructor "WallpaperService.Engine()"
and it doesn’t requires any arguments.
http://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html

so i tried code’s like this
CubeEngine nested in CubeWallpaper1 = public class(WallpaperService.Engine)

public
constructor;

end

and compiler saying “no matching or parameterless constructor in ancestor”

i strongly feel this must be a user(me) error. but i don’t understand how it works. please help me.

thank you.

I’m not familiar with this sample, but this could be because Java nested classes work differently than Oxygene ones. In Java, a nested class always has a reference to a parent class instance. in Oxygene, nested classes are standalone, the nesting is really just a scope thing, and a CubeEngine, by default, would know about a specific CubeWallpaper instance.

in Oxygene, you would need to manually represent that relationship yourself, if needed — for example by providing a field and said constructor.

Does that help/make sense?

it makes sense! thanks for quick and detailed reply.