-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to SOS a script but ignore existing behaviors #5
Comments
That's exactly what Navigator does. If you select a button that has a
script and a behavior, and select Convert to Behaviors, the dialog will
display with just that button in the list. If you convert then:
1. The button's script will be moved to a SoS.
2. The button's behavior will be changed to the SoS.
3. The SoS's behavior will be set to the original behavior for the button.
4. The log will include a section labeled something like "Script-only Stack
Behavior Code" and that will include a line that is something like:
set the behavior of <the SoS> to <the id of the (former) behavior of the
button>
In order to retain the original order of things, you'd have to include that
line of code in your startup scripts, since SoS don't (yet) support storing
their own behaviors.
IF, on the other hand, you wanted to convert everything to SoS behaviors,
then after opening the Convert to Behaviors dialog you would click the
button "Add Behavior Chains" and the list of controls to convert would
expand from just the original button to whatever the chain of behaviors is
for that button. *Then* converting would convert the button and all the
behaviors.
So just don't click that button, and you get exactly what you describe
above.
gc
…On Sun, Feb 18, 2018 at 7:37 PM, macMikey ***@***.***> wrote:
In the case of objects created with tmControls, there is already a
behavior chain set for the tmc objects. Typically there is a button script
that is set as the behavior of the group, and then that button has another
button as the "master behavior".
For example, for a tmc "button", which is really a group of objects, there
is a script for the group, then a behavior that is used for all tmc
buttons, and then a tmc master behavior.
The more I've been thinking about this, the more I think that maybe it
would be better to leave the object behavior chain alone, and simply SOS
the script of the object, which will leave the entire project cleaner.
Breaking all these chained behaviors out shouldn't break anything, but we
will wind up with extra SOS's when we probably have no intention of ever
editing any of it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmz0Q5hp7D4UfC4gBtZTBM7IpIzPH2Zks5tWOx1gaJpZM4SKA02>
.
|
Hmmm. I didn't get that from reading the documentation the first couple times. I read it again this morning and I get it now. It might be good to have that behavior be more explicit (and then close this issue). |
The documentation is behind the reality, especially since I created the convert dialog after the docs. I'll update and then close this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the case of objects created with tmControls, there is already a behavior chain set for the tmc objects. Typically there is a button script that is set as the behavior of the group, and then that button has another button as the "master behavior".
For example, for a tmc "button", which is really a group of objects, there is a script for the group, then a behavior that is used for all tmc buttons, and then a tmc master behavior.
The more I've been thinking about this, the more I think that maybe it would be better to leave the object behavior chain alone, and simply SOS the script of the object, which will leave the entire project cleaner. Breaking all these chained behaviors out shouldn't break anything, but we will wind up with extra SOS's when we probably have no intention of ever editing any of it.
The text was updated successfully, but these errors were encountered: