Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1 2 
Send Topic Print
Toward Code Macros (Read 12691 times)
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
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
 
« Last Edit: Aug 23rd, 2011, 1:34pm by Mark Anderson »  

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



Posts: 141
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: 5689
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 v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1 2 
Send Topic Print