Locking selective text in a field

Lynch, Jonathan bnz2 at cdc.gov
Thu Jul 21 10:59:09 EDT 2005


For setting the lock on a chunk use something like this in a script
somewhere:

Set the linktext of char 4 to 6 of field "myField" to "Locked"


In the script of the field, use this (untested):

On rawkeydown
  Put word 2 of the selectedchunk into tStartChar
  Put word 4 of the selectedchunk into tEndChar
  If tEndChar < tStartChar then
    If the linktext of the selection = "Locked" then
      Exit rawkeydown
    End if
  Else
    Repeat with X = tStartChar to tEndChar
      If the linktext of char X of me = "Locked" then
        Exit rawkeydown
      End if
    End repeat
  End if
  Pass rawkeydown
End rawkeydown

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Levi
Kendall
Sent: Thursday, July 21, 2005 10:46 AM
To: use-revolution at lists.runrev.com
Subject: Locking selective text in a field

Hi all,

  I'm looking for a method to allow selective text to be locked in a
field.  Essentially everything in the field would need to be editable
except specific lines of text.  Or perhaps not even lines, but
specific chunks of characters.  One difficulty is as text is added or
deleted from the field, the sections of text that need to remained
locked will move around.

  Has anyone experimented with something similar or found an
implementation to do this?  Thanks.

-Levi
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list