FLEX- disable the cursor click event on busyCursor - apache-flex

I am using a flex2 in a web application. I have added a busy-cursor in my application successful but I need to disable the cursor click event as long as the cursor animates.
Can I do this? How can I do it?
I am new to flex. Please provide me a sample code.
Thanks in advance.

Not that I know of off the top of my head. But you can always remove the "click" listener to the components on the page.
E.g.,
myComponent.removeEventListener(MouseEvent.CLICK, onMouseClickEventDoThis);
It's a pain though, since you would have to do this for every visual component.
What I've done in the past, is just make the component.enable = false. That way, it greys out and doesn't listen to any events.
myComponent.enable = false;
Just remember to re-enable it when you're done with the busy cursor.
myComponent.enable = true;

Related

Have problem to get touch or mouseclick trigger the click event of aframe objects

I can't get my code to work to trigger a function upon a click event. Both on desktop or mobile chrome browser it doesn't work. If I enter to inspector mode I recognize that in a small area of the object I can click it and it will triggered, but if I leave the inspector (strg+alt+i) it doesn't work. it seems to me that something will not hit the right point to trigger the event. This makes me crazy.
I hope someone could give me a good hint to solve my problem. thanks in advance.
My code is online testable under https://glitch.com/~ede21-arjslocationtutorial
I did not try to edit the code but I think the problem comes from your cursor and raycaster properties. They should be on a camera entity, not on the a-scene entity. A-Frame creates a default one but you can create it yourself and set this properties. The cursor will change when you hover the entities, then it should work properly ;)

Need help troubleshooting button click in Selenium

Update:
After further investigation, actually what's happening is when the checkbox is checked using jquery, the next step is to click the button to save. Well, for some unknown reason, the checkbox is unchecking itself.
Here's the jquery to select the checkbox:
string jsStmt = #"
$(function(){
$(':checkbox').filter(function(){
return $(this).parent().next('td').text() === 'Label to look for';
}).prop('checked', true);
});
";
IJavaScriptExecutor js = (IJavaScriptExecutor)_driver;
js.ExecuteScript(jsStmt);
I can see the checkbox get checked, then when the dialog closes I can see it get unchecked?
OP:
Button click event for Selenium testing has been working for a while. All of a sudden, it's not working anymore. Only possible change was some 3rd party css change but I don't know what it could've been.
The button is kind of buried in layers, however, there's a checkbox that gets checked by Selenium that is still working fine, and it's the reason why the button needs to be clicked.
I can debug, and see that Selenium is finding the button. It appears that the button gets clicked but the postback event doesn't occur.
I can stop execution right before the click event and open developer tools and manually type in the statement to click the button, AND that works!
I even tried executing the click with JavaScriptExecutor with no luck.
I am so lost why it's Not firing postback event.
In short, try clicking the checkbox using an IWebElement instead of javascript.
I would suggest avoiding using IJavaScriptExecutor as much as possible in selenium tests as it can lead to performing functions the user wouldn't actually be able to do with simple interactions, or having those functions behave differently than you would expect because the execution path is different than what a user would do if they just clicked something.
I think that's what you're running to in this case where you're trying to mark the box as checked.

Grayed Toobar Button

I added a button to a toolbar and when I run the application, it is grayed (desactivated) I could not click on it. I tried to add events when I click on it, but still gray.
How could I make it active?
Make sure there's a handler for the button. MFC will automatically disable a button if there's no ON_COMMAND handler for it.
Otherwise you need to implement ON_UPDATE_COMMAND_UI to enable the button.
Ok it works now, I had to add the ID into tha Accelerator table, weired but it worked at least.

Detect right clicks on a RichEditableText

I am currently implementing squiggly in a flex application to enable spell checking. Due to certain requirements, I can not use SquigglyUI to hook onto my spark RichEditableText. I have successfully used com.adobe.linguistics.utils.TextTokenizer to tokenize and highlight mispelt words.
I would like to be able to let the user rightclick on a mispelled word and show a list of suggestions in the context menu using getSuggestions.
I have tried to attach a listener to my RichEditableText:
richtexteditor.addEventListener("rightClick", showSuggestions);
And this is my event handler:
private function showSuggestions(event:MouseEvent):void{
trace('hi there');
}
The problem is when debugging the application, I never get the trace in my console as the rightclick event is never dispatched. In addition, I need to detect the word the user has right clicked on. How can I go about doing this and how can I detect right clicks?
Cheers
All I had to do was add an event handler to the contextmenu property of the richeditable text:
richtexteditor.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, doSomething);
r.addEventListener(MouseEvent.RIGHT_CLICK, listener)
This will listen for the right-click of the mouse (Flex4.5)

ASP.NET Ajax ReOrderList - Any way to disable specific items from being dragged and dropped?

I have an ajax controltoolkit reorderlist within an asp.net application.
I need to disable certain specific steps from being reordered. This has to be done dynamically. All steps are consecutive and start from the beginning, but it's not known until runtime how many need to be disabled from being reordered any further.
I tried the e.item.enabled = false for reorderlist_itemdatabound but this just disabled links. I need to disable the drag handler.
Any help is greatly appreciated. Thanks!
To be honest, I'm not too familiar with this control, but...
You need to hide the drag handler div (or whatever is in the 'DragHandleTemplate' I believe) and/or change its class. Two suggestions:
1) Add a javascript startup script to disable the divs in question.
2) Subclass this control... Override the Render() method. Replace it with original code from ReorderList, but check the Item to see if you should render the drag handle.
as a workaround to disable drag'n'drop for some item - you can set width=0 to the control inside <DragHandleTemplate> </DragHandleTemplate>. Thus user won't be able to pick the item for dragging.
Suppose you have an image with id dragme in DragHandleTemplate; you can do this in the ItemDataBound handler:
Image dragMe = (Image)((TableRow)e.Item.Controls[0].Controls[0]).Cells[0].Controls[0].FindControl("dragMe");
dragMe.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
This way you preserve the alignment.

Resources