Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2005
    Posts
    17

    Huh? Bug? e_CtrlID and e_MsgId sequence dependent?

    Setup Factor 7.0.3

    Just wondering. This code on an Edit Fields screen On Ctrl Message event:

    Code:
    if (e_CtrlID == CTRL_BUTTON_01) then
    	Dialog.Message("Test", "CTRL_BUTTON_01", MB_OK, MB_ICONEXCLAMATION);
    	if (e_MsgId == MSGID_CLICKED) then
    		Dialog.Message("Test", "MSGID_CLICKED", MB_OK, MB_ICONEXCLAMATION);
    	end
    end
    Only shows the first Dialog box. But this code

    Code:
    if (e_MsgId == MSGID_CLICKED) then
    	Dialog.Message("Test", "MSGID_CLICKED", MB_OK, MB_ICONEXCLAMATION);
    end
    
    if (e_CtrlID == CTRL_BUTTON_01) then
    	Dialog.Message("Test", "CTRL_BUTTON_01", MB_OK, MB_ICONEXCLAMATION);
    end
    Shows both dialog boxes. Is this a bug? Or what is the reasoning behind this?

    This:

    Code:
    if ((e_CtrlID == CTRL_BUTTON_01) and (e_MsgId == MSGID_CLICKED)) then
    	Dialog.Message("Test", "CTRL_BUTTON_01", MB_OK, MB_ICONEXCLAMATION);
    	Dialog.Message("Test", "MSGID_CLICKED", MB_OK, MB_ICONEXCLAMATION);
    end
    Does not show anything. Neither does this:

    Code:
    if (e_MsgId == MSGID_CLICKED) then
    	Dialog.Message("Test", "MSGID_CLICKED", MB_OK, MB_ICONEXCLAMATION);
    	if (e_CtrlID == CTRL_BUTTON_01) then
    		Dialog.Message("Test", "CTRL_BUTTON_01", MB_OK, MB_ICONEXCLAMATION);
    	end
    end
    I just don't get it

    And just to wrap it up:
    Code:
    if (e_CtrlID == CTRL_BUTTON_01) then
    	Dialog.Message("Test", "CTRL_BUTTON_01", MB_OK, MB_ICONEXCLAMATION);
    end
    
    if (e_MsgId == MSGID_CLICKED) then
    	Dialog.Message("Test", "MSGID_CLICKED", MB_OK, MB_ICONEXCLAMATION);
    end
    only shows the first message. That seems pretty weird to me
    Last edited by TorbenKoch; 08-25-2005 at 02:10 AM.

  2. #2
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Change “e_MsgId” into “e_MsgID”.

    I haven’t tried but I have learned how cumbersome the case sensitiveness in Lua might be (as a Windows user I’m not accustomed with the “details ).

  3. #3
    Join Date
    Jun 2005
    Posts
    17

    Thumbs down

    Ahhh, bloody d...

    It was that simple, had checked it again and again.

    Thank you so very much for that hint!

  4. #4
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    It’s so funny when I notice the wrong case in other person’s code. But I don’t find the errors in my own code!

    Have a nice day.

  5. #5
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    The eternal paradox.

Posting Permissions

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