Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: SelectionPlaceholder in Packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90317] Re: SelectionPlaceholder in Packages
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sat, 5 Jul 2008 04:52:05 -0400 (EDT)
  • References: <g4i8ue$38p$1@smc.vnet.net>

Thanks for very useful replies from David Reiss and Maxim Rytin.



I discovered that when appending a Global` to a placeholder in the package 
notebook, the .m file aquires an extra space between them. By copying the 
code to Workbench and using that editor I was able to add the Global` 
without difficulty and then copy the .m file back.



Maxim also suggested the code:



With[{s = Symbol["Global`\[SelectionPlaceholder]"]},

 CreatePalette[Defer@ PasteButton[foo2[s]]]]



which works like a charm.


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"David Park" <djmpark at comcast.net> wrote in message 
news:g4i8ue$38p$1 at smc.vnet.net...
> I'm having a lot of difficulty in using a SelectionPlaceholder in a
> CreatePalette statement that is in a package. The problem is that it gets
> the package context attached to it and if I try to write a 'Global`' in
> front of it I obtain syntax errors when loading the package. 



  • Prev by Date: Re: How to sync plots?
  • Next by Date: Re: Re: Re: Problem with parametric minimization
  • Previous by thread: SelectionPlaceholder in Packages
  • Next by thread: Re: SelectionPlaceholder in Packages