omniJS: Canvas.background.layer Errors where 'undefined' expected

As a Shape, Canvas.background duly inherits a .layer property from Graphic

Perhaps this is a matter of taste, but after a longish debugging session, I have finally tracked a problem down to the discovery that if we query the .layer property of a Shape which is the canvas background, in lieu of the expected null (or perhaps undefined), we trigger a Layer error, and script execution stops.

I think my personal request would be that a polite enquiry after a property value should be rewarded by a null or undefined value rather than an error and the termination of execution. Does that seem sensible ?

Thanks for this report! It will return null after r294085. There was also a problem here with being able to SET the layer of the background graphic, which should’ve been impossible, and is now a no-op (it won’t change from null now).

1 Like