Define_tag ?

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

Define_tag ?

Steve Upton

Still working on Lasso 8.5 to 9 migration

finding that a define_tag doesn't seem to be working.

Looking up in Lasso guide and there is NO mention of define_tag in the reference for Lasso 9.

Does it still exist?

I see mention of a "tag" tag but there is no documentation at all in those entries…

help?

Regards,

Steve Upton


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

Ke Carlton-3
Yes, it's still there and still works.

You've probably got a syntax issue, some where — try converting everything
to parenthesis syntax:

define_tag('mytag');
   // the definition
/define_tag;

Or use Lasso 9:

define mytag => {
   // the definition
}

What error do you get?

Ke

On 8 June 2012 21:20, Steve Upton <[hidden email]> wrote:

>
> Still working on Lasso 8.5 to 9 migration
>
> finding that a define_tag doesn't seem to be working.
>
> Looking up in Lasso guide and there is NO mention of define_tag in the
> reference for Lasso 9.
>
> Does it still exist?
>
> I see mention of a "tag" tag but there is no documentation at all in those
> entries…
>
> help?
>
> Regards,
>
> Steve Upton
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

Steve Upton

On Jun 8, 2012, at 1:23 PM, Ke Carlton wrote:

> Yes, it's still there and still works.
>
> You've probably got a syntax issue, some where — try converting everything
> to parenthesis syntax:
>
> define_tag('mytag');
>   // the definition
> /define_tag;
>
> Or use Lasso 9:
>
> define mytag => {
>   // the definition
> }
>
> What error do you get?

I'm not getting an explicit error at this time. Just finding that a local variable is not defined when it's fine in Lasso 9.

The define_tag is a bit antiquated with:

Define_Tag('buildHeader', -required='templateChoice', -optional='siteSection', -autooutput, -encodeNone);

So I wanted to lookup the need for such things as -autooutput and -encodeNone yet there are NO signs of documentation….

So I'm left wondering

Regards,

Steve


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

stevepiercy
In reply to this post by Steve Upton
The 8 entry is still valid, or you can refer to either Language Guide.

http://www.lassosoft.com/lassoDocs/languageReference/obj/Define_Tag?v=8

http://www.lassosoft.com/Language-Guide-Defining-Methods

--steve


On 6/8/12 at 1:20 PM, [hidden email] (Steve Upton) pronounced:

> Still working on Lasso 8.5 to 9 migration
>
> finding that a define_tag doesn't seem to be working.
>
> Looking up in Lasso guide and there is NO mention of define_tag in the reference
> for Lasso 9.
>
> Does it still exist?
>
> I see mention of a "tag" tag but there is no documentation at all in those
> entries…
>
> help?
>
> Regards,
>
> Steve Upton
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

stevepiercy
In reply to this post by Steve Upton
On 6/8/12 at 2:12 PM, [hidden email] (Steve Upton) pronounced:

> On Jun 8, 2012, at 1:23 PM, Ke Carlton wrote:
>
> > Yes, it's still there and still works.
> >
> > You've probably got a syntax issue, some where — try converting everything
> > to parenthesis syntax:
> >
> > define_tag('mytag');
> >   // the definition
> > /define_tag;
> >
> > Or use Lasso 9:
> >
> > define mytag => {
> >   // the definition
> > }
> >
> > What error do you get?
>
> I'm not getting an explicit error at this time. Just finding that a local
> variable is not defined when it's fine in Lasso 9.
>
> The define_tag is a bit antiquated with:
>
> Define_Tag('buildHeader', -required='templateChoice', -optional='siteSection',
> -autooutput, -encodeNone);

-autooutput is not a keyword.

maybe you meant this:

define_tag('buildheader', -required='templatechoice', -optional='sitesection',
 -optional='autooutput', -encodenone);



> So I wanted to lookup the need for such things as -autooutput and -encodeNone
> yet there are NO signs of documentation….
>
> So I'm left wondering
>
> Regards,
>
> Steve
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

Ke Carlton-3
If I recall correctly -autooutput is valid for L8.x

define_tag:'mytest',-autooutput;
'x';
/define_tag;

mytest; // x


However it's no longer supported by Lasso 9, so you'll need to do something
like this:

define_tag:'mytest';

local('out') = string;

#out += 'x';

return #out;

/define_tag;

Ke

On 8 June 2012 22:20, Steve Piercy - Web Site Builder
<[hidden email]>wrote:

>
> -autooutput is not a keyword.
>
>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

stevepiercy
Ah, OK, it's not documented in 8 so I never used it.

--steve


On 6/8/12 at 10:25 PM, [hidden email] (Ke Carlton) pronounced:

> If I recall correctly -autooutput is valid for L8.x
>
> define_tag:'mytest',-autooutput;
> 'x';
> /define_tag;
>
> mytest; // x
>
>
> However it's no longer supported by Lasso 9, so you'll need to do something
> like this:
>
> define_tag:'mytest';
>
> local('out') = string;
>
> #out += 'x';
>
> return #out;
>
> /define_tag;
>
> Ke
>
> On 8 June 2012 22:20, Steve Piercy - Web Site Builder
> <[hidden email]>wrote:
>
> >
> > -autooutput is not a keyword.
> >
> >
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

Tim Taplin
In reply to this post by Ke Carlton-3
and if you are defining local variables inside the tag, you'd need to insert them into an array or map and return that array or map for use in your page (obviously assigning to a local var in the page context.

define_tag:'mytest';

local('out') = string;
local('now' = server_time);
local('useless' = 'Some other Useless Label');

#out += 'x';

local('dataset' = map('out' = #out, 'now' = #now, 'useless' = #useless));

return #dataset;

/define_tag;

called with:
local('page_data' = mytest() );

#page_data->find('out');

Not a very useful example, but perhaps offers some additional insight into the possibilities.

Tim

On Jun 8, 2012, at 3:25 PM, Ke Carlton wrote:

> If I recall correctly -autooutput is valid for L8.x
>
> define_tag:'mytest',-autooutput;
> 'x';
> /define_tag;
>
> mytest; // x
>
>
> However it's no longer supported by Lasso 9, so you'll need to do something
> like this:
>
> define_tag:'mytest';
>
> local('out') = string;
>
> #out += 'x';
>
> return #out;
>
> /define_tag;
>
> Ke
>
> On 8 June 2012 22:20, Steve Piercy - Web Site Builder
> <[hidden email]>wrote:
>
>>
>> -autooutput is not a keyword.
>>
>>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Define_tag ?

Steve Upton

On Jun 8, 2012, at 2:46 PM, Tim Taplin wrote:

> and if you are defining local variables inside the tag, you'd need to insert them into an array or map and return that array or map for use in your page (obviously assigning to a local var in the page context.

Actually I was getting bitten by the inverse problem. The new behavior of includes not being able to see locals from the includer…

Also Ke, thanks for the heads up about my use of autooutput. It was handy while it lasted….

Have a good weekend all

Regards,

Steve


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>