locked
Why attribute injector mechanism only applies for Get, not Set? RRS feed

  • Question

  • User221222409 posted

    I found attribute injectors really simplified my work for creating an application. such as the 'FindControl' shortcut for Controls. But it only applies for getting a attribute from the target object, not Set. for example, we can write:

    a = ViewState.a

    but it's not possible to write this:

    ViewState.a = 'hello'

    I don't know why IronPython only supports Get, but not Set operations of a attribute injector. Can anybody tell me why?

    Plus, there are no attribute injector support for the 'RepeaterItem' type, and 'HttpSessionState'. I've implemented this by myself, and added it to the Microsoft.Web.IronPython.dll, for my personal usage.

    I'll appritiate you very much if someone tell me what's next for the IronPython for ASP project, including new features introductions, I really like it.

    Best regards,
    Neil Chen

    Sunday, December 17, 2006 4:13 AM

Answers

  • User1641955678 posted

    Hi Neil,

    Making injectors read/write is indeed something that we're looking at, as it will make scneraios like the one you describe easier.  Obviously, it won't work on readonly things like the query string, but we can make it work wherever it makes sense.

    As for why we don't have them for RepeaterItem and HttpSessionState, we simply did not get to do that.  I'll make sure we add them.  I'm glad you were able to figure out how to implement them yourself!

    What next for IronPython for ASP.NET: well, we're basically taking feedback from users like you to see what areas need to evolve.  As you can see in this forum, we have not receive all that much feedback so far, so I suspect not too many people have given it a good test run yet.

    Thanks for your comments, and keep them coming!

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 18, 2006 4:26 PM

All replies

  • User1641955678 posted

    Hi Neil,

    Making injectors read/write is indeed something that we're looking at, as it will make scneraios like the one you describe easier.  Obviously, it won't work on readonly things like the query string, but we can make it work wherever it makes sense.

    As for why we don't have them for RepeaterItem and HttpSessionState, we simply did not get to do that.  I'll make sure we add them.  I'm glad you were able to figure out how to implement them yourself!

    What next for IronPython for ASP.NET: well, we're basically taking feedback from users like you to see what areas need to evolve.  As you can see in this forum, we have not receive all that much feedback so far, so I suspect not too many people have given it a good test run yet.

    Thanks for your comments, and keep them coming!

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 18, 2006 4:26 PM
  • User221222409 posted

    David,

    Thanks very much for your reply, I'll keep on studying this project.[:D]

    Neil Chen

    Monday, December 18, 2006 9:30 PM