Loading ...
Sorry, an error occurred while loading the content.

Re: [peditors] Need a way for a pScript to tell if pedit is in List View or Edit View [ps]

Expand Messages
  • Steven Hill
    Resent to include [ps] in the subject line... ... I agree it would be useful, but here are some work-arounds. 1. ESC-o exits the memo in EditView (i.e. goes to
    Message 1 of 1 , May 1 5:26 AM
    • 0 Attachment
      Resent to include [ps] in the subject line...

      At 11:51 -0700 30/4/02, John Harms wrote:

      >DO: John Harms - photojhh@... - 30-Apr-2002
      >
      >Need a way for a pScript to tell if pedit is in List View or Edit
      >View, for use with &ifscript.
      >
      >This is needed for pScripts that behave differently depending on the mode.

      I agree it would be useful, but here are some work-arounds.

      1. ESC-o exits the memo in EditView (i.e. goes to ListView), but does
      nothing (not even an error dialogue) in ListView. So you can use
      ESC-o to get pedit into a defined state.

      2. If you really need the if-type stuff then it can be done as follows:

      {WhereAmI::
      /&runtimeInit []
      /! /$e /&varSet@ [$0, $$] /*get length of memo; set to a zero if
      no text field*/
      /&ifScript@ [$0!=0, @@Memo@@] /*length isn't zero, so its a memo*/
      /&mess [@@list!!@@,,250] /*a message*/
      }
      {Memo::
      /&mess [@@memo!!@@,,250] /*a message*/
      }

      The only problem with this script an empty memo (i.e. length zero)
      which behaves as a list.

      Hope that helps,

      Steven
    Your message has been successfully submitted and would be delivered to recipients shortly.