Is there a "where used" function in the Debugger?

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
mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am
Location: Montréal, Canada

Is there a "where used" function in the Debugger?

Post by mluka » Fri Jun 29, 2018 3:58 pm

Hi all.

Is there a function that would allow one to discover all the places (in a stack) where a handler is called?

(Context: I'm trying to get my head around the DataGrid before making a final decision on using LC to replace some dying apps on my iPhone and FileMaker Pro on my iMac. In one of the lessons ("Creating a List of People"), it is disclosed that the "behaviour" script of the DG contains a handler, "FillInData", which seems to play an important role. But I could not find where or when or why it's called from... I put a checkpoint on that handler and it was triggered when I scrolled the DG (in user mode) to the top. But it does not tell me who called it!!!)

(A note: the LC 9.0.0 User Guide mentions (p. 498) that there is a Debug Context that "shows you the path of execution..." I must be blind, because I can't find such a thing, either in the window that opens when the breakpoint is triggered or in the menus...)

Thanks.
Michel
Montréal, Canada

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Is there a "where used" function in the Debugger?

Post by LiveCode_Panos » Fri Jun 29, 2018 4:27 pm

Hi mluka,

To show all the occurrences of a handler:

You can open the script editor, press cmd+F to show the Search Bar, and then click on "More".

In the dialog that appears now, enter your search term and in the dropdown "Look in" choose "all available stacks", and then click on "find all".

Moreover, if you want the search to include IDE stacks as well, make sure you have checked the "Show IDE stacks in Lists" (in the LC menubar choose View -> "Show IDE stacks in Lists")

Best,
Panos
--

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

Re: Is there a "where used" function in the Debugger?

Post by dunbarx » Fri Jun 29, 2018 6:53 pm

Hi.

I think you are wanting the "Find and "Replace..." menuItem in the "Edit" menu.

This is powerful and invaluable, and after you play around with its options, you will be on your way.

Craig Newman

mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am
Location: Montréal, Canada

Re: Is there a "where used" function in the Debugger?

Post by mluka » Fri Jun 29, 2018 7:24 pm

Yes! The "Find"! Thanks for the answer!

But... "be careful what you ask for..."

Unfortunately, for my specific problem, there are 52 occurences!!! Some of which evidently come from deeply inside the DataGrid internals!

I'm not going to learn how to use the DataGrid by using this approach. :?

Please bear with me: I'll post another question, in more general terms, later. I think I may have chewed off more than I can handle... :cry:

Thanks for all your help so far!
Michel
Montréal, Canada

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

Re: Is there a "where used" function in the Debugger?

Post by dunbarx » Fri Jun 29, 2018 8:21 pm

You may have to get creative. There is an option to search only the current card. If you make a copy of that card, and delete the dataGrid, you can then see only the handlers (or any string) of interest outside that gadget.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”