Dynamically Created iOS Controls Don't Run their Open Event When Opened

I’m seeing an issue where I have a custom subclass that I am using. When I try to dynamically add this subclass to the View, the subclass gets added but the open event of that subclass does not run.

So for example, I have a container control that has a couple of labels and an iOSImageView in it. In the OpenEvent of the ImageView, I specify what image should be opened. When I dynamically add the container control, that code never executes. The ioSImageView is there. I can set an image in the IDE and that opens fine. Just nothing done in code.

I can add a constructor method to a subclass, the constructor method runs. But the open event is never raised.

Certainly this seems like a bug…

This is similar to another behaviour. If you programmatically change the value of a switch the ValueChanged event doesn’t fire. You have to put the ValueChanged code into a method and call the method after the program changes the switch value. You probably have to do a similar thing in your case.

Yeah, this is really bad. I know in the iOS Framework they used to run fine becauseI have some code that I know was working. When I see stuff like this it makes me really wonder if many people are developing for iOS…

That’s not a bug. ValueChanged is only supposed to fire when the user changes the value. Otherwise if you didn’t want that behavior you would have to write extra code to detect if the event was raised because of an internal change.

What about the underlying thing I reported, Greg? Bug or not?