Community
Participate
Working Groups
Right now we can set the return code from outside of the Dialog class. We need a way to do that for Bug# 94153
Changing setReturnCode(int) to public should be binary compatible but would cause problems with source compatibility I believe. I'm not personally gung-ho about this and would prefer if reflection was used in the handler myself.
Well, we would have to make sure that we follow our API evolution rules. PW
(In reply to comment #1) > Changing setReturnCode(int) to public should be binary compatible but would > cause problems with source compatibility I believe. I'm not personally gung-ho > about this and would prefer if reflection was used in the handler myself. I don't think I understand how this affects source compatibility if the visibility is increasing. On the other hand, if we don't think it's appropriate/necessary to add API for this particular use case, reflection seems like a good alternative. And I know that we use reflection already in handlers (for things like select all).
(In reply to comment #3) > I don't think I understand how this affects source compatibility if the > visibility is increasing. I use 3.5 and extend Window and write... protected void setReturnCode(int i) { super.setReturnCode(i); } ...then next year I download 3.6 where setReturnCode(int) has been changed to 'public', I will get a compiler error now because my "version" of the method is 'protected' and it has _reduced_ the visibility of the overridden method in question.
good example. My brain is really full right now and I couldn't come up with it.
See: Bug# 94153 comment# 14 This request is no longer needed.
closing per comment 6