It appears it might do what I want. It seems the plugin is partially broken, which is my fear because it was written by Ville Vainio and because he has not contributed in a long time.
I'll have to dig deeper into this. On Monday, May 4, 2015 at 10:32:26 AM UTC-4, Terry Brown wrote: > > On Mon, 4 May 2015 05:03:48 -0700 (PDT) > john lunzer <[email protected] <javascript:>> wrote: > > > I thought Leo might already have a way to do this which is why I > > asked. > > > > I guess I'm still confused on the "get them as usual" part. > > I'm not sure Edward's answer addressed your question - I think the > valuespace plugin might, but I didn't write it and always have to read > the docs. three times to work out what it actually does do ;-) > > It may not do what you want, but it certainly does involve defining > things in one part of an outline and using them in calculation > elsewhere in the outline, so it may do what you want or just need a > very thin wrapper layer on top to do what you want. > > Cheers -Terry > > > It's not clear to me how I would use an @data node in an @settings > > node and have it be accessible/read via some named reference to it in > > any arbitrary node and checked if it changed when saving? > > > > Specifically what I'm trying to do is say have a node: > > > > Headline: > > @data myString1 > > Body: > > This is Common Data > > > > Then in a child of an @clean myfile.txt node be able to reference > > "myString1" by name somehow and be replaced by "This is Common Data" > > when the file is written out. > > > > On Monday, May 4, 2015 at 7:27:25 AM UTC-4, Edward K. Ream wrote: > > > > > > On Mon, May 4, 2015 at 6:14 AM, john lunzer <[email protected] > > > <javascript:>> wrote: > > > > > > Could Leo have something like @int/@bool/@string/etc simple > > > settings types > > >> but applicable to any node in an outline? > > >> > > > > > > ​Anything is possible, but I won't do this. Settings are complex > > > and capable enough as it is. > > > > > > Put common data in settings in myLeoSettings.leo or in the > > > local .leo file and get them as usual. > > > > > > In particular, @data nodes can hold any data you want. > > > c.config.getData has the following signature: > > > > > > def getData (self,setting,strip_comments=True,strip_data=True): > > > > > > You may want to set the two keyword args to False. > > > > > > Finally, your scripts communicate through > > > g.app.permanentScriptDict​. This dict is not cleared after a script > > > executes. Keys and values are anything you want. This is one > > > alternative to using c.config.set/get. > > > > > > HTH. > > > > > > Edward > > > > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
