Why .getSession() and not just .session?

35 views
Skip to first unread message

Phrogz

unread,
Mar 2, 2012, 2:21:34 PM3/2/12
to ace-d...@googlegroups.com
I noticed that the ACE implementation of .getSession() current just returns the session property. My current use of the editors is lazily caching this property once as soon as the editor is created and re-using it everywhere else. So far, everything appears to be working just fine. So:
  1. Why are almost all useful API methods on the session and not the editor? The distinction between the two (from an API standpoint) seems arbitrary.
  2. Why is this simple property accessor hidden behind a method? (Just for future proofing?)
  3. When does the internal session for an editor change (when is setSession() called)?
Thanks for a wonderful piece of software!
Reply all
Reply to author
Forward
0 new messages