I have an NSArrayController
which handles entities of GeometryShape
.
GeometryShape
has: name
, type
, color
.
LineShape
is a GeometryShape
and has: beginPositionX
, beginPositionY
, endPositionX
, endPositionY
.
CircleShape
is a GeometryShape
and has: positionX
, positionY
, radius
.
The NSTableView
shows all inserted shapes in the NSArrayController
, where each column is bound with arrangedObjects
& the key name.
When I select a line shape, its properties are displayed in the Line tab - which is the default tab.
Now if I select a circle shape, I want the Circle tab to be selected and the circles properties to be displayed.
…and so depending on which shape type I select the corresponding tab will be selected and display the corresponding shape properties.
How may I achieve this excellent :) model?