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
Send Topic Print
OnAdd syntax (Read 1564 times)
wajakob
Full Member
*
Offline



Posts: 10

OnAdd syntax
Jul 29th, 2016, 10:53am
 
A simple query.  After two years of adding manually the prototype reference for notes lodged inside containers (for books or primary sources), I decided to try using an OnAdd action.  Cannot make it work.  Is there a problem with the following syntax?  OnAdd:$Prototype="P-Musgrove on PFF"
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OnAdd syntax
Reply #1 - Jul 29th, 2016, 11:10am
 
Assuming what you see in the Action Inspector's 'Action' sub-tab for the note is this code:

$Prototype="P-Musgrove on PFF";

The semi-colon at the end is only needed is there is another action expression (separate piece of code) to run after the above.  Assuming there is a prototype called 'P-Musgrove on PFF' then the prototype should get set.

What is (not) happening that you expect?  Wrong prototype? No prototype? Something else?
Back to top
 
 

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



Posts: 10

Re: OnAdd syntax
Reply #2 - Jul 29th, 2016, 2:47pm
 
I have tried to set the OnAdd action for the container in which I want to place the notes.  No prototype is set.  In addition there is an error message which says that the OnAdd action cannot be parsed.
Back to top
 
 
  IP Logged
wajakob
Full Member
*
Offline



Posts: 10

Re: OnAdd syntax
Reply #3 - Jul 29th, 2016, 2:48pm
 
I meant to say that no prototype is set for any of the new notes placed in the container.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: OnAdd syntax
Reply #4 - Jul 29th, 2016, 4:11pm
 
Ah. Assuming you have already created a prototype called "P-Musgrove on PFF"  the code in my last reply, add as a container's $OnAdd code will set that prototype for any note added to the container.
Back to top
 
 

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



Posts: 10

Re: OnAdd syntax
Reply #5 - Jul 29th, 2016, 5:27pm
 
Unfortunately.  I have done as suggsted with no luck.  I created the container, gave it the $OnAdd:$Prototype="P-Musgrove on PFF".  Still no joy.
Back to top
 
 
  IP Logged
wajakob
Full Member
*
Offline



Posts: 10

Re: OnAdd syntax
Reply #6 - Jul 29th, 2016, 5:51pm
 
Tried it with a second conainer.  Got the error message:  "This note's $OnAdd action cannot be parsed."  Back to manual entry, I guess.
Back to top
 
 
  IP Logged
wajakob
Full Member
*
Offline



Posts: 10

Re: OnAdd syntax
Reply #7 - Jul 29th, 2016, 8:47pm
 
It now happens that the "errors and warnings" flag that initially appeared in one container now infects every other container and note in the entire file.   Please advise.
Back to top
 
 
  IP Logged
wajakob
Full Member
*
Offline



Posts: 10

Re: OnAdd syntax
Reply #8 - Jul 29th, 2016, 9:57pm
 
Problem finally solved.  No worries.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print