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
Prototype not updating a particular note with rule (Read 4866 times)
Ralph Alvy
Full Member
*
Offline



Posts: 85
Santa Monica
Prototype not updating a particular note with rule
Jan 22nd, 2015, 3:35pm
 
I notice that after I change a particular prototype's rule, one particular note doesn't get its rule changed, even though that note has the prototype referenced here. I assume this is because I altered that note's rule at one point, so I deleted that note's rule and then unselected and reselected that prototype for that note. That fails to fix this. How to I get a note back to its virgin state vis a vis its rule, so it can then inherit its prototype's rule?

For now, I have recreated that note and copied all its children into its new incarnation, and that new one works fine. I'm saving the old problem note to manipulate and learn from, after I hear back from the forum.
Back to top
 
« Last Edit: Jan 22nd, 2015, 3:37pm by Ralph Alvy »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Prototype not updating a particular note with rule
Reply #1 - Jan 22nd, 2015, 4:26pm
 
You need to reset inheritance. There are many ways. The way I use it this. Open Get Info for the note with the bad rule. Select Attributes -> General and scroll the list so you can see 'Rule'. Aside: the line will be shown in bold indicating that it is a locally set and not inherited value. Right-lick in the Rule's line in in the table then click the pop-up menu item "Use Inherited Value".  The Rule data should now be drawn in normal weight font indicating it is now no longer locally set and the rule's value box should show the prototype's rule.

More on resetting inheritance via Action code..
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Prototype not updating a particular note with rule
Reply #2 - Jan 22nd, 2015, 5:45pm
 
To clarify: you need to reset that noteís inheritance because that note already has a rule.

If a note has a value for $Rule, thatís its $Rule.  If it doesnít, Tinderbox checks the prototype for $Rule; if the prototype has a $Rule, thatís it. If not, we check the prototype of the prototype.  If we have no prototype, or if no prototype has a $Rule, we use the default value of $Rule.
Back to top
 
 
WWW   IP Logged
Ralph Alvy
Full Member
*
Offline



Posts: 85
Santa Monica
Re: Prototype not updating a particular note with rule
Reply #3 - Jan 22nd, 2015, 7:12pm
 
That problem note has no rule, and the Info screen verifies that (the rule value in the Info screen is blank). It has no rule because I deleted the entire local rule. But it will not inherit the prototype's rule after I apply the prototype to it. I figured that was because it once had a local rule, even though it has none now.

But I see that using the Info screen, I can get it to inherit the prototype's rule.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Prototype not updating a particular note with rule
Reply #4 - Jan 23rd, 2015, 3:07am
 
You'd probably find it helpful to read this article on inheritance in TB and then this one on prototype-based inheritance in TB.

From that it should then be clear why simply deleting a locally set rule does re-enable inheritance. Simply deleting a rule sets a local value of an empty string which is not the same as no value, such as will enable inheritance.
Back to top
 
 

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



Posts: 85
Santa Monica
Re: Prototype not updating a particular note with rule
Reply #5 - Jan 24th, 2015, 11:53am
 
Maybe a future version of TB can have a button on the Inspector|Rule tab that allows the user to Use Inherited Value.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Prototype not updating a particular note with rule
Reply #6 - Jan 25th, 2015, 4:41am
 
Further to Ralph's point, the Rule inspector could usefully show its inheritance vs local value status as a visual cue given that it is a primary place for rule insertion/review.
Back to top
 
 

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



Posts: 39

Re: Prototype not updating a particular note with rule
Reply #7 - Jan 26th, 2015, 10:08am
 
To give Ralph's question yet another spin:

Given a prototype P inherits its keyAttribute "URL" to the note N since N uses P as its prototype.

Hence one adds the keyAttribute "publicationCity" to N. Means: One has now a note N showing both the keyAttribute "URL" inherited from P and the keyAttribute "publicationCity" only N holds.

NOW one decides to add "Publisher" as another keyAttribute to P. One assumes that this second keyAttribute will be inherited to N as well. But that's not the case.

Even if one is deleting the keyAttribute "publicationCity" that only N holds does not reset or re-establish full inheritance-dependency between N and its prototype P.

In other words: As soon as someone messes with keyAttributes in a note that inherited keyAttributes from a prototype the inheritance-dependency is broken and can not -- at least to my knowledge -- be re-established.

Any ideas?
Cheers!
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Prototype not updating a particular note with rule
Reply #8 - Jan 26th, 2015, 12:47pm
 
Quote:
NOW one decides to add "Publisher" as another keyAttribute to P. One assumes that this second keyAttribute will be inherited to N as well. But that's not the case.

You assume incorrectly. TB is behaving as documented. The items sown in this the Key Attributes table is stored in/inherited as the value of attribute $KeyAttributes. By editing $KeyAttributes in N you remove all further inheritance of $KeyAttributes as N now uses the local value of the attribute.

If you simply delete the local value of $KeyAttributes in N you've now set it to a local value of "", i.e. no attributes. It is still a locally set value. To make it inherit again from P you must reset inheritance as already described.

I also suggest reading these 2 tutorials on TB6 Inheritance and on inheritance via prototypes. That may avoid further incorrect assumptions about how inheritance works.
Back to top
 
 

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



Posts: 39

Re: Prototype not updating a particular note with rule
Reply #9 - Jan 26th, 2015, 3:42pm
 
Thanks, Mark for your quick reply.

I studied both tutorials. Resetting inheritance (using: Get Info... --> attributes --> KeyAttributes --> [right click] "Use Inherited Value") indeed brought back the initial set of KeyAttributes created in the Prototype.

Best
a

Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print