Define a tag and then can't call it

View: New views
7 Messages — Rating Filter:   Alert me  

Define a tag and then can't call it

by Brad Lindsay-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, can someone explain to me why this is failing?  I get an error  
saying no tag, type, or constant defined with the name  
lsd_string_toduration!

============================================================
[
define_tag('String_ToDuration', -namespace='LSD', -required='a_string');
     return #a_string;
/define_tag;

lsd_string_toduration('help');
]
============================================================

-Brad

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/



Re: Define a tag and then can't call it

by Douglas Burchard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You have a typo. Try:

        return(#a_string);

or

        return: #a_string;

On Jun 30, 2009, at 12:21 PM, Brad Lindsay wrote:

> Ok, can someone explain to me why this is failing?  I get an error  
> saying no tag, type, or constant defined with the name  
> lsd_string_toduration!
>
> ============================================================
> [
> define_tag('String_ToDuration', -namespace='LSD', -
> required='a_string');
>    return #a_string;
> /define_tag;
>
> lsd_string_toduration('help');
> ]
> ============================================================
>
> -Brad

--
Douglas Burchard, President
DouglasBurchard.com, Web Applications
15024 NE 66th Street
Redmond, WA  98052, USA

direct: (206) 227-8161
solutions@...
http://www.douglasburchard.com/




--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/



Re: Define a tag and then can't call it

by Steve Piercy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Add a trailing _ to the -namespace parameter.

define_tag('String_ToDuration', -namespace='LSD_', -required='a_string');

--steve


On Tuesday, June 30, 2009, blindsay@... (Brad Lindsay) pronounced:

>Ok, can someone explain to me why this is failing?  I get an error  
>saying no tag, type, or constant defined with the name  
>lsd_string_toduration!
>
>============================================================
>[
>define_tag('String_ToDuration', -namespace='LSD', -required='a_string');
>     return #a_string;
>/define_tag;
>
>lsd_string_toduration('help');
>]
>============================================================
>
>-Brad
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<web@...>                  <http://www.StevePiercy.com/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/



Re: Define a tag and then can't call it

by Brad Lindsay-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jun 30, 2009, at 3:26 PM, Douglas Burchard wrote:
> You have a typo. Try:
> return(#a_string);
> or
> return: #a_string;

Oops!  But it *still* doesn't work.


On Jun 30, 2009, at 3:27 PM, Steve Piercy - Web Site Builder wrote:
> Add a trailing _ to the -namespace parameter.
> define_tag('String_ToDuration', -namespace='LSD_', -
> required='a_string');
>

Nor does this.

-Brad




> --steve
>
>
> On Tuesday, June 30, 2009, blindsay@... (Brad Lindsay)  
> pronounced:
>
>> Ok, can someone explain to me why this is failing?  I get an error
>> saying no tag, type, or constant defined with the name
>> lsd_string_toduration!
>>
>> ============================================================
>> [
>> define_tag('String_ToDuration', -namespace='LSD', -
>> required='a_string');
>>    return #a_string;
>> /define_tag;
>>
>> lsd_string_toduration('help');
>> ]
>> ============================================================
>>
>> -Brad
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <web@...>                  <http://www.StevePiercy.com/>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/



Re: Define a tag and then can't call it

by bilcorry :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Brad Lindsay wrote on 6/30/2009 2:21 PM:
> Ok, can someone explain to me why this is failing?  I get an error
> saying no tag, type, or constant defined with the name
> lsd_string_toduration!

I don't use namespaces because of the oddities I tend to encounter.  But if you really want to use it, this works:

[
define_tag('ToDuration', -namespace='LSD_String', -required='a_string');
    return(#a_string);
/define_tag;

lsd_string_toduration('help');
]


- Bil



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/



Re: Define a tag and then can't call it

by Brad Lindsay-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jun 30, 2009, at 3:37 PM, Bil Corry wrote:

> Brad Lindsay wrote on 6/30/2009 2:21 PM:
>> Ok, can someone explain to me why this is failing?  I get an error
>> saying no tag, type, or constant defined with the name
>> lsd_string_toduration!
>
> I don't use namespaces because of the oddities I tend to encounter.  
> But if you really want to use it, this works:
>
> [
> define_tag('ToDuration', -namespace='LSD_String', -
> required='a_string');
>    return(#a_string);
> /define_tag;
>
> lsd_string_toduration('help');
> ]

That is definitely an oddity.  I'm sure I have another tag with a  
namespace that has an underscore in the name and not the namespace.  
Weird.

Thanks,
-Brad

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/



Re: Define a tag and then can't call it

by Stiti :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you are using the -Namespace in the define_tag then don't use "_" (underscrore) character in the tag name. Because when you call the custom tag in your program, Lasso always considers the string upto the last "_" character as the namespace of the custom tag and the string after the last "_"character as the Tag Name.
If the string after the last "_"character doesn't matches the Tag Name defined in [Define_tag] and the string before last "_" character doesn't matches the string provided in the "-Namespace" option in Define_Tag and , it returns an error that the "No tag, type or constant was defined under the name lsd_string_toduration".

In your case "lsd_string" is considered as namespace of the tag but it finds only "lsd" as the namespace. Thus it finds no tag defined for the name "lsd_string_toduration". If in the define_tag the tag name will be "ToDuration" and -Namespace="LSD_String", then lsd_string_toduration('help'); statement will be executed successfully.


Brad Lindsay-2 wrote:
Ok, can someone explain to me why this is failing?  I get an error  
saying no tag, type, or constant defined with the name  
lsd_string_toduration!

============================================================
[
define_tag('String_ToDuration', -namespace='LSD', -required='a_string');
     return #a_string;
/define_tag;

lsd_string_toduration('help');
]
============================================================

-Brad

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Thanks
Stiti Samantaray
Mindfire Solutions
www.mindfiresolutions.com