Hyperlinks not activated by callback?

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Hyperlinks not activated by callback?

Postby Guest » Sat Apr 07, 2012 7:06 pm

Hi,

the method mouseClicked in RSyntaxTextArea is not called when the user clicks into the editor.

Thus, the code to activate the hyperlink-callbacks is never activated.

Btw, the method mouseMoved is called when the user moves the mouse.

Stefan
Guest
 

Re: Hyperlinks not activated by callback?

Postby robert » Sat Apr 07, 2012 7:26 pm

Hi Stefan,

Are you holding down Ctrl when hovering over a hyperlink? RSTA requires a modifier key to be pressed for hyperlinks to be scanned for and activated (see setLinkScanningMask(int)). And yes, we use a MouseMotionListener so we can detect when the mouse moves into a hyperlink, so we can change the cursor to/from the standard link "hand" cursor.
User avatar
robert
 
Posts: 802
Joined: Sat May 10, 2008 5:16 pm

Re: Hyperlinks not activated by callback?

Postby Guest » Tue Apr 10, 2012 1:15 pm

Hi Robert,

as always, thanks for your answer. I should have seen this myself.

Now a new problem occurs:

I implemented a HyperlinkListener, upon a click the listener-callback now gets called, I get passed the data as expected - everything is ok up to this point.

BUT: after the click the hyperlink keeps beeing selected, when I click back directly into the RSyntaxTextArea, the link immediately gets activated again - independently from where I click.

Stefan
Guest
 

Re: Hyperlinks not activated by callback?

Postby robert » Fri Apr 13, 2012 12:51 pm

I'll look into this.
User avatar
robert
 
Posts: 802
Joined: Sat May 10, 2008 5:16 pm

Re: Hyperlinks not activated by callback?

Postby Guest » Wed Apr 18, 2012 10:14 am

Thanks.

Greetings
Stefan
Guest
 

Re: Hyperlinks not activated by callback?

Postby robert » Thu Apr 19, 2012 2:49 am

I couldn't reproduce this, but I pushed what I think would be a fix anyway. :D If you can, try to grab at least revision 479 from SVN and see if you can reproduce the 2x link activation issue.
User avatar
robert
 
Posts: 802
Joined: Sat May 10, 2008 5:16 pm

Re: Hyperlinks not activated by callback?

Postby Guest » Thu Apr 19, 2012 9:04 am

Hi Robert,

yes! This (stopScanningForLinks) fixes my problem.

Greetings
Stefan
Guest
 


Return to Help

Who is online

Users browsing this forum: No registered users and 7 guests

cron