MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: "SelectionData" and palettes

On May 18, 1:31 am, meitnik <meit... at> wrote:
> With[ {p = ToExpression[CurrentValue[InputNotebook[],
> "SelectionData"]]},
>  PresentTmpls[p]
> I found a similar code fragment on MathGroup. I wanted to use it in my
> palette. However, once the palette is standalone it fails to work;
> otherwise within a current session of a notebook it works fine. Is
> there a more stable way to grab a text selection so it can be used for
> further use in code? Thanks.

InputNotebook[] refers to the notebook which would currently receive
keyboard input.  This is likely not the same as your palette.  Which
notebook are you trying to reference here?


  • Prev by Date: Re: Use of names
  • Next by Date: Solving for Stiffness using a plot
  • Previous by thread: Re: "SelectionData" and palettes
  • Next by thread: Re: "SelectionData" and palettes