Welcome, Guest. Please Login or Register
Tinderbox
  News:
Forum should be fixed now!  Problems?  Email info@eastgate.com!
  HomeHelpSearchLoginRegister  
 
Pages: 1 2 
Send Topic Print
Toward Code Macros (Read 7431 times)
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 4709
Southsea, UK
Re: Toward Code Macros
Reply #15 - Aug 23rd, 2011, 1:34pm
 
OK, I updated the article on do(), to cover use of eval() and action.

Also, revisiting my article on Macros in general, I realised where my confusion came from re evaluation of inline code, i.e. inside a macro, viz.:

Quote:
Macros cannot, generally, evaluate export or action code, so might best be thought of sections of boilerplate text with configurable text inputs. An exception is that ^do()^ - and then only within the context of export from Tinderbox - may use export code. There is thus a subtle difference in the behaviour of export code vs. action code invoked macros with regard to how inline code is treated.

Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v5
(TB consulting - email me)
WWW shoantel   IP Logged
Ted Goranson
Full Member
*
Offline



Posts: 120
Virginia Beach VA
Re: Toward Code Macros
Reply #16 - Aug 30th, 2011, 3:30pm
 
Not directly related, but a helpful possibility may come from external storage. I can attach a file to a note, but there seems no way for Tinderbox to access the contents of that note. On the other hand, Tinderbox can access the (text) content of files that have a URL associated with them, right?

It may be slow, but has anyone tried have TB code stored external to TB in files?
Back to top
 
 
WWW TedGoranson   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 4709
Southsea, UK
Re: Toward Code Macros
Reply #17 - Aug 30th, 2011, 3:51pm
 
The File-type attribute simply stores an OS path that it passes to Finder to handle. TB does 'talk' directly with the file.

Various Command Line tools enable fetching of data from external files, e.g. curl. That said, my understanding is that the CL interface wasn't intended (optimised) for heavy CL traffic.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v5
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1 2 
Send Topic Print