Undocumented feature in 7.1.3

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Undocumented feature in 7.1.3

Trevor Jacques
Hello.

I just found an interesting SNAFU. For an internationalisation
effort. I had been successfully using the form:

[Process: $LangText->Find: 'ButtonTitleDeleteChild']

to produce some needed text. All has worked perfectly until I tried
putting [Loop_Count] into the contents of the variable. I broke
things downby replacing the [process: ] with the following:

[Loop_Count] works.

[Process: 'Delete related record [Loop_Count].'] does not work.

[Process: ('Delete related record [Loop_Count].')] does not work.

[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
contents of the array entry is "Delete related record." works.

[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
contents of the array entry is "Delete related record [Loop_Count]."
does not work.

[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
contents of the array entry is "[Loop_Count]" does not work.

All other [processing] that I've done has worked perfectly, so I'm
beginning to suspect an undocumented feature.

Anyone have any experiences with this or suggestions? Thanks.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Andreas Steinmann
can't you put the loop_count in a var?

[var: 'loup_count' = (loup_count)]
[Process: 'Delete related record ' + $loup_count + '.']

Andreas

>Hello.
>
>I just found an interesting SNAFU. For an internationalisation
>effort. I had been successfully using the form:
>
>[Process: $LangText->Find: 'ButtonTitleDeleteChild']
>
>to produce some needed text. All has worked perfectly until I tried
>putting [Loop_Count] into the contents of the variable. I broke
>things downby replacing the [process: ] with the following:
>
>[Loop_Count] works.
>
>[Process: 'Delete related record [Loop_Count].'] does not work.
>
>[Process: ('Delete related record [Loop_Count].')] does not work.
>
>[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
>contents of the array entry is "Delete related record." works.
>
>[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
>contents of the array entry is "Delete related record [Loop_Count]."
>does not work.
>
>[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
>contents of the array entry is "[Loop_Count]" does not work.
>
>All other [processing] that I've done has worked perfectly, so I'm
>beginning to suspect an undocumented feature.
>
>Anyone have any experiences with this or suggestions? Thanks.
>
>T.
>
>------------------------------
>Lasso Support: http://support.omnipilot.com/
>Search the list archives: http://www.listsearch.com/lassotalk.lasso
>Manage your list subscription:
>http://www.listsearch.com/lassotalk.lasso?manage


--
  N A T F I L M    F E S T I V A L
  --------------------------------
  St. Kannikestr. 6
  DK-1169 Copenhagen K     Denmark
  Tel.  +45 3312 0005
  Mobil +45 2811 7505
  Fax   +45 3312 7505
  --------------------------------
  <mailto:[hidden email]>
  <http://www.natfilm.dk>

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Ke Carlton
In reply to this post by Trevor Jacques
Is there an explicit reason for using the process tag?

Ke


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf
Of Trevor Jacques
Sent: 24 August 2006 13:37
To: [hidden email]
Subject: Undocumented feature in 7.1.3

Hello.

I just found an interesting SNAFU. For an internationalisation
effort. I had been successfully using the form:

[Process: $LangText->Find: 'ButtonTitleDeleteChild']

to produce some needed text. All has worked perfectly until I tried
putting [Loop_Count] into the contents of the variable. I broke
things downby replacing the [process: ] with the following:

[Loop_Count] works.

[Process: 'Delete related record [Loop_Count].'] does not work.

[Process: ('Delete related record [Loop_Count].')] does not work.

[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
contents of the array entry is "Delete related record." works.

[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
contents of the array entry is "Delete related record [Loop_Count]."
does not work.

[Process: $LangText->Find: 'ButtonTitleDeleteChild'] where the
contents of the array entry is "[Loop_Count]" does not work.

All other [processing] that I've done has worked perfectly, so I'm
beginning to suspect an undocumented feature.

Anyone have any experiences with this or suggestions? Thanks.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by Andreas Steinmann
>can't you put the loop_count in a var?

In terms of Lasso only, yes, but I'm not putting the [loop_count] in
the variable. My customer is.  :-/

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by Ke Carlton
>Is there an explicit reason for using the process tag?

Yes. I'm not putting the code in the variable. My customer is.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Clive Bruton
In reply to this post by Trevor Jacques

On 24 Aug 2006, at 13:37, Trevor Jacques wrote:

> [Process: 'Delete related record [Loop_Count].'] does not work.

[Process: 'Delete related record ' (loop_count) '.']?

It's not really that clear to me what it is you're trying to do, just  
output a string?


-- Clive

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
>[Process: 'Delete related record ' (loop_count) '.']?

The code HAS to be between two single quotations, since the text with
the lasso code to be processed is provided as a string elsewhere,
that is then read as a string into the array element. That element is
read and processed to produce the output for the page. I cannot
presage the format of the text/lasso that the string with comprise,
so all lasso syntax formats must be between those two single
quotation marks and then [process] properly.

>It's not really that clear to me what it is you're trying to do,
>just output a string?

Yup. Simple, really.  :-)

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Andreas Steinmann
In reply to this post by Trevor Jacques
OH?

I thought, Lasso would do that for you, for your customer or for anyone?
Andreas

>>can't you put the loop_count in a var?
>
>In terms of Lasso only, yes, but I'm not putting the [loop_count] in
>the variable. My customer is.  :-/
>
>T.
>
>------------------------------
>Lasso Support: http://support.omnipilot.com/
>Search the list archives: http://www.listsearch.com/lassotalk.lasso
>Manage your list subscription:
>http://www.listsearch.com/lassotalk.lasso?manage


--
  N A T F I L M    F E S T I V A L
  --------------------------------
  St. Kannikestr. 6
  DK-1169 Copenhagen K     Denmark
  Tel.  +45 3312 0005
  Mobil +45 2811 7505
  Fax   +45 3312 7505
  --------------------------------
  <mailto:[hidden email]>
  <http://www.natfilm.dk>

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

James Harvard
In reply to this post by Trevor Jacques
At 8:37 am -0400 24/8/06, Trevor Jacques wrote:
>[Process: $LangText->Find: 'ButtonTitleDeleteChild']
>
>to produce some needed text. All has worked perfectly until I tried putting [Loop_Count] into the contents of the variable. I broke things downby replacing the [process: ] with the following:

This bit me when upgrading to L7. Basically you can't have loop_count separated from its parent tag (records, loop, while, iterate etc) in any code that is parsed separately. It was sort of documented, but IIRC only with reference to include files.

loop: 5 ;
        include: 'code_including_loop_count.lasso' ;
        process: '[loop_count]' ;
        // both the above will cause an error with Lasso >= 7
/loop;

HTH,
James Harvard

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Clive Bruton
In reply to this post by Trevor Jacques

On 24 Aug 2006, at 14:10, Trevor Jacques wrote:

>> [Process: 'Delete related record ' (loop_count) '.']?
>
> The code HAS to be between two single quotations, since the text  
> with the lasso code to be processed is provided as a string  
> elsewhere, that is then read as a string into the array element.  
> That element is read and processed to produce the output for the  
> page. I cannot presage the format of the text/lasso that the string  
> with comprise, so all lasso syntax formats must be between those  
> two single quotation marks and then [process] properly.

[Process: 'Delete related record \' (loop_count) \'.']


-- Clive

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by Andreas Steinmann
>OH? I thought, Lasso would do that for you, for your customer or for anyone?

It does, but you have to understand that I don't provide this part of
the code. It's provided in text strings by my customers.

>>In terms of Lasso only, yes, but I'm not putting the [loop_count]
>>in the variable. My customer is.  :-/

I should have said:

I'm not putting the '[loop_count]' in the variable.

My customer is putting the lasso syntax within a text string that he
provides. I have to ensure that anything, including Lasso code, in
his string is processed properly, hence the use of [process].

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Andreas Steinmann
In reply to this post by Trevor Jacques
If [loop_count] is 746

the code

[var: 'loup_count' = (loup_count)]
[Process: 'Delete related record ' + $loup_count + '.']

would produce

[Process: 'Delete related record 746.']

right?
ANdreas


>>[Process: 'Delete related record ' (loop_count) '.']?
>
>The code HAS to be between two single quotations, since the text
>with the lasso code to be processed is provided as a string
>elsewhere, that is then read as a string into the array element.
>That element is read and processed to produce the output for the
>page. I cannot presage the format of the text/lasso that the string
>with comprise, so all lasso syntax formats must be between those two
>single quotation marks and then [process] properly.
>
>>It's not really that clear to me what it is you're trying to do,
>>just output a string?
>
>Yup. Simple, really.  :-)
>
>T.
>
>------------------------------
>Lasso Support: http://support.omnipilot.com/
>Search the list archives: http://www.listsearch.com/lassotalk.lasso
>Manage your list subscription:
>http://www.listsearch.com/lassotalk.lasso?manage


--
  N A T F I L M    F E S T I V A L
  --------------------------------
  St. Kannikestr. 6
  DK-1169 Copenhagen K     Denmark
  Tel.  +45 3312 0005
  Mobil +45 2811 7505
  Fax   +45 3312 7505
  --------------------------------
  <mailto:[hidden email]>
  <http://www.natfilm.dk>

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Simon Forster
In reply to this post by Trevor Jacques

On 24 Aug 2006, at 14:10, Trevor Jacques wrote:

>> [Process: 'Delete related record ' (loop_count) '.']?
>
> The code HAS to be between two single quotations, since the text...

Don't understand.

>> It's not really that clear to me what it is you're trying to do,  
>> just output a string?
>
> Yup. Simple, really.  :-)

So can't you use:

['Delete related record ' loop_count '.']

And if you must use the process tag, you could try:

[Process: ('Delete related record ' loop_count '.')]

HTH

Simon Forster
_______________________________________________________
  LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
  Tel: +44 (0)20 8133 0528   Fax: +44 (0)70 9230 5247
_______________________________________________________



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
>>The code HAS to be between two single quotations, since the text...
>Don't understand.

My customer provides the string, which might include Lasso syntax.
That whole string is put into an array element. When that element is
needed, it is [process]ed to ensure that the syntax is processed at
the appropriate time.

>So can't you use:
>['Delete related record ' loop_count '.']

Possibly, but remember: I can't predict the format of the lasso
syntax in the string, which is why I'm processing it.

>And if you must use the process tag, you could try:
>[Process: ('Delete related record ' loop_count '.')]

As I said, the format is not up to me. [process] has to work on
whatever lasso syntax is provided. Period.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by Andreas Steinmann
>If [loop_count] is 746, the code:
>[var: 'loup_count' = (loup_count)]
>[Process: 'Delete related record ' + $loup_count + '.']
>would produce
>[Process: 'Delete related record 746.']
>right?

Possibly, but remember: I'm not providing the syntax that has to be
processed. If my customer provides

Delete record [loop_count]

That's EXACTLY what I have to work on. [process]ing that should
produce the correct result.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by Clive Bruton
>[Process: 'Delete related record \' (loop_count) \'.']

I can't be sure that this will be the format of the text/syntax to be
[processed]. Everything to be processed is between a set of single
quotation marks. Period. I can't change the format of that
text/syntax, but the [process] tag has to work correctly on that
text/syntax.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by James Harvard
>James wrote:
>loop: 5 ;
> process: '[loop_count]' ;
> // will cause an error with Lasso >= 7
>/loop;

Even with Lasso 8? (Actually, I'm in the middle of a set of
[records], rather than specifically a [loop].)

This seems to defeat the purpose of the [process] tag.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Greg Willits-2
On Aug 24, 2006, at 6:49 AM, Trevor Jacques wrote:

>> James wrote:
>> loop: 5 ;
>> process: '[loop_count]' ;
>> // will cause an error with Lasso >= 7
>> /loop;
>
> Even with Lasso 8?

Yep.

Works:
        loop: 3;
           process: 'loop_count';
        /loop;

Does not work:
        loop: 3;
           process: '[loop_count]';
        /loop;


> (Actually, I'm in the middle of a set of [records], rather than  
> specifically a [loop].)

Same diff


> This seems to defeat the purpose of the [process] tag.

It's a limitation of Loop_Count, not Process.

You just need to put it into a var.


Works:
        var:'indx' = integer;
        loop: 3;
           $indx += 1;
           process: '[$indx]';
        /loop;

-- gw


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Bil Corry-3
In reply to this post by Trevor Jacques
Trevor Jacques wrote:
> but the [process] tag has to work correctly on that text/syntax.

As others have pointed out, [process] does work correctly, it's your code that isn't proper.  If you want your users to be able to use [loop_count] without the container tags, then you'll have to do something like this:


var:'code' = 'This is a test [loop_count]';
loop: 5;
  process: (string_replace:$code,-find='[loop_count]',-replace=loop_count);
/loop;


- Bil


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented feature in 7.1.3

Trevor Jacques
In reply to this post by Greg Willits-2
>Greg wrote:
>Works:
> loop: 3;
>   process: 'loop_count';
> /loop;
>Does not work:
> loop: 3;
>   process: '[loop_count]';
> /loop;

>It's a limitation of Loop_Count, not Process. You just need to put
>it into a var.

I can do this, but I can't rely on my users to do so, since they only
have the Lasso docs to go by.

I just relooked up [process] in the Lasso 8 reference, but there is
no reference to ANY exceptions to the rules for [process]ing strings.
The lookup for [Loop_Count] makes mention of assigning it to a
variable for [include]s but nothing about [process].

>Works:
> var:'indx' = integer;
> loop: 3;
>   $indx += 1;
>   process: '[$indx]';
> /loop;

I'd use: $indx = loop_count; to be clearer and drop the first line.
Perhaps there's a small performance hit or integer is required to
make it work?

Bil wrote:
>As others have pointed out, [process] does work correctly, it's your
>code that isn't proper. If you want your users to be able to use
>[loop_count] without the container tags, then you'll have to do
>something like this:
>
>var:'code' = 'This is a test [loop_count]';
>loop: 5;
>  process: (string_replace:$code,-find='[loop_count]',-replace=loop_count);
>/loop;

I disagree with Bil and agree with Greg. This kind of exception has
to be 1) clearly marked in the documentation, or 2) made consistent
in the way that [process] works, since any other [tag]s inside the
set of single quotations work just fine.

I've sent this to the documentation folks.

T.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
12