Pasted graphic in script editor window -> odd behavior

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 237
Joined: Sun May 27, 2007 8:19 pm

Pasted graphic in script editor window -> odd behavior

Post by Martin Koob » Wed Sep 05, 2007 4:04 am

I just accidentally pasted a graphic(a photo that was on the clipboard instead the the script I thought I had copied) into a script editing window for a button. I then saw the graphic instead of the script. I tried to undo the paste but that did not work.

Then I closed the script window for the button and reopened it to edit the script I saw the graphic. The script was still there (I can select all and copy via keyboard sort cuts) and it functions it should(clicking the button gets the correct action) however I can't remove the graphic to see the script to edit it.

I tried creating a button and pasting the script in there. That worked to save the script. However, when I deleted the name of the old button and changed the name to the new button and then opened the script of the new button the graphic reappeared. I thought the graphic was associated with the button name. However then I opened the card script. There was the graphic on top of the card script. When I checked the button script it no longer had the graphic.

After more testing It seems the if the graphic is in a script window it will not appear in other script windows. If you close the script window with the graphic, the next script that you open to edit will have the script.

After I quit Revolution and restarted it seems that issue is now gone.

This seems to be a bug where you can paste a non text object into a script editing window.


Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5138
Joined: Thu Feb 23, 2006 9:24 pm

Post by Mark » Wed Sep 05, 2007 9:04 am

Hi Martin,

You are right, this is a bug. If it hasn't been reported to QCC yet, it should.

Once the script windows are created, they are re-used. If you have two objects and edit the script of both of them, you have two script windows. Close one script editor and create a new object. Edit the script of this third object and you still have two script windows in memory, because Rev is using the old script window. Now, if you edit the scripts of the 3 buttons simultaneously, you will have 3 script windows in memory.

Each new script window is a clone of one original window. The clones exist in memory only. If you accidentally change a script window, the original is not changed and when you quit Revolution, all script window in memory are destroyed. Thus, restarting Revolution solves the problem.


The biggest LiveCode group on Facebook:
The book "Programming LiveCode for the Real Beginner"! Get it here!

Post Reply

Return to “Talking LiveCode”