[comp.sys.mac.programmer] Tear-OffMenus?

pnm@goanna.oz (Paul BIG EARS Menon) (07/17/89)

hi,
  I am about to embark on a Mac project, and would like to include
  the tear-off menu facility (a la Hypercard, MacPaint...).  There are no
  Inside Mac nor Technote references.  Can anyone refer me to an example
  of how this is done (MacTutor?) or better yet, put one on the net?
   
   It's more than likely this has already appeared in this group, so
  apologies for missing it the first time.


  Thanks for any info,

    Paul Menon,
    Dept of Computer Science,
    Royal Melbourne Institute of Technology, 
    124 Latrobe Street,
    Melbourne 3001, 
    Victoria, Australia.

PH:	+61 3 660 3209
CSNET:		pnm@goanna.rmit.oz
BITNET/ARPA:	pnm%goanna.rmit.oz@uunet.uu.net
UUCP:		...!uunet!munnari!goanna.rmit.oz!pnm

mnkonar@smallberries.SRC.Honeywell.COM (Murat N. Konar) (07/17/89)

Sorry to post this, my e-mail bounced.

In article <2216@goanna.oz> pnm@goanna.oz (Paul BIG EARS Menon) writes:
>  I am about to embark on a Mac project, and would like to include
>  the tear-off menu facility (a la Hypercard, MacPaint...).  There are no

The April 1988 issue of MacTutor has a really good and robust
descripion on how to implement Tear-Off menus.  It's in C and 
source code disks are available from MacTutor for around $8.

Or you could wait for System 7 which I understand will support
tear-off menus more straight forwardly (i.e. real calls, no 
hacks).

Good Luck!
____________________________________________________________________
Have a day. :^|
Murat N. Konar        Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)

dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) (07/18/89)

In article <25723@srcsip.UUCP> mnkonar@src.honeywell.com (Murat N. Konar) writes:
>Or you could wait for System 7 which I understand will support
>tear-off menus more straight forwardly (i.e. real calls, no 
>hacks).

  Hmmm, are there any calls at all. I was under the impression that sys 7.0
supports tearoff menus by making *ANY* menu tear off by default.  It not
so much that 7.0 is allowing tear off's as it is implementing for any
menu.

  But I could be wrong, and would like to know if I am.
-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////////////////////
David M. O'Rourke____________________|_____________dorourke@polyslo.calpoly.edu
|  God doesn't know, he would have never designed it like that in the first   |
|_ place. ____________________________________________________________________|

tim@hoptoad.uucp (Tim Maroney) (07/18/89)

In article <2216@goanna.oz> pnm@goanna.oz (Paul BIG EARS Menon) writes:
>  I am about to embark on a Mac project, and would like to include
>  the tear-off menu facility (a la Hypercard, MacPaint...).  There are no

In article <25723@srcsip.UUCP> mnkonar@src.honeywell.com (Murat N. Konar)
writes:
>The April 1988 issue of MacTutor has a really good and robust
>descripion on how to implement Tear-Off menus.  It's in C and 
>source code disks are available from MacTutor for around $8.

I don't wish to impugn the fine programming of my colleagues at Impulse
Technologies, who wrote this code; but it should be noted that its
direct use of window regions and low-level window manager traps places
it in jeapordy for the future.  A source at Apple is in fact firmly
convinced that it will break under System 7.0.

I should also point out that incorporating this code in your programs
costs more than $8.  You have to obtain a considerably more expensive
license.

>Or you could wait for System 7 which I understand will support
>tear-off menus more straight forwardly (i.e. real calls, no 
>hacks).

The word is that *all* menus under System 7.0 will be tear-off menus.
This may change -- I hope so, as it would be confusing to the user.

Unfortunately, System 7.0 will run only on machines with two megabytes
or more of storage.  This means you cannot count on your target
audience having anything past System 6.0, since most machines do not
have more than one megabyte of RAM and will not be upgraded.  Perhaps
the best course is to test the system version; if it is 6.0.x then use
something like Don and Mike's code; if it is 7.0 then leave the system
to handle tearing off, and bypass Don and Mike's code.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"The negro slaves of the South are the happiest, and, in some sense, the
 freest people in the world.  The children and the aged and infirm work not
 at all, and yet have all the comforts and neccessaries of life provided for
 them." -- George Fitzhugh, CANNIBALS ALL! OR, SLAVES WITHOUT MASTERS, 1857

mnkonar@gorby.SRC.Honeywell.COM (Murat N. Konar) (07/18/89)

In article <12571@polyslo.CalPoly.EDU> dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
>  Hmmm, are there any calls at all. I was under the impression that sys 7.0
>supports tearoff menus by making *ANY* menu tear off by default.  It not
>so much that 7.0 is allowing tear off's as it is implementing for any
>menu.
>  But I could be wrong, and would like to know if I am.


Actually, now that I think about it, you may be right,  I wonder if that 
means that applications that use custom MDEFs will break under System 7
or maybe the menu manager does a check to see what MDEF is in use.  Anyone?




____________________________________________________________________
Have a day. :^|
Murat N. Konar        Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)

svc@well.UUCP (Leonard Rosenthol) (07/20/89)

In article <25762@srcsip.UUCP>, mnkonar@gorby.SRC.Honeywell.COM (Murat N. Konar) writes:
> In article <12571@polyslo.CalPoly.EDU> dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
> > [ discussion of Tear Off Menus under System 7.0 ]
> 
> Actually, now that I think about it, you may be right,  I wonder if that 
> means that applications that use custom MDEFs will break under System 7
> or maybe the menu manager does a check to see what MDEF is in use.  Anyone?
> 
	I would highly doubt that they would break.  The current INIT's that
allow for TearOffs for any menu support the ability to tear off menus whether
they use the standard MDEF or a custom one, and I assume that this will be
true of whatever System 7 does.  Since and MDEF is and MDEF the TOM mechanism
should be the same regardless - though I guess that if you break rules in your
MDEF (assume certian things, etc.) that it may not work but otherwise...

-- 
+--------------------------------------------------+
Leonard Rosenthol        |  GEnie : MACgician
Lazerware, inc.          |  MacNet: MACgician
UUCP: svc@well.UUCP      |  ALink : D0025

mnkonar@gorby.SRC.Honeywell.COM (Murat N. Konar) (07/22/89)

In article <8026@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
>I don't wish to impugn the fine programming of my colleagues at Impulse
>Technologies, who wrote this code; but it should be noted that its
>direct use of window regions and low-level window manager traps places
>it in jeapordy for the future.  A source at Apple is in fact firmly
>convinced that it will break under System 7.0.
>
>I should also point out that incorporating this code in your programs
>costs more than $8.  You have to obtain a considerably more expensive
>license.

The low level window traps they use are (to the best of my recollection)
documented in IM.  I know this does not guarantee that those traps will be
present in the future but Apple does try to let documented things stand.
As to direct manipulation of window regions, I do not recall any of that 
being done but I could be wrong.

As for licensing fees, there is a note at the bottom of the page in MacTutor
where the source code disks are listed that says in part "the code contained
[on the disks] may be included, if properly acknowledged, in commercially
marketed products at no additional charge to the developer."


____________________________________________________________________
Have a day. :^|
Murat N. Konar        Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)