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
Tinderbox keeps reverting changes of text (Read 6558 times)
Christoph
Full Member
*
Offline



Posts: 54

Tinderbox keeps reverting changes of text
Mar 23rd, 2013, 8:36am
 
Hello all
I have run into a peculiar problem: In one particular Tinderbox file I cannot change the text body of notes anymore. When I do, everything is changed back to the original state in a matter of a second or so.

This problem is new and does not affect other Tinderbox documents. Although I cannot say for sure when it started, I am sure that the same setup has worked without problems for a long time.
How shall I proceed to find out what is causing the problem?

Thanks in advance
Christoph
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Tinderbox keeps reverting changes of text
Reply #1 - Mar 23rd, 2013, 10:12am
 
Are you (re-)setting $Text via action code. If so, be aware the process strips all text formatting.
Back to top
 
 

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



Posts: 54

Re: Tinderbox keeps reverting changes of text
Reply #2 - Mar 23rd, 2013, 10:37am
 
Not intentionally at least. I have set a couple of custom key attributes but nothing fancy, I don't remember setting any actions but perhaps I have inadvertently left some experimental code somewhere. Where would I look for anything of that sort?

Thanks
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Tinderbox keeps reverting changes of text
Reply #3 - Mar 23rd, 2013, 11:24am
 
Check rules and agents. Any code setting $Text will result in un-styled text.

$Text(A) = $Text(B)

If note B has styled text, note A will have the same text but without the styles. If note C has this rule:

$Text = $Text.replace("X","Y");

The text will be unstyled. Even if you add styles the next agent/rule update cycle will remove the styling. Also, it doesn't matter the exact search strings - the point is a note running a replace() on its own $Text will remove the text styling.

Links.  Running replace on a note's own text will not affect links. A note copying another note's $Text via action code receives an unstyled copy of the source $Text and without the source text's links. (Texted in v5.12.1).
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: Tinderbox keeps reverting changes of text
Reply #4 - Mar 23rd, 2013, 12:36pm
 
"Every second or so" sounds like a rule is doing something that tells Tinderbox to reset everything.

Putting on my psychic turban, I'm betting you're using Explorer view?  Explorer is more subject to the effect of rules and actions than are Text windows.

I'd look for a rule that (a) sets $Text, or (b) has a syntax error. Or possibly (c) always forces a refresh -- for example, a push-me pull-you that changes the color of a note to a different color each time the rule runs.
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Tinderbox keeps reverting changes of text
Reply #5 - Mar 24th, 2013, 8:28am
 
Having a problem finding notes with rules? Make an agent with this query (yes, it's short!):

$Rule

Another source is a rule inherited by a prototype. IOW, you may not recall setting a rule in the note, but it has one because it inherits it via a prototype.
Back to top
 
 

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



Posts: 359

Re: Tinderbox keeps reverting changes of text
Reply #6 - Mar 25th, 2013, 10:08pm
 
I was experiencing this behavior today and tracked down this thread. I have agents, but none that act on $Text. And no rules anywhere. But I did happen to have Outline View and Explorer View open at the same time. Closing down Explorer View stopped the resetting. Am I right in concluding it's best not to have those two views open when editing $Text? (I think I remember reading something about that, but can't find it now.)
Back to top
 
« Last Edit: Mar 25th, 2013, 10:25pm by Sumner Gerard »  
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Tinderbox keeps reverting changes of text
Reply #7 - Mar 26th, 2013, 9:56am
 
It's a bad idea to have a TEXT window open at the same time as you have an Explorer view open. As far as Tinderbox is concerned, you could be editing the text in two different places; it's easy to confuse Tinderbox about which copy you really want.

In Explorer view, text might revert if a syntax error causes an agent action or a rule to fail while editing.  In cleaning up afterward, Tinderbox might be forced to fall back to the last trusted version of the text.

In general, using outline view and text windows will work around any problems like this in Explorer, whatever their source.
Back to top
 
 
WWW   IP Logged
Julian Plumley
Full Member
*
Offline



Posts: 5

Re: Tinderbox keeps reverting changes of text
Reply #8 - Mar 3rd, 2014, 5:54am
 
Hi - I have had exactly the same problem. I create a new note, double-click to open the note text window and start typing, but a few seconds later the text disappears. For existing notes, if I try and change their text, it reverts to the original after a few seconds.
The notes with the problem have no prototype and no rules - they are simple notes just being used for comments. I have a lot of other notes which are part of a flowsheet. These inherit prototypes and some rather complex rules. I also have several agents, but they should only act on the flowsheet notes, not the comment notes that have the problem. So rules and agents should not affect the notes with the problem.

I managed to fix the problem. I had one text window open for one of flowsheet notes. When I close this, I can edit the comment note as normal using the text window. i.e. the windows open were...
Problem: map view + comment note I am trying to edit + one flowsheet note
No Problem: map view + comment note I am trying to edit

It is good that I have fixed the problem, but I have no clue why this works. Is this similar to what was meant by "It's a bad idea to have a TEXT window open at the same time as you have an Explorer view open. " But I had no explorer views open - only the text window for one of the flowsheet notes (i.e. the window you get it you double-click the note).

Thanks for any wisdom on this,
Julian
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Tinderbox keeps reverting changes of text
Reply #9 - Mar 3rd, 2014, 8:16am
 
"…some rather complex rules…". A good working hypothesis is these may be having effects you didn't assume. It's hard to guess further without seeing the effect in context. I assume you're using v5.12.2 - if not I'd update to the current version and try again (if you have free access to updates).

Do any rules set $Text? If so, I'd look carefully at the action code. It may work on a wider scope than intended. Also, is the map being sorted. Or is it a map of the contents of an agent and the 'note' being opening is actually an alias. If the latter, try setting the agent off ($AgentPriority) and see if the issue persists.
Back to top
 
 

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



Posts: 5

Re: Tinderbox keeps reverting changes of text
Reply #10 - Mar 3rd, 2014, 11:03am
 
Hi Mark - thanks for the answer. Yes - I am on v5.12.2.
Yes - some rules change $Text, and I agree that the first suspect is the action code. But I don't think any of it should act on a note which does not have certain prototypes. Is there a way to search through action code to find anything I have missed? The regular search only searches text & titles of notes.
The map is not being sorted.The map is the top level, not inside an agent. The notes with the problem are originals, not alias.
What I do not understand is why the problem goes away when I close the text window of a different note. Can that be due to action code?
In the end, I am making progress again because I have a work-around: close any open text windows before editing a comment note. But it is weird.
Back to top
 
« Last Edit: Mar 3rd, 2014, 11:22am by Julian Plumley »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Tinderbox keeps reverting changes of text
Reply #11 - Mar 3rd, 2014, 1:28pm
 
Based on what you say I guess it's related to rules setting $Text. I'd remove the rules (temporarily) from the prototypes altering $Text and see if the issue persists.

It may be that if a rule alters one note's text window, then all [sic] open text windows are refreshed. In doing so, the unsaved text in a note you are currently typing would be lost.  If so, this sounds like a variant of the issue Mark B raised up-thread.

I think this is hard to triage further here, and suggest you contact support directly.
Back to top
 
 

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



Posts: 5

Re: Tinderbox keeps reverting changes of text
Reply #12 - Mar 3rd, 2014, 1:52pm
 
I just tried what you suggested and it worked.

I stopped all the agents that can change $Text. Then I tried to edit a comment note (that should not be governed by the agent), while another text box (for a flowsheet note which is governed by the agents) was also open. The result was that I could edit the comment note, unlike before. So stopping the agents eliminates the problem.

So it is a variant of the same issue. The agent is continually updating all open text windows, even for notes it does not govern, as long as there is one open that it does govern.

Thanks for the help. I don't need to take this further, since I have the work-around.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print