Skip to content

Conversation

@timotei
Copy link

@timotei timotei commented Feb 4, 2016

This will ease re-use for controls that inherit
from NControlView, by providing direct access
to the rendered class, in case it's different
than NControlView, without having to cast it manually.

@chrfalch
Copy link
Owner

chrfalch commented Feb 9, 2016

Thanks for the PR, the problem with this one is that it contains no changes to the Windows code, would you be able to take a look at this and see if you can update?

@timotei
Copy link
Author

timotei commented Feb 9, 2016

Sure, not sure how I missed that :(

This will ease re-use for controls that inherit
from NControlView, by providing direct access
to the rendered class, in case it's different
than NControlView, without having to cast it manually.
@timotei
Copy link
Author

timotei commented Feb 20, 2016

@chrfalch Done

@chrfalch
Copy link
Owner

Hi Timotei,

Could you please provide a short explanation with code samples telling me
about why you want this (provide a few use cases)? That makes integrating
the pull request much more easy :-)

Chris

On Sat, Feb 20, 2016 at 6:19 PM, Timotei Dolean [email protected]
wrote:

@chrfalch https://github.com/chrfalch Done


Reply to this email directly or view it on GitHub
#48 (comment).

@timotei
Copy link
Author

timotei commented Feb 21, 2016

I can do a sample if you want, not sure it will help much given the nature of the change.

Basically, the reason for this is to simplify the code when implementing renderers for NControlView-based controls. When you have custom controls that inherit from NControlView, and you want to do the renderers, you need to cast the element to the actual wanted element. With the generic variant no cast is needed as we're 100% sure which type it is :)

@chrfalch
Copy link
Owner

This sounds like a reasonable plan. Will take a look an evaluate the PR
during the week. Thanks!

Chris

On Sun, Feb 21, 2016 at 11:33 PM, Timotei Dolean [email protected]
wrote:

I can do a sample if you want, not sure it will help much given the nature
of the change.

Basically, the reason for this is to simplify the code when implementing
renderers for NControlView-based controls. When you have custom controls
that inherit from NControlView, and you want to do the renderers, you need
to cast the element to the actual wanted element. With the generic variant
no cast is needed as we're 100% sure which type it is :)


Reply to this email directly or view it on GitHub
#48 (comment).

@chrfalch
Copy link
Owner

(No need for a sample, I understand your use case).

On Mon, Feb 22, 2016 at 10:39 AM, Christian Falch <[email protected]

wrote:

This sounds like a reasonable plan. Will take a look an evaluate the PR
during the week. Thanks!

Chris

On Sun, Feb 21, 2016 at 11:33 PM, Timotei Dolean <[email protected]

wrote:

I can do a sample if you want, not sure it will help much given the
nature of the change.

Basically, the reason for this is to simplify the code when implementing
renderers for NControlView-based controls. When you have custom controls
that inherit from NControlView, and you want to do the renderers, you need
to cast the element to the actual wanted element. With the generic variant
no cast is needed as we're 100% sure which type it is :)


Reply to this email directly or view it on GitHub
#48 (comment).

@chrfalch
Copy link
Owner

Hi, sorry for the delay with this PR; Wouldn't this change the behavior for existing renderers and controls, i.e. it is not backwards compatible?

@timotei
Copy link
Author

timotei commented Apr 23, 2016

Hi.

Nope, it's backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants