Bug? CustomView with Layout file...

Cableguy

Expert
Licensed User
Longtime User
Hi Erel,

I am creating a Custom view using a layout file added to the base pane.
it consists of a few color pickers, range sliders and a label.
my issue is, when i try to expose some property from of of the used nodes to the callback, I get "Object should first be initialized"...

If i do intialize (which i shouldn't) the IDE warns me that the view was added with the designer and thus should not be initialized in code...
 

Cableguy

Expert
Licensed User
Longtime User
This is most probably a bug in your code. Try to reproduce it in a small project and upload it.
Indeed, it was...

I was a bit eluded by the CustomView creation sequence...
The Initialize sub is ment to initialize the CustomView itself. If the components are added in code, then they should be initialized in this same sub as some other properties can be defined, BUT, if the view uses a layout file, those components will only be "available" in the DesignerCreateView sub!
(this is my first time using a layout in a custom view, so I'm learning!)
 
Top