I'm using the FETStationPanels from FlashEff2 with Flex 3. Unfortunately, it is garbling some of the letters.
Below is a simplified version of what the problem is:
Imagine that I've got three buttons. If any of the buttons are selected a titleWindow opens. Inside the titleWindow is some text pulled from a database that has the FETStationPanels effect applied to it, and an image. The first button that is clicked (it doesn't matter which one) will have garbled text. If I select another button, then the effect is fine and everything displays okay.
The FlashEff2 effect is fired on the creationComplete event of the TitleWindow.
I had a resize effect on the TitleWindow. I removed it, because I thought that that might be the problem. I put in a static height for the TitleWindow, but that didn't work either.
I also tried using callLater and setting a timer to delay the appearance of the image until well after the effect had ended, but that didn't work, either.
It's weird that the problem occurs only on the first button selected. After that it works fine.
I've been struggling with this problem for 3 days. I would post code, but there is too much for it to be useful. Does anyone have any suggestions on how to solve this problem? Any general things that I can try or should check?
Thank you.
-Laxmidi
Okay, I figured it out. When I add the TitleWindow, I put some effects on it in the main app and I forgot about them:
popWindow.setStyle("addedEffect", fadeInZoomEffect);
popWindow.setStyle("removedEffect",zoomFadeEffect);
When I took these out, my problem was solved. Everything works. I wish I had noticed those lines a few days ago!
Thank you.
-Laxmidi
Related
The following question is about RichTexFX. For standard JavaFX components, I've never had this issue before.
In my application, I am adding text content to the end of a GenericStyledArea (actually a subclass of it, but that should have no impact on the behaviour I am observing). Every time new content has been added to the end of the document, I scroll to the bottom so the new content is always in view. I use the following code to scroll to bottom (actually written in Kotlin, but I have translated it to Java below):
showParagraphAtTop(document.getParagraphs().size() - 1)
This almost always works. However, in some cases the screen will not show the newly added element. I have come to the conclusion that by the time showParagraphAtTop is called, some internal state in richtextfx has not been updated. This is because I added a button that I can click on to call the code above, and if I click it after the scroll failed, it scrolls to the bottom as expected.
I have tried various ways to work around this, but the only solution that works reliably is to do the following:
FxTimer.runLater(Duration.ofMillis(10), () -> showParagraphAtTop(getDocument().getParagraphs().size() - 1));
In other words, I force a short delay before actually scrolling the screen.
Even though the above works, it's incredibly unsatisfactory, and there should be some way to do this the right way. However, I have been unable to figure it out.
I saw another question (Autoscroll JavaFX TextFlow) which suggested the use of layout() prior to scrolling. This does not remove the problem, although it does appear to make it less common.
Please see this gist to see what I am trying to achieve: https://gist.github.com/d9e22915234e6ea34d20
The code is heavily cut down on the problem I face. As you can see when running the code there is a "miss" detected on the label or the text area (if you miss it by 5em or whatever). Unfortunately this does not work for the Dialog's own buttons OK and Cancel (Please run the code and you will see immediately what i am talking about). If you click near an FX-Node it should detect wheter you missed it or not.
Does anybody know if it is possible to detect clicks in the Dialogs button area?
And if it is possible, how to link them to the node like the label and the area?
Thank you in advance.
From what you're seeing, I would guess that the Dialog consumes click events in the button bar, so they don't make it to the Window (which is where you added the EventHandler). If you really want to do this, you can change addEventHandler to addEventFilter. This works for me.
Read this tutorial if you want to find out why this works:
http://docs.oracle.com/javase/8/javafx/events-tutorial/processing.htm#CEGJAAFD
I've had a look around to see if this has been answered, and there are many similiar questions here but none that match the problem I'm having, so here goes.
I have a jQuery animation that runs on all pages. It works fine on all pages except those with a .NET Update Panel. The items that are animated are not part of the Update Panel at all, they have nothing to do with it.
When I click on the button that triggers the animation in question, it doesn't do anything. It gets called alright (a quick alert("clicked!"); proved that) but it simply doesn't do anything. It sometimes looks as though it's trying, but failing, but there are no JavaScript errors reported.
From other similiar questions and answers here, people have suggested using jQuery's .live() and also the PageRequestManager.getInstance().add_endRequest() but none of these are valid here, as the items are outside of the Update Panel. (I've also given them a try, just in case!)
Has anyone else come across this issue before? Any help appreciated!
A quick edit...it appears that clicking the button that causes the animation is actually causing the update panel to reload, am not sure why as they're all set to conditional and have triggers associated with them.
Ok, I've fixed it myself. The jQuery click on the div that caused the animation was being propagated through to the UpdatePanel. Simply calling: event.stopPropagation() in the .click() function solved the problem.
Just an FYI, if you are using events registered with .live() this will not work.
(Per the jQuery documentation: http://api.jquery.com/event.stopPropagation/)
I have been developing an application for the past couple of weeks and as of yesterday all of the textinputs have become uneditable. It seems like when you click on one it switches between the focusIn state and then back to the focusOut state. What could cause this?
Sounds like you've added an event listener that causes you to lose focus just when you gain it. Without a look at the code, though, all we can do is guess.
A TabNavigator was causing the problem. By removing the TabNavigator and replacing it with a TabBar and ViewStack it fixed the problem. If you looking at the comments section of this page http://livedocs.adobe.com/flex/3/html/help.html?content=navigators_4.html you will be able to see in more detail what the problem is
I've run into a strange problem with an HTML form. I've built a dynamic table that adds a new row when you enter data into an existing blank row; because there are some server requirements in adding a row, I make an AJAX call to do this in the onblur event. It took a while to make this work for all browsers, but eventually all was happy with the world ... until IE8. Now, what happens is that, when the call returns from AJAX, the cursor shows in the next textbox (correctly), but the keyboard no longer works. I have to close the modal window (actually an IFRAME), then the keyboard starts to work again. If I put IE8 into compatibility mode, it works fine.
Has anybody seen behavior like this, or have any ideas for a workaround?
Thanks, Jim
I had problems with DIVs placed above an INPUT, that cloacked the cursor... and once the DIV was not above it, the cursor appeared back again.
Just an idea: Maybe your IFRAME captured the focus (and/or the keyboard).