"on opencard" handler
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 66
- Joined: Sun Apr 15, 2007 2:54 pm
- Location: Albuquerque, NM USA
"on opencard" handler
Hi,
This one has me stumped.
A stack's "on opencard" handler works fine in dev environment, but fails to execute in stand alone version.
I've deleted the handler, rebuilt it, tried totally different code in a handler by that name -- all work fine while in livecode, but fail after stand alone is built. This is specific to this stack, as "on opencard" still works in stand alone versions of other stacks created after this problem started.
Anyone seen this type of behavior before?
Thanks.
This one has me stumped.
A stack's "on opencard" handler works fine in dev environment, but fails to execute in stand alone version.
I've deleted the handler, rebuilt it, tried totally different code in a handler by that name -- all work fine while in livecode, but fail after stand alone is built. This is specific to this stack, as "on opencard" still works in stand alone versions of other stacks created after this problem started.
Anyone seen this type of behavior before?
Thanks.
Ken
Re: "on opencard" handler
Hi Ken
My first thought is to check the handler for oddness in the script, it definitely seems to be only affecting this one handler, so that is the place to begin your investigation. Therefore some lines of script code would be helpful.
My first guess is maybe you have a handler looking up folder paths?? In the IDE the relative path is from the location of the engine, while in a standalone it is from the location of the standalone executable. If so, you may need to adjust the location where the handler is looking by getting a relative folder path by parsing "the effective filename of this stack".
Otherwise... I guess seeing some script is the only idea I have at the moment.
My first thought is to check the handler for oddness in the script, it definitely seems to be only affecting this one handler, so that is the place to begin your investigation. Therefore some lines of script code would be helpful.
My first guess is maybe you have a handler looking up folder paths?? In the IDE the relative path is from the location of the engine, while in a standalone it is from the location of the standalone executable. If so, you may need to adjust the location where the handler is looking by getting a relative folder path by parsing "the effective filename of this stack".
Otherwise... I guess seeing some script is the only idea I have at the moment.
-
- Livecode Opensource Backer
- Posts: 66
- Joined: Sun Apr 15, 2007 2:54 pm
- Location: Albuquerque, NM USA
Re: "on opencard" handler
Hi, Sparkout,
Thanks for your reply. The script code "inside" the "on opencard" handler does not change the situation. Deleting the entire code, then using:
on opencard
put "This time it worked" & CR into fld"testlog"
end opencard
also fails to place the text in that field. It's like there is something corrupted in the livecode that causes any "opencard" handler to fail.
As a last resort, I will rebuild the stack code from scratch, but that is not a pleasant alternative.
Thanks.
Thanks for your reply. The script code "inside" the "on opencard" handler does not change the situation. Deleting the entire code, then using:
on opencard
put "This time it worked" & CR into fld"testlog"
end opencard
also fails to place the text in that field. It's like there is something corrupted in the livecode that causes any "opencard" handler to fail.
As a last resort, I will rebuild the stack code from scratch, but that is not a pleasant alternative.
Thanks.
Ken
Re: "on opencard" handler
Hi Ken,
it is also worth a try to only re-build that card!
Delete it and create a new one, should work
Best
Klaus
it is also worth a try to only re-build that card!
Delete it and create a new one, should work
Best
Klaus
Re: "on opencard" handler
What happens if you use
preOpenCard
instead of
openCard ?
Also you say at the begining of your post 'A stack's "on opencard"..' Just to check you're putting the openCard in the cards script and not the stacks?
preOpenCard
instead of
openCard ?
Also you say at the begining of your post 'A stack's "on opencard"..' Just to check you're putting the openCard in the cards script and not the stacks?
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: "on opencard" handler
The most likely reason is that you have an opencard handler in the card that is blocking execution of the opencard handler in the stack. Also check group and background scripts, because those can block too.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: "on opencard" handler
Yes, but that doesn't necessarily explain why it works in the IDE and not in a standalone. That part's puzzling.
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: "on opencard" handler
Oh right, forgot about that part. I guess we'd need to see an example stack.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: "on opencard" handler
That would be useful. Ken?
I do notice that there's no space between fld and "testlog" in your typed example. I assume it's right in the actual stack. And that there's a "testlog" field available for the text.
I do notice that there's no space between fld and "testlog" in your typed example. I assume it's right in the actual stack. And that there's a "testlog" field available for the text.
-
- Livecode Opensource Backer
- Posts: 66
- Joined: Sun Apr 15, 2007 2:54 pm
- Location: Albuquerque, NM USA
Re: "on opencard" handler
Thanks to everyone for the helpful ideas.
In the end, I did "rebuild" the card from the most recent backup copy of the livecode which still worked correctly. Not too much downtime connected with it.
MWieder -- gosh, I've never used a space after the FLD and it's always worked OK for the field update.
Again, thanks to all the generous folks here. The "Revolution" community is first rate!
Regards,
In the end, I did "rebuild" the card from the most recent backup copy of the livecode which still worked correctly. Not too much downtime connected with it.
MWieder -- gosh, I've never used a space after the FLD and it's always worked OK for the field update.
Again, thanks to all the generous folks here. The "Revolution" community is first rate!
Regards,
Ken
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: "on opencard" handler
<g> I've never *not* used a space... I guess it's good to know it works both ways.MWieder -- gosh, I've never used a space after the FLD and it's always worked OK for the field update.
Glad you got it working.