Flex TextInput has become uneditable - apache-flex

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

Related

Spark Datagrid: issue with scrolling (selectionChange event)

I have a flex mobile project. In my homeview I have a spark datagrid. The selectionMode is "singleCell". I have an eventlistener on the datagrid which listens to the selectionChange event. When someone clicks on a cell, a callout view is showed with a list.
Now when I want to scroll in the datagrid (if it has many rows), obviously the selectionChange event is triggered instead of the normal scrolling. Does anyone has a solution for this?
The curious thing is, when you use a list (in place of a spark datagrid) with a change event (spark.components.supportClasses.ListBase.change), the list is able to say the difference between scrolling and a selection without any issue!
Correct, the issue is caused by the singleCell editmode #Al_Birdy.
I have semi-solved it by using a doubleclick event on the datagrid. The app will also be exported as a desktop application in the final stage so that isn't a real bad idea.
As www.Flextras.com pointed out, the datagrid is not yet optimized for mobile usage. If I may add something to that, it isn't that mature either. To solve this issue, basicly a likewise approach should be implemented like the list control has. In this control, this behaviour is implemented (the difference between a scroll event and a touch/click event). It kinda surprised me that the spark datagrid didn't had this behaviour. But then again it wouldn't surprise me they took the 'ol good desktop' component and ported it, which might explain everything.

Flex 3 TileList selected item strange behaviour

I have a Flex TileList with an itemRenderer made by me.
The list loads the content perfectly and renders it.
Renderer is a simple canvas element with a checkbox and another canvas with some labels with data.
I implemented a method that, on TileList itemClick="clickedItemHandler(event)", changes the state of the checkbox (if checked -> uncheck, and vice versa).
Problem is: the method works if i click on any place of the item, EXCEPT the checkbox. When i click the checkbox, it doesn't change state.
My thoughts: maybe i was changing the state of the checkbox, and the event changing it back, but i debugged it and it doesn't look like so..
The solution is actually quite simple. Perhaps the best way to make this work is making sure the CheckBox ignores mouse clicks, and this can be done by setting the "mouseEnabled" attribute to false.
Cheers
I think you're probably correct. The checkbox toggles when you click it and then you toggle it back when the event gets to the TileList. You may not see this when debugging depending on how you are confirming... you may be able to fix this by confirming that the target of the event is not a CheckBox.

Garbled Text using FETStationPanels, But Only the First time It's Called

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

jQuery animation not working on page with update panel

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/)

Navigation issue in Flex - ViewStack, states or something else?

I have a bit of doubt regarding my application which is being created using Mate framework. The first thing user has to do is to log in, so I created Login.mxml view. After a successful login I need to display the main view with applicationControlBar at the top and a workspace below. At the moment I have two separate views, so if I understand correctly it makes sense using ViewStack.
Thing is, I'd like also to display some kind of panel with buttons on top of the workspace after login - here is screenshot. After clicking on a button the panel should dissapear. To complicate things a little bit more, there is a possibility for this panel to change state. Clicking on a specific button may result in showing progress bar at the bottom of panel.
I feel I should create separate view, MenuDialog.mxml and put there buttons, progress bar and states, but how to display it on the top of the workspace? I hope my problem is clear enough :)
I would make the panel a popUp, with the main application (or the ViewStack's parent container) as the parent of the popUp. You can use the PopUpManager Class to close it based on user actions within the Panel.
Assuming that perhaps you do not want a modal login style panel (which many apps these days eschew) then you should absolutely use states rather than ViewStacks.
States are a much cleaner way to distinguish the various, uh, states that your UI can be in -LOGGED_IN, LOGGED_OUT, etc.
It may take a little to get used to working with states, but once you do, you'll never go back. :-)

Resources