Hi all,

there have been some questions about stacks, that were cut off
when beeing displayed. The troublemaker was/is the new property
"windowboundingrect", which is in fact the screenrect minus 20 pixel
for the menubar/start-bar.

I tested a lot and found a (quite) reliable solution, which works fine for
me, especially on iMacs and Powerbooks with the monitor set to 1024*768.

This works for stacks with a size of 1024*768 without decorations!!!
Can be modified to fit other screen-resolutions, of course.

I am working with a backdrop in this case...

######################################

on preOpenStack
  scheckung1      #see below (Hi Monte, this (very bad ;-)
  scheckung2      #german for check ;-)
  scheckung3      # -> check3 :-D

  if "Development" is not in the environment then

###VERY important if you tend to just open the stack
### for editing and you forgot to lock messages first,
### like i do (sometimes... :-)
### (backdrop and no menubar = annoying surprise...)
### Advantage:
### no need to delete these lines
### before you build a standalone from this stack !!!

    set the decorations of me to empty
    set the backdrop to black
    hide menubar
    if the screenrect is 0,0,1024,768 then
      set the windowboundingrect to 0,0,1024,768
      set the loc of me to 512,384
      set the rect of me to 0,0,1024,768

### !!!!!!!!! This does the trick, at least for me.
### It forces the stack to HAVE its original dimensions 1024*768
###AND to use the whole available monitor-area
### AND centers it if the monitor is also set to 1024*768

    else
      set the loc of me to the screenloc

### If the screen is bigger, it will look good anyway...

    end if
  end if
  set the navigationarrows to false
  get the effective filename of this stack
  set the itemdel to "/"
  delete last item of it
  set the directory to it

### I will never forget that again...
### Important when using relative paths...

end preOpenStack

###You can make your own checking-handlers, of course...
###There are still folks out there who try to spell
###multimedia with 8 bit :-(

on  scheckung1
  if the screendepth < 16 then
    answer "Not colorful enough... ;-)" with "Me???"
    quit
  end if
end scheckung1

on  scheckung2
  if item 3 of the screenrect < 1024 and item 4 of the screenrect < 768 then
    answer "Too small!" with "What the..."
    quit
  end if
end scheckung2

### MetaCard and Quicktime is a combination that can't be beat !!!!!
on  scheckung3
  if the qtversion < 4 then
    answer "Too old" with "I am not!"
    quit
  end if
end scheckung3

###############################


Maybe this is helpful to you folks...

Please don't hesitate to drop a line, if you have some questions.


Regards from deutschland (this is german for germany ;-)


Klaus Major <[EMAIL PROTECTED]>
MetaScape GmbH


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