Using the GetDataOfLine function out of the message path?

stephen barncard stephenREVOLUTION2 at barncard.com
Thu Dec 8 11:30:28 EST 2011


Not to be a problem, but 'call' is NOT a synonym of 'send'
from the docs:

*Comments:*

The *call* command sends a handler message to the object. If the script of
the object doesn't trap the handler message, the message is passed to the
next object in the object's message path.


When executing a handler invoked by the *call *command the defaultStack
remains the same as it was when the *call *command was issued. Therefore
any object references in the called handler are evaluated in the context of
the call command that invoked the handler.  For example, button 3 may
commonly refer to button 3 of the current card of the stack from which the
target handler was called.


*This differs from the send command which temporarily changes the context
so that object references are evaluated in the context of the object
containing the target handler.*

On 8 December 2011 06:34, Mike Bonner <bonnmike at gmail.com> wrote:

> try either send or dispatch for this.
> dispatch "messageyouwantsenttodatagrid" to group "your datagrid"
> or send, or call which is a synonym.
>
> On Thu, Dec 8, 2011 at 5:10 AM, Michael Doub <mike at doub.com> wrote:
>
> > What do you have in the button that will give you a handle as to which
> row
> > you are looking for?   Are you always looking for the row in a curtain
> > position?
> >
> > -= Mike
> >
> >
> >
> > On 2011-12-08, at 12:27 AM, Keith (Gulf Breeze Ortho Lab) wrote:
> >
> > > Hi All,
> > >
> > > The LiveCode_Data_Grid.pdf manual states:
> > >  “You need to keep in mind that GetDataOfLine (and GetDataOfIndex) is a
> > function defined for a Data Grid. That means that the Data Grid group
> MUST
> > be in the message path. If the Data Grid group is not in the message path
> > you would need to use the call command.”
> > > Would anyone out there be able to provide an example of this? I need to
> > be able to get the data from a line in a Data Grid form when clicking on
> a
> > button that is not part of the Data Grid...
> > >
> > > I know how to get the data when the Data Grid group is in the path as
> > follows:
> > >
> > >
> > >  on mouseUp
> > >     put the dgHilitedLines of me into theLine
> > >     put GetDataOfLine(theLine,"FilePath") into thePic
> > >     launch document thePic
> > >  end mouseUp
> > >
> > > Thanks,
> > >
> > > - Boo
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode at lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>



More information about the use-livecode mailing list