Handlers not found in card script
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Handlers not found in card script
I think it's time for a quick trick
On Win it's;
Ctrl+Shift+c
Will show you the card script of the currently showing card
Ctrl+Shift+s
Will show you the stack script
Mac has similar
I only point this out as there has been confusion over where scripts are (card or stack). It does tell you at the top of the script editor where the script you are editing is, but it's a bit convoluted.
Simon
On Win it's;
Ctrl+Shift+c
Will show you the card script of the currently showing card
Ctrl+Shift+s
Will show you the stack script
Mac has similar
I only point this out as there has been confusion over where scripts are (card or stack). It does tell you at the top of the script editor where the script you are editing is, but it's a bit convoluted.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Handlers not found in card script
Good point Simon! Another thing to watch out for is whether you have two cards with the same name (open the Project Browser from the 'Tools' menu to check)...
"...this is not the code you are looking for..."
Re: Handlers not found in card script
Hi Dave,dave.kilroy wrote:Aha! Good we are getting somewhere...
If handlers are not appearing on the left then I think there is a bug in the card's script which is preventing it from compiling
Probably the best way to find the bug is to comment out all the handlers except one and hit compile - if the one un-commented handler now appears in the left you know that the script compiled and that the bug is not in that particular handler. Next uncomment another handler, compile, check in the left - and continue until you get all the handlers in the left disappearing again (which means you've hit the bug). Once you get this you will know the bug is in that handler. After you've identified the buggy handler carry out a similar commenting/uncommenting process to find the source of the problem
Good luck! It shouldn't take you more than a few minutes to sort out - if you get stuck then upload the stack here...
Dave
Have tried to add handlers from scratch and only able to add one handler to the card script at any onetime. It doesn't matter what its called. How do I upload the stack? This seems to a bug with my system : Mac late 2007 running Yosemite 10.10 and the latest livecode 7.0.2 (rc2). Have spent a long time trying to get this to work.. thks Martin
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Handlers not found in card script
Hi Martin - shame this isn't working for you yet...
If you can't see an 'upload files' tab like in the screenshot when you are in the 'post a reply' screen I think you must be below the minimum number of postings before you're allowed to upload files: If you don't see the tab then do you have Dropbox? If so do a 'share Dropbox link' thingie and insert the link here - or send me the stack via pm and I'll upload it here for you...
Dave
If you can't see an 'upload files' tab like in the screenshot when you are in the 'post a reply' screen I think you must be below the minimum number of postings before you're allowed to upload files: If you don't see the tab then do you have Dropbox? If so do a 'share Dropbox link' thingie and insert the link here - or send me the stack via pm and I'll upload it here for you...
Dave
"...this is not the code you are looking for..."
Re: Handlers not found in card script
get this message when loading attachment??
The extension livecode is not allowed.
This is really frustrating... will set up dropbox for you now if you can supply email address...
The extension livecode is not allowed.
This is really frustrating... will set up dropbox for you now if you can supply email address...
Re: Handlers not found in card script
Here's the dropbox link: https://www.dropbox.com/sh/2qfji8fckhbk ... gAkda?dl=0dave.kilroy wrote:Hi Martin - shame this isn't working for you yet...
If you can't see an 'upload files' tab like in the screenshot when you are in the 'post a reply' screen I think you must be below the minimum number of postings before you're allowed to upload files: If you don't see the tab then do you have Dropbox? If so do a 'share Dropbox link' thingie and insert the link here - or send me the stack via pm and I'll upload it here for you...
Dave
Hope this helps.
Martin
Re: Handlers not found in card script
Zip the file first, then you will be able to upload it here
Re: Handlers not found in card script
Zipped file uploaded.
- Attachments
-
- Calculator.zip
- (1.94 KiB) Downloaded 229 times
Re: Handlers not found in card script
Just tested the stack. Does not work in LC 7.0.2 (handler not found!), but does work in LC 6.7.x (handler found)!? The SAME stack?
Oh boy...
Oh boy...

Re: Handlers not found in card script
------------
Last edited by anmldr on Fri Feb 06, 2015 3:55 pm, edited 1 time in total.
Re: Handlers not found in card script
------------
Last edited by anmldr on Fri Feb 06, 2015 3:56 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Handlers not found in card script
Hi all - there was some invisible character(s) in the declaration of the operatorPressed handler that was causing the failure. The following is one way to get things working again:
1 - copy the 'innards' of the operatorPressed handler
2 - delete the complete handler
3 - apply and save the code (you should now see the numberPressed handler appearing in the left hand side)
4 - declare the operatorPressed handler again (you need to type this afresh, do not try to copy the declaration from the old handler)
5 - paste the 'innards' from the old handler in the new version of operatorPressed
6 - remember to add the pOperator parameter to the declaration
7 - apply and save the code (you should now see all handlers in the left hand pane)
Kind regards
Dave
1 - copy the 'innards' of the operatorPressed handler
2 - delete the complete handler
3 - apply and save the code (you should now see the numberPressed handler appearing in the left hand side)
4 - declare the operatorPressed handler again (you need to type this afresh, do not try to copy the declaration from the old handler)
5 - paste the 'innards' from the old handler in the new version of operatorPressed
6 - remember to add the pOperator parameter to the declaration
7 - apply and save the code (you should now see all handlers in the left hand pane)
Kind regards
Dave
"...this is not the code you are looking for..."
Re: Handlers not found in card script
Problem solved with a lot of help from Dave; there were unspecified hidden character(s) present in the operatorPressed handler including the comments causing it to fail.
See Dave Kilroy breakdown for process followed to correct the problem.
Thanks for all contributions
Martin
See Dave Kilroy breakdown for process followed to correct the problem.
Thanks for all contributions
Martin
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Handlers not found in card script
Martin this was a tricky bug to spot - especially for someone new to the LiveCode IDE - perhaps the two takeaways should be:
1 - if you are really stuck ask at the forum
2 - if handlers don't appear in the left pane, stop and find out why - even if the script compiles!
Kind regards
Dave
1 - if you are really stuck ask at the forum
2 - if handlers don't appear in the left pane, stop and find out why - even if the script compiles!
Kind regards
Dave
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Handlers not found in card script
Klaus I'm wondering whether the different ways the stack is handled in the script editors of LC 6.7 and 7.0 be something to do with the fact that LC 7 allows unicode in scripts?
Martin how do you feel about filing your first bug report?
Dave
If so, then this should be considered a bug as it is not 'fair' that invisible entities can lurk in scripts that break the scripts but don't throw an error.Klaus wrote:Just tested the stack. Does not work in LC 7.0.2 (handler not found!), but does work in LC 6.7.x (handler found)!? The SAME stack?
Oh boy...
Martin how do you feel about filing your first bug report?
Dave
"...this is not the code you are looking for..."