Old code to Lasso Version 8

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

Old code to Lasso Version 8

detlef.hebbel
Hello List.

When rewriting old code to Lasso Version 8:


This is the code:

[else: if:(field: 'R_Options_product_serial::TextDisplayOption') == 'Option
1'][/if][if:(Field: 'R_Options_product_serial::OptionType') == 'Text' &&
(Field: 'R_Options_product_serial::TextDisplayOption') == 'Option 2']


This is the error message:

Error Message: 
No tag, type or constant was defined under the name "if" with arguments:
array: (Option 1)

at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'='' on
line: 974 at position: 14

at: portal with params: 'R_Options_product_serial'

at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''

at: inline with params: -Search, -Database='Products', -Table='Public',
-MaxRecords=1, 'Product_Name'=NULL

at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''

Error Code: -9948
Action: nothing


...and I am failing to fix it.....


Any idea how to fix, anybody?

Many thanks

Detlef



--
------------------------------
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: Old code to Lasso Version 8

Bil Corry
Remove the [if] after the [else]:

[else: (field: 'R_Options_product_serial::TextDisplayOption') == 'Option
1'][/if][if:(Field: 'R_Options_product_serial::OptionType') == 'Text' &&
(Field: 'R_Options_product_serial::TextDisplayOption') == 'Option 2']


The if/else structure is now:

        if: $this;
                // do stuff
        else: $that;
                // do stuff
        else;
                // do stuff
        /if;


You can read more about it on page 440 of the Language Guide.  I'd recommend you
read the entire chapter, it'll save you a lot of time.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/
 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Detlef Hebbel
Sent: Monday, September 26, 2005 9:15 PM
To: [hidden email]
Subject: Old code to Lasso Version 8

Hello List.

When rewriting old code to Lasso Version 8:


This is the code:

[else: if:(field: 'R_Options_product_serial::TextDisplayOption') == 'Option
1'][/if][if:(Field: 'R_Options_product_serial::OptionType') == 'Text' &&
(Field: 'R_Options_product_serial::TextDisplayOption') == 'Option 2']


This is the error message:

Error Message: 
No tag, type or constant was defined under the name "if" with arguments:
array: (Option 1)

at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'='' on
line: 974 at position: 14

at: portal with params: 'R_Options_product_serial'

at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''

at: inline with params: -Search, -Database='Products', -Table='Public',
-MaxRecords=1, 'Product_Name'=NULL

at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''

Error Code: -9948
Action: nothing


...and I am failing to fix it.....


Any idea how to fix, anybody?

Many thanks

Detlef



--
------------------------------
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: Old code to Lasso Version 8

Jim Van Heule
In reply to this post by detlef.hebbel
Do a global replacement of

Else: If:

and

Else:If:

to Else:

That should correct the majority of the errors you come across in  
moving from LP6 or earlier to LP8.

There are also a few other tricks such as

Error_CurrentError, ErrorCode

to Error_CurrentError: -ErrorCode

Lasso no longer allows a comma immediately after a tag and instead  
requires a colon. I think this also effects some server data tags.

Also notice that parameters now require a - in front of them. such as  
-ErrorCode, -Table, -SQL, etc.

That's all I can remember at the moment. It's been awhile and the  
memories are not so fresh.

--
Jim Van Heule
Heunox Corporation
(616) 844-0066


On Sep 27, 2005, at 12:14 AM, Detlef Hebbel wrote:

> Hello List.
>
> When rewriting old code to Lasso Version 8:
>
>
> This is the code:
>
> [else: if:(field: 'R_Options_product_serial::TextDisplayOption') ==  
> 'Option
> 1'][/if][if:(Field: 'R_Options_product_serial::OptionType') ==  
> 'Text' &&
> (Field: 'R_Options_product_serial::TextDisplayOption') == 'Option 2']
>
>
> This is the error message:
>
> Error Message:
> No tag, type or constant was defined under the name "if" with  
> arguments:
> array: (Option 1)
>
> at: /Special.lasso with params: '-KeyValue'='33', '-
> Token.Action'='' on
> line: 974 at position: 14
>
> at: portal with params: 'R_Options_product_serial'
>
> at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''
>
> at: inline with params: -Search, -Database='Products', -
> Table='Public',
> -MaxRecords=1, 'Product_Name'=NULL
>
> at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''
>
> Error Code: -9948
> Action: nothing
>
>
> ...and I am failing to fix it.....
>
>
> Any idea how to fix, anybody?
>
> Many thanks
>
> Detlef
>
>
>
> --
> ------------------------------
> 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: Old code to Lasso Version 8

detlef.hebbel
In reply to this post by detlef.hebbel
Done!

Works fine.

Thanks Jim


on 27.09.2005 20:55, Jim Van Heule at [hidden email] wrote:

> Do a global replacement of
>
> Else: If:
>
> and
>
> Else:If:
>
> to Else:
>
> That should correct the majority of the errors you come across in
> moving from LP6 or earlier to LP8.
>
> There are also a few other tricks such as
>
> Error_CurrentError, ErrorCode
>
> to Error_CurrentError: -ErrorCode
>
> Lasso no longer allows a comma immediately after a tag and instead
> requires a colon. I think this also effects some server data tags.
>
> Also notice that parameters now require a - in front of them. such as
> -ErrorCode, -Table, -SQL, etc.
>
> That's all I can remember at the moment. It's been awhile and the
> memories are not so fresh.
>
> --
> Jim Van Heule
> Heunox Corporation
> (616) 844-0066
>
>
> On Sep 27, 2005, at 12:14 AM, Detlef Hebbel wrote:
>
>> Hello List.
>>
>> When rewriting old code to Lasso Version 8:
>>
>>
>> This is the code:
>>
>> [else: if:(field: 'R_Options_product_serial::TextDisplayOption') ==
>> 'Option
>> 1'][/if][if:(Field: 'R_Options_product_serial::OptionType') ==
>> 'Text' &&
>> (Field: 'R_Options_product_serial::TextDisplayOption') == 'Option 2']
>>
>>
>> This is the error message:
>>
>> Error Message:
>> No tag, type or constant was defined under the name "if" with
>> arguments:
>> array: (Option 1)
>>
>> at: /Special.lasso with params: '-KeyValue'='33', '-
>> Token.Action'='' on
>> line: 974 at position: 14
>>
>> at: portal with params: 'R_Options_product_serial'
>>
>> at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''
>>
>> at: inline with params: -Search, -Database='Products', -
>> Table='Public',
>> -MaxRecords=1, 'Product_Name'=NULL
>>
>> at: /Special.lasso with params: '-KeyValue'='33', '-Token.Action'=''
>>
>> Error Code: -9948
>> Action: nothing
>>
>>
>> ...and I am failing to fix it.....
>>
>>
>> Any idea how to fix, anybody?
>>
>> Many thanks
>>
>> Detlef
>>
>>
>>
>> --
>> ------------------------------
>> 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