1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

KSP: Expand function calls - call ui_control callbacks as if they're functions!

Discussion in 'Feature Suggestions' started by EvilDragon, Sep 7, 2010.

Thread Status:
Not open for further replies.
  1. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Let's say we would like to remotely process what happens when we press a button, INCLUDING the press of that button. I'm not sure regular function calls could be used in such manner.

    Basically, this feature would make ALL ui_control callbacks available as functions to call when needed. The difference would be in syntax, it should be called with:

    call callback $<callback name>



    Do scripters find this useful?
     
  2. kb123

    kb123 NI Product Owner

    Messages:
    1,255
    I think a more generic use of the above is the ability to have code generated events rather than just responding to user input. So, in the example above, the button call back would be allowed to generate another event resulting in another call back if required. Does that make sense?
     
  3. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    But which callback would be generated? Would I have to type it up again?

    The meaning of this request is to "press" the button and run through its callback from a different callback. To do this now you have to copy the code in both places, or use the same function in both places, which is not really the way to go, IMO.
     
  4. kb123

    kb123 NI Product Owner

    Messages:
    1,255
    On reading your original post again, I think we are actually talking about the same thing .. sorry for the confusion .. :)

    edit: I think it would be VERY useful
     
  5. kotori

    kotori NI Product Owner

    Messages:
    1,153
    Why is that a problem?
     
  6. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Hm. Dunno. The idea just crossed my mind. :D
     
Thread Status:
Not open for further replies.