cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

ACL to get Editor startup command arguments

BrianJ
3-Visitor

ACL to get Editor startup command arguments

Inside ACL code I'd like to see if the Editor session was started as
read-only. I can see whether the specific documents are read-only using
the doc_read_only() function, but it will return 0 (not read-only) for a
given doc when Editor was started with the -r switch (session read-only)
and that doc had doc_read_only(doc, 0) called on it, even though the
session state seems to take precedence.

I can't seem to find anything in ACL or in the API for other languages
like Java that indicates whether Editor was started as read-only. I also
looked for something that would return the command line string that
started Editor so I could search for "-r" in that string, but I can't
seem to find anything like that, either. Any ideas?

Thanks,
--



Brian Jensen
bjensen@bluelid.com

3 REPLIES 3
bibach
1-Newbie
(To:BrianJ)

The option() function allows a second argument to indicate that you want
the session-level value for an option, but so far as I can tell, there is
no option corresponding to the read-only status. Your best bet may be to
rely on the fact that every document starts out read-only in this state and
to do something like use doc_add_callback() to set up a document "create"
callback that will fire whenever a document is opened to check its state or
use doc_open() to briefly open some arbitrary file without the read-only
flag and see if it is read-only anyway. Doing the latter just once after
startup shouldn't be too inefficient.

-Brandon 🙂


BrianJ
3-Visitor
(To:BrianJ)





Brian Jensen
bjensen@bluelid.com


BrianJ
3-Visitor
(To:BrianJ)

Brandon,

Thanks for the idea, I'll give that a try.

Sorry, everyone, for the empty reply a few minutes ago. Had the reply
window open ready to write this, got called away for a few minutes, then
came back and absentmindedly hit the send button.

Regards,



Brian Jensen
bjensen@bluelid.com


Announcements

Top Tags