![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Mon, Feb 11 2013 10:55 AM | Permanent Link |
Matthew Jones | I know this is quite trivial, but is there a way to make the event code for
OnChange etc pass the TComponent instead of TObject? Only it would make accessing the Tag so much easier. That said, since it will be a TComponent, the hard cast to one isn't so bad. Can I suggest that the (Sender as TComponent) syntax be supported as well as TComponent(Sender)? Sure, it won't actually be able to do the check, but it would be nice to be able to copy and paste code and use the better syntax. /Matthew Jones/ |
Thu, Feb 14 2013 11:44 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< I know this is quite trivial, but is there a way to make the event code for OnChange etc pass the TComponent instead of TObject? >> I'll have to review whether this would break any existing code or not. It shouldn't, but I'd have to check. << Can I suggest that the (Sender as TComponent) syntax be supported as well as TComponent(Sender)? Sure, it won't actually be able to do the check, but it would be nice to be able to copy and paste code and use the better syntax. >> The problem with "as" is that you're trading a compiler check for a runtime error, and not a runtime error that is easily expressed. You'll end up getting weird errors about properties not existing or being NULL, and it will not be readily apparent as to the source of the problem. IOW, such a change equals more support calls for us. Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 14 2013 2:45 PM | Permanent Link |
Matthew Jones | > IOW, such a
> change equals more support calls for us. I guess that is a fair cost. I wouldn't expect it to do anything different, but it wouldn't be obvious. /Matthew Jones/ |
This web page was last updated on Friday, December 1, 2023 at 06:01 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |