Handeling messages

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
gagsoft
Posts: 168
Joined: Sat Jun 29, 2013 7:56 pm

Handeling messages

Post by gagsoft » Sat Feb 07, 2015 7:43 am

Hi All
I am playing with an idea to create something that will manage videos and I have seen a number already with sample code. The idea is to add markers / tags / notes on video and store it in SQL database. To connect to a MySQL database and do the CRUD thing I can sort of manage. The thing is to still have the videos separate from the database and the url’s stored in a table. I need some guidance on the maneuvering between records because I do not understand how LiveCode handles this. Now here is the thing. Is a card similar to a record in other databases and is there an event that fires when the user moves from on record /card to the next.
I want to update the player resource property when this happens or am I barking up the wrong tree here. Is there a sample script somewhere that one can look at that will demonstrate Card / record messages.

Any guidance on this would be appreciated.
Thanks
Peter G

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Handeling messages

Post by dunbarx » Sat Feb 07, 2015 3:39 pm

Hi.

Not sure I understand, but there are several messages sent when you navigate from one card to another: "closeCard", "openCard, "preOpenCard", "openControl", and others.

All your bookkeeping can be done by trapping these messages. Is this what you needed?

Craig Newman

gagsoft
Posts: 168
Joined: Sat Jun 29, 2013 7:56 pm

Re: Handeling messages

Post by gagsoft » Fri Feb 13, 2015 9:32 am

Hi Craig
My apologies for only responding to your reply now.
I think I need to study the fundamentals of the Data Grid object.
The issue was I needed to see which row on the grid had focus so that I can get the row ID.
I want to use this to filter the rows in a detail table that will be showed on another card.

Thanks
Peter

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Handeling messages

Post by dunbarx » Fri Feb 13, 2015 3:12 pm

Hi.

The dataGrid user manual is the place to go, as well as all the lessons, and anything else you can get about these complex objects.

For your actual question, the "dgHilitedLines" will return the currently focussed line.

Craig

gagsoft
Posts: 168
Joined: Sat Jun 29, 2013 7:56 pm

Re: Handeling messages

Post by gagsoft » Sun Jan 28, 2018 11:43 am

Thank you Craig, Dunbarx for the feedback.

Thanks
Peter G

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”