Alpha Video Training
Results 1 to 10 of 10

Thread: X-Dialog dblclick event?

  1. #1
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002
    Posts
    1,039

    Default X-Dialog dblclick event?

    Hello All,

    Can anyone tell me why the double-click event in the following code is not causing the message box to appear?

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++

    DIM form_name as C
    if is_object(topparent.this) then
    form_name = topparent.name()+".this"
    else
    form_name = ""
    end if
    DIM SHARED vc_search_input as C
    DIM SHARED vc_search_select as C
    DIM SHARED varC_result as C
    DELETE expression_result
    expression_result = eval("\"\"",form_name)
    vc_search_input = convert_type(expression_result,"C")
    DELETE expression_result
    expression_result = eval("\"\"",form_name)
    vc_search_select = convert_type(expression_result,"C")
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    DIM vc_search_select_rl_def_orig as C
    vc_search_select_rl_def_orig = "kl=tbl_customer,{keylist_build(\"H=.025,1:35[Customer Name],2:35[Street Address],3:15[City],4:15[State]\",''+Customer_id,left(''+Customer_name,35),left(''+Street_address_1,35),left(''+Street_city,15),left(''+Street_state,15))}{Customer_name "= [varC-"vc_search_input]}"
    DIM vc_search_select_rl_def as C
    vc_search_select_rl_def = replace_parameters(vc_search_select_rl_def_orig,local_variables())
    varC_result = ui_dlg_box("Search for customer (by company name)",""%dlg%
    {region}
    | [.100vc_search_input!vc_search_input_changed];
    | [%@vc_search_select_rl_def%.100,25vc_search_select!list_*];
    {endregion};
    {line=1,0};
    {region}
    "*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"
    {endregion};
    %dlg%,""%code%
    If a_dlg_button = "vc_search_input_changed" then
    vc_search_select_rl_def = replace_parameters(vc_search_select_rl_def_orig,local_variables())
    a_dlg_button = ""
    else if a_dlg_button = "list_dblclick" then
    ui_msg_box("title","message",UI_STOP_SYMBOL)
    a_dlg_button = ""
    else
    a_dlg_button = ""
    end if
    %code%)

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++

    Thanks,

    Louis

  2. #2
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,172

    Default RE: X-Dialog dblclick event?

    Normally, in the event code you would trap each action separately and trap all of the actions for the event that has the doubleclick

    ""%code%
    If a_dlg_button = "vc_search_input_changed" then
    vc_search_select_rl_def = replace_parameters(vc_search_select_rl_def_orig,local_variables())
    a_dlg_button = ""
    end if

    if left(a_dlg_button,5_) = "list_"
    if a_dlg_button = "list_dblclick" then
    ui_msg_box("title","message",UI_STOP_SYMBOL)
    end if
    a_dlg_button = ""
    end if
    %code%)

    Jerry

  3. #3
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002
    Posts
    1,039

    Default RE: X-Dialog dblclick event?

    Jerry,

    Thanks for your suggestion. I understand the changes you made, and they make perfect sense, but the dblclick event still does not appear to be firing.

    Below, is a revised version of the code. It was written to work with the "Customer" table in Alpha Sports. I had to remove the underscore in your code ***if left(a_dlg_button,5_)*** to get the script to run at all. I assume that this was a typo.

    If you or anyone else for that matter wouldn't mind creating a new script in Alpha Sports and pasting the following code into it, then taking a look at why the double click is not causing the message box to pop-up, I would sure appreciate any guidance that can be offered.

    '************Code Follows***************
    'Create an XDialog dialog box to prompt for parameters.
    'In order to evaluate expressions using the eval() function, in the context of
    'the current form, the "form_name" variable is defined.
    DIM form_name as C
    if is_object(topparent.this) then
    form_name = topparent.name()+".this"
    else
    form_name = ""
    end if
    DIM SHARED v_search_input as C
    DIM SHARED v_search_Select as C
    DIM SHARED varC_result as C
    DELETE expression_result
    expression_result = eval("\"\"",form_name)
    v_search_input = convert_type(expression_result,"C")
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    DIM v_search_Select_rl_def_orig as C
    v_search_Select_rl_def_orig = "kl=customer,{keylist_build(\"H=.025,1:35[Lastname],2:35[Address],3:15[City],4:15[State]\",''+Customer_id,left(''+Lastname,35),left(''+Bill_address_1,35),left(''+Bill_city,15),left(''+Bill_state_region,15))}{Lastname "= [varC-"v_search_input]}"
    DIM v_search_Select_rl_def as C
    v_search_Select_rl_def = replace_parameters(v_search_Select_rl_def_orig,local_variables())
    varC_result = ui_dlg_box("Search by customer name...",""%dlg%
    {region}
    | [.100v_search_input!v_search_input_changed];
    | [%@v_search_Select_rl_def%.100,25v_search_Select!list_*];
    {endregion};
    {line=1,0};
    {region}
    "*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"
    {endregion};
    %dlg%,""%code%
    If a_dlg_button = "v_search_input_changed" then
    v_search_Select_rl_def = replace_parameters(v_search_Select_rl_def_orig,local_variables())
    a_dlg_button = ""
    end if
    if left(a_dlg_button,5) = "list_"
    if a_dlg_button = "list_dblclick" then
    ui_msg_box("title","message",UI_STOP_SYMBOL)
    end if
    a_dlg_button = ""
    end if
    %code%)

    '***********End of Code***********************

    Thanks

    Louis Nickerson

  4. #4
    Alpha Software Employee AaronBBrown's Avatar
    Real Name
    Aaron Brown
    Join Date
    Feb 2001
    Location
    Waltham, MA
    Posts
    2,836

    Default RE: X-Dialog dblclick event?

    [%@v_search_Select_rl_def%.100,25v_search_Select!list_*];

    You have defined an edit control here. Edit controls do not have a double click event.

  5. #5
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002
    Posts
    1,039

    Default RE: X-Dialog dblclick event?

    Aaron,

    Thank you for your observation.

    This control was created using the X-Dialog genie and was defined as a "Record List List Box".

    How is it that it is an "Edit Control" and based on the look and functionality I am trying to achieve, what type of control would you suggest?

    Thanks Again,

    Louis

  6. #6
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,172

    Default RE: X-Dialog dblclick event?

    Louis

    I didn't look carefully and see you had a record list list box, which Aaron points out does not have a doubleclick. However, a conventional list box does have a doubleclick event. If you use advanced formating, you can make a list box very similar to one using keylist_build(), which is
    what you are using.

    Jerry

  7. #7
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002
    Posts
    1,039

    Default RE: X-Dialog dblclick event?

    Jerry/Aaron,

    I created a test script using a simple list box and it did in-fact recognize the double click, however...

    If I populate that simple list box with the contents of a table instead of supplying a crlf list of options, it does not work.

    Any new ideas?

    Thanks,

    Louis

  8. #8
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,172

    Default RE: X-Dialog dblclick event?

    Louis

    When you say "does not work", what do you mean? I have attached a script for a xdialog list box created in Alphasports using the Customer table. If you doubleclick on an entry, the doubleclick fires. Just open Alphasports and import this script and try it.

    Jerry

  9. #9
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002
    Posts
    1,039

    Default RE: X-Dialog dblclick event?

    Jerry,

    Thanks for the example!

    I am working on a pretty complex X-Dialog and your example is proving to be a huge time saver.

    Thank you very much!

    Louis

  10. #10
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,084

    Default Re: X-Dialog dblclick event?

    Louis,

    I have the same problem as this tread.
    The Jerry's attachment is contained as
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <HTML><HEAD>
    <TITLE>404
    Not Found</TITLE>
    </HEAD><BODY>
    <H1>Not Found</H1>
    The requested
    URL //alphaphorum/files/200502/a5v6/36/12236/Xdailog_dblclick%20-%2002-03-2005%20-1.txt
    was not found on this server.<P>
    <HR>
    <ADDRESS>Apache/1.3.11 Server at msgboard2.alphasoftware.com Port 80</ADDRESS>
    </BODY></HTML>
    *

    I have the DropDown List Box with CRLF list from SET tables. I'd like to have the editable and refreshed dropdown list when I click on this box.

    How did you make this editable dropdown box?

    This is my part of an xDialog code.
    Code:
    vVndrLists = set.external_record_content_get( ......)
    
    ui_dlg_box(dlg_title,<<%dlg%
    .....
    .....
    Vendor:| [.10vVndrId^=vVndrLists!vVendor_*];
    .....
    .....
    %dlg%,<<%code%
    if Left(a_dlg_button,7)="vVendor" then
    	
        If a_dlg_button ="vVendor_setfocus" then
        	        vVndrLists =""
    		
                    vVndrLists = set.external_record_content_get("SomeTbl.set", ....)
    		
                    a_dlg_button=""
    	end if
        a_dlg_button =""
    end if

Similar Threads

  1. xdialog & dblclick
    By Steven Devaney in forum Alpha Five Version 5
    Replies: 9
    Last Post: 03-03-2004, 07:43 PM
  2. dblclick again
    By BRIAN GRAY in forum Alpha Five Version 5
    Replies: 1
    Last Post: 11-10-2003, 06:51 AM
  3. dblclick problem,
    By BRIAN GRAY in forum Alpha Five Version 5
    Replies: 1
    Last Post: 11-07-2003, 07:07 PM
  4. Which Event?
    By Schulzie in forum Alpha Five Version 4
    Replies: 1
    Last Post: 09-02-2003, 03:44 PM
  5. Problem with dblclick and ui_dlg_box
    By Willard in forum Alpha Five Version 5
    Replies: 5
    Last Post: 12-25-2002, 09:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •