Nedit session

Thorsten Haude yoo at vranx.de
Mon May 28 13:52:23 CEST 2007


Hi,

* A.V.Kuznetsov wrote (2007-05-28 16:45):
>> >I found incompleteness of NEdit macro language.
>> >
>> >There is the $read_only system variable.
>> >It state can not be changed using a macro, as a result,
>> >read-only status of buffers is lost when you open saved sessions. 
>> >Seems the macro set_read_only() must be added to the
>> >Window Preferences Actions.
>> 
>> I think $read_only is for files that are actually read-only, so this
>> is not supposed to work from within NEdit. May you are looking for
>> $locked and set_locked().
>
>You are right, $read_only value must not be changed from within NEdit:
>$read_only is for checking of file status,
>$locked is for checking of window status.
>
>Try simple macro
>
>set_locked(!$locked)
>dialog("read_only="$read_only " locked="$locked, "Close")
>
>set_locked() changes values of both $read_only and $locked.
>Seems, that is incorrect.
>
>If file is actually read-only, both $read_only and $locked
>are equal to unity and can not be changed till then you "SaveAs" window.
>When file is not actually read-only and window is locked,
>zero value of $read_only must not be changed(?).

I don't claim to grok the _LOCKED macros, but if I understand you
right, you shouldn't have a problem if you just use $locked and
set_locked().


Thorsten
-- 
The ability to quote is a serviceable substitute for wit.
    - Somerset Maugham
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.nedit.org/pipermail/discuss/attachments/20070528/ddecbb8d/attachment.bin


More information about the Discuss mailing list