💾 Archived View for gemini.spam.works › mirrors › textfiles › apple › ADC › adv.910108 captured on 2020-10-31 at 20:56:03.

View Raw

More Information

-=-=-=-=-=-=-


America Online
APPLE II DEVELOPMENT FORUM CONFERENCE LOG
Tuesday, January 8, 1991  10:00 p.m. Eastern Time
Topic:  Toolbox Programming
Forum Leader:  Dave Sugar (AFL Dyfet)

AFL Dyfet  Tonight's toolbox night :)
AFA Gary J Yep :)
INF2       Is it the toolbox today?
AFL Dyfet  Yes it is Inf2...In fact, I think DevScott had the first question
           for tonight.
INF2       Today, the ToolBox...  Tommorow, the WORLD!!!:D
DevScott   I am trying to learn more about the GS and programming it by
           creating a simple
DevScott   paint program using pascal and am having problems with an about
           dialog
DevScott   box "disfiguring" the drawing window behind it.  What do I need to
           do
DevScott   to preserve the drawing already done?  GetPort/SetPort stuff?
AFL Dyfet  GA Winkie....
WinkieJim  Is the window behind it getting the partthe dialog covered
           erased?
DevScott   What was that?
DevScott   The part of the window the dialog covers is filled with the
           current color
DevScott   selected (a different problem).
WinkieJim  Is the window behind the dialog just getting erased without being
           redrawn?
WinkieJim  Not the background color?
DevScott   Well, I'm not quite sure...
AFA Gary J Probably the background color.
WinkieJim  Is it white?
DevScott   The color is selected using 
DevScott   SetPenPat, but when drawing, the color drawn isn't what was
DevScott   selected?  Hard to tell.
DevScott   Not always white, though.
WinkieJim  Scott, you do redraw the entire window when your update routine
           for that
WinkieJim  window is drawn, right?

DevScott   I believe so...what exactly do I do to make sure that it's done.
DevScott   <---- sorry, kind of a novice here.
AFL Dyfet  That's okay Scott!!
WinkieJim  In your update rouine for the window you're supposed to redraw
           EVERYTHING
WinkieJim  that is displayed in the context region of the window.
DevScott   So, do you have to set up a routine that "remembers" everything
           the user
DevScott   did draw?
WinkieJim  Right Scott
AFL Dyfet  Yes, Scott
DevScott   Well, I'm still a little foggy about how to do that, but I'll do
           some more
DevScott   digging to see if I can figure it out.
WinkieJim  Scott you could also draw everything to the window on screen AND
           to an 
WinkieJim  off-screen window and then copy all the pixels to the on-screen
           window at
WinkieJim  update time.
DevScott   PPToPort, or is that a little different?
WinkieJim  I believe CopyPixels is what you'd want to use
DevScott   Ok, I'll try it out.  Thanks for the guidance!
DevScott   <-- Done.
WinkieJim  Good luck Scott.   GA
DevScott   :)
AFL Dyfet  Okay, go ahead Steve....
SteveB     Just wanted to thank the people who helped my figure out....
SteveB     how to handle what SFP gives me. Nice guys here! :)
SteveB     And, I have to be leaving, so g'night all! :)
AFL Dyfet  Thanks :)
SteveB     GA :)
AFL Dyfet  Okay, INF2 has the next question...GA INF2...
INF2       Well, actually, not much of a "question", but I'll GA...
INF2       Well, it's only been one year, since I've got my IIGS, but I don't
           understand
INF2       the ToolBox at all...  Do you need stuff like ORCA/C?
INF2       Or APW?
AFL Dyfet  A good place to start, actually, is a wonderful book Michael
           Fisher wrote, the
AFL Dyfet  Apple IIgs Technical Reference....
AFL Marty  Who? :)
INF2       The "Technical Introduction to the IIGS"?
AFL Dyfet  It is published by Osborn/Mcgraw Hill
INF2       Oh
AFL Dyfet  It was the first IIgs programming book I started with....and still
           use it for
AFL Dyfet  reference from time to time....GA Dave...
Dave Lyons If you do any real toolbox work, you definitely want the real
           reference manuals--the stuff
Dave Lyons in Toolbox Ref Volume 3 wasn't even conceived when Fischer's book
           came out (and you want the
Dave Lyons official books anyway).  ga
INF2       Well, can't I use ANY part of the ToolBox from GS/OS itself?
AFL Dyfet  That is true...at some point you will want to get the IIgs toolbox
           references.
AFL Dyfet  GA Gary...
AFA Gary J As for languages and such, yes ORCA/C is one you could use, but
           you can also
AFA Gary J access the IIGS toolbox from assembly, Pascal, or even BASIC on
           the IIGS.
INF2       BASIC?
INF2       HOW?
AFA Gary J You can even experiment with toolbox calls using Nifty List CDA 
           :)
AFL Dyfet  GA Marty....
AFA Gary J Not Applesoft BASIC, but IIGS specific basics.
AFA Gary J GA
INF2       Oh...
AFL Marty  I started reading a good book on toolbox programming last
           night...
AFL Marty  it's called "Mastering the Apple IIGS Toolbox" by...
AFL Marty  Dan Gookin and Morgan Davis.
AFL Marty  I got through about 60 pages or so.  It goes at a rather good rate
           for me
AFL Marty  (I'm the rankest of beginners)...
INF2       But you see,
INF2       I don't have ANYTHING I can use to acess the ToolBox, I think...
AFL Marty  You can experiment with toolbox calls from BASIC or from the
           monitor.
AFL Marty  GA
AFL Dyfet  Or from Nifty List :)
AFA Gary J (Or Nifty List :)
INF2       I only have AppleSoft....
AFA Gary J :)
AFL Marty  Or from Nifty List :)
INF2       And what is Nifty List?
AFA Gary J (Nifty List is available in our software library.  It's a CDA
           written by
AFA Gary J Dave Lyons)
INF2       Oh.
AFL Dyfet  GA Dave :)
AFA Gary J :)
Dave Lyons Nifty List got its name because its original purpose in life was
           to disassemble ("List")
Dave Lyons assembly code with extra information displayed in the margin (the
           names of toolbox calls, for
INF2       But what is it now?
Dave Lyons example).  It's grown into a generally useful tool for learing
           about the GS toolbox and OS, and
Dave Lyons for debugging GS programs (yours and other people's).
INF2       Does it come with Docs?
Dave Lyons Starting with version 3.0, you can make toolbox calls
           interactively and write your own commands
Dave Lyons if you want.  Sure, docs are included, and most of the information
           is available right from Nifty
Dave Lyons List (by putting a "?" in front of the command name).
Dave Lyons ga
INF2       OK...  Thanks Dave!:)
AFA Gary J BUT, I'd like to add.... it REALLY HELPS to have manuals of some
           type
AFA Gary J guiding you along in making those toolcalls.
INF2       Uh-huh...
AFA Gary J :)
INF2       I'll D/L that right now.
INF2       BYE!
AFL Dyfet  Okay, GSShadow has the next question, and the floor now...GA
           GS...
GSShadow   Ok. this should be qiuck. First, where can i find info on the 
GSShadow   QuickDrawII 'picture' format, the one used with the Draw Picture
           command?
AFL Dyfet  GA Dave
Dave Lyons Apple IIgs Technical Note #46 (this was revealed to me by page 6
           of the Apple II Technical Note
Dave Lyons Index, amazingly enough).
Dave Lyons The information is provided for
Dave Lyons debugging purposes, mainly--the format may be extended in the
           future, but it isn't too likely
Dave Lyons to change soon.  ga
GSShadow   O.k. I thought It might be in the tech notes. I have been waiting
           of APDA's
GSShadow   compilation of tech notes. How can I get tech notes sent to me? Is
           there some
GSShadow   kind of subscription?
AFA Gary J GSShadow:  You can download TN#46 right here on America Online
AFL Dyfet  GA Matt
Matt DTS   As of the new APDAlog automagically winging its way around the
           world, the APDA subscription policy
Matt DTS   for TNs changes.  Now you can buy a complete back set and a
           one-year subscription independent of the
Matt DTS   calendar year (for example, if you subscribe in September 1991 it
           goes until September 1992).
Matt DTS   GA
AFA Gary J (That sounds good :)
Tamira     when does the new APDA cat go out Matt???
Matt DTS   Dunno.  I have mine already.
WinkieJim  Tam, I got mine today
AFA Gary J Tamira, mine came yesterday.
Tamira     sigh again.....and again  :(
GSShadow   THANKS. Also, for some reason my program (asm) is not getting
           update events
GSShadow   for my modeless dialogs. I have used taskmaster, and the is
           Dialog/Dialog
GSShadow   select combo but I cannot get my dialogs redrawn when they're
           covered by 
GSShadow   windows. If it is covered by a modal dialog, everything owrks
           fine! Help?
AFL Dyfet  GA Dave
Dave Lyons GSShadow, the least painful way is to not use modeless dialogs,
           and just
Dave Lyons use regular windows instead.
Dave Lyons The Dialog Manager should be automatically updating
Dave Lyons your modeless dialogs during DialogSelect, though--I don't know
           what going wroing, unless
Dave Lyons you are expecting it to draw something *other* than your dialog
           items in there.  (That is, if you have
Dave Lyons a wContDefProc that you expect the system to call for that window,
           you will be disappointed.)
Dave Lyons ga
WinkieJim  I love it when Dave saves the painful stuff for last :)
GSShadow   O.k. My problem is that I want to get input from controls without
           having to 
GSShadow   select a window, and I was hoping to accomplish that w/ a modeless
           dialog.
GSShadow   I guess I can get around it.
Dave Lyons Okay, you want the user to type
Dave Lyons into, say, a Line Edit control while the window isn't in front?
GSShadow   No, I want the user to be able to click on an icon  while the
           window isn't
GSShadow   in front. (same difference)
Dave Lyons I don't see how modeless dialogs simplifies it--
Dave Lyons what's stopping you from calling FindControl and TrackControl on a
           window that's not in front?
Dave Lyons (It's just that TaskMaster doesn't help you out as much there.)
GSShadow   I was hoping it some magical property I could use to my advantage.
           But I guess
GSShadow   not, Huh?
Dave Lyons (Not that I've thought of, anyway.  ga)
AFL Dyfet  Okay, Nuzz, you have the floor now...
Nuzz       If an App that does NOT have a resource fork wishes to open other
           files RForks,
Nuzz       must that app issue resource startup/down calls, and if it does
           have to and
Nuzz       doesn't, what are the consequences
WinkieJim  Yes it must startup and shotdown the resource manager.
AFL Dyfet  GA Dave...
Dave Lyons Yes, your application has to start and shut down the resource
           manager--but StartUpTools and
Dave Lyons ShutDownTools take care of that for you, even if your application
           has no resource fork.  ga
Nuzz       OK, how about Da's in the same context?
WinkieJim  Yup, if they are going to make resource manager calls.
Dave Lyons In system 5.0.4 and earlier,
Dave Lyons StartUpTools and ShutDownTools must *not* be called from a DA, so
           you have to do your own
Dave Lyons ResourceStartUp and ResourceShutDown calls from the DA, as shown
           in GS Technote #71.  ga
Nuzz       OK. Done
AFL Dyfet  Okay, go ahead Foreigner...
Foreigner1 Coupla quick Questions: 1. Should a LocInfo BoundsRect ever have a
           v1 of -25?
Foreigner1 That's what I get with a GetLocInfo call on the samples from
           ORCA/C...
AFL Dyfet  GA Dave
Dave Lyons Yes, the BoundsRect of a QuickDraw II grafport that points to
           video memory is the rectangle 
Dave Lyons bounding the screen, in the local coordinates of the window.  So
           if the top line of your window's
Dave Lyons content region is on scanline 25, the boundsRect.v1 of your
           window's port will be -25.  ga
Dave Lyons (BTW, you can use Nifty List to quickly check on things like
           this!)
AFL Dyfet  :)
Foreigner1 Okay, thanks.  #2- how do you do Icons, when the header file
           states the length
WinkieJim  Dyfet, do you think we should have Dave pay fro all his
           commercials? :) :):)
Foreigner1 of them to all be one?  (The QDIconRecord in QDAUX.h)?
Foreigner1 GA
AFL Dyfet  :)
AFL Dyfet  GA Dave...
Dave Lyons What?  Most icons -don't- have length 1.  How are you determining
           that they do?
Dave Lyons Are you examining Finder icon FILES, or individual icons?
Coach101   Dave, I think he is referring to the struct/typedeff in the .h
           file....
Foreigner1 The struct definition in the header file states, (and I quote)
           Byte iconImage[1];
Foreigner1 Same with the cursor definition in Quickdraw.h
Foreigner1 GA
AFL Dyfet  GA Matt
Matt DTS   (I found it just before he said it) That doesn't mean the icons
           are all one byte long.  It's some
Matt DTS   kind of C hocus-pocus to define the structure so you can access it
           later.  Someone who actually knows
Matt DTS   C will have to explain it in detail.  GA.
Dave Lyons Ah!  Since icons are variable-length, you can't really write
           structures for them in Pascal or C;
Dave Lyons those are just templates you can use as a starting point.  If you
           want to use those data structures,
Dave Lyons make a copy & make one with the height and width you need.  Ditto
           for QuickDraw cursors.
AFL Dyfet  So you just use IconImage to reference the FIRST byte of the
           image....
Foreigner1 Gotcha.  One last (easy) question- Address/Phone # of APDA?
Dave Lyons 1-800-282-APDA
Foreigner1 ga. I'm done!
AFL Dyfet  Okay, A2 has the next question...GA A2...
A2GS       2 short Q's.....1) Do Apple Dealers still give the system disk
           upgrades?
WinkieJim  A2GS, yes if they want too...Apple doesn't require them too...
WinkieJim  if you have a good one they should allow you to get a copy of the
           latest
WinkieJim  system.
A2GS       I'm currently using a 1987 ver. of AppleLink (developer ver.)
           has
A2GS       there been any upgrade for II users since then???????
A2GS       GA
AFL Dyfet  GA MAtt
Matt DTS   Send me an AppleLink with your name and system configuration and
           we'll talk offline.
A2GS       huh?
Matt DTS   Using '87 AppleLink = you have an AppleLink account.
Matt DTS   Use it to send me (DEATHERAGE1) an AppleLink that contains your
           name, your system configuration and
Matt DTS   we'll talk about upgrades.  GA.
A2GS       oh...o.k......now I see....need to get more sleep  :)
AFL Dyfet  Okay, are there any more questions for tonight?
AFA Parik  (I read somewhere that AppleLink will [soon] allow anyone online,
           alaCIS/GEnie)
AFA Parik  (er, I mean you don't need a Mac...you can use a IBM.  still need
           a acct!)
A2GS       got a Q...
WinkieJim  We have a question!
A2GS       Is there anyway to force the Cntrl-pnl NDA to come up without
           using having
A2GS       to use PDM's?
A2GS       GA
WinkieJim  PDM's?
A2GS       pull down menus
WinkieJim  Oh....:)
AFL Dyfet  GA Winkie
DangardAce Someone write QuickeysGS :)
WinkieJim  I Edited the Control panel NDA file to have a keyboard equivalent
           :)
Coach101   Cheating :)
A2GS       I'd prefer NOT to do that....any other suggestions?
A2GS       Dave...Matt?
WinkieJim  Only way I know, until someone creates a macro program that
           simulates mouse 
WinkieJim  movements to the event manager...
A2GS       Matt...Dave?
Dave Lyons There's no built-in shortcut for opening the Control Panel NDA,
           no.
WinkieJim  Well, I like keyboard equivalents for NDas...I wrote the only NDA
           that has
WinkieJim  a keyboard equivalent for it's menu item :) :) :)
AFA Gary J You could use CTRL-OA-ESC :)
A2GS       sorry won't cut it
Nuzz       How do you know someone else won't use that Key combo Jim
WinkieJim  Nuzz, I took a chance...the new version will have it selectable by
           the user. :)
Coach101   There is the OpenNDA call that looks like it would do it if.....
Coach101   you could come up with the idNum to pass it.  Does anyone know how
           to "safely" find the idNum?
AFL Dyfet  GA Matt
Matt DTS   Keyboard equivalents for NDA menu items aren't such a good idea -
           depending on the (unguaranteed)
Matt DTS   search order of MenuKey, either your NDA or the application's menu
           item that share key equivalents
Matt DTS   will never get to use it.  If it's yours, it's OK, but it's not OK
           to take the applications.  GA.
Coach101   Matt, can you safely run the menu manager's menu lists to find a
           particular NDAs idNum and
Coach101   then call OpenNDA?
A2GS       Is there any "safe" way to find out the ID assigned to the CP
           Nda?
Dave Lyons Coach, it's not guaranteed, but it's reasonably safe to call
           GetMItemName on 1, 2, 3... until you
Dave Lyons find the DA you're looking for.  It'll work.
Dave Lyons You may confuse some applications that way, though--it would be
           better to make
Dave Lyons the application think there was a mouse-down in the menu bar, and
           then make MenuSelect return that
Dave Lyons ID.   This way if the app does some housekeeping when it opens an
           NDA itself, it will still get
Dave Lyons to do it (not all apps let TaskMaster open DAs for them).
Coach101   So, then one could cause any NDA to come up by looping on
           GetMItenName till they find the one
Coach101   they wish to start and then do an OpenNDA with the resulting
           idNum?  We solved ?'s problem!
A2GS       how do we check whether we got the id for the CP?
Coach101   A2, remember Dave's caveats about confusing an applicatoin (but if
           its your application, where
Coach101   is the confusion), the Get... call will give you the menu name of
           the NDA (I think) so you just go 
Coach101   on looking until you hit the end (some sort of error return, I
           suppose) or get an equality on the
Coach101   name you are looking for.
Coach101   ga
AFL Dyfet  Okay, do we have anything else for tonight>
A2GS       thanx...will study the matter further