sometimes DataGrid claims focus when loading - gwt

I've a text box to enter a search string.
After typing a character, after 200 ms, a call to reload the DataGrid is done. The DataGrid has several columns with hyperlinks in the first column.
Sometimes when typing characters in the search text box, the DataGrid claims the focus and the first hyperlink is focused.
Is this some known bug or is there any way to debug/detect which part of the code is actually claiming the focus on the DataGrid?
Is it possible to install a hook somewhere to see the actual stacktrace when the focus event appears?
Thank you!

Related

Microsoft Word: Adding ScreenTip changes text to {Hyperlink\| BookmarkName \o"screentip}, but want original text

Microsoft word fails to add hyperlink over bookmark and show Hyperlink text everytime
I select the text.
Then i add bookmark from Insert -> link -> add
Then when i add Link (ctrl+K) and go to insert document and screentip by clicking bookmark
It just show this text instead of original text.
Can anyone suggest what the issue is actually?
I think this is off-topic but you have more experience here than I do.
Press Alt+F9 to toggle display of field codes / results.
On some computers, this is Fn+Alt+F9. On Macs, use Opt instead of Alt.
The original text does not appear in the field code but is there and will show up in the document.
I originally missed your real question and the mistaken answer follows below.
This has nothing to do with the presence or absence of the bookmark.
This is the ordinary behavior of the Hyperlink and the AutoText fields in Word. The text displayed in the document does not appear when you display the field.
This is examined in my article on the Microsoft site about Pop-Up text in Word.
Here is the field insertion dialog box:
Here is what it looks like in the document:
And here is the field code shown using Alt+F9:
Note that the display text is not shown at all in the field code. It is still there. If you select the field and enter the following in the Immediate Window of the vba editor you will see the display text.
? Selection.Fields(1).Result
I suspect this comes from the origination of these two fields. With the hyperlink field, it is often created using selected text. It does not especially make sense, but it is how the field operates.

Alignment issue with IE6

I was building a module in gwt. One of the functionality is that I will get multiple records in GridPanel from database. When I hover over on a particular record it should display some information like "click on the row to provide feedback". I have implemented it and it is working fine. But for IE when I hover over, it is displaying the message at top-left corner. Getting alignment problem.
Used this line in my code.
grid.setToolTip("Click on the row to provide feedback");

How to add tooltip entries for items in Eclipse SWT combo

The exact already asked question to what I'd like to do is: how to add tooltip on the entries and not the combo....
I cannot use a CCombo. JoeYo said that he solved it by using a DefaultToolTip class on the Combo, but he didn't elaborate.
Can anyone, (#JoeYo hopefully) give me a bit more detail how to got the handle on the list, once dropped, to capture the mouse hover events, and then of course display the tool tip?
If I was supposed to ask for more info on the original question, I could not figure out how. I tried to comment, but was told I did not have enough credits.
DefaultToolTip is part of JFace. Other than the native tooltip of the platform, it can be freely positioned and shown/hidden. Internally it is comprised of a Shell that when shown stays on top of all other controls.
In combination with a MouseListener, the getVisibleItemCount() and getItemHeight you might be able to compute above which item (if any) the mouse cursor hovers and show a tooltip with suitable content.
This answer has a snippet that computes which item of a List widget is under the mouse pointer. It should be possible to adapt it for the Combo widget. The remaining difficulty is probably to figure out the of the drop-down and the gap between of the Combo and its drop-down.

GWT CellTable Sort Column With Custom Header

I have a sortable column in a CellTable. The problem is that I have a custom Header, in the header there is a text box. When the user clicks the text box, the column is sorted and the text box looses focus. What I need is for the sort to happen if there is a click anywhere in the header except in the text box. I have tried listening to the "click" event on the textbox cell and do stopPropagation, but the event is fired after the sort happens so it does not stop the event. Any ideas would be helpful.
Cell widgets use event delegation: the event that triggers and gets passed to your Cell's onBrowserEvent is the same, caught at the same place, as the one that triggers sorting, so stopPropagation won't be of any help.
Also, have a look at the code for CellTable (or AbstractCellTable in trunk): there's no way to prevent sorting. I'd suggest you file a request for enhancement on the issue tracker.

UITextField: Text Entered Programmatically but not Visible in the Text Field

I have a weird behaviour that has only shown up in the last week. I don't use IB, all the controls are created in code.
I have a text field with a keyboard active. The first time I load the text field and use the keyboard, everything works normally. The second time I use it, the typed text does not show in the text field. However, the text is in the text field programmatically. For example, I can use it to execute a search. When the keyboard closes, the text appears.
Some of my UITextFields have misaligned text. For example, I write "hello", and instead of displaying centered inside the field like normal, it displays shifted several pixels downward to the extent that the bottom of the text is cut off. It's almost as if another view is chopping the bottom off the text by obscuring it.
I use three20, but according to http://groups.google.com/group/three20/browse_thread/thread/d7c4bc1ee2f9590d#, Xcode is suspected of causing the problem. I seen the behavior on 2 diferent macs, one running with Snow Leopard (10.6) and the other with Leopard (10.5).
This is how the problem looks in Xcode:
It is not obvious, but there is text in that search field. Notice that the placeholder text is not show. However, if I hit Search, the code executes with the entered text.
This is how the app appears in the simulator:
I finally find the reason.
I call [textField becomeFirstResponder] in a function called from loadView. But I move it to viewDidAppear and everything work Ok...
I've seen that happen with text fields and affine transforms. If you rotate a text field using a transform, the text shows up in a seemingly random part of the superview. If you use a transform to move the text field to make room for the keyboard, you might be seperating the embedded text editor from the field itself. That would also explain why the text is in the code because the text attribute of the text field is not affected by the visual layout of the UI.