Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Tk::Text, is there a selection?
Hi,

from the documentation to Tk::Text i concluded that i can get
the selection by:

$txt->get('sel.first', 'sel.last');

But i need to test if there IS a selection.  To do this i
should test if the option "exportSelection" is true.

How do i do that?  I tried:

$t->cget('exportSelection')

But that was always true.  How do i test for the selection?


Best regards,
Torsten.


Report this thread to moderator Post Follow-up to this message
Old Post
Torsten Mohr
09-07-04 02:00 AM


Re: Tk::Text, is there a selection?
In article <chil14$bpn$1@schleim.qwe.de>, tmohr@s.netic.de says...
> Hi,
>
> from the documentation to Tk::Text i concluded that i can get
> the selection by:
>
> $txt->get('sel.first', 'sel.last');

Or via $txt->getSelected;

> But i need to test if there IS a selection.  To do this i
> should test if the option "exportSelection" is true.
>
> How do i do that?

What's wrong with:

print "Nothing selected\n" unless $t->getSelected;

--
Go to http://MarcDashevsky.com to send me e-mail.

Report this thread to moderator Post Follow-up to this message
Old Post
Marc Dashevsky
09-07-04 02:00 AM


Re: Tk::Text, is there a selection?
Hi,

> Or via $txt->getSelected;

that works, thanks!

> What's wrong with:
>
> print "Nothing selected\n" unless $t->getSelected;

I do not find any reference to "getSelected" in Tk::Text,
even now that i know it exists.  Else i think i would have
used it.


Thanks,
Torsten.


Report this thread to moderator Post Follow-up to this message
Old Post
Torsten Mohr
09-08-04 09:00 PM


Re: Tk::Text, is there a selection?
In article <chnitd$a5l$1@schleim.qwe.de>, tmohr@s.netic.de says...
> Hi,
> 
>
> that works, thanks!
> 
>
> I do not find any reference to "getSelected" in Tk::Text,
> even now that i know it exists.  Else i think i would have
> used it.

I'm running perl/Tk 804.027 and the getSelected method is documented,
so perhaps the pod has been improved.

--
Go to http://MarcDashevsky.com to send me e-mail.

Report this thread to moderator Post Follow-up to this message
Old Post
Marc Dashevsky
09-09-04 01:56 AM


Re: Tk::Text, is there a selection?
"Marc Dashevsky" <usenet@MarcDashevsky.com> wrote in message
news:MPG.1ba930a77a3566c0989a45@netnews.comcast.net...
> In article <chnitd$a5l$1@schleim.qwe.de>, tmohr@s.netic.de says... 
>
> I'm running perl/Tk 804.027 and the getSelected method is documented,
> so perhaps the pod has been improved.

Yes. I did that for 804; with the permission of O'Reilly publishing and
Steve of course ;)

As wonderful as Mastering Perl/Tk is - I got tired of having to always look
them up. Surprisingly, the book binding has held up rather well around p.189

Jack



Report this thread to moderator Post Follow-up to this message
Old Post
Jack D
09-09-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PerlTk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.