Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
embedding link to file in textbox contents
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ts...@comcast.net  
View profile  
 More options May 22 2008, 10:12 am
Newsgroups: comp.lang.smalltalk.dolphin
From: ts...@comcast.net
Date: Thu, 22 May 2008 07:12:52 -0700 (PDT)
Local: Thurs, May 22 2008 10:12 am
Subject: embedding link to file in textbox contents
I am creating an application where the user can enter some text into a
multi-line textbox.  As the user is typing text into the textbox, I
want the user to be able to insert links to files on the company
network.  The contents of the textbox (including the file links) will
be stored in an underlying database.  In a subsequent session of the
application, when the text (including embedded file links) is
retrieved from the database and displayed on screen, I want the user
to be able to click on the link and the associated file will open up
in a new window.  Typically the file will be Word, Excel, or .PDF,
although it would be nice to not have stringent limitations on the
file type.  Can I do this in Dolphin 5.1?  Thanks.  -Ted

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Udo Schneider  
View profile  
 More options May 22 2008, 4:55 pm
Newsgroups: comp.lang.smalltalk.dolphin
From: Udo Schneider <Udo.Schnei...@homeaddress.de>
Date: Thu, 22 May 2008 22:55:52 +0200
Local: Thurs, May 22 2008 4:55 pm
Subject: Re: embedding link to file in textbox contents
Ted,

> retrieved from the database and displayed on screen, I want the user
> to be able to click on the link and the associated file will open up

I wrote a goodie called "US RichTextEdit Extensions" which might help
you. Surprisingly enough the RTF control already supports Links and is
also able to automatically detect URLs and turn them into links. If the
link you want is not a URL you have to make them linkable on your own -
but thats not very hard.

presenter := RichTextPresenter
             showOn: 'This is my E-Mail Address:
mailto:Udo.Schnei...@homeaddress.de .
Just drop me a mail or visit me here:
http://readthesourceluke.blogspot.com/'
                     asRichText.
(presenter view)
     autoUrlDetect: true;
     link: true;
     enableMailtoLinks.
presenter
     when: #linkClicked:
     send: #value:
     to:
         [:link |
         MessageBox notify: link
             caption: 'Link clicked']

So if you have a RichTextPresenter view you can use #autoUrlDetect: to
enable/disable the automatic linking of URLs. #link: is used to enable
linking in general. So even if #autoUrlDetect is true you won't see any
links until you set #link: to true.

The package also contains a method to make mailto: links linkable.
#enableMailtoLinks parses the text and for mailto: links and hides the
mailto: prefix so that only the email address remains. However the link
itself still contains the mailto: + email combinations. This is a good
example how to use non-visible pre- and postfixes for link.

This is i.e. useful if you want to present a "simple link" to the user
but need a more descriptive link for your program.

To capture clicked links you simply have to hook up the the
#linkClicked: event in your #createSchemanticWiring method. The event
parameter is the complete link - not only the user visible part. So in
the mailto: link above you will get a
"mailto:Udo.Schnei...@homeaddress.de" although only
"Udo.Schnei...@homeaddress.de" is visible to the user.

You can download the most recent version of me goodies here:
http://readthesourceluke.blogspot.com/

However please note that the packages are for DST6 - however I see no
reason why the RTF package should not work in DST 5.1 as well.

Hope this helps.

CU,

Udo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ts...@comcast.net  
View profile  
 More options May 23 2008, 9:03 am
Newsgroups: comp.lang.smalltalk.dolphin
From: ts...@comcast.net
Date: Fri, 23 May 2008 06:03:02 -0700 (PDT)
Local: Fri, May 23 2008 9:03 am
Subject: Re: embedding link to file in textbox contents
Udo,

Thanks for the goodies package.  I upgraded to DST6 and have the URL
autodetect working, and will work on making file pathnames linkable.

Ted

On May 22, 4:55 pm, Udo Schneider <Udo.Schnei...@homeaddress.de>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Udo Schneider  
View profile  
 More options May 23 2008, 1:14 pm
Newsgroups: comp.lang.smalltalk.dolphin
From: Udo Schneider <Udo.Schnei...@homeaddress.de>
Date: Fri, 23 May 2008 19:14:55 +0200
Local: Fri, May 23 2008 1:14 pm
Subject: Re: embedding link to file in textbox contents
Ted,

> Thanks for the goodies package.  I upgraded to DST6 and have the URL
> autodetect working, and will work on making file pathnames linkable.

You might want to take a look at #enableMailtoLinks. It makes mailto:
links "linkable". You could use it as a basis for your own kind of links.

CU,

Udo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »