From:
                                                           10/12/97 11:01 PM
Subject: MAX Digest - 11 Oct 1997 to 12 Oct
1997To: Recipients of MAX digests 

There are 3 messages totalling 108 lines in this issue.

Topics of the day:

  1. sprintf object (2)
  2. menubar problems in a Stand-Alone

----------------------------------------------------------------------

Date:    Sun, 12 Oct 1997 01:56:33 -0400
From:    John Williams 
Subject: Re: sprintf object

Hey Maxheads,
In the Max manual it suggests that you consult a C manual for the syntax of
sprintf for lots of functions not documented in Max. Well I checked out my
aged Think C bible and my more recent Symantec C++ equivalent and now I know
a few things I didn't before (like sprintf %#X prints numbers as hex in
upper
case with the 0X prefix, to name but one). However, when it comes to the
precision field, leading 0's etc. I have had no success. Does anybody know
the syntax that the Max object uses (or have I already discovered all of the
"secret features" to which Max alluded ?). Trying to get stuff to print out
in tidy columns in Max is a severe headache. I wrote a patch that did this
which became pretty huge before it worked correctly. Anybody got any smart
tips?
(sorry to post this twice but I'd really like to know !!!)
John  WIlliams.

------------------------------

Date:    Sun, 12 Oct 1997 15:36:51 +0200
From:    Thomas Schneider 
Subject: menubar problems in a Stand-Alone

Hi Maxers !

I have some questions regarding a Stand-Alone using the menubar object.
Making a Stand-Alone with MaxPlay I have the following problems with the
menubar
 object :

1) command period :
Normaly command period stops the max scheduler and you can choose resume to
 restart the scheduler.
In a Stand-Alone with Maxplay using the menubar object the resume command
will
 never be enabled, so you have no chance after typing command period to
restart
 the max scheduler !
Also if you eliminate the resume and overdrive command with the menubar
object
 (second argument 3) you never have the chance to restart the max scheduler.
The problem is, it is usual to type command period to stop long
calculations, so
 peoble often use these command, and so they have to start again the
programm to
 restart the scheduler.
Is there any way to get the command period in my own external as a key
message,
 so I can use it to stop actions and not to stop the scheduler ?

2) Edit menu :
My external don`t recieve the clear message of the Edit menu, instead the
 command is send out the edit menu outlet of the menubar object with number
0.
Is this the right behaviour ?
The next problem is, my object only recieves the undo,cut, copy and paste
 message (binding these messages with admess and A_CANT) when it is
active.(when
 one of its window or the owning patcher window is active). Using other
 subpatches or externals with other windows I have no chance to implement
global
 edit commands, for example, when the Max (Info) window is active the edit
 commands are not send to my object.

3) Close command :
In a Stand-Alone using the menubar object the close command for the
 top-level-patcher is not disabled when using the Can`t close Toplevel
Patchers
 option in the Application Maker.

4) No Midi Setup Dialog on Startup / Use Preferences File
I am confused with these options in the Application Maker :
I think, the MIDI Setup is saved in the preferences file (also the Max
(info)
 window size and position. When I now use my own preferences file these
settings
 are not saved or read, so I will get every time the MIDI Setup Dialog on
 Startup.
To solve this problem I check the No Midi Setup option, but this also
removes
 the MIDI Setup command from the File Menu.

Thanks a lot for any answers.

Thomas Schneider

------------------------------

Date:    Sun, 12 Oct 1997 08:05:29 -0600
From:    Kevin Walker 
Subject: Re: sprintf object

>...However, when it comes to the
>precision field, leading 0's etc. I have had no success.

Is this what you had in mind?

max v2;
#N vpatcher 78 95 523 347;
#P newex 48 173 55 262153 print xx;
#P number 46 64 35 9 0 0 0 4;
#P newex 47 120 104 262153 sprintf "%06.6d";
#P flonum 156 52 35 9 0 0 0 4;
#P newex 159 121 104 262153 sprintf "%08.2f";
#P newex 160 174 55 262153 print yy;
#P flonum 270 51 35 9 0 0 0 4;
#P newex 273 120 98 262153 sprintf "%8.2f";
#P newex 274 173 55 262153 print zz;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P connect 4 0 3 0;
#P connect 1 0 0 0;
#P connect 5 0 4 0;
#P connect 2 0 1 0;
#P pop;

------------------------------

End of MAX Digest - 11 Oct 1997 to 12 Oct 1997
**********************************************