a variety of things

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
mattmaier
Posts: 109
Joined: Fri Apr 19, 2013 2:49 am

a variety of things

Post by mattmaier » Fri Nov 07, 2014 7:24 am

Originally this was going to be a question about why "first word" wasn't working in a switch case. Before posting I figured I'd try one or two more things. While trying those things, the script editor disappeared, and then I was going to ask how to recover it. Before posting that, I found that it wasn't technically disappeared, it was just minimized...sort of. Making it medium sized made it disappear and maximizing it made it reappear, but it only covered part of the screen. That was whatever. The script editor was available, but then it started displaying so that I couldn't see the variable watcher section at the bottom. I was going to ask about that, but I figured I could try just starting from scratch. So I uninstalled livecode, reinstalled it, and it came back with all of the old "recent files" and exact same display problems. So I uninstalled it again, deleted the RunRev folder in Programs, and reinstalled, resetting the computer each time. After all of that It's still coming back from being uninstalled and deleted with all of its old settings, including the same display problem. So I uninstalled it again, went and hunted down a couple runrev and livecode folders under Users & App Data, deleted those, then reinstalled and reset. No change. It still comes back with the same problem.

So now this question is sort of about how to actually uninstall Livecode, but it's mostly about why it seems to think only part of my screen exists and most importantly why the script editor isn't displaying correctly.

All of this is on Windows 8.1 and Livecode 7 (I've got 7-rc-1 installed on another computer, but this one is claiming no new updates are available)

I thought I was actually doing pretty well until this little cycle of fail.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5399
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: a variety of things

Post by jacque » Fri Nov 07, 2014 8:26 pm

Preferences are stored in a stack named "livecode.rev", and if you are using LC version 7 there is also a stack named "livecode7.rev" in the same folder. On a Mac the folder is in Library/Preferences/ but I'm not sure where Windows stores it. You can probably find it by doing a search for the stack file name. Window positions and sizes are stored there.

Do you use two monitors? The issue you're having sounds like a bug that was/is triggered by having a stack window open on a second monitor.

If it happens again, you shouldn't need to reinstall LiveCode. Just delete the preferences stack and restart LiveCode.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mattmaier
Posts: 109
Joined: Fri Apr 19, 2013 2:49 am

Re: a variety of things

Post by mattmaier » Sat Nov 08, 2014 1:42 am

jacque, awesome, thanks that worked perfectly :) I just searched for livecode.rev & livecode7.rev and deleted them both.

It's entirely possible that my laptop still thinks it might possibly have to deal with an external monitor since I had one for a long time. But after deleting those two preference files all of the windows are behaving themselves properly.

For what it's worth, I also got the syntax of my original question sorted out.

This is what worked (tLine is a comma delimited list of numbers; action list is a return delimited list; the only two entries at the moment are "createNode" and "deleteNode #,#,#,etc"):

Code: Select all

command build --create working array; make all changes listed in action list
   put startingArray into workingArray
   repeat for each line tLine in actionList
      switch 
         case first word of tLine is "createNode"
            createNode
            break
         case first word of tLine is "deleteNode"
            deleteNode (the last word of tLine)
            break
      end switch
   end repeat
end build
I was trying to make this work. The switch would recognize "createNode" but it wouldn't recognize that "deleteNode" was the first word on the line, or even that it was one of the words on the line at all. I tried some varieties like "first word is" and "first word of tLine is."

Code: Select all

command build --create working array; make all changes listed in action list
   put startingArray into workingArray
   repeat for each line tLine in actionList
      switch tLine
         case "createNode"
            createNode
            break
         case first word "deleteNode"
            deleteNode (the last word of tLine)
            break
      end switch
   end repeat
end build

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: a variety of things

Post by [-hh] » Sat Nov 08, 2014 2:00 am

Code: Select all

repeat for each line tLine in actionList
  switch (first word of tLine)
    case "createNode"; createNode; break
    case "deleteNode"; deleteNode (last word of tLine); break
  end switch
end repeat
This is equivalent to your first script, probably "deleteNote" isn't word 1, caused by gremlins after it?
You could test this by using "char 1 to 10 of tLine" instead of "first word of tLine" (or use this anyway or use char 1 only).
shiftLock happens

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”