Documentation confusion

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

Documentation confusion

Steve Upton

I feel like a butt head but I can't seem to squeeze what I need from the online reference.

In the Globals thread I see mentioned "define myglobal => array('x','y','z')"

So I lookup "define" for L9… nothing

I see "define menuglobal => thread {"

So I look up "thread"… nothing.

OK, not *nothing* but no description of the type itself. Just a couple of methods, and many of them have "no description available"

What am I missing?

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: Documentation confusion

Tim Taplin
Don't worry, we all find that frustrating. However, the Language Guide does have a good section on defining types and methods which will likely shed some light on the subject for you. the link is http://www.lassosoft.com/Language-Guide

You might find some examples of lasso 8 vs lasso9 syntax  in a recent thread with the subject "Re: Is there still a "Basics" list?"

however, the examples you cite could be reviewed like such:

> define myglobal => array('x','y','z')

defines a custom tag (method in lasso9 speak)

define_tag('myglobal');
        return( array('x','y','z') );
/define_tag;

That example uses a shorthand method of writing a method that is a one liner. Its lasso9 shorthand for:

        define myglobal => {
                     return array('x','y','z')
         }

> define menuglobal => thread {

the thread keyword between the signature and the capture (  the section inside the brackets { } ) indicates that this will become a persistent thread object.

when you define a custom type you would use a type keyword to indicate this and then the methods defined inside the type would be defined as public instead of define, see example.

define mytype => type {
         
        public currentMiles(km_input) => {
                //convert to miles
                return converted
       }
}

local('test' = mytype)
#mytype->currentMiles(360)

These are very simplistic examples hoping to give you a jump start. The Language Guide is an excellent reference which I still use regularly.

Tim Taplin

On Jun 12, 2012, at 4:02 PM, Steve Upton wrote:

>
> I feel like a butt head but I can't seem to squeeze what I need from the online reference.
>
> In the Globals thread I see mentioned "define myglobal => array('x','y','z')"
>
> So I lookup "define" for L9… nothing
>
> I see "define menuglobal => thread {"
>
> So I look up "thread"… nothing.
>
> OK, not *nothing* but no description of the type itself. Just a couple of methods, and many of them have "no description available"
>
> What am I missing?
>
> 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]>

#############################################################
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: Documentation confusion

Ke Carlton-3
In reply to this post by Steve Upton
Hey Steve,

A thread is not a type in the same sense of an array or a map — it's
more of a construct like => type { } ie.

define mytype => type {}
define mythread => thread {}

It shares many properties of a (custom) type — except once defined,
only one instance of it exists (globally / per Lasso instance). It's
documented here: http://www.lassosoft.com/Language-Guide-Threading —
scroll down to "Thread Objects"

So it's understandable why it's not in the reference (like type) —
although perhaps it would be good to add another category and point
users to the documentation or similar...

Ke

On 12 June 2012 23:02, Steve Upton <[hidden email]> wrote:

>
> So I look up "thread"… nothing.
>
> OK, not *nothing* but no description of the type itself. Just a couple of methods, and many of them have "no description available"
>
> What am I missing?
>
> 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]>
#############################################################
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: Documentation confusion

Ke Carlton-3
In reply to this post by Tim Taplin
Now that's a much more accessible response — thanks Tim...

Ke

On 12 June 2012 23:22, Tim Taplin <[hidden email]> wrote:
> Don't worry, we all find that frustrating. However, the Language Guide does have a good section on defining types and methods which will likely shed some light on the subject for you. the link is http://www.lassosoft.com/Language-Guide
>
#############################################################
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: Documentation confusion

Steve Upton


Thanks guys.

My question was mostly about my inability to find stuff in the online reference. But I have tracked down the thread stuff in the Language Guide.

I'm accustomed to a language reference having entries for pretty much anything you'd see in code. The older L8 language ref seemed to have a lot more.

Anyway, I'm working my way forward.

thanks

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]>