/*
 *  $VER: Testsuche.rexx V1.4 (18.05.2000)
 *
 *  ARexx-Script for DataM II
 *  Copyright 2000 by Christoph Kirsch
 *
 *  FOR INTERNAL DEBUGGING USE ONLY!
 */

options results

address 'DATAM_II.1'

GETACTIVE
obj = result

say "Active object has address " || obj

if obj ~= 0 then do

  OBJECTNAME obj
  name = result

  say "Object is called " || name

  OBJECTTYPE obj
  typname = result
  OBJECTTYPE obj NUMERIC
  typnr = result

  say "Object is of type " || typname || " = type #" || typnr

  if typname = 'TABLE' then do

    say "Object is table. So we can go on."

    GETACTIVE SHEET
    obj = result

    if obj ~= 0 then do

      OBJECTNAME obj
      name = result

      say "Sheet at address " || obj || " is named " || name

      GOTO obj 2 3
      REDRAW obj

      say "We moved the cursor, now."

      GETCONTENT obj
      inhalt = result

      say "The cell at cursor position contains: " || inhalt

      GETCONTENT obj 1 2
      inhalt = result

      say "The cell (1,2) contains: " || inhalt

      GETCONTENT obj 1 6
      inhalt = result

      say "The cell (1,6) contains: " || inhalt

      GETCONTENT obj 1 6 INTERPRET
      inhalt = result

      say "The cell (1,6) contains as result: " || inhalt

      GETCONTENT obj 1 6 RENDERED
      inhalt = result

      say "The cell (1,6) contains rendered: " || inhalt

      GOTO obj 5 2
      REDRAW obj
      SETCONTENT obj COLUMN 5 LINE 2 "Ein Test"
      REDRAW obj CURSOR

      SETCONTENT obj COLUMN 6 LINE 1 "10.10.2000"
      SETCONTENT obj COLUMN 7 LINE 1 "{externe.datei}"
      SETCONTENT obj COLUMN 6 LINE 2 "13.284"
      SETCONTENT obj COLUMN 8 LINE 2 "Zwei Test"
      GOTO obj 7 2
      SETCONTENT obj "12:54"
      REDRAW obj ALL

    end
    else do

      say "Error: The table seems to have no sheets!"

    end

  end

end
else do

  say "Error: The active window does not contain an object!"

end

