Script editor
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Script editor
Is there a preference setting to show tabs for all controls that have scripts in the card that is currently being edited? Or to you have to keep the script editor open all of the time to keep all of the scripts that have been edited in tabs in the script editor?
For instance, I click on a button and add code. There is a tab for that script. I click on another button and add script and it has a tab. If for some reason I have to close the script editor then those scripts are no longer there in the tabs for that card.
Not a biggie...just wondering if it is possible to open all tabs automatically for all controls that currently have scripts for the card that is visible.
Linda
For instance, I click on a button and add code. There is a tab for that script. I click on another button and add script and it has a tab. If for some reason I have to close the script editor then those scripts are no longer there in the tabs for that card.
Not a biggie...just wondering if it is possible to open all tabs automatically for all controls that currently have scripts for the card that is visible.
Linda
Re: Script editor
Hi.
I have never seen a way to restore recently opened script tabs if you close the editor itself. You can always minimize, instead of closing, the editor of course.
That said, since it is possible to edit the scripts of any control under, er, script control:
You can always maintain a list of the controls of interest in a custom property and restore that way.
Craig Newman
I have never seen a way to restore recently opened script tabs if you close the editor itself. You can always minimize, instead of closing, the editor of course.
That said, since it is possible to edit the scripts of any control under, er, script control:
Code: Select all
on mouseUp
edit the script of control "yourControl1"
edit the script of control "yourControl2"
edit the script of control "yourControl3"
end mouseUp
Craig Newman
Re: Script editor
Or, how about
on mouseUp
repeat with i = 1 to the number of controls on this card
if i is the id of me then next repeat #skip me
if the script of control i of this card is not empty then edit the script of control i of this card
end repeat #for i = 1 to the number of controls on this card
end mouseUp
on mouseUp
repeat with i = 1 to the number of controls on this card
if i is the id of me then next repeat #skip me
if the script of control i of this card is not empty then edit the script of control i of this card
end repeat #for i = 1 to the number of controls on this card
end mouseUp
Re: Script editor
Linda, Mike..
Surely if you want to open all the non-empty scripts of all controls, this will do it. You might want to add the script of the card itself as well as the stack. But this would get cumbersome with a lot of controls, no?
Usually I have only a few scripts being examined at any one time, depending on what part of the project I am dealing with, and it is only those that I would rather reload in a new session. This requires keeping track of those controls, likely in a custom property.
Now the question arises: how does one automatically track those controls when using shortcuts? There is no "openScript" or "editScript" message, sent when, say, you click on a control with the option and command keys held down, or when you use the inspector. In fact, I find it very difficult to trap any message at all when that shortcut is used, or from the inspector. These actions seem to take their own sweet path, short-circuiting message sending entirely.
If you write some universal script-opening gadget, this problem goes away, but I have been cmd-opt-clicking for so long I will not change. What do you think?
Craig
Surely if you want to open all the non-empty scripts of all controls, this will do it. You might want to add the script of the card itself as well as the stack. But this would get cumbersome with a lot of controls, no?
Usually I have only a few scripts being examined at any one time, depending on what part of the project I am dealing with, and it is only those that I would rather reload in a new session. This requires keeping track of those controls, likely in a custom property.
Now the question arises: how does one automatically track those controls when using shortcuts? There is no "openScript" or "editScript" message, sent when, say, you click on a control with the option and command keys held down, or when you use the inspector. In fact, I find it very difficult to trap any message at all when that shortcut is used, or from the inspector. These actions seem to take their own sweet path, short-circuiting message sending entirely.
If you write some universal script-opening gadget, this problem goes away, but I have been cmd-opt-clicking for so long I will not change. What do you think?
Craig
Re: Script editor
Like I wrote, it isn't a big deal. I just am really exploring the how's and why's in LiveCode to develop my own preferences for how to use it. I just seemed awkward to have to simply click on a control and then click on the code icon in the toolbar each time. cmd-opt-click sounds good. 

Re: Script editor
Yes. That's why Cmd-Opt-Shift-click is my favorite thing. It gives you a contextual menu for most of the things you can do with a control, including editing its script and its behavior script (very handy.) If you are using the edit tool, then Cmd-Opt-click opens the script immediately provided your preferences are set to allow that (General pane.)I just seemed awkward to have to simply click on a control and then click on the code icon in the toolbar each time.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Script editor
I realize this is an older topic, but (at least in all the Lc versions I have access too) there *is* something like the original poster was looking for.anmldr wrote:Is there a preference setting to show tabs for all controls that have scripts in the card that is currently being edited? Or to you have to keep the script editor open all of the time to keep all of the scripts that have been edited in tabs in the script editor?
In the project browser, just clicking on the blue bubble at the end of whatever you want to code will open it in the editor, whether its open or not. It is also fairly small on screen up to vers. 7.x anyway. Just my .02 for the future finders of this thread

