DICE PACKS BUNDLE
Page 2 of 3 First 123 Last

Thread: Context Menus

  1. #11
    pindercarl's Avatar
    Join Date
    Jan 2015
    Posts
    974
    Blog Entries
    2
    Shot in the dark, the second click on wounds may be resetting the focus to wounds. Try switching focus to woundsEdit on a single click and see what happens.

  2. #12

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    So onClickDown() does the same thing as onDoubleClick(). onClickRelease does properly pass the focus to the other control, but this would never allow me to select the original control and edit its contents. I did try catching an onChat() and typing in a special character which I captured in an if statement and passing Focus, and that worked. So it feels like it's something with the click events themselves.

    I've also looked at the hierarchy of classes that make the basic number up windowcontrol -> numberfield -> number -> basicnumber and their scripts, and none of them appear to have an override for the method.
    Last edited by Tielc; October 26th, 2018 at 00:24.

  3. #13
    pindercarl's Avatar
    Join Date
    Jan 2015
    Posts
    974
    Blog Entries
    2
    I didn't mean for it to be a permanent solution, just trying to determine if the second click was return focus to the wounds control. I'm not sure from your post if that was the case, or not.

  4. #14

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    I didn't mean to come across that way; onClickRelease() works, and onClickDown() gives me the same challenge I had before. It looks like maybe onHover() could internally setFocus maybe?

    Edit: No, that's not doing it either.

  5. #15
    Are you returning "true" in onClickDown to prevent FG from performing the default behavior?

    Regards,
    JPG

  6. #16

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    I have tried returning true in both onClickDown and onDoubleClick, both give the same results. I can watch the focus change to the specified control for about a split second and then it returns.

  7. #17

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    This is a private video where I'm hopefully trying to explain this a little better what I'm trying to accomplish. I am sorry for my dog chewing on the hardest toy he could find in the background.


  8. #18
    Do you have a copy of the current code extension which has the issue, and steps to recreate? That's the easiest way for me to investigate.

    Regards,
    JPG

  9. #19

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    This is the extension as I would prefer it to work. One thing I noticed this morning. If I double click, before I release the cursor on the second double click; I move the cursor away from the initial control, the focus changes as expected. So it has to be something with the fact that the cursor is still over the control.
    Attached Files Attached Files

  10. #20

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    You can actually see this issue happening without my extension. If you open the record_char_main.xml file from common in the 5e Ruleset and add a doubleclick event to say the wounds field like so

    function onDoubleClick(x,y)
    window.hp.setFocus();
    return true;
    end

    Then when you run FG and double click on wounds, you can see the focus switch to the hp field and then immediately return to the wounds field.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
Starfinder Playlist

Log in

Log in