I just upgraded from 9.2.4 to 9.2.6.
This code was working under 9.2.4, but not so much now. Any clues? define_tag( 'debug', -req='input', -copy, -opt='label', -copy); !local_defined('label') ? local('label') = '' | #label += ': '; local('output') = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input + '</div>'; return(#output); /define_tag; debug('hello', 'test label'); The error is: Error Msg: Position was out of range: 0 max is 2 - John Morris ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
I downgraded back to 9.2.4, then upgraded to 9.2.5.
It works in 9.2.5, so something in 9.2.6 changed it. - John Morris On Sep 17, 2013, at 5:20 PM, John Morris <[hidden email]> wrote: > I just upgraded from 9.2.4 to 9.2.6. > > > This code was working under 9.2.4, but not so much now. > Any clues? > > > define_tag( 'debug', > -req='input', -copy, > -opt='label', -copy); > > !local_defined('label') ? local('label') = '' | #label += ': '; > > local('output') = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input + '</div>'; > > return(#output); > > /define_tag; > > > > > debug('hello', 'test label'); > > > The error is: > > Error Msg: Position was out of range: 0 max is 2 > > - John Morris > > > ############################################################# > > Attend the Lasso Developer Conference 2013! > Sept 12-14, 2013 in Niagara Falls, Canada > http://www.lassosoft.com/LDC-niagara-falls-2013 > > ############################################################# > 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]> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by John Morris-3
Hi John,
Have you tried losing the semi colons from the code? #label += ': ' is also optimised as #label ->append( ': ') define_tag('debug', -req='input', -copy, -opt='label', -copy) => { !local_defined(label) ? local(label) = '' | #label ->append( ': ) local(output) = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input + '</div>' return(#output) } Very best regards, Rick ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by John Morris-3
That error message appears in the definition of the pair type in
Lasso 9. define pair->get(position::integer) => (#position == 1 ? .first | (#position == 2 ? .second | fail(-1, 'Position was out of range'))) My guess is that somewhere else you are invoking pair->get(0). One way to verify is to replace your code with: define_tag('debug') return('moosehair') /define_tag If you still get the error message, then you know it ain't in this tag. --steve On 9/17/13 at 5:20 PM, [hidden email] (John Morris) pronounced: >I just upgraded from 9.2.4 to 9.2.6. > > >This code was working under 9.2.4, but not so much now. >Any clues? > > >define_tag( 'debug', >-req='input', -copy, >-opt='label', -copy); > >!local_defined('label') ? local('label') = '' | #label += ': '; > >local('output') = '<div style="font: 11px \'Tahoma\'; color: >#888; border-bottom: 1px dotted #bbb; width: 500px; padding: >3px;">' + #label + #input + '</div>'; > >return(#output); > >/define_tag; > > > > >debug('hello', 'test label'); > > >The error is: > >Error Msg: Position was out of range: 0 max is 2 > >- John Morris > > >############################################################# > >Attend the Lasso Developer Conference 2013! >Sept 12-14, 2013 in Niagara Falls, Canada >http://www.lassosoft.com/LDC-niagara-falls-2013 > >############################################################# >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/> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by John Morris-3
John,
I wonder if it's related to this issue: http://www.lassosoft.com/rhinotrac?id=7578 Brad On 9/17/13, 6:32 PM, John Morris wrote: > I downgraded back to 9.2.4, then upgraded to 9.2.5. > It works in 9.2.5, so something in 9.2.6 changed it. > > - John Morris > > On Sep 17, 2013, at 5:20 PM, John Morris<[hidden email]> wrote: > >> I just upgraded from 9.2.4 to 9.2.6. >> >> >> This code was working under 9.2.4, but not so much now. >> Any clues? >> >> >> define_tag( 'debug', >> -req='input', -copy, >> -opt='label', -copy); >> >> !local_defined('label') ? local('label') = '' | #label += ': '; >> >> local('output') = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input +'</div>'; >> >> return(#output); >> >> /define_tag; >> >> >> >> >> debug('hello', 'test label'); >> >> >> The error is: >> >> Error Msg: Position was out of range: 0 max is 2 >> >> - John Morris >> >> >> ############################################################# >> >> Attend the Lasso Developer Conference 2013! >> Sept 12-14, 2013 in Niagara Falls, Canada >> http://www.lassosoft.com/LDC-niagara-falls-2013 >> >> ############################################################# >> 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]> > > > ############################################################# > > Attend the Lasso Developer Conference 2013! > Sept 12-14, 2013 in Niagara Falls, Canada > http://www.lassosoft.com/LDC-niagara-falls-2013 > > ############################################################# > 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]> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by John Morris-3
18 sep 2013 kl. 00:20 skrev John Morris <[hidden email]>:
> I just upgraded from 9.2.4 to 9.2.6. > > > This code was working under 9.2.4, but not so much now. > Any clues? > > > define_tag( 'debug', > -req='input', -copy, > -opt='label', -copy); > > !local_defined('label') ? local('label') = '' | #label += ': '; > > local('output') = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input + '</div>'; > > return(#output); > > /define_tag; > I suggest you write it Lasso 9 style instead, problem solved and performance improved. define debug( input::string, label::string = string ) => { return '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + (#label ? #label + ': ') + #input + '</div>' } HDB Jolle ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by Rick Draper-2
Hey Rick,
the ->append( ': ') did not work. Same error Thanks though - John Morris On Sep 17, 2013, at 5:59 PM, Rick Draper <[hidden email]> wrote: > Hi John, > > Have you tried losing the semi colons from the code? #label += ': ' is also optimised as #label ->append( ': ') > > define_tag('debug', -req='input', -copy, -opt='label', -copy) => { > > !local_defined(label) ? local(label) = '' | #label ->append( ': ) > > local(output) = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input + '</div>' > > return(#output) > > } > > Very best regards, > > Rick > > > > ############################################################# > > Attend the Lasso Developer Conference 2013! > Sept 12-14, 2013 in Niagara Falls, Canada > http://www.lassosoft.com/LDC-niagara-falls-2013 > > ############################################################# > 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]> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by Brad Lindsay
Hey Brad,
I found this item after I posted, I think it's the same issue. Thanks. - John Morris On Sep 17, 2013, at 7:11 PM, Brad Lindsay <[hidden email]> wrote: > John, > > I wonder if it's related to this issue: > http://www.lassosoft.com/rhinotrac?id=7578 > > Brad > > On 9/17/13, 6:32 PM, John Morris wrote: >> I downgraded back to 9.2.4, then upgraded to 9.2.5. >> It works in 9.2.5, so something in 9.2.6 changed it. >> >> - John Morris >> >> On Sep 17, 2013, at 5:20 PM, John Morris<[hidden email]> wrote: >> >>> I just upgraded from 9.2.4 to 9.2.6. >>> >>> >>> This code was working under 9.2.4, but not so much now. >>> Any clues? >>> >>> >>> define_tag( 'debug', >>> -req='input', -copy, >>> -opt='label', -copy); >>> >>> !local_defined('label') ? local('label') = '' | #label += ': '; >>> >>> local('output') = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input +'</div>'; >>> >>> return(#output); >>> >>> /define_tag; >>> >>> >>> >>> >>> debug('hello', 'test label'); >>> >>> >>> The error is: >>> >>> Error Msg: Position was out of range: 0 max is 2 >>> >>> - John Morris >>> >>> >>> ############################################################# >>> >>> Attend the Lasso Developer Conference 2013! >>> Sept 12-14, 2013 in Niagara Falls, Canada >>> http://www.lassosoft.com/LDC-niagara-falls-2013 >>> >>> ############################################################# >>> 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]> >> >> >> ############################################################# >> >> Attend the Lasso Developer Conference 2013! >> Sept 12-14, 2013 in Niagara Falls, Canada >> http://www.lassosoft.com/LDC-niagara-falls-2013 >> >> ############################################################# >> 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]> > > ############################################################# > > Attend the Lasso Developer Conference 2013! > Sept 12-14, 2013 in Niagara Falls, Canada > http://www.lassosoft.com/LDC-niagara-falls-2013 > > ############################################################# > 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]> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by John Morris-3
18 sep 2013 kl. 12:40 skrev John Morris <[hidden email]>:
> Hey Rick, > > the ->append( ': ') did not work. > Same error > > Thanks though > > - John Morris Ricks tip is a really good suggestion but unrelated to your issue. To expand on it. Wherever you have #mystring += ' some extra value' you should change it to #mystring -> append(' some extra value') The append is way faster than the += construction. Several 100% faster in some cases. HDB Jolle ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
In reply to this post by Jolle Carlestam-3
Hey Jolle,
Your's worked. I think it was a bug that Brad's post mentioned. http://www.lassosoft.com/rhinotrac?id=7578 I'm "trying" to get my site prepped for a Lasso9 upgrade, so I don't want to rewrite all my code :) But in this case I think I'll go your route, instead of the easy downgrade path. Many thanks - John Morris On Sep 18, 2013, at 3:25 AM, Jolle Carlestam <[hidden email]> wrote: > 18 sep 2013 kl. 00:20 skrev John Morris <[hidden email]>: > >> I just upgraded from 9.2.4 to 9.2.6. >> >> >> This code was working under 9.2.4, but not so much now. >> Any clues? >> >> >> define_tag( 'debug', >> -req='input', -copy, >> -opt='label', -copy); >> >> !local_defined('label') ? local('label') = '' | #label += ': '; >> >> local('output') = '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + #label + #input + '</div>'; >> >> return(#output); >> >> /define_tag; >> > > I suggest you write it Lasso 9 style instead, problem solved and performance improved. > > define debug( > input::string, > label::string = string > ) => { > > return '<div style="font: 11px \'Tahoma\'; color: #888; border-bottom: 1px dotted #bbb; width: 500px; padding: 3px;">' + (#label ? #label + ': ') + #input + '</div>' > > } > > HDB > Jolle > > ############################################################# > > Attend the Lasso Developer Conference 2013! > Sept 12-14, 2013 in Niagara Falls, Canada > http://www.lassosoft.com/LDC-niagara-falls-2013 > > ############################################################# > 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]> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
18 sep 2013 kl. 12:47 skrev John Morris <[hidden email]>:
> Hey Jolle, > > Your's worked. > > I think it was a bug that Brad's post mentioned. > http://www.lassosoft.com/rhinotrac?id=7578 > > I'm "trying" to get my site prepped for a Lasso9 upgrade, so I don't want to rewrite all my code :) > > But in this case I think I'll go your route, instead of the easy downgrade path. > > Many thanks > > - John Morris Well, of course mine worked... :-) With some consideration in code writing, a lot of Lasso 8 code can be kept when moving to Lasso 9. But for type and method definitions I've found it worthwhile to rewrite them using Lasso 9 specific syntax. The enhancements on how methods are defined are so significant that it pays of in speed and stability to have them rewritten. HDB Jolle ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
I agree with Jolle here. While it may be tedious to go through and "colon cleanse" your code, it's very much worth it in the end.
Where I work, we've been emphasizing the use of as much Lasso 9-friendly syntax as possible when working on 8.5 systems. And while I don't want to go down the rabbit hole of a Lasso 8/9 debate, Lasso 8 was more "forgiving" when it came to strings vs. integers vs. decimals. Lasso 9, well, not so much. We've been emphasizing the use of parentheses syntax over colon syntax, and making sure that we cast our variables as integers, strings, decimals, etc. I anticipate that the remaining 8.5 systems we have will be easier to upgrade than the first systems that underwent this process. Dave --- Dave Bruhn Systems Analyst North Carolina Hospital Association PO Box 4449 Cary, NC 27519-4449 919-677-4145 (office) [hidden email] http://www.ncha.org On Sep 18, 2013, at 6:52 AM, Jolle Carlestam wrote: > 18 sep 2013 kl. 12:47 skrev John Morris <[hidden email]>: > >> Hey Jolle, >> >> Your's worked. >> >> I think it was a bug that Brad's post mentioned. >> http://www.lassosoft.com/rhinotrac?id=7578 >> >> I'm "trying" to get my site prepped for a Lasso9 upgrade, so I don't want to rewrite all my code :) >> >> But in this case I think I'll go your route, instead of the easy downgrade path. >> >> Many thanks >> >> - John Morris > > Well, of course mine worked... :-) > > With some consideration in code writing, a lot of Lasso 8 code can be kept when moving to Lasso 9. But for type and method definitions I've found it worthwhile to rewrite them using Lasso 9 specific syntax. > The enhancements on how methods are defined are so significant that it pays of in speed and stability to have them rewritten. > > HDB > Jolle > > ############################################################# > > Attend the Lasso Developer Conference 2013! > Sept 12-14, 2013 in Niagara Falls, Canada > http://www.lassosoft.com/LDC-niagara-falls-2013 > > ############################################################# > 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]> ############################################################# Attend the Lasso Developer Conference 2013! Sept 12-14, 2013 in Niagara Falls, Canada http://www.lassosoft.com/LDC-niagara-falls-2013 ############################################################# 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]> |
Free forum by Nabble | Edit this page |