Bug - Path String

Discussion in 'CRM / Helpdesk / App Integration' started by SWSDEV, Jan 14, 2011.

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

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    I took the project variable and put a path to a folder in it. When I used it had changed as follows.

    The original: C:\ProgramData\3CX\Data\Work Order Audio
    Changed to: C:programDataCXDataWork Order Audio


    After I escaped the backslash '\\' it worked. I can't imagine too many non-programmers would think to try that.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi,

    If you're using a string with quotes, then you need to escape special characters. The string you enter is a javascript expression, so you need to escape characters as backslash, quotes, etc. This is not a bug, this is by design.

    Maybe we should offer a button or something to quicly enter a string literal, and then we escape it for you. But the string that will be entered as value for the expression will have the escaping characters.

    Regards,
     
  3. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    Maybe even validate string literals for special characters when the text box control loses focus.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    The problem is that you may want to add some special character. For example, you may want a TAB, and then enter \t, but if we escape that automatically, that would become \\t, and that's not what the user wanted originally. So, in order to enter a string literal, we could offer a dialog to enter it, but the user would have to say "I want a string literal", and then we escape it automatically. We cannot do that in every case without asking the user...
     
  5. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    Maybe pop up the dialog if you detect a special character?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    I'm thinking on a toggle button on the right of each text box. Something like the button to show or hide characters in a password text box (you can see that in the admin interface of 3CX). When it's pressed, the user enters a string literal, and when it's not pressed, the user enters an expression.

    We need to discuss the best metaphor to use, and then implement the change...
     
Thread Status:
Not open for further replies.