Adobe Dreamweaver Forums



Last 10 THreads :         Create 2nd animation in same flash file (Last Post : dabooj - Replies : 0 - Views : 1 )           »          Local host and php Solutions help... (Last Post : RJweb - Replies : 1 - Views : 6 )           »          problems linking PDFs (Last Post : Alan - Replies : 3 - Views : 4 )           »          Flash movie not working in html (Last Post : WEBDavid - Replies : 0 - Views : 1 )           »          load xml into mc symbols (Last Post : DigitalUprising - Replies : 0 - Views : 1 )           »          drop down menu over flash (Last Post : ltartisel - Replies : 2 - Views : 3 )           »          Flash-PHP Mail Form (Last Post : kglad - Replies : 3 - Views : 4 )           »          Flash Controls Not Displaying in Embedded File (Last Post : kglad - Replies : 5 - Views : 6 )           »          DW Flash Encoder (Last Post : wycn - Replies : 2 - Views : 3 )           »          navigation bar (Last Post : G. Rex - Replies : 5 - Views : 6 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 03:13 PM
aperitech
 
Posts: n/a
Diggs:
Default Flickering tooltip in bottom right corner

I implemented a custom tooltip using the IToolTip interface and DataGrid. This
worked well, but the problem is that when the tooltip tries to popup in the
bottom right corner of the window it gets into a loop where it appears and
disappears (the cursor is over the DataGrid when it appears). Does anyone have
any ideas about why this is happening?

My goal is to have a tooltip that displays some data with Name/Value pairs in
two columns. If anyone has any alternate implementation ideas please let me
know.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 04:53 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner


"aperitech" <webforumsuser@macromedia.com> wrote in message
news:gg3u9f$f0u$1@forums.macromedia.com...
>I implemented a custom tooltip using the IToolTip interface and DataGrid.
>This
> worked well, but the problem is that when the tooltip tries to popup in
> the
> bottom right corner of the window it gets into a loop where it appears and
> disappears (the cursor is over the DataGrid when it appears). Does anyone
> have
> any ideas about why this is happening?
>
> My goal is to have a tooltip that displays some data with Name/Value pairs
> in
> two columns. If anyone has any alternate implementation ideas please let
> me
> know.


Does the same thing happen with the default tooltip renderers?


Reply With Quote
  #3 (permalink)  
Old 11-20-2008, 05:43 PM
aperitech
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner

No, the default tooltip will position the tooltip so that it is just inside the
bounds of the window, in the lower right hand corner. It's only with my custom
tooltip, installed via the ToolTipManager, where this is a problem.

Reply With Quote


  #4 (permalink)  
Old 11-20-2008, 05:52 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner


"aperitech" <webforumsuser@macromedia.com> wrote in message
news:gg47g1$qc5$1@forums.macromedia.com...
> No, the default tooltip will position the tooltip so that it is just
> inside the
> bounds of the window, in the lower right hand corner. It's only with my
> custom
> tooltip, installed via the ToolTipManager, where this is a problem.


Maybe if you posted your code it would be easier to discover the problem...


Reply With Quote
  #5 (permalink)  
Old 11-21-2008, 08:03 PM
aperitech
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner

Here's the code. You need to scroll vertically and horizontally (unless you
have immense screen resolution) to get to the button which will end up at the
bottom right corner of the browser window. Hover over it and you'll see the
flashy tooltip.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
applicationComplete="init();">

<mx:HBox id="outerBox" x="2000" y="2000" >
<mx:Button label="Hover over me" toolTip="blah"/>
</mx:HBox>

<mx:Script>
<![CDATA[
import mx.managers.ToolTipManager;

private function init():void {
ToolTipManager.toolTipClass = BuggyToolTip;
}

]]>
</mx:Script>
</mx:Application>



package {
import mx.containers.Canvas;
import mx.controls.Label;
import mx.core.IToolTip;
import mx.managers.ToolTipManager;

public class BuggyToolTip extends Canvas implements IToolTip {

private var _label:Label;

public function BuggyToolTip() {
super();
_label = new Label();
_label.width = 400;
_label.height = 400;
_label.opaqueBackground = "0x99cc00";
}

override protected function createChildren():void {
super.createChildren();
addChild(_label);
}

public function get text():String { return null; }

public function set text( value:String ):void {}
}
}

Reply With Quote
  #6 (permalink)  
Old 11-21-2008, 08:43 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner


"aperitech" <webforumsuser@macromedia.com> wrote in message
news:gg741k$kbv$1@forums.macromedia.com...
> Here's the code. You need to scroll vertically and horizontally (unless
> you
> have immense screen resolution) to get to the button which will end up at
> the
> bottom right corner of the browser window. Hover over it and you'll see
> the
> flashy tooltip.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute"
> applicationComplete="init();">
>
> <mx:HBox id="outerBox" x="2000" y="2000" >
> <mx:Button label="Hover over me" toolTip="blah"/>
> </mx:HBox>
>
> <mx:Script>
> <![CDATA[
> import mx.managers.ToolTipManager;
>
> private function init():void {
> ToolTipManager.toolTipClass = BuggyToolTip;
> }
>
> ]]>
> </mx:Script>
> </mx:Application>
>
>
>
> package {
> import mx.containers.Canvas;
> import mx.controls.Label;
> import mx.core.IToolTip;
> import mx.managers.ToolTipManager;
>
> public class BuggyToolTip extends Canvas implements IToolTip {
>
> private var _label:Label;
>
> public function BuggyToolTip() {
> super();
> _label = new Label();
> _label.width = 400;
> _label.height = 400;
> _label.opaqueBackground = "0x99cc00";
> }
>
> override protected function createChildren():void {
> super.createChildren();
> addChild(_label);
> }
>
> public function get text():String { return null; }
>
> public function set text( value:String ):void {}
> }
> }


Not sure how much it matters, but try creating the child in createChildren
and setting its properties in commitProperties(), also try setActualSize()
instead of width and height. You also may want to inspect the Framework
ToolTip code to see if it has special handling for this.

HTH;

Amy


Reply With Quote


  #7 (permalink)  
Old 11-30-2008, 07:33 PM
aperitech
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner

A couple of updates. First I've included code which better represents what I'm
trying to do, which is have a tooltip with a DataGrid inside. The flickering
still occurs even with this simplest possible example. It appears like the
call to createChildren is happening repeatedly. I put a break point in such
that I could see the stack in a call to createChildren that was not the first
iteration. Here it is..

Main Thread (Suspended)
BuggyToolTip/createChildren
mx.core::UIComponent/initialize
mx.core::Container/initialize

mx.managers::SystemManager/http://www.adobe.com/20 06/flex/mx/internal::childAdd
ed

mx.managers::SystemManager/http://www.adobe.com/20 06/flex/mx/internal::rawChild
ren_addChildAt
mx.managers::SystemChildrenList/addChild

mx.managers::ToolTipManagerImpl/http://www.adobe.c om/2006/flex/mx/internal::cre
ateTip

mx.managers::ToolTipManagerImpl/http://www.adobe.c om/2006/flex/mx/internal::tar
getChanged

mx.managers::ToolTipManagerImpl/http://www.adobe.c om/2006/flex/mx/internal::che
ckIfTargetChanged

mx.managers::ToolTipManagerImpl/http://www.adobe.c om/2006/flex/mx/internal::too
lTipMouseOverHandler

It appears like the toolTipMouseOverHandler is being invoked repeatedly when
the tooltip appears? Also previousTarget is null in targetChanged, thus
causing the tooltip to be created again.

package {
import mx.containers.Canvas;
import mx.controls.DataGrid;
import mx.core.IToolTip;

public class BuggyToolTip extends Canvas implements IToolTip {

private var _dataGridataGrid;
private static var c:int = 0;

public function BuggyToolTip() {
super();
}


override protected function createChildren():void {
super.createChildren();
_dataGrid = new DataGrid();

if(c > 10) {
trace();
}
c++;
addChild(_dataGrid);
}

public function get text():String { return null; }

public function set text( value:String ):void {}
}
}

Reply With Quote
  #8 (permalink)  
Old 12-01-2008, 04:33 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner


"aperitech" <webforumsuser@macromedia.com> wrote in message
news:ggupee$luj$1@forums.macromedia.com...
>A couple of updates. First I've included code which better represents what
>I'm
> trying to do, which is have a tooltip with a DataGrid inside. The
> flickering
> still occurs even with this simplest possible example. It appears like
> the
> call to createChildren is happening repeatedly. I put a break point in
> such
> that I could see the stack in a call to createChildren that was not the
> first
> iteration. Here it is..


You've set c as a static variable, which means it's getting set by any
instance of your tooltip that gets created. Were you expecting that there
would ever only be one tooltip instance created for the entire lifetime of
your app?


Reply With Quote
  #9 (permalink)  
Old 12-01-2008, 07:50 PM
aperitech
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner

Yes, I did that for debugging purposes so I could set a breakpoint. I was
imagining that each flicker is creating a new tooltip instance and I wanted the
counter to be "global" for any/all tooltip instances that were created. I
wanted to see the stack after the first creation (i.e. the bug conditions).

Reply With Quote


  #10 (permalink)  
Old 12-01-2008, 08:54 PM
rtalton
 
Posts: n/a
Diggs:
Default Re: Flickering tooltip in bottom right corner

I think the "flickering" is caused by by a continuous stream of
mouseOver/mouseOut events on the button. It's looping.
e.g:
Mouse moves over button
mouseOver event is thrown
Tooltip is displayed
mouseOut event is thrown
Tooltip is hidden
mouseOver event is thrown
etc.

So you've got to keep the canvas or datagrid from covering the button, and
hence throwing the mouseOut event.
OR
Handle the mouseEvent for the button and somehow block the looping behavior.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:43 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk