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
Text attribute in Stamps (4.6 question) (Read 10331 times)
Paul Walters
Ex Member




Text attribute in Stamps (4.6 question)
Mar 08th, 2009, 9:13am
 
This is a 4.6 question.

Let's say I have a user attribute named Quote in a document; it is a string.  In this document every note has a non-empty Quote, and no Text.

If I create and apply a Stamp with the action:

$Text = $Quote

Nothing happens.

If I try to create a QuickStamp to enter a value for Text, I can't because Text does not display in any of the attribute groups - I don't know if this is new with 4.6.

If I put the action mentioned above into a rule, it works as expected.

Is there a method in 4.6 to create a Stamp or QuickStamp with actions that involve Text?  My approach for now is to create a prototype with the rule, apply it to all the notes, then flip them back to the original prototype I had created for the notes.   This works like a stamp.

Thanks!
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Text attribute in Stamps (4.6 question)
Reply #1 - Mar 8th, 2009, 10:07am
 
I just tried this, and it works fine.

If your note is open in a text window or an explorer view, however, the text won't change; Tinderbox assumes you're editing the text yourself, and won't overwrite your work.


Note: Tinderbox 4.6 does have trouble parsing  the $Text attribute when $Text appears on the right hand side of the '=' assignment.  This will be fixed in the next release.
Back to top
 
 
WWW   IP Logged
Paul Walters
Ex Member




Re: Text attribute in Stamps (4.6 question)
Reply #2 - Mar 8th, 2009, 12:20pm
 
Maybe something is corrupted on my machine.

I just emailed Tinderbox support a test Tinderbox file.  It has an attributed Quote and these stamps:

ClearText --> action is:   $Text=;
SetText --> action is: $Text=$Quote

Applying the stamps has no result.


Back to top
 
« Last Edit: Mar 8th, 2009, 4:43pm by Paul Walters »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Text attribute in Stamps (4.6 question)
Reply #3 - Mar 8th, 2009, 12:24pm
 
Tangential point - SetText is ideally now coded $Text=$Quote. If/when your TBX is working correctly either syntax (i.e. with/without the extra '$') will work in v4.6.
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.
The Answer
Reply #4 - Mar 8th, 2009, 1:05pm
 
Tinderbox 4.6 can sometimes confuse a string constant that coincides with an attribute name. For example, if you have a user attribute named Quote, the action (or stamp)

    $Text="Quote"

is misparsed as if you had written

    $Text=$Quote

This arises from an effort, now seen to be ill-advised, to continue to support the old syntax

     Text=Name

where the '$' is implicit. We're working on a fix; in the mean time, disambiguating the string from the attribute name will provide a workaround.
Back to top
 
 
WWW   IP Logged
Paul Walters
Ex Member




Re: Text attribute in Stamps (4.6 question)
Reply #5 - Mar 8th, 2009, 4:43pm
 
I am not using a string (such as $Text="Quote").  Quote is the name of an attribute.  I am using $Text=$Quote, which is what I intend.  The stamp doesn't work.
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Text attribute in Stamps (4.6 question)
Reply #6 - Mar 8th, 2009, 4:49pm
 
I just tested it, again, in a newly-created document. And it works for me.

    Stamp: $Text=$Quote
   
Create a new note.
Make Quote a key attribute
Set Quote to "'Tis true 'tis day"
Close the text window.
Select the note in outline view
Use the stamp
Open the note; the text has been changed
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Text attribute in Stamps (4.6 question)
Reply #7 - Mar 8th, 2009, 5:17pm
 
Paul, I too get the same as Mark B.  This implies either some sort of ocrrpution or that there are other factors at work.  Try the basic test in a new TBX. If it works - as it does for me, look at what else might be affecting the task in question.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Paul Walters
Ex Member




Re: Text attribute in Stamps (4.6 question)
Reply #8 - Mar 8th, 2009, 6:55pm
 
Each file I've mentioned here was created to test this; a new TBX in each case.  So, to be extra sure I again created a test Tinderbox file, with a user attribute called Quote and a stamp with the action $Text = $Quote.  I did this in 4.6 on a MacPro and again in 4.6 on a MacBook.  The stamp does not work in either instance of 4.6.  I zapped 4.6 on the MacPro, the plist and other related files, and reinstalled 4.5.3.  I recreated the same test file using 4.5.3.  The stamp worked in 4.5.3.  I've re-zapped 4.5.3 and reinstalled 4.6.  I re-re-created the test file.  The stamp does not work in 4.6.

I've sent the 4.5.3 and the 4.6 test files to support.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Text attribute in Stamps (4.6 question)
Reply #9 - Mar 8th, 2009, 7:21pm
 
Quote:
I've sent the 4.5.3 and the 4.6 test files to support.


That should help with diagnosis. Having a common reference at least gives a consistent context which helps excludes lots of possibilities.
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: Text attribute in Stamps (4.6 question)
Reply #10 - Mar 9th, 2009, 10:38am
 
SOLUTION: just close your text window or explorer view.

If a note has an open text window, or is selected in an Explorer window, Tinderbox assumes that you might be editing the text and will not modify the text in rules, stamps, and actions.
Back to top
 
 
WWW   IP Logged
Paul Walters
Ex Member




Re: Text attribute in Stamps (4.6 question)
Reply #11 - Mar 10th, 2009, 8:10am
 
Ah-ha!  Thanks.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print