Control keyword parameters

Discussion in 'Bug Reports' started by agraham, Mar 24, 2009.

  1. agraham

    agraham Expert Licensed User

    Although not strictly a bug this works in the IDE. obj is a Door library object.

    name = "Sbar"
    sort = "Scrollbar"
    obj.Value = Control(name, Scrollbar).ControlRef
    or
    obj.Value = Control(name, "Scrollbar").ControlRef
    or
    obj.Value = Control(name, sort).ControlRef

    but when optimised compiled Basic4ppc accepts

    name = "Sbar"
    sort = "Scrollbar"
    obj.Value = Control(name, Scrollbar).ControlRef
    or
    obj.Value = Control(name, "Scrollbar").ControlRef
    but not
    obj.Value = Control(name, sort).ControlRef

    It would be nice it the optimising compiler could also accept a variable as a parameter even if it meant losing

    obj.Value = Control(name, Scrollbar).ControlRef

    Also a slightly related anomaly. ControlType for a library control returns Namespace.Type whereas Basic4ppc only knows it as Type.
     
    Last edited: Mar 24, 2009
  2. Erel

    Erel Administrator Staff Member Licensed User

    It will be fixed so the behavior will be the same. The optimized compiler must know the control type during compilation so it is not possible to use a variable as the type.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice