[JS] Unlock and lock layer

I can see in the reference guide there is a Layer has a Locked property.
"locked - If true, this layer is editable; set to false to lock the layer."
Seems like that is reversed, but not matter. How do you actually set the property of a layer?
Using some of the examples I figured I can point to the right layer which is the bottom most one:
if (documents.length > 0) {
countOfLayers = activeDocument.layers.length;
if (countOfLayers > 1) {
bottomLayer = activeDocument.layers[countOfLayers-1];
But then what?

bottomLayer.locked = true (or false)
BTW, I think you're right, the documentation is wrong. Setting locked to true will lock the layer.

Similar Messages

  • Problem with unlocking and locking the Materials in MARA using idocs.

    We are sending a inbound idoc from one cluster to the other to update the materials
    If the material is locked ( MARA-MATFI=x ) before it needs to be unlock it  ,update it and lock again .
    If its not locked ,we just need to update it and lock the material .
    When we are trying to implement this the materials are not getting locked at all times .
    the update inbound idoc is being sent to 5 clusters at a time .
    The same material is getting locked in some clusters and some it is not . (But the data is being updated in all the clusters )
    Can you please suggest me a solution or give me an idea where the problem would be lying.

    The client has a Keystone Server where alll the Master data is kept and there are 5 Production Servers .
    When ever there are any updates to the Materials they are first updated in the Keystone server .
    And with the help of a Batch Job they send inbound idocs to the 5 Production Servers.
    On the Production servers if the material in MARA  that needs to be updated is locked ,it needs to be unlocked updated and locked again .
    Hope i have  given u the clear idea of the scenario

  • Trouble with unlocking and locking a 3rd gen iPod touch

    When I lock or unlock my iPod it will either re unlock itself or relock itself so if I was to lock my iPod right now it would unlock and be at my lock screen and if I press the button again it will lock and relock right away again I have to do this about 3 times before it will lock for once I did everything that the site said and nothing helped

    Saying you tried everthing since it does not tell us what yu did try.
    Have your restored the iPod to factory defaults/new iPod?
    Is so and still have a problem then you likely have a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Iphone 5 unlocks and locks automaticly.

    Hey everyone,
    It's 12:13 Am right now and I'm so ******! Well my Iphone 5 (Laying beside my bed) Starts to locking and unlocking itself automaticly since about 20 minutes.
    I don't know if the lock button is broken or it is a problem in the phone.  (I think it's the button)
    I just know that it lights up and gets dark every 5 seconds! Sometimes the slide to power off appears but then it's getting dark again.
    I can't even turn it off! It turns itself back on! The phone is about one week old. I got it from verizon.
    It worked perfectly before.
    Should I bring it back to verizon and get a new one? Please help. I don't know what to do

    Okay it has been fixed. I got a new one from Verizon.

  • Unlocked and locked iPhone

    Whats is an unlocked iPhone????     ,  and what is a locked iPhone????

    No. There is nothing written on the phone or the box that will identify a locked or unlocked phone, with the possible exception of a carrier logo, which will pretty much always indicate that the device is locked. Lack of a carrier logo is NOT a guarantee that the phone is unlocked.
    What an intelligent consumer will do is purchase the phone from an authorized source instead of buying a gray market phone from an untrusted party.

  • Guys..i got silly question...about unlocked and locked iphone 4/4s in canada.

    Is it true that if we buy iphone 4/4s from provider it is actually soft unlock...which mean that it will lock one the first sim we put in(not necessary the provider sim)?
    i was planning to buy one in kijiji for my friend...

    I suppose that would depend upon the provider.

  • Ipod touch Keeps unlocking n locking itself

    I was adding more apps & was on the safari then my Ipod touch started unlocking and locking itself. tried to turn itself off & making sounds like it was taking a picture but I dont even have a camera on it. I think it might be a virus but I dont want to hook it up to the computer to restore it incase it is a virus I dont want it on the computer too! Please help!!

    It's not a virus. Try resetting your iPod Touch to see if that clears the problem.
    To Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).

  • Unlocking a "Partially Locked Layer" in Ps CS3

    I am working on a poster for a school project and I have come across something that I have never encountered before in the 4 years of photoshopping I have done. Its a "Partially locked layer". The layer is a text layer and the "lock" button in the layers pallet is off. I have been searching around for how to unlock this layer I have only found these on the "backround" layer not text layers and i cannot figure out ( nor can my teacher(s)) how to unlock it. I need to just transform and edit the text in this layer but am unable to due to the partial locking of the layer.
    Any ideas on how to unlock?
    What I have tried:
    restarting Ps CS3
    Lock Button
    Copying the text layer
    saving as another name and re-opening
    Differnt Computer
    Thanks,
    Matt

    Are either of the 2 icons in red down? If so click on them so they are not depressed.
    If you accidentally used New>> background from layer (your layer would look like the screenshot above). In taht case thje text has been bitmapped, adn even releasing would release this bitmapped.
    If this does not solve your problem, can you post a screenshot of your layers palette?

  • Lock/unlock and charging sound.

    Yesterday night at 12:35am my lumia 535 phone lock/ unlock and charging sound was not work. So can. I or you please resolve this issue.

    Press the Volume key. Then tap on the down arrow at the right. Finally increase the volume for Ringer + Notifications by sliding the bar to the right.
    That should be it

  • I have a first generation iPad and the screen went completely green on me and locked up.  I was able to unlock it, but now there's a green haze all over the screen.  Anyone know what the issue could be and how I can get it fixed?

    I have a first generation iPad and the screen went completely green on me and locked up.  I was able to unlock it, but now there's a green haze all over the screen.  Anyone know what the issue could be and how I can get it fixed?

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Out-of-Warranty Service
         If you own an iPad that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will replace (Apple doesn't repair) your iPad with an iPad that is new or equivalent to new in both performance and reliability for the Out-of-Warranty Service fee listed below. (The replacement will most likely be a refurbished iPad in a brown box, however, it has a new screen, back and battery.)   
    iPad model
    Out-of-Warranty Service Fee
    iPad mini
    $219
    iPad 3rd, 4th generation
    $299
    iPad 2, iPad
    $249
    A $6.95 shipping fee will be added if service is arranged through Apple and requires shipping. All fees are in US dollars and are subject to local tax.
    Certain damage is ineligible for out-of-warranty service, including catastrophic damage, such as the device separating into multiple pieces, and inoperability caused by unauthorized modifications. However, an iPad that has failed due to contact with liquid may be eligible for out-of-warranty service. See http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipad
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
    You may can get the iPad repaired at 3rd party repair sources for less $, however, any remaining Apple warranty will be voided.
    iPad Repair & Screen Replacement Services
    http://www.ifixyouri.com/16-ipad-repairs
    RepairZoom iPad Repair
    http://www.repairzoom.com/ipad-repair.html
    Mission Repair
    http://www.missionrepair.com/Apple_iPad_Repair_Services_s/431.htm
    iGadgetResQ
    http://www.igadgetresq.com/ipad-repair/
     Cheers, Tom

  • How do I select multiple files under "Get File Info"and lock or unlock all?

    How do I select multiple files under "Get File Info"and lock or unlock them all? It seems to do it automatically when I have 10 or more selected. But how do I lock or unlock 5 or 6 files in one swoop? Thanks

    Select the desired files then press OPTION and select Show Inspector from the Finder's File menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Am facing issue on my iphone 5s after updating to ios 7.1.1, every while the phone hang after lock it and cannot unlock and even cannot turn on the screen this is so annoying, kindly advice if i have to go back to the store as device still under warranty

    Am facing issue on my iphone 5s after updating to ios 7.1.1, every while the phone hang after lock it and cannot unlock and even cannot turn on the screen this is so annoying, kindly advice if i have to go back to the store as device still under warranty, and if its a hardware issue or software ??

    Hello HaithamOkeely,
    We've an article that provides the following troubleshooting steps that may help stabilize your iPhone.
    If the device is unresponsive or if certain controls aren't working as expected, restart your device.
    If the device remains unresponsive or does not turn on (or power on), reset your device.
    If there is no video or if the screen remains black, verify that the device has enough charge to turn on:
    If you are using an iPad, ensure that it's connected to the USB Power Adapter supplied with the device.
    Let it charge for at least twenty minutes, then see if it starts normally.
    If there is no image on the screen, press the Sleep/Wake button to attempt to wake the device.
    If the screen displays a red battery icon, continue charging the device until the battery is fully charged. Learn more about charging iPhone and iPod touch, or iPad.
    If the above steps do not resolve the issue, or the if the screen remains black or shows a persistent Apple logo, try restoring with iTunes:
    Connect the device to your computer and open iTunes.
    If the device appears in iTunes, select and click Restore on the Summary pane. Learn more aboutrestoring iOS software.
    If the device doesn't appear in iTunes, try to force the device into recovery mode, and then restore it.
    If the above steps do not resolve the issue, contact Apple.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Cheers,
    Allen

  • My friend took my phone and tried to guess my password to unlock it, and he locked me out of my phone for a minute, but when it unlocked and i tried to use my phone all of my apps, photos, all my data had been deleted. how can i get them back?

    my friend took my phone and tried to guess my password to unlock it, and he locked me out of my phone for a minute, but when it unlocked and i tried to use my phone all of my apps, photos, all my data had been deleted. how can i get them back?

    As Ocean20 say, your only shot at recovering the photos and data is to restore from a backup (with iTunes if you took the backup with iTunes, through iCloud if you took the backup through iCloud).
    The erasure is to prevent your data from falling into the hands of somebody who takes your phone and eventually guesses your password. If you feel that the inconvenience caused by this feature and your friend outweighs the trouble that somebody could cause if they got possession of your contacts and other data, you can change this behaviour.
    Settings > General > Passcode Lock > Erase Data > OFF

  • Could not save Preferences because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the 'Get Info' command in the Finder to ensure the file is unlocked and you have permission to access the file.

    I have this massage every time close ps cc
    Could not save Preferences because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the ‘Get Info’ command in the Finder to ensure the file is unlocked and you have permission to access the file. If the problem persists, save the document to a different file or duplicate it in the Finder.

    You may get better help in Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll
    If FINDER means Mac, read below (and try to give more information when asking a question)
    Mac 10.9.3 workaround https://forums.adobe.com/thread/1489922
    Enable Mac Root User https://forums.adobe.com/thread/1156604
    -more Root User http://forums.adobe.com/thread/879931
    -and more root user http://forums.adobe.com/thread/940869?tstart=0

  • My iPod nano has a lock on the screen.How can I unlock and use my nano?

    My iPod nano has a lock on the screen. How can I unlock and use my iPod?

    Do you know there is the lock/unlock thing on the top or bottom right? If that doesn't work, hold down the middle circle and top portion of the circle button at the same time and hold until the screen goes black. Let go and soon an apple will appear. If you wait / press some buttons (i am not sure exactly how this part works) it will turn white and then the screen will appear again. You have all your music and everything still but the problem should be gone. This also works if your iPod ever freezes.

Maybe you are looking for