TweetFollow Us on Twitter

Code Tester
Volume Number:3
Issue Number:11
Column Tag:ABC's of Macintosh

Code Tester Shell for Pascal

By J. E. “Jeff” Fox, Houston, TX

Writing code for the Macintosh can be a very tedious process, unless you start with a shell program. The program in this example is designed to provide a simple shell supporting a window, menus, text edit and update events. You can select a desk accessory, move the window, zoom the window, and close the window. The window supports a text edit record and some quickdraw graphics, both of which are updated whenever the window is uncovered. The purpose of this shell program was to provide a simple working Macintosh program, which could then be used to test specific code examples. So I’ve called it Code Tester! The routines to be tested are placed in the TestStuff Unit. I’ve coded two routines called ‘theTest’, which displays some text edit message, and ‘theDrawing’, which draws some quickdraw stuff in color (if you have a Mac II). You can use this code tester shell to quickly test out procedures that will become a part of a larger Mac program, without having to re-invent the event loop programming of windows, events, menus and so forth. If you are new to Mac programming, this will also give you a good overview of how a Mac program is constructed. The black and white output of code tester is shown in figure 1.

This program was first written in TML Pascal using TML’s syntax of segmentation. The version presented here is written in LS Pascal using units instead of segments. It should be easily ported to either Turbo Pascal or back to TML Pascal. The program globals are placed in one unit, while the main program and the test unit make up the other two units.

LS Pascal 1.11 and the Macintosh II

The latest version of TML Pascal that I have is 2.2 which I used on this program. For LS Pascal, the latest version is 1.11 which is officially a ‘beta’. Think is distributing version 1.11 as a patcher program plus libraries that will automatically update your version 1.0 LS Pascal into the 1.11 version. This version runs on the Mac II and supports the new Mac II libraries. However, there are still problems in using the LS shell environment to run, debug and edit your programs. Apparently, not all of the system parameters required for a color video board on a Mac II are being properly reset and if you have your video set to 256 colors, you may find yourself crashing a lot when editing and running under the LS shell. Think is still trying to get all the bugs out of this. In black and white mode, this version seems very reliable on the Mac II.

Fig. 1 Text Edit, & Color Quickdraw (on a Mac II!)

Mac programs written in Pascal tend to have a very small main program. Find the end of the program listing ‘CodeTester’, and you’ll see our main program has only four items: PrimeMemory, MainSetUp, MainEventLoop and Close.

Does Anyone Understand Memory Management?

The first procedure called is Prime Memory. This routine is called first to do some memory management for us. A typical thing is to allocate additional master pointers and set up a grow zone proc in case we run out of memory. It is also possible to do some heap management such as calling MaxApplZone to grow the heap to the application limit. However, this might not be considered ‘MultiFinder friendly’ when we start dividing the heap into seperate application zones. As MultiFinder becomes available, and Inside Macintosh Volume 5 gets ‘debugged’ from all it’s errors, hopefully a more clear picture of how memory management is properly done will emerge. While I have not placed a grow zone proc in our program, an example is given here. A program’s grow zone function is called by the Memory manager when it needs a larger continuous chunk of memory then it has available. As usual though there are a couple of pitfalls here. I constructed this straight from IM and hope that I am correct. Memory management seems to be the most misunderstood of all Mac subjects and more information in this area would be welcome at MacTutor.

FUNCTION MyGrowZone(cbNeeded : Size) : LongInt;
Var
 AHandle : Handle;
Begin
 If NOT GZCritical Then
    MyGrowZone := 0 {don’t respond, post failure }
   ELSE
    Begin
        AHandle := GZSaveHnd;  { handle in danger? }
        If AHandle = NIL Then   {dump something }
          Begin
            SetFontLock(FALSE);
 (* Anything else *)
 MyGrowZone :=1;  {we freed some}
 End {AHandle = NIL}
 ELSE
 MyGrowZone := 0; 
 End;  {First Else, AHandle :=}
End;  

Another heap management routine that could be called in our ‘PrimeMemory’ routine is one to set the application heap limit. Again, under MultiFinder, this probably would not be desirable since MultiFinder is allocating each application it’s own heap space based on the size resource in the resource file. Also, this command seems to choke LS Pascal’s shell environment, so I have left it out of the code.

SetApplLimit(POINTER(ORD4(GetApplLimit)-4096));

What we are trying to do here is to add about 4k to the initial 8K stack size at start-up.

Then (Last but not least) we call MoreMasters. For EACH MoreMasters call we obtain 1 Master Ptr. block with 64 master pointers for the use of the program. All of our handles we declare in the program will use one of these master pointers.

Initializing the Macintosh Managers

Going back to the Main program, next comes ‘MainSetUp’, which collects all the init type calls. In the routine ‘Energize’ is the standard Macintosh inits for quickdraw, menus, fonts and so forth. One thing that is always handy is to place a pointer to a crash routine in the call to InitDialogs(). This will direct the Mac to your crash proc when the user hits the resume button during a system bomb. This could prevent damage from a system reset. In our program, our crash proc just returns to the Finder. Take a look at how the cursor is set up, course you don’t have to do it like this if you don’t want to. Here again just a convenience. Note the type coercion in the HLock call. HLock expects a HANDLE, not a CURSHANDLE. Watch (no pun) the spelling of curshandle. CursorHandle is wrong, and it’s real easy to do. Also watch out for ICN# NOT ICON# it can be a really frustrating experience (I’ve done it twice now sigh).

The other set up troutines are for a window, text edit, rectangles and menus. In our program, we have only two menus so this is pretty straight forward. The SetUpLimits routine is used to set our rectangles. Note here that we set the rectangle for our window in relation to the screenbit.bounds global variable. This variable is managed by Quickdraw and by referencing it, our window will open up to a size that is appropriate to whatever monitor our program is running on. All window manager rectangles should be defined in relation to screenbits.bounds so that they will be independent of the display being used. In setting up text edit, we define the view area for text edit in relation to the window’s port rectangle, then call TENew. This will associate a text edit record with this window. Note that the current grafport for quickdraw must be set to the window before TENew is called. This is so Text Edit can access the quickdraw globals for the text size, font, style and mode. In our program, we call SetUpWindow first, then call SetUpTE second, so everything is done in the right order.

The Main Event

The main event loop is of course, the heart of all Macintosh programs. Our event loop calls system task, idles the text edit cursor and gets an event. Under MultiFinder, you might want to replace GetNextEvent with WaitNextEvent if your program does not use null events. This will allow more time for MultiFinder to give to other applications that might be running in background during null events. Our program will process a mouse event, a menu key event, an activate/deactivate event and an update event. In our case, the activate event is trivial. All we do is call TEActivate, which sets the caret at the insertion point so it will blink when TEIdle is called. However, since we don’t have any typing implement in our keydown event, this isn’t of much interest.

The Mighty Update Event

Update events are the soul of the Macintosh. Mac guidelines suggest that all drawing on the Mac be done during an update event. The way this is done for text as an example, is to set up the text edit record and then invalidate an area of the screen. When the update event is generated, our update routine calls TEUpdate, and the text is automatically displayed. This is what we do in our ‘theText’ procedure. We don’t actually draw any text in the window. We just stuff it into our text edit record and invalidate the port rectangle of our window, generating an update event. But what about graphics? To update the graphics portion of our screen, we call our drawing routine. This requires that all drawing calls be stored so that they can collectively be called any time an update event takes place, re-drawing the display. This is where the Mac can get tricky when your drawing calls are user generated! In our update routine, we erase the port rectangle and re-draw the graphics by calling ‘theDrawing’ procedure. Note that we really are not erasing the whole window, nor does the whole window get re-drawn! When we call BeginUpdate, the visiRgn of the window is temporarily restricted to the update region so only the update region actually gets erased and re-drawn. After calling EndUpDate, the visiRgn is restored and the update region is left empty. The window manager is doing a lot of work behind the scenes during an update event.

Mouse Down Event

When we have a mousedown event, our event loop calls DealwithMouseDowns and here we find where the mouse event took place by calling FindWindow, and then we use a case statement to deal with each area a mouse can be in. If it is a menu bar click, we call our menu bar routines. If it is a click in a desk accessory or a window not belonging to us, then we call SystemClick, which passes the event on to the desk accessory. For a click in the content region of our window, we call SelectWindow to bring it to the front if it isn’t already. For the drag bar or the goaway box in the window frame, we have toolbox calls that allow us to drag the window or hide the window. Note that we do not close the window, since one of our menu bar routines allows us to show the window and draw in it and that might be a big difficult if we closed the window and released the window record. In fact it would bomb! So HideWindow is sufficient. For a zoom box click, we erase the port rectangle of the window and call ZoomWindow, which generates an update event, so the window contents will be re-drawn. See how important it is that all window drawing be re-producable during an update event? ZoomWindow is a relatively new routine described in Inside Macintosh, volume 4.

Our menu bar is pretty simple since it only has an apple menu and a file menu. Thus desk accessories are not properly supported, since there is no edit menu for them! However, desk accessories can be called if they can be used with just a mouse click. We call GetItem to find the name of the desk accessory, and then pass that name to OpenDeskAcc, which runs the da. To protect ourselves from sloppy da’s, we save our current grafport while the da is running.

If we select our ‘about ’ item in the Apple menu, the about dialog box comes up. One neat thing about the about box (did I really say that?) is it doesn’t have an “OK” Button. It was implemented by enabling the static text in the “R” file. What this means is that the text will be counted as an “ItemHit”. Clicking anywhere in the dialog box will result in closing the about box. Please note however that if you DO use a button, the Stat Text should be “Disabled” so an item hit won’t be reported. Rmaker assumes(theres that word again) that things are “Enabled” unless you tell it otherwise. The static text rectangle is defined to fill the entire about box, use carriage returns “\0D” and be sure that you have not disabled the text. Since Rmaker will enable it by default, when the user clicks you get an itemhit and dump the about box.

How To Make (or steal) Your Own Icon’s

First of all your going to need these programs (Tools).

The Easiest way is to launch ResEdit, then open a “New” window. Call the window anything you like, but don’t use the programs name you got it from, then go to a program and “Open” it.....

OK now open the ICN# resource. “Copy” it, then:

Paste it into your “New” window.

Close the Program you opened.

“Get Info” on your icon and set the ID to what you need, usually 128 for an application or 129 for it’s document. Modify the icon with the pencil to make what you want.

Close and save it.

Quit.

Now launch

Open the icon and choose “Decompile” and be sure to save the file.

Quit.

All Right !! You did it!

You now have one file containing your icon, which can be “Paste" into any Resource file and one file with a “Hard copy” of the Icon which you can use in a Rmaker .R file. Thats how Code Tester’s was done, my particular favorite way of doing it.

Don’t forget to launch Edit first and then the rsrc. doc since the decompiled icon file is not of type EDIT.

That’s all folks, may the mouse be with you.


PROGRAM CodeTester;
(* Version 1.1 *)
(* © CopyRight 1987 by J.E.Fox, for Mactutor™ *)
{I-}
USES
 ROM85, TestGlobals, TestStuff;

PROCEDURE crash;
BEGIN
 ExitToShell;
END;

PROCEDURE DoAbout;
 VAR
 MyAbout : DialogPtr;
 ItemHit : Integer;
BEGIN
 MyAbout := GetNewDialog(AboutId, NIL, Pointer(-1));
 ShowWindow(MyAbout);
 ModalDialog(NIL, ItemHit);
 CASE ItemHit OF
 1 : 
 DisposDialog(MyAbout);
 OTHERWISE
 BEGIN
 END;
 END;  (* Case of *)
END;  (* DoAbout *)

PROCEDURE ProcessMenu_in (CodeWord : longint);
 VAR
 Menu_No : integer;  {menu number selected}
 Item_No : integer;  {item in menu selected}
 Name : Str255;      {name holder for da or font}
 OpenDAResult : integer;
 TempPort : Grafptr; {protect against DA}
BEGIN
 IF CodeWord <> 0 THEN
 BEGIN {go ahead and process the command}
 Menu_No := HiWord(CodeWord); {get Hi word of...}
 Item_no := LoWord(CodeWord); {get Lo word of...}
 CASE Menu_No OF
 AppleMenu : 
 BEGIN
 CASE Item_No OF
 1 : 
 DoAbout;
 OTHERWISE
 BEGIN
 GetItem(AppleMHandle, Item_No, Name);
 GetPort(TempPort);
 OpenDAResult := OpenDeskAcc(Name);
 SetPort(TempPort);
 END;     (* Otherwise *)
 END         (* Case Item_No of *)
 END;        (* apple menu *)
 FileMenu : 
 BEGIN
 CASE Item_No OF
 1 : 
 theTest;
 2 : 
 BEGIN (* The dividing Line *)
 END;
 3 : 
 BEGIN
 SetCursor(Watch);
 Finished := True; (* quit *)
 END;
 END; (* Item_No of (File) *)
 END; (* file menu *)
 END; (* Case Menu_No of *)
 HiliteMenu(0);  (* unhilite after menu *)
 END; (* the If codeword <>0 *)
END; (* of ProcessMenu_in procedure *)

PROCEDURE DealwthMouseDowns (Event : EventRecord);
 VAR
 WindowPointedTo : WindowPtr;
 GlobalMouse, LocalMouse : Point;
 WindoLoc : integer;
 TempPort : GrafPtr;
BEGIN
GlobalMouse := Event.Where;
LocalMouse := GlobalMouse;
GlobalToLocal(LocalMouse);
WindoLoc := FindWindow(GlobalMouse, WindowPointedTo);
CASE WindoLoc OF
 inMenuBar : 
 ProcessMenu_in(MenuSelect(GlobalMouse));
 inSysWindow : 
 SystemClick(Event, WindowPointedTo);
 inContent : 
 BEGIN
 IF WindowPointedTo <> FrontWindow THEN
 BEGIN
 SelectWindow(WindowPointedTo);
 SetPort(WindowPointedTo);
 END;
 END; {InContent}
 inGrow : 
 BEGIN
 END;
 inDrag : 
 BEGIN
 DragWindow(WindowPointedTo, GlobalMouse, DragArea);
 END;
 inGoAway : 
 BEGIN
 IF TrackGoAway(WindowPointedTo, GlobalMouse) THEN
 HideWindow(WindowPointedTo);
 END;
 InZoomIn, InZoomOut : 
 BEGIN
 IF TrackBox(WindowPointedTo, GlobalMouse, WindoLoc) THEN
 BEGIN
 GetPort(TempPort);
 SetPort(WindowPointedTo);
 EraseRect(WindowPointedTo^.portRect);
 ZoomWindow(WindowPointedTo, WindoLoc, True);
 SetPort(TempPort);
 END;
 END;
 OTHERWISE
 BEGIN
 END;
 END;    (* CASE WindoLoc of *)
END;  (* DealwthMouseDowns *)

PROCEDURE DealwthKeyDowns (Event : EventRecord);
 VAR
 CharCode : char;
BEGIN
 CharCode := Chr(Event.message MOD 256);
 IF BitAnd(Event.modifiers, CmdKey) = CmdKey THEN
 ProcessMenu_in(MenuKey(CharCode));
END;

PROCEDURE Activate_DeActivate (Event : EventRecord);
 VAR
 TargetWindow : WindowPtr;
BEGIN
 TargetWindow := WindowPtr(Event.message);
 IF Odd(Event.modifiers) THEN
 BEGIN  (* then the window is becoming active *)
 SetPort(TargetWindow);
 TEActivate(JeffsText);
 END  (* If Odd *)
 ELSE
 BEGIN
 TEDeactivate(JeffsText);
 END;  (* Deactivate *)
END;  (* Activate_DeActivate *)

PROCEDURE DealwthUpdates (Event : EventRecord);
 VAR
 UpDateWindow, TempPort : WindowPtr;
BEGIN
 UpDateWindow := WindowPtr(Event.message);
 GetPort(TempPort);
 SetPort(UpDateWindow);
 BeginUpDate(UpDateWindow);
 EraseRect(UpDateWindow^.portRect);
 MoveHHi(handle(JeffsText));
 HLock(handle(JeffsText));
 TEUpdate(UpdateWindow^.portRect, JeffsText);
 theDrawing;  {update our graphics stuff}
 HUnlock(handle(JeffsText));
 EndUpDate(UpDateWindow);
 SetPort(TempPort);
END;

PROCEDURE MainEventLoop;
 VAR
 Event : EventRecord;
BEGIN
 REPEAT
 SystemTask;
 TEIdle(JeffsText);
 IF GetNextEvent(EveryEvent, Event) THEN
 CASE Event.what OF
 mouseDown : 
 DealwthMouseDowns(Event);
 KeyDown, AutoKey : 
 DealwthKeyDowns(Event);
 ActivateEvt : 
 Activate_DeActivate(Event);
 UpDateEvt : 
 DealwthUpdates(Event);
 OTHERWISE
 BEGIN
 END;
 END;(* of Case *)
 UNTIL Finished;
END;

PROCEDURE PrimeMemory;
BEGIN
 {MaxApplZone;  Grow Heap to Limit }
 MoreMasters;  (* Allot 5, 64 Mptr Blocks *)
 MoreMasters;
 MoreMasters;
 MoreMasters;
 MoreMasters;
END;

PROCEDURE Close;
 BEGIN
 END;

(* ŸŸŸ  Following are called by Set Up  ŸŸŸŸŸ *)

PROCEDURE Energize;
 VAR
 BeamH, WatchH : CursHandle;
BEGIN
 InitGraf(@thePort); (* Set up all Managers *)
 InitFonts;
 InitWindows;
 InitMenus;
 TEInit;
 InitDialogs(@crash);(* crash Proc to ‘Resume’ *)
 InitAllPacks;
 FlushEvents(everyEvent, 0);

 WatchH := GetCursor(watchCursor); {watchs Mptr addr stack}
 HLock(Handle(WatchH)); (* Note the type clash *)
 Watch := WatchH^^;(* DDeref and store *)
 SetCursor(Watch); (* Wrap 10 Mr. Sulu *)
 Finished := False;(* program terminator *)
END;

PROCEDURE SetupMenus;

BEGIN
 AppleMHandle := GetMenu(AppleMenu);
 InsertMenu(AppleMHandle, 0);
 FileMHandle := GetMenu(FileMenu);
 InsertMenu(FileMHandle, 0);
 AddResMenu(AppleMHandle, ‘DRVR’);

 MoveHHI(Handle(AppleMHandle));
 HLock(Handle(AppleMHandle));
 MoveHHI(handle(FileMHandle));
 HLock(Handle(FileMHandle));
 DrawMenuBar;
 END;

PROCEDURE SetupLimits;
BEGIN
 Screen := ScreenBits.Bounds;   {set the size of the screen}
 SetRect(DragArea, Screen.left + 4, Screen.top + 24, Screen.right - 4, 
Screen.bottom - 4);
 SetRect(GrowArea, Screen.left, Screen.top + 24, Screen.right, Screen.bottom);
 SetRect(WindowArea, Screen.left + 10, Screen.Top + 40, Screen.right 
- 200, Screen.bottom - 50);
END;

PROCEDURE SetUpWindow;
 VAR
 title : str255;
BEGIN
 title := ‘Code Tester’;
 JeffsWindow := NewWindow(NIL, WindowArea, title, FALSE, 8, pointer(-1), 
TRUE, 1);
 IF JeffsWindow = NIL THEN
 crash;
 SetPort(JeffsWindow);
 TextFont(applFont);
 TextSize(12);
 TextFace([]);
 TextMode(1);
END;

PROCEDURE SetUpTE;
BEGIN
 WITH JeffsWindow^.portRect DO
 BEGIN
  SetRect(ViewArea, left + 4, top + 4, right - 1, bottom - 1);
 END;
 DestArea := ViewArea;
 JeffsText := TENew(DestArea, ViewArea); 
 { must be done after setPort}
END;

PROCEDURE MainSetUp;
BEGIN
 Energize;
 SetupMenus;
 SetupLimits;
 SetUpWindow;  (* Save Room for windows if used *)
 SetUpTE;
 InitCursor; (* ready to go, show Arrow cursor *)
END;

(* ŸŸŸŸŸŸŸ Main Program ŸŸŸŸŸŸŸ *)

BEGIN
 PrimeMemory;
 MainSetUp;
 MainEventLoop;
 Close;
END.


UNIT TestGlobals;

INTERFACE

 USES
 ROM85;

 CONST
 AppleMenu = 256;(* Resourse ID’s *)
 FileMenu = 257;
 TestItem = 1;
 Quititem = 3;

 AboutId = 260;
 NoteId = 261;
 CautionId = 262;
 StopId = 263;

 DlogH = 100;    (* for SF Get & Put *)
 DlogV = 85;

 UntitledId = 300; (* Strings *)
 Saveit = 301;
 UndoIt = 302;

 VAR
 Finished : Boolean; (* terminate program *)
 Watch : Cursor; (* Cursors *)
 AppleMHandle, FileMHandle : MenuHandle;
 ResStr : Str255;
 ResStrHdl : StringHandle;
 Machine : integer;

 DragArea : Rect;     (* rectangles *)
 GrowArea : Rect;
 Screen : Rect;
 ViewArea, DestArea : Rect;
 WindowArea : Rect;

 JeffsText : TEHandle;
 JeffsWindow : WindowPtr;  (* ptr to window *)

IMPLEMENTATION

END.


UNIT TestStuff;

INTERFACE

 USES
 ROM85, TestGlobals;

 PROCEDURE theTest;
 PROCEDURE theDrawing;

IMPLEMENTATION

PROCEDURE theTest;
 VAR
 str0, str1, str2 : str255;
BEGIN
 str0 := chr(13);
 SysBeep(1);(* for now *)
 ShowWindow(JeffsWindow);
 ForeColor(blackColor);
 str1 := ‘This is a Test!’;
 str2 := ‘Put your test code here ’;
 TESetSelect(0, 0, JeffsText);
  TESetText(pointer(ORD(@str1) + 1), length(str1), JeffsText);
 TEInsert(pointer(ORD(@str0) + 1), 1, JeffsText);
 TEInsert(pointer(ORD(@str2) + 1), length(str2), JeffsText);
 InvalRect(JeffsWindow^.portRect);
END;

PROCEDURE theDrawing;
 VAR
 r : rect;
BEGIN
 PenSize(3, 3);
 PenMode(patCopy);
 PenPat(black);
 ForeColor(redColor);
 BackColor(whiteColor);
 MoveTo(40, 20);
 SetRect(r, 40, 40, 80, 100);
 FrameRect(r);
 OffsetRect(r, 10, 10);
 FrameRect(r);
 ForeColor(blueColor);
 OffsetRect(r, 10, 10);
 FrameRect(r);
 OffsetRect(r, 10, 10);
 FrameRect(r);
 ForeColor(yellowColor);
 SetRect(r, 20, 130, 100, 180);
 FillOval(r, dkGray);
 OffsetRect(r, 15, 15);
 ForeColor(greenColor);
 FillOval(r, gray);
 OffsetRect(r, 15, 15);
 ForeColor(cyanColor);
 FillOval(r, black);
 OffsetRect(r, 15, 15);
 ForeColor(magentaColor);
 FillOval(r, ltGray);
 ForeColor(blackColor);
END;

END.


* Code Tester.R resources
* by Jeff Fox
*
Testor.RSRC
????????

Type COTE = STR 
  ,0    ;;0 by convention
J. E. (JEFF) Fox   Ver. 1.1  8 Feb. 1987 \A9 J.E.Fox .

Type BNDL
  ,128
  COTE  0
  ICN# 1
  0 128  1 129
  FREF 2
  0 128  1 129

Type FREF
  ,128
  APPL  0 ;; local id 0 for icon list
  ,129 
  TEXT 1;;Doc’s File Type, Local id 1 for icon list 
  
* ------ Multifinder --------
 
Type SIZE = GNRL
 ,-1
.I
16384 ;; $4000 = bit 14 set
.L
223232  ;; 250K less 32K =220K (for 250K recomended)
.L
172032  ;; 200K less 32K = 120K (for 200K minimum)

Type ICN# = GNRL
  ,128 (4)  ;; The Appl. Icon
.H
FFFFFFFF C0000003 BFFFFFFD A0000005
A0000005 A0000005 A0000005 A0000005
A0000005 A3FC3FC5 A0402005 A0402005
A0402005 A0402005 A0402005 A0402005
A0403E05 A0402005 A0402005 A0402005
A0402005 A0402005 A0402005 A0403F85
A0000005 A0000005 A0000005 A0000005
A0000005 BFFFFFFD C0000003 FFFFFFFF
*
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF

  ,129      ;; The Doc Icon
.H
0FFFFC00 08000600 08000500 08000480
0FE00440 09000420 090007F0 091F0010
09100010 09100010 091C0010 09100010
08100010 08100010 081F0010 08000010
08007C10 08004010 08004010 08007010
08004010 08004010 08004010 08004010
08000010 08EEBDD0 08000010 08000390
09AE7010 08000010 08000010 0FFFFFF0
*
0FFFFC00 0FFFFE00 0FFFFF00 0FFFFF80
0FFFFFC0 0FFFFFE0 0FFFFFF0 0FFFFFF0
0FFFFFF0 0FFFFFF0 0FFFFFF0 0FFFFFF0
0FFFFFF0 0FFFFFF0 0FFFFFF0 0FFFFFF0
0FFFFFF0 0FFFFFF0 0FFFFFF0 0FFFFFF0
0FFFFFF0 0FFFFFF0 0FFFFFF0 0FFFFFF0
0FFFFFF0 0FFFFFF0 0FFFFFF0 0FFFFFF0
0FFFFFF0 0FFFFFF0 0FFFFFF0 0FFFFFF0

*  ---------- MENUS ------------

Type MENU        
* the apple menu
  ,256
\14
About Code Tester...
(-

Type MENU
* the file menu
  ,257
File
  Run the Test/R
  (-
  Quit/Q

* ---- Dialogs --------
Type DLOG ;; About Box
    ,260 (4);; Purgeable
Mikey Likes it !!;; Title String
60 110 195 430   ;; H,V, Global
Visible  NoGoAway 
3
0
270

* ------ Alerts ------
Type ALRT
   ,261 (4) ;; Note Alert #1 in List
   100 100 200 400
   271
   F764
   
Type ALRT          
   ,262   ;; Caution Alert #2 in List
   100 100 200 400
   272
   F765

Type ALRT     
   ,263   ;; Stop Alert #3 in List
   100 100 200 400
   273
   F765

* ------ Dialog Items --------
Type DITL
    ,270  (4)    ;; AboutBox, Purgeable
1;; # of Items

*1 Static Text Items MUST be DISABLED 
*Other wise mouse clicks reported for Text item.
StatText
2 2 170 410 ;; H,V, Local, Zero ‘D’ not ‘OD’.
Code Test Version 1.1\0D\0D++
For Run Time tests of code\0D\0D++
\A9 1987 by J. E. (Jeff) Fox, for Mactutor™\0D\0D++
    All Rights Reserved

Type DITL
    ,271  (4)    ;; Note Alert
2;; # of Items

*1
BtnItem
12 175 32 270
OK

*2
Stat Disable
50 10 190 390
^0

Type DITL
    ,272 (4);; Caution Alert
3;; # of Items

*1
BtnItem
12 175 32 280
Okay with me

*2
BtnItem
43 175 62 280
Forget it

*3
Stat Disable
50 10 190 390
^0

Type DITL
  ,273  (4) ;; Error, Stop Alert
2;; # of Items

*1
BtnItem
12 175 32 295
EXIT To Finder

*2
Stat Disable
50 10 190 390
^0

*  ---- Strings ----------

Type STR 
  ,300 (4);; For the window, If needed
   UnTitled
  
  ,301 (4)
   Mikey Likes it 
   
  ,302 (4)
   What the &%$$$?
 
AAPL
$524.94
Apple Inc.
+5.93
MSFT
$40.01
Microsoft Corpora
-0.39
GOOG
$536.10
Google Inc.
-20.44

MacTech Search:
Community Search:

Software Updates via MacUpdate

Mac DVDRipper Pro 4.1.7 - Copy, backup,...
Mac DVDRipper Pro is the DVD backup solution that lets you protect your DVDs from scratches, save your batteries by reading your movies from your hard disk, manage your collection with just a few... Read more
PDFpenPro 6.2 - Advanced PDF toolkit for...
PDFpenPro allows users to edit PDF's easily. Add text, images and signatures. Fill out PDF forms. Merge or split PDF documents. Reorder and delete pages. Even correct text and edit graphics! Create... Read more
PDFpen 6.2 - Edit and annotate PDFs with...
PDFpen allows users to easily edit PDF's. Add text, images and signatures. Fill out PDF forms. Merge or split PDF documents. Reorder and delete pages. Even correct text and edit graphics! Features... Read more
Monolingual 1.5.9 - Remove unwanted OS X...
Monolingual is a program for removing unnecesary language resources from OS X, in order to reclaim several hundred megabytes of disk space. It requires a 64-bit capable Intel-based Mac and at least... Read more
Maya 2015 - Professional 3D modeling and...
Maya is an award-winning software and powerful, integrated 3D modeling, animation, visual effects, and rendering solution. Because Maya is based on an open architecture, all your work can be scripted... Read more
Starcraft II: Wings of Liberty 1.1.1.180...
Download the patch by launching the Starcraft II game and downloading it through the Battle.net connection within the app. Starcraft II: Wings of Liberty is a strategy game played in real-time. You... Read more
Sibelius 7.5.0 - Music notation solution...
Sibelius is the world's best-selling music notation software for Mac. It is as intuitive to use as a pen, yet so powerful that it does most things in less than the blink of an eye. The demo includes... Read more
Typinator 5.9 - Speedy and reliable text...
Typinator turbo-charges your typing productivity. Type a little. Typinator does the rest. We've all faced projects that require repetitive typing tasks. With Typinator, you can store commonly used... Read more
MYStuff Pro 2.0.16 - Create inventories...
MYStuff Pro is the most flexible way to create detail-rich inventories for your home or small business. Add items to MYStuff by dragging and dropping existing information, uploading new images, or... Read more
TurboTax 2013.r17.002 - Manage your 2013...
TurboTax guides you through your tax return step by step, does all the calculations, and checks your return for errors and overlooked deductions. It lets you file your return electronically to get... Read more

Latest Forum Discussions

See All

Where's My Water? Featuring XYY (G...
Where's My Water? Featuring XYY 1.0 Device: iOS Universal Category: Games Price: $.99, Version: 1.0 (iTunes) Description: iPod Touch 4th Gen, iPhone 3GS or iPad 1 are not compatible with this app. | Read more »
The Amazing Spider-Man 2 (Games)
The Amazing Spider-Man 2 1.0.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.0 (iTunes) Description: *IMPORTANT* The Amazing Spider-Man 2 requires an iPad 2 (or newer), iPhone 4s (or newer), or iPod touch 5th... | Read more »
Living Planet - Tiny Planet Videos and P...
Living Planet - Tiny Planet Videos and Photos 1.0 Device: iOS Universal Category: Photography Price: $.99, Version: 1.0 (iTunes) Description: 50% OFF LAUNCH SPECIAL! BUY NOW BEFORE THE PRICE GOES UP... | Read more »
Livescribe 3 Smartpen Review
Made by: Livescribe Price: $149.99 for Livescribe 3 Hardware/iOS Integration Rating: 4.5 out of 5 stars Usability Rating: 4 out of 5 stars Reuse Value Rating: 4.75 out of 5 stars Build Quality Rating: 4.5 out of 5 stars Overall Rating: 4.44 out of... | Read more »
Unpossible Review
Unpossible Review By Carter Dotson on April 17th, 2014 Our Rating: :: RALPH WIGGUM APPROVESUniversal App - Designed for iPhone and iPad Unpossible is much better than its English!   | Read more »
Hitman GO Review
Hitman GO Review By Carter Dotson on April 17th, 2014 Our Rating: :: GO HITMAN, GO!Universal App - Designed for iPhone and iPad Hitman GO is not the obvious way to do a mobile version of the Hitman series, but it’s an incredibly... | Read more »
Monster High Ghouls and Jewels is a Frea...
Monster High Ghouls and Jewels is a Freaky Fashion-Forward Match-3 Puzzler Posted by Rob Rich on April 17th, 2014 [ permalink ] | Read more »
Dinosaur Train A to Z Review
Dinosaur Train A to Z Review By Amy Solomon on April 17th, 2014 Our Rating: :: DINO DETAILSUniversal App - Designed for iPhone and iPad Dinosaur Train A to Z is an educational app about dinosaurs that includes In-App Purchases... | Read more »
Easter Comes to Junk Jack X – Bringing N...
Easter Comes to Junk Jack X – Bringing New Crafts, Chemistry, and More Posted by Rob Rich on April 17th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Call of Cookie Review
Call of Cookie Review By Jordan Minor on April 17th, 2014 Our Rating: :: COOKIE CRUMBLESUniversal App - Designed for iPhone and iPad Call of Cookie proves that plants aren’t the only fighting foods out there.   | Read more »

Price Scanner via MacPrices.net

Apple restocks refurbished Mac minis starting...
The Apple Store has restocked Apple Certified Refurbished Mac minis for up to $150 off the cost of new models. Apple’s one-year warranty is included with each mini, and shipping is free: - 2.5GHz Mac... Read more
Hyundai Brings Apple CarPlay To The 2015 Sona...
Hyundai Motor America has announced it will bring Apple CarPlay functionality to the 2015 Sonata. CarPlay is pitched as a smarter, safer and easier way to use iPhone in the car and gives iPhone users... Read more
Updated iPads Coming Sooner Than We Had Thoug...
MacRumors, cites KGI securities analyst Ming Chi Kuo, well-respected as an Apple product prognisticator, saying that Apple will introduce an upgraded iPad Air and iPad mini in 2014/Q3, meaning the... Read more
Toshiba Unveils New High And Low End Laptop M...
Toshiba has announced new laptop models covering both the high-end and low-end of the notebook computer spectrum. Toshiba 4K Ultra HD Laptop Toshiba’s new Satellite P55t features one of the world’s... Read more
Save up to $270 with Apple refurbished 13-inc...
The Apple Store has Apple Certified Refurbished October 2013 13″ Retina MacBook Pros available starting at $1099, with models up to $270 off MSRP. Apple’s one-year warranty is standard, and shipping... Read more
Apple now offering refurbished iPad mini with...
The Apple Store has Certified Refurbished 2nd generation iPad minis with Retina Displays now available starting at $339. Apple’s one-year warranty is included with each model, and shipping is free.... Read more
Microsoft Blinks – Drops Microsoft Office 365...
Microsoft has dropped the annual subscription fee for Microsoft Office 365 Personal – which is needed in order to create and edit documents in Microsoft Office for iPad. However, Apple’s iOS and OS X... Read more
New AVG Vault Apps for iOS and Android Help K...
AVG Technologies N.V. an online security company for 177 million active users, has announced the launch of its latest mobile application, AVG Vault. The free app introduces an innovative user... Read more
Free Local Carrot iPhone App Helps Find Fresh...
I love fresh vegetables. I’m not a vegan, although I was for several years in the 1980s, but fresh vegetables and other whole foods are still my dietary mainstays as a matter of taste rather than... Read more
CarSO Pro – Car Service and Finance Manager/O...
Lviv, Ukraine-based BM-Studios’ CarSO Pro is a tool to manage operations concerning your car. Never forget to change the oil or prolong the insurance for your car. Remember when you’ve done the car... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Retail - Manager - Holyoke - Apple I...
Job Summary Keeping an Apple Store thriving requires a diverse set of leadership skills, and as a Manager, you’re a master of them all. In the store’s fast-paced, Read more
*Apple* Retail - Manager - Apple (United Sta...
Job SummaryKeeping an Apple Store thriving requires a diverse set of leadership skills, and as a Manager, you're a master of them all. In the store's fast-paced, dynamic Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Retail - Market Leader - Cincinnati...
…challenges of developing individuals, building teams, and affecting growth across Apple Stores. You demonstrate successful leadership ability - focusing on excellence Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.