Works while in IDE but not when compiled..
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Works while in IDE but not when compiled..
So I have a button sitting around to use as a template to dynamically generate a menu when my stack starts up. I copy the button to the group, set it's name and other properties, set it's size and position etc...
This worked as it should while in the IDE. But when compiled, it all goes to hell instantly.
The button is copied, but the names, contents, size and positions are not being changed at all in the compiled program.
Is there any reason for this, or have I overlooked something?
Thanks,
~Garrett
This worked as it should while in the IDE. But when compiled, it all goes to hell instantly.
The button is copied, but the names, contents, size and positions are not being changed at all in the compiled program.
Is there any reason for this, or have I overlooked something?
Thanks,
~Garrett
Hi Garrett,
First of all, turn on error reporting in the standalone builder settings.
Second, if you are also setting a script, you might be bumping into script limits.
Third, maybe you have set a password, either as a property of the stack or in the standalone builder settings. If your template stack is password protected, you can't copy from it.
Fourth, make sure that you are referring to your new buttons by ID number or make sure that they all have a unique name.
Best,
Mark
First of all, turn on error reporting in the standalone builder settings.
Second, if you are also setting a script, you might be bumping into script limits.
Third, maybe you have set a password, either as a property of the stack or in the standalone builder settings. If your template stack is password protected, you can't copy from it.
Fourth, make sure that you are referring to your new buttons by ID number or make sure that they all have a unique name.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi Mark,
1. error reporting for standalone? I'll have to look into this
2. not sure what you mean by "setting a script"
3. no passwords being used, and no template stack.. It's a button that's being used as a template on the main stack. In fact, no other stacks and no other cards. Just one stack and one card here.
4. I've been using "the last button" to do the work. should/would that not work?
Thanks,
~Garrett
1. error reporting for standalone? I'll have to look into this
2. not sure what you mean by "setting a script"
3. no passwords being used, and no template stack.. It's a button that's being used as a template on the main stack. In fact, no other stacks and no other cards. Just one stack and one card here.
4. I've been using "the last button" to do the work. should/would that not work?
Thanks,
~Garrett
Hi Garrett,
Setting script means that you set a script by means of a script, like this:
After copying a button to a group, "the last button" may not work, because the layer of the group may affect the layer of the button.
Best,
Mark
Setting script means that you set a script by means of a script, like this:
Code: Select all
set the script of btn x to the script of btn y
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
To late Malte 
I decided to try renaming my template button first and setting it's label, then copy it to the group, then set the name again of the "first button" back to it's template name and label... Then I go back to the new button and set it's position and such. And this seems to have solved my problem.
Thanks to all who replied here, it really helped me out
~Garrett

I decided to try renaming my template button first and setting it's label, then copy it to the group, then set the name again of the "first button" back to it's template name and label... Then I go back to the new button and set it's position and such. And this seems to have solved my problem.
Thanks to all who replied here, it really helped me out

~Garrett
Seems like there's a bug in the standalone builder to me - I have painstakingly built a system which relies on copying template images to new cards and referencing them by collecting the id from the it variable. Works fine in the IDE, only I've just been bitten by the standalone not working, as it seems that after copying the image, "it" contains only "OK".malte wrote:Hi Garrett,
directly after the copy command, the ID of the newly created button will be in the it variable. Try this_
on mouseUp pMouseBtnNo
copy me to grp 1
put it
end mouseUp
Hth,
Malte
Absolutely sure!
I only found out why my standalone was silently failing after saving a bug report and finding a reference to the line where the object ref was failing.
More delving and troubleshooting later I tracked it down to the wrong result being returned by "it" - but only in the standalone. (I went to QCC and saw your bug ref 7314 too - which oddly is recorded as "not a bug".)
I only found out why my standalone was silently failing after saving a bug report and finding a reference to the line where the object ref was failing.
More delving and troubleshooting later I tracked it down to the wrong result being returned by "it" - but only in the standalone. (I went to QCC and saw your bug ref 7314 too - which oddly is recorded as "not a bug".)
Hi S.,
The next morning, i found out that I was really copying the wrong object. That's why I closed that bug.
Does it help if you lock messages while you copy? I have just finished a project that is copying objects all the time and it never goes wrong. Although it is possible that there is a bug, I am quite convinced that there is a problem with a script in your stack.
Mark
The next morning, i found out that I was really copying the wrong object. That's why I closed that bug.
Does it help if you lock messages while you copy? I have just finished a project that is copying objects all the time and it never goes wrong. Although it is possible that there is a bug, I am quite convinced that there is a problem with a script in your stack.
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Lol - yes, my mistake.
I found out the substack had been inadvertantly ticked to encrypt with password in the standalone settings. The mainstack was showing no password protection, so I had overlooked the fact that the substack needs to be selected to see its encryption properties - the encrypt with password checkbox is not a global setting for the whole bundle obviously.

I found out the substack had been inadvertantly ticked to encrypt with password in the standalone settings. The mainstack was showing no password protection, so I had overlooked the fact that the substack needs to be selected to see its encryption properties - the encrypt with password checkbox is not a global setting for the whole bundle obviously.
