On 15/2/01 5:30 pm, Wilhelm Sanke at [EMAIL PROTECTED] wrote:

> The following script works fine (in the modeless searchstack):
> 
> "if word 1 of the owner of fld j of cd i of the topstack is "group" then
> put  Return& the owner of fld j of cd i of the topstack after last line
> of  SearchResult"
> 
> However, if you add "the vis of" or "the ID of" before "owner" as in
> 
> "if word 1 of the owner of fld j of cd i of the topstack is "group" then
> put  Return& the vis of the owner of fld j of cd i of the topstack after
> last line of  SearchResult"

Hi Wilhelm, no this is not a bug.

If you know that all of your groups have names set on them (i.e. not "group
id xxxx") then you could get round this with:

put return & the vis of group (char 2 to -2 of word 2 of the owner of fld j
of cd i of the topStack) of cd i of the topStack after last line of
SearchResult

In the above line, first we specify where fld j is (of cd i of the topStack)
but then we go on to say where the owner is (of cd i of the topStack). Also
the group is referred to by actually using the word "group" and then by
extracting the name of the group - this is instead of using the previous
method in combination with a "do" statement.

However, the overall easiest way would probably be:

  set the defaultStack to the topStack
  put the owner of fld j of cd i into tGroup
  if word 2 of tGroup is "id" then put return & the vis of group id (word 3
of tGroup) of cd i after last line of SearchResult
  else put return & the vis of group (char 2 to -2 of word 2 of tGroup) of
cd i after last line of SearchResult

This directly queries the visibility of the group after finding out how to
refer to it. So you can use it with groups regardless of whether they have a
names set on them.

Cheers,

Alan

Alan Beattie <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (Formerly Cross Worlds Computing)
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to