Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16561

PasteButton and SelectionPlaceHolder

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From Fred Simons <f.h.simons@tue.nl>
Newsgroups comp.soft-sys.math.mathematica
Subject PasteButton and SelectionPlaceHolder
Date Wed, 12 Feb 2014 10:06:08 +0000 (UTC)
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <ldfh2g$bvf$1@smc.vnet.net> (permalink)
Lines 29
Organization Time-Warner Telecom
NNTP-Posting-Date 12 Feb 2014 10:11:34 GMT
NNTP-Posting-Host d5559eed.news.twtelecom.net
X-Trace DXC=kYD9dQ_Gb8XJfb:@jQ1\c[C_A=>8kQj6];[h;PUXBgbT`9@n`L<iRV\EFiONJ7[GoVZkhEZ3k^:2_
X-Complaints-To abuse@twtelecom.net
X-Received-Bytes 1608
X-Received-Body-CRC 3323363366
Xref csiph.com comp.soft-sys.math.mathematica:16561

Show key headers only | View raw


Here are two questions on PasteButton. The example is a strong 
simplification of something that I did not get working.

Construct a PasteButton by evaluating the next command.

PasteButton[\[SelectionPlaceholder]^2 + \[SelectionPlaceholder]^3]

Then enter the number 4 in an Input Cell. select it and press the 
button. The result is

4^2 + \[SelectionPlaceholder]^3

where the selectionplaceholder first turns up as an open square, that 
becomes black as soon as we click in the cell.

Question 1. Only the first selectionplaceholder is used. Is this 
intented behaviour? Is it possible to replace all selectionplaceholders 
with the selection?

Question 2. There is no evaluation. Is it possible to construct a 
PasteButton that also evaluates the result?

Any help will highly be appreciated.

Many thanks in advance.

Fred Simons
Eindhoven University of Technology

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

PasteButton and SelectionPlaceHolder Fred Simons <f.h.simons@tue.nl> - 2014-02-12 10:06 +0000

csiph-web