TweetFollow Us on Twitter

Forth Edit Task
Volume Number:2
Issue Number:11
Column Tag:Forth Forum

An Edit Task for Forth

By Jörg Langowski, MacTutor Editorial Board, Juri Munkki, Helsinki, Finland

An Editor Task For Mach2

By Juri Munkki, with Jörg Langowski

[Since this column is the Forth Forum, we must give others space for contributions. This month we received an article by one of our readers, Juri Munkki from Helsinki, who devised a rather practical text editor to run under Forth. Evidently they lack a desk accessory editor like MockPackage+ which will run with HFS. With the multi-tasking Mach2, an editor task helps a lot in developing programs; I had the same problems as Juri trying to use Edit 2.0 in connection with Mach2. Mach2 and Edit just don't want to run together under Switcher - even with the cache switched off - on a Mac Plus. Also, Edit is overkill for Forth development since individual program pieces tend to be rather short.

The 32K text size limitation for this editor is therefore no big drawback; in fact, it is more than the 28K of MockWrite. Read the code carefully for some interesting additions to Mach2, like ON, OFF, ANEW, scrap handling words, an on-window palette menu and auto-indentation on text entry.

Enough of a foreword, I'll pass the keyboard to Juri now. J.L.]

Editing a Problem in Mach 2

Mach 2 is a great language, but it certainly has some flaws. The first one that every programmer confronts is the lack of an integrated editor.

Palo Alto Shipping suggests that Edit and Forth are used with Switcher, but I don't like Edit and and it takes most of my 512K Mac's memory to hold Mach I, Edit and Switcher. The first thing that came to my mind was MockWrite. MockWrite is a very good text editor DA, but the versions everybody have here in Finland trash files under HFS. (I had a lot of fun finding that out.)

I didn't know of any other DA editors when I got Mach I, so I thought writing a small editor would not take too much time.

I still had to find a working combination in order to be able to write the editor. The best solution I found, was to use Edit and Mach without the Switcher. In Edit, I could use "Other" to launch Forth and in Mach, I used an FKEY to launch Edit. I modified the menu in Edit so that I could switch programs with a command key combination. With the cache on, it wasn't unbearably slow, but it wasn't very interactive.

I have done most of my Macintosh programming in MacForth because it was the first good language available. Mach I is different, but learning it was easy since the manual is good and I already knew the toolbox. I wouldn't recommend Mach I to a beginner, but it is very good as a second language. I still miss many of the nice little commands that MacForth has.

I extended Mach I with some MacForth words that I thought would be useful. Anew was probably the most important. In.Heap would also have been nice, but HeapVar was the best I could do with my knowledge of Forth. Heapvar is used to return the heap space that is pointed to by the handle in a variable. I also added RECT, !RECT, ON and OFF. On and Off are very simple, but they make code much more readable and speed up programs.

Example of "HeapVar":

HeapVar A.Variable
Anew MyProgram
Variable A.Variable
 
100 Call NewHandle Drop A.Variable !
 

The editor uses the ROM TextEdit engine and is thus limited to a maximum of 64K of text or 32767 lines. I have limited the editor to 32K of text in order to avoid checking for the maximum amount of lines. The commented source code of TEDDY is about 25K. This limits the amount of source code to 32K, but code segments are not allowed to be larger than 32K.

Teddy is not the first Editor I have written. I wrote a similar program in MacForth when I thought it would be a nice addition to my terminal program. The MacForth version of Teddy is even simpler than MachTeddy, but the experience helped me avoid some bugs and problems.

The program conforms closely to the Macintosh user interface guidelines. The only nonstandard thing I can think of is the lack of an I-beam cursor. I forgot the cursor at first, but when I thought of it, it no longer seemed worth adding. This is a programmer's tool, after all. My MacForth Teddy has an I-Beam cursor, since it is used by non-programmers who expect it.

The comments in the program demonstrate the things that have been less documented in MacTutor. Scrap handling is heavily documented because the program does it 100% according to Inside Macintosh and it has not been discussed in MacTutor. Inside Macintosh gives very specific rules on scrap management.

The scrap is usually held in two places. The desk accessories expect it to be in the desk scrap and every program usually has its own clipboard format. Text Edit has two global variables to handle the clipboard. The TE-scrap must be converted to the global scrap after a cut or paste has been made.

Teddy avoids useless scrap conversion. If a program first converts the scrap to text and then puts it back without a change, all others' formats are lost. Consider a situation where a user has three programs under Switcher and two of these understand pictures. If a picture is copied and then the user switches to the other program, by first switching to the text application, the text application should not delete the picture just because it doesn't like pictures. Destroy the desk scrap only when you have to change it!

Teddy keeps a flag to monitor changes in the text edit scrap. If a cut or copy is made, the flag is set and the scrap will be converted when the window is deactivated. Desk scrap is always moved to the text edit scrap if the editor window is activated.

Menus are a very good invention, but sometimes a palette on a window is easier and faster to use. My first experiment with palettes was with the MacForth version of Teddy. I have used them since then on many of my programs. It would be very easy to add keyboard equivalents to these functions, but Teddy has none. A palette is very simple to implement: it is a collection of boxes that act like buttons. I first tried to use a collection of buttons, but a button takes too much space.

Teddy scrolls automatically if the user tries to type outside the screen. The selection range is used to determine if the screen should be scrolled. Cursor keys work well, because the person who wrote Text Edit was clever enough to implement them.

Clickloop procedures are very hard to do in Forth, so I wrote the scroll routine in assembler. The clickloop routine changes the setting of the scroll bar, but the changes are not drawn during the scrolling because Text Edit sets the clipping rectangle to the text edit view rectangle. If you want to be able to monitor the selection from the scroll bar, insert a few toolbox calls to change the clipping rectangle.

The Macintosh File Manager is easy to use (once you figure out how), but requires a large amount of initialization. I haven't figured how to use the Mach 2 file system, so it wasn't really hard to write the routines in "pure toolbox" instead of Forth. Note that HFS is supported simply by using the volrefnum from the sfreply and putting it in the parmblock. The current (last used) filename and volrefnum are remembered for later use. Loading and saving stop multitasking.

The "Enter" key is useless in MacWrite, but in this editor it provides an indenting alternative to the "Return" key. You might want to switch the meaning of return and enter. Enter looks at the line you are on, adds a return and a few spaces to align the new line with the previous line. Tab generates four spaces.

When I write programs, I use a workspace that contains Teddy and some extensions. The resources (DLOG, ALRT, DITL, PICT) are in the Mach 2 file because that way they aren't deleted when the workspace is updated. Teddy should be snapshotted before it is called, or the workspace will not work.

Teddy might serve as a basis for creating more specialized editors. You may use this source code in any program you write, but it would be nice to mention me in the "About" dialog.

I usually edit a program, save it and load it from a file because this forces me to make constant backups to the disk. Even a very small cache is enough to keep the file in RAM and compiling is just as fast as compiling from the clipboard.

Let's program!

Installation Notes - J.L.

To install the editor in your Mach2 (or Mach1) system, you should create a Workspace immediately after loading the file by either saying workspace ted or new-segment ted (the latter leaving a full 32K of code space after the editor has been invoked). Make sure the workspace file is on the same disk as the copy of Mach2 that it is run with, otherwise the workspace won't work.

You can then, as usual, click the workspace icon and call the editor from within Mach by typing ted. The resources used by the editor should be in the Mach file (see above). Listing 2 shows an Rmaker input to create those resources, which can then be pasted with ResEdit. The PICT ID=900 is not printed here. However, it is on the resource file Teddy.rsrc on our source code disk. I'd recommend you to get that disk anyway instead of typing in all the code.

Listing 1: Teddy, A Text Editor Task for Mach1.
( Teddy -- Text Editor )

( Contains MacForth-like extensions to Mach I in addition to
 the editor. Type TED to call the editor at any time. The 
 MacForth-style extensions are mostly undocumented here.
 Look for examples in this source. )

( Anew:
  Used in the form: ANEW PROGRAM_NAME. It tries to find the
 PROGRAM_NAME and forget it if it is found. It then creates
 PROGRAM_NAME and continues. It should be used in the
 beginning of the program. Old versions are then automatically
 forgotten, if they exist. )

ONLY FORTH DEFINITIONS 
ALSO MAC ALSO ASSEMBLER

: ANEW { | LEN }
  32 WORD DUP C@ 1+ NEGATE -> LEN
  FIND SWAP DROP
   IF LEN >IN +! FORGET CALL DRAWMENUBAR THEN
 LEN >IN +!
CREATE DOES> DROP
;

( Heapvar:
 Used in the form: HEAPVAR VARIABLE_NAME. If
 VARIABLE_NAME exists, it returns the handle from
 VARIABLE_NAME to the heap. It should be used before
 ANEW to free space from the heap. )

: HEAPVAR
  32 WORD
  FIND IF LINK>BODY EXECUTE 
     @ DUP 
     IF DUP CALL HUNLOCK DROP
            CALL DISPOSHANDLE DROP ELSE DROP THEN
     ELSE DROP
   THEN
;

: RECT  
  CREATE  SWAP 2SWAP SWAP   W, W, W, W,
;

GLOBAL
 CODE !RECT
    MOVE.L    (A6)+,A0
    MOVE.W    14(A6),(A0)+
    MOVE.W    10(A6),(A0)+
    MOVE.W     6(A6),(A0)+
    MOVE.W     2(A6),(A0)+
    ADDA.L    #16,A6
    RTS
END-CODE

GLOBAL
 CODE OFF
    MOVEA.L   (A6)+,A0
    CLR.L    (A0)
    RTS
END-CODE
MACH

GLOBAL
 CODE ON
    MOVEA.L   (A6)+,A0
    MOVE.L    #-1,(A0)
    RTS
END-CODE

GLOBAL
 CODE SCALE
    MOVE.L   (A6)+,D0
    BMI.S    @1
    MOVE.L   (A6),D1
    ASL.L    D0,D1
    MOVE.L   D1,(A6)
    RTS
@1  MOVE.L   (A6),D1
    NEG.L    D0
    ASR.L    D0,D1
    MOVE.L   D1,(A6)
    RTS
END-CODE

GLOBAL
 CODE @MOUSE
    SUBQ.L    #4,A6
    MOVE.L    A6,-(A7)
    _GETMOUSE
    RTS
END-CODE

HEADER TEDDY.W2 DC.L    0
HEADER TEDDY.T2 DC.L    0
HEADER TEDDY.S2 DC.L    0
 CODE CLICKPROC
    MOVEM.L   D1-D3/A0-A4,-(A7)
    CLR.L     -(A7)
    MOVE.L    A7,-(A7)
    _GETMOUSE            ( Where is the mouse cursor? )
    MOVE.L    (A7)+,D0
    SWAP.W    D0         ( Get the Y-location to D0.W  )
    CMP.W     #18,D0     ( Is Mouse.Y smaller than 18? )
    BLT.S     @1
    MOVE.L    TEDDY.W2,A0
    MOVE.W    20(A0),D1
    SUB.W     #16,D1
    CMP.W     D1,D0      ( Is Mouse.Y below the text? )
    BGE.S     @2
@4  MOVEM.L   (A7)+,D1-D3/A0-A4
    MOVEQ.L   #1,D0
@3  RTS

@1  CLR.W     -(A7)      ( Are we allowed to scroll down? )
    MOVE.L    TEDDY.S2,-(A7)
    _GETCTLVALUE
    MOVE.W    (A7)+,D0
    BEQ.S     @4         ( If we are on top, do nothing )
    SUBQ.W    #1,D0      ( Scroll one line up )
    MOVE.L    TEDDY.S2,-(A7)
    MOVE.W    D0,-(A7)
    _SETCTLVALUE
    CLR.W     -(A7)
    MOVE.W    #11,-(A7)  ( One line = 11 pixels )
    MOVE.L    TEDDY.T2,-(A7)
    _TESCROLL            ( Scroll the text )
    MOVEM.L   (A7)+,D1-D3/A0-A4
    MOVEQ.L   #1,D0
    RTS
    
@2  CLR.W     -(A7)
    MOVE.L    TEDDY.S2,-(A7)
    _GETCTLVALUE         ( Where are we? )
    MOVE.W    (A7)+,D3
    CLR.W     -(A7)
    MOVE.L    TEDDY.S2,-(A7)
    _GETMAXCTL           ( How high can we go? )
    MOVE.W    (A7)+,D0
    CMP.W     D0,D3
    BGE.S     @4
    ADDQ.W    #1,D3      ( Scroll one line... )
    MOVE.L    TEDDY.S2,-(A7)
    MOVE.W    D3,-(A7)
    _SETCTLVALUE
    CLR.W     -(A7)
    MOVE.W    #-11,-(A7)
    MOVE.L    TEDDY.T2,-(A7)
    _TESCROLL
    MOVEM.L   (A7)+,D1-D3/A0-A4
    MOVEQ.L   #1,D0
    RTS
END-CODE

( The following routine is quite simple. All it does is search a string 
for another one ignoring case and it returns the offset or a flag. )

CODE FINDER   
 ( ?STR ?LEN SEARCHSTR SEARCHLEN -- OFFSET )
    MOVEM.L   D0-D7/A0-A4,-(A7)
    MOVE.L    (A6)+,D0
    MOVE.L    (A6)+,A0
    MOVE.L    (A6)+,D1
    MOVE.L    (A6)+,A1
    MOVE.W    D0,D2
    SUB.W     D1,D2
    CLR.L     D7
@1  CLR.W     D3
@2  MOVE.B    0(A0,D3.W),D4
    BMI.S     @3
    CMP.B     #96,D4
    BLT.S     @3
    SUB.B     #32,D4   ( Remove case )
@3  MOVE.B    0(A1,D3.W),D5
    BMI.S     @4
    CMP.B     #96,D5
    BLT.S     @4
    SUB.B     #32,D5   ( Remove case )
@4  CMP.B     D4,D5    ( Is a char equal to another? )
    BNE.S     @5
    ADDQ.W    #1,D3    ( It was, one match )
    CMP.W     D1,D3    ( Have we found the string? )
    BLT.S     @2
    MOVE.L    D7,-(A6)
    MOVEM.L   (A7)+,D0-D7/A0-A4
    RTS

@5  ADDQ.L    #1,A0    ( No match...yet )
    ADDQ.L    #1,D7
    DBRA      D2,@1    ( Look again? )
    MOVE.L    #-1,-(A6) ( No match...return -1 )
    MOVEM.L   (A7)+,D0-D7/A0-A4
    RTS
END-CODE

( 4ASCII nnnn converts the 4 character string into its numeric
 value. It can only be used in the immediate mode. Examples
 below )

: 4ASCII 
 0
4 0 DO
  8 SCALE 0 WORD 1+ C@ + 
LOOP
;

ONLY FORTH ALSO MAC
4ASCII TEXT CONSTANT "TEXT
4ASCII DRVR CONSTANT DRIVER
4ASCII MACA CONSTANT "MACA
  HEX AB0 CONSTANT TESCRAP.LEN  
 ( Global TeEdit private scrap variables )
            AB4 CONSTANT TESCRAP.HANDLE DECIMAL


                   NEW.WINDOW TEDDY.W
               " Text Editor" TEDDY.W TITLE
                 50 0 304 480 TEDDY.W BOUNDS
ZOOM VISIBLE CLOSEBOX GROWBOX TEDDY.W ITEMS

            400 4000 TERMINAL TEDDY.TASK

NEW.MBAR TEDDY.BAR

900 CONSTANT APPLEID
NEW.MENU APPLEMENU
    HERE 1 C, 20 C, APPLEMENU TITLE
" About Edit...;(-" APPLEMENU ITEMS   ( Add DAs later )
          0 APPLEID APPLEMENU BOUNDS
        
               901 CONSTANT TFILEID
                   NEW.MENU TFILE
                    " File" TFILE TITLE
" Open/O;Save/S;Save as..." TFILE ITEMS
                  0 TFILEID TFILE BOUNDS

           902 CONSTANT TEDITID
               NEW.MENU TEDITMENU
                " Edit" TEDITMENU TITLE
" Cut/X;Copy/C;Paste/V;Select All & Copy;-(;Find/F;Again/G("
                        TEDITMENU ITEMS
              0 TEDITID TEDITMENU BOUNDS
              
: ADD.DRVRS ( Add desk accessories )
 APPLEMENU @ DRIVER CALL ADDRESMENU
;

             NEW.CONTROL TEDDY.SB
VSCROLLBAR VISIBLE 100 0 TEDDY.SB ITEMS

: DAHANDLER { ITEM | Daname }
 ITEM 2 > IF                 ( We must open a desk accessory )
     256 CALL NEWPTR -> DANAME    
 ( Get us a STR255 for the name )
     APPLEMENU @ ITEM DANAME CALL GETITEM
     DANAME CALL OPENDESKACC DROP 
 ( Open the desk accessory )
     DANAME CALL DISPOSPTR        ( Give the String back )
     ELSE
     ITEM 1 = 
( The about edit alert should be shown. The resource must
  be added separately to Mach 2. )
       IF 900 0 CALL ALERT DROP  THEN THEN
;
HEX  44 CONSTANT txFont ( Offsets in a window record )
     46 CONSTANT txFace
     48 CONSTANT txMode
     4A CONSTANT txSize
     6C CONSTANT WindowKind DECIMAL

VARIABLE TEDDY.T     ( PLACEHOLDER FOR TEXT HANDLE )
VARIABLE ACTIVE?     ( ACTIVE FLAG                 )
VARIABLE MUSTCONVERT ( SCRAP CONVERSION FLAG       )
 20 CONSTANT UPARROW ( Part codes )
 21 CONSTANT DOWNARROW
 22 CONSTANT PAGEUP
 23 CONSTANT PAGEDOWN
129 CONSTANT THUMB
 
VARIABLE CURMAX     ( Current scroll bar range   )
VARIABLE CURSET     ( Current scroll bar setting )
: CORRECT.CONTROL.RANGE
 CURMAX @ TEDDY.T @ @ 94 + W@ 1- 0 MAX DUP CURMAX !
   = NOT
  IF TEDDY.SB @ CURMAX @ CALL SETMAXCTL THEN
;
: CORRECT.CONTROL   ( Set scroll bar )
 CURSET @ ( Look at the destination RECT for the position )
 18 TEDDY.T @ @ W@ L_EXT - 11 / DUP CURSET ! = NOT
 IF TEDDY.SB @ CURSET @ CALL SETCTLVALUE THEN
;
: TOO.HIGH.TEDDY    ( Autoscroll, when typing )
 0 TEDDY.W 20 + W@ 40 - TEDDY.T @ @ 
 16 + W@ L_EXT - DUP 11 MOD -
 ?DUP IF ( If tescroll is called with 0 0, the caret disappears! )
 TEDDY.T @ CALL TESCROLL
  ELSE DROP THEN
 CORRECT.CONTROL
;
: TOO.LOW.TEDDY   ( Autoscroll, when typing )
 0 29 TEDDY.T @ @ 16 + W@ L_EXT - DUP 11 MOD - 
 TEDDY.T @ CALL TESCROLL
 CORRECT.CONTROL
;
: CORRECTSCROLL 
 ( If the user is typing, check if we should scroll. )
 TEDDY.T @ @ 32 + DUP W@ SWAP 2+ W@ = 
 ( Do we have a caret? )
  IF TEDDY.T @ @ 16 + W@ L_EXT 29 < IF TOO.LOW.TEDDY  ELSE
     TEDDY.T @ @ 16 + W@ L_EXT
     TEDDY.W 20 + W@ 40 - >         IF TOO.HIGH.TEDDY THEN
   THEN
  THEN 
;
CREATE TEMR 8 ALLOT   ( Temporary storage ) 
: SCRAP->TE           ( Convert global scrap to TeScrap )
 0 "TEXT TEMR CALL GETSCRAP 0>         ( Is there text? )
  IF TESCRAP.HANDLE @ "TEXT TEMR CALL GETSCRAP
 TESCRAP.LEN W! THEN
  MUSTCONVERT OFF     
 ( The scrap does not have to be converted just now )
;
: TE->SCRAP
 MUSTCONVERT @       
  ( Are there any changes after SCRAP->TE? )
  IF
  CALL ZEROSCRAP DROP 
 ( Zero scrap to clear non-text entries )
  TESCRAP.LEN W@ "TEXT TESCRAP.HANDLE @ @ 
 CALL PUTSCRAP DROP
  THEN
;
: CLEAR.TESCRAP     
 ( Word used to clear tescrap when it is not needed )
 TESCRAP.HANDLE @ 0 CALL SETHANDLESIZE DROP
 0 TESCRAP.LEN W!
;

VARIABLE OLDPORT  
  ( Used to save the current window before a dialog )
CREATE DLOG900 0 ,  ( Handle storage for our "FIND" dialog )
VARIABLE DEVENT     ( Dialog "event" )

( You can set the following strings from Forth and then use
 "aGain"  to replace any untypeable characters. 
 Do a find or replace, then set teddy.f1 and f2 and choose
 "aGain". This will do the previous operation with the new
 strings! )

CREATE TEDDY.F1 256 ALLOT ( String to find )
CREATE TEDDY.F2 256 ALLOT ( Replace string )
( The following part finds Teddy.F1 from the text )
: TFIND.REALLY { | SELEND STRSTART }
 TEDDY.T @ @ 34 + W@    -> SELEND
 TEDDY.T @ @ 62 + @ @   -> STRSTART
 TEDDY.F1 COUNT ?DUP 
IF 
 STRSTART SELEND +
 TEDDY.T @ @ 60 + W@ SELEND -
 DUP TEDDY.F1 C@ > 
IF
 FINDER DUP
 0< IF    DROP 10 CALL SYSBEEP 0 0 TEDDY.T @ 
 CALL TESETSELECT
      ELSE
         SELEND + TEDDY.F1 C@ + DUP TEDDY.T @ 
 CALL TESETSELECT
      THEN
ELSE 2DROP 2DROP 10 CALL SYSBEEP 0 0 TEDDY.T @
  CALL TESETSELECT 
THEN
  CORRECTSCROLL 
ELSE DROP 
THEN
;
( The following finds Teddy.F1 and replaces it with Teddy.F2 )
: TEDDY.REPLACE { | SELEND STRSTART }
 TEDDY.T @ @ 34 + W@        -> SELEND
 TEDDY.T @ @ 62 + @ @       -> STRSTART
 TEDDY.F1 COUNT ?DUP 
IF 
 STRSTART SELEND +
 TEDDY.T @ @ 60 + W@ SELEND -
 DUP TEDDY.F1 C@ > 
IF
 FINDER DUP
 0< IF    DROP 10 CALL SYSBEEP 0 0 TEDDY.T @ 
 CALL TESETSELECT
      ELSE DUP
          SELEND + TEDDY.F1 C@ OVER + TEDDY.T @ 
 CALL TESETSELECT
        TEDDY.T @ CALL TEDELETE
        TEDDY.F2 COUNT TEDDY.T @ CALL TEINSERT
        SELEND + TEDDY.F2 C@ + DUP TEDDY.T @ 
 CALL TESETSELECT
      THEN
ELSE 2DROP 2DROP 10 CALL SYSBEEP 0 0 TEDDY.T @
  CALL TESETSELECT 
THEN
 CORRECTSCROLL 
ELSE DROP 
THEN
;  
: TEDDYFIND.SUB ( Find or replace according to button )
 DEVENT W@ CASE
  1 OF TFIND.REALLY         ENDOF
  2 OF TEDDY.REPLACE        ENDOF
  ENDCASE
;
: TEDDYFIND
TE->SCRAP 
 ( Forth receives an activate when the dialog is gone. )
 ( The scrap must be saved to preserve it. )
TEDDY.T @ CALL TEDEACTIVATE
DLOG900 @ 0= 
IF 900 0 -1  CALL GETNEWDIALOG DLOG900 !
 ELSE DLOG900 @ CALL BRINGTOFRONT DLOG900 @ 
 CALL SHOWWINDOW 
THEN
 OLDPORT   CALL GETPORT
 DLOG900 @ CALL SETPORT      ( Set the dialog port )
  BEGIN
   0 DEVENT CALL MODALDIALOG 
 ( Call this until the user has finished )
  DEVENT W@ 4 < 
 UNTIL
OLDPORT @ CALL SETPORT      
 ( Reset "predialog" environment )
DLOG900 @ 5 PAD PAD 4 + PAD 8 + CALL GETDITEM
PAD 4 + @ TEDDY.F1 CALL GETITEXT         ( Set Teddy.F1 )
DLOG900 @ 6 PAD PAD 4 + PAD 8 + CALL GETDITEM
PAD 4 + @ TEDDY.F2 CALL GETITEXT         ( Set Teddy.F2 )
DLOG900 @ CALL HIDEWINDOW
TEDDY.T @ CALL TEACTIVATE
TEDITMENU @ 7 CALL ENABLEITEM
TEDDYFIND.SUB
;
( Handle Cut/Copy/Paste and others for Teddy and DAs )
: TEDITHANDLER { ITEM }
 CALL FRONTWINDOW TEDDY.W = 
IF ( Editor cut/paste )
ITEM  CASE
 1 OF TEDDY.T @ CALL TECUT    MUSTCONVERT ON ENDOF
 2 OF TEDDY.T @ CALL TECOPY   MUSTCONVERT ON ENDOF
 3 OF TESCRAP.LEN W@
          TEDDY.T @ @ 60 + W@
          TEDDY.T @ @ 34 + W@ TEDDY.T @ @ 32 + W@ - -
              + 32767 < IF
           TEDDY.T @ CALL TEPASTE
          ELSE 5 CALL SYSBEEP 5 CALL SYSBEEP THEN ENDOF
 4 OF 0 TEDDY.T @ @ 60 + W@ TEDDY.T @ 
 CALL TESETSELECT
         TEDDY.T @ CALL TECOPY MUSTCONVERT ON ENDOF
  6 OF TEDDYFIND ENDOF
  7 OF TEDDYFIND.SUB ENDOF
ENDCASE
    CORRECT.CONTROL.RANGE
    CORRECTSCROLL
ELSE ( DA cut/copy/paste...Undo is left for you to add... )
     CALL FRONTWINDOW
     WINDOWKIND + W@ L_EXT 0< 
 IF ITEM  4 < 
 IF ITEM 1+  CALL SYSEDIT  DROP THEN
    THEN
THEN
;

ALSO ASSEMBLER
( Here we have support for SFGETFILE and SFPUTFILE; these
 routines are similar to the ones in the Mach 2 manual. )
HEADER TYPES    DC.B    'TEXT'
HEADER GPROMPT  DC.B    20
                DC.B    'Please select a file'
HEADER PPROMPT  DC.B    18
                DC.B    'Please type a name'
 CODE TEDDYGETFILE
    MOVE.W    #50,-(A7)
    MOVE.W    #50,-(A7)
    PEA        GPROMPT
    CLR.L    -(A7)
    MOVE.W    #1,-(A7)
    PEA        TYPES
    CLR.L    -(A7)
    MOVE.L    (A6)+,-(A7)
    MOVE.W    #2,-(A7)
    _PACK3
    RTS
END-CODE
 CODE TEDDYPUTFILE
    MOVE.W    #50,-(A7)
    MOVE.W    #50,-(A7)
    PEA     PPROMPT
    MOVE.L    (A6)+,-(A7)
    CLR.L    -(A7)
    MOVE.L    (A6)+,-(A7)
    MOVE.W    #1,-(A7)
    _PACK3
    RTS
END-CODE
ONLY FORTH ALSO MAC ALSO TALKING
230 USER PARMBLK
CREATE FNAME 0 C, 63 ALLOT 
( Our file has a name. This is where it is kept)
CREATE FPLACE 0 ,          ( This is the folder of our file. HFS! )
( Here we do some "dirty" programming. I use the file manager
 directly. This works, but the code is not very clear. Once the
 PARaMeterBLocK is set, it doesn't need to be changed much.
 Read Inside Macintosh  for details on parameter blocks and
 the file system. )
: TEDDYLOAD ( Replace selection range with a file )
 TE->SCRAP
 PAD TEDDYGETFILE ( Use PAD as SFREPLY )
 PAD C@ IF  PAD 10 + FNAME 64 CMOVE
            PAD 6  + W@ FPLACE !
                       PARMBLK 12 + OFF
            PAD 10 +   PARMBLK 18 + !
            PAD 6 + W@ PARMBLK 22 + W!
            0          PARMBLK 26 + W!
                       PARMBLK 28 + OFF
            PARMBLK CALL OPEN 
             IF 10 CALL SYSBEEP ( Ouch! File Error )
              ELSE
              PARMBLK CALL GETEOF DROP
              PARMBLK 28 + @
              TEDDY.T @ @ 60 + W@
              TEDDY.T @ @ 34 + W@ TEDDY.T @ @ 32 + W@ - -
              + 32767 < ( Does the result fit? )
                IF TESCRAP.HANDLE @ DUP DUP
                   PARMBLK 28 + @ CALL SETHANDLESIZE DROP
                   CALL GETHANDLESIZE TESCRAP.LEN W!
                   CALL HLOCK DROP
                   TESCRAP.HANDLE @ @ PARMBLK 32 + !
                   TESCRAP.LEN   W@   PARMBLK 36 + !
                   0 PARMBLK 44 + W!
                   0 PARMBLK 46 + !
                   PARMBLK CALL READ DROP
                   TESCRAP.HANDLE @ CALL HUNLOCK DROP
                   PARMBLK CALL CLOSE DROP
                   TEDDY.T @ CALL TEPASTE
                   CORRECT.CONTROL.RANGE
                   CORRECTSCROLL
                ELSE 5 CALL SYSBEEP 5 CALL SYSBEEP 
 ( Ouch! Text too long )
                THEN
            THEN
THEN
;
: TEDDYSAVE ( Save selection range )
 TE->SCRAP
 PAD FNAME TEDDYPUTFILE
 PAD C@ IF  PAD 10 + FNAME 64 CMOVE
            PAD 6  + W@ FPLACE !
                       PARMBLK 12 + OFF
            PAD 10 +   PARMBLK 18 + !
            PAD 6 + W@ PARMBLK 22 + W!
            0          PARMBLK 26 + W!
                       PARMBLK 28 + OFF
            PARMBLK CALL CREATE DROP
            PARMBLK CALL OPEN   DROP
            TEDDY.T @ @ 34 + W@ TEDDY.T @ @ 32 + W@ -
            ?DUP 0= IF TEDDY.T @ @  60 + W@ THEN
            PARMBLK 28 + !
            PARMBLK CALL SETEOF DROP
            TEDDY.T @ @ 34 + W@ TEDDY.T @ @ 32 + W@ -
            ?DUP 0= IF
              TEDDY.T @ @ 60 + W@ PARMBLK 36 + !
              TEDDY.T @ @ 62 + @ @ PARMBLK 32 + !
              ELSE 
                                  PARMBLK 36 + !
              TEDDY.T @ @ 62 + @ @ TEDDY.T @ @ 32 + W@ +
                                  PARMBLK 32 + !
              THEN
             0 PARMBLK 44 + W! PARMBLK 46 + OFF
             PARMBLK CALL WRITE  
             PARMBLK CALL FLUSHFILE DROP
             PARMBLK CALL CLOSE DROP
              IF 10 CALL SYSBEEP
                 PARMBLK CALL DELETE
             ELSE 
                 PARMBLK CALL GETFILEINFO DROP
                 "TEXT PARMBLK 32 + ! ( Text filestype TEXT! )
                 "MACA PARMBLK 36 + ! ( MacWrite files )
                 PARMBLK CALL SETFILEINFO DROP 
             THEN
             PARMBLK 18 + OFF
             PARMBLK CALL FLUSHVOL DROP
     THEN
;
: TEDDYSAVEALL ( Save the whole file )
TEDDY.T @ @ 60 + W@ IF
TE->SCRAP
FNAME C@ IF 
                        PARMBLK 12 + OFF
            FNAME      PARMBLK 18 + !
            FPLACE @   PARMBLK 22 + W!
            0          PARMBLK 26 + W!
                       PARMBLK 28 + OFF
            PARMBLK CALL CREATE DROP
            PARMBLK CALL OPEN   DROP
            TEDDY.T @ @  60 + W@ PARMBLK 28 + !
            PARMBLK CALL SETEOF DROP
              TEDDY.T @ @ 60 + W@ PARMBLK 36 + !
              TEDDY.T @ @ 62 + @ @ PARMBLK 32 + !
             0 PARMBLK 44 + W! PARMBLK 46 + OFF
             PARMBLK CALL WRITE  
             PARMBLK CALL FLUSHFILE DROP
             PARMBLK CALL CLOSE DROP
              IF 10 CALL SYSBEEP
                 PARMBLK CALL DELETE
             ELSE 
                 PARMBLK CALL GETFILEINFO DROP
                 "TEXT PARMBLK 32 + !
                 "MACA PARMBLK 36 + ! 
                 PARMBLK CALL SETFILEINFO DROP 
             THEN
             PARMBLK 18 + OFF
             PARMBLK CALL FLUSHVOL DROP
     THEN THEN
;
: TFILEHANDLER ( Handle the file menu )
 CASE 1 OF 0 TEDDY.T @ @ 60 + W@
           TEDDY.T @ CALL TESETSELECT
           TEDDYLOAD                ENDOF
      2 OF TEDDYSAVEALL             ENDOF
      3 OF TEDDY.T @ @ 32 + @
           0 TEDDY.T @ @ 32 + !
           TEDDYSAVE
           TEDDY.T @ @ 32 + !       ENDOF
ENDCASE
;
: TEDDYMENUS ( Menu events are delivered here )
 0 CALL HILITEMENU
 CASE
   APPLEID OF DAHANDLER         ENDOF
   TFILEID OF TFILEHANDLER      ENDOF
   TEDITID OF TEDITHANDLER      ENDOF
  ENDCASE 
;
( This program has a menu on its window. There are 5 items on
 this menu and the names of these items have to be kept
 somewhere. This was a simple way to create an array of
 strings. )
: TITLES
 CASE 0 OF " Select All"      ENDOF
      1 OF " Select Forward"  ENDOF
      2 OF " Select Backward" ENDOF 
      3 OF " Copy From Disk"  ENDOF
      4 OF " Save Selection"  ENDOF ENDCASE
;
: DRAWTITLES     ( Draw palette items )
PAD CALL GETPORT  ( Get our window )
PAD @ TXFONT + W@ ( Save text characteristics )
PAD @ TXSIZE + W@ 
PAD @ TXMODE + W@
1 CALL TEXTFONT   ( Geneva )
9 CALL TEXTSIZE   ( 9 point )
1 CALL TEXTMODE
 5 0 DO           ( 5 items in our palette )
   2 I 90 * 2+ 15 OVER 91 + TEMR !RECT 
 TEMR CALL ERASERECT
 TEMR CALL FRAMERECT
   I 90 * 47 +
   I TITLES CALL STRINGWIDTH 2/ - ( Center the string )
   12 CALL MOVETO I TITLES CALL DRAWSTRING
 LOOP
 CALL TEXTMODE ( Reset text charasteristics )
 CALL TEXTSIZE      
 CALL TEXTFONT
;
168 USER UPDATE-HOOK   ( Mach 2 has a lot of stupid hooks )
152 USER CONTENT-HOOK  ( I have to live with them )
172 USER ACTIVATE-HOOK ( even if I do not like them )

CREATE SPORT 4 ALLOT   ( Saved Port )

: GROWB ( Set the view rectangle )
 TEDDY.W 20 + W@ 16 - 16 SCALE
 TEDDY.W 22 + W@ 16 - + TEDDY.T @ @ 12 + !
;
: TEDDYUP ( Update events are delivered here )
( Note that the zoom box also generates an update event! )
SPORT CALL GETPORT    ( Save some external window )
 TEDDY.W CALL SETPORT 
 ( Use the text editor window for updates )
 TEDDY.W CALL BEGINUPDATE 
 ( Inside Mac says this must be done )
 GROWB
 TEDDY.W 16 + CALL ERASERECT 
 ( Erase area to be updated )
 DRAWTITLES                  ( Draw palette titles )
 TEDDY.W 16 + TEDDY.T @ CALL TEUPDATE
 TEDDY.W CALL DRAWCONTROLS   
 ( We have a scroll bar to update )
 TEDDY.W CALL DRAWGROWICON
 TEDDY.W CALL ENDUPDATE
SPORT @ CALL SETPORT 
 ( Restore the port before the update )
;
( Given the number of the palette item that the mouse was
 pressed in, this procedure tracks the mouse to see what the
 user really wants. )
: DOPALETTE.SUB { SELECTED | SLOC }
 3 SELECTED 90 * 3 + 14 OVER 89 + TEMR !RECT
 0 -> SLOC
BEGIN
 CALL STILLDOWN
 WHILE
  @MOUSE TEMR CALL PTINRECT 0= 0= SLOC XOR
   IF TEMR CALL INVERTRECT SLOC NOT -> SLOC THEN
  REPEAT
SLOC IF TEMR CALL INVERTRECT SELECTED 1+ ELSE 0 THEN
; 
: DOPALETTE ( There is a mousedown in the palette )
 @MOUSE L_EXT
 2 - 90 / DOPALETTE.SUB
  CASE 1 OF 0 TEDDY.T @ @ 60 + W@
              TEDDY.T @ CALL TESETSELECT ENDOF
       2 OF TEDDY.T @ @ 32 + W@ TEDDY.T @ @ 60 + W@
            TEDDY.T @ CALL TESETSELECT ENDOF
       3 OF 0 TEDDY.T @ @ 34 + W@
            TEDDY.T @ CALL TESETSELECT ENDOF
       4 OF TEDDYLOAD                  ENDOF
       5 OF TEDDYSAVE                  ENDOF
ENDCASE
;
( Dotextclick looks at the shift key and calls TeClick.
  0= 0= is the equivalent of MacForth's "Boolean". )
: DOTEXTCLICK ( MOUSEPT -- Click...no ammo in a mouse... )
 
EVENT-RECORD 14 + W@ 512 AND 0= 0= TEDDY.T @ CALL TECLICK
 TEDDY.W CALL DRAWCONTROLS
;

2 2 15 452 RECT BUTTONRECT ( This is the rect of our palette )
: CONTENTCLICK { | MOUSEPT }
 RUN-CONTENT
 TEDDY.W CALL SETPORT
 EVENT-RECORD 10 + @ PAD ! PAD CALL GLOBALTOLOCAL
 PAD @ -> MOUSEPT 
 MOUSEPT BUTTONRECT CALL PTINRECT
    IF DOPALETTE 
    ELSE MOUSEPT TEDDY.T @ @ 8 + CALL PTINRECT
       IF MOUSEPT DOTEXTCLICK
       THEN
   THEN
;
( We set the dest and view rectangles )
: INITTEXT
 18 4 TEDDY.W 20 + W@ 16 - TEDDY.W 22 + W@ 16 - 
 TEMR !RECT TEMR PAD 8 CMOVE
 1 PAD 2+ W! TEMR PAD CALL TENEW TEDDY.T !
 -1 TEDDY.T @ @ 72 + W! 
;
( The following code handles the scroll bar )
( The thumb is called separately...Mach I manual for details )
: DOTHUMB 
 TEDDY.T @ @ W@ L_EXT 18 - NEGATE
 TEDDY.SB @ CALL GETCTLVALUE 11 * -
 0 SWAP TEDDY.T @ CALL TESCROLL
;
: DOARROW 
 TEDDY.SB @      CALL GETCTLVALUE SWAP OVER + 
 TEDDY.SB @ SWAP CALL SETCTLVALUE
 TEDDY.SB @      CALL GETCTLVALUE -
  11 * 0 SWAP TEDDY.T @ CALL TESCROLL
;
: TEDDYBAR
 CASE 
  UPARROW OF  -1  DOARROW ENDOF
  DOWNARROW OF 1  DOARROW ENDOF
 PAGEUP OF 
 TEDDY.W 20 + W@ 40 - -11 / -1 MIN DOARROW ENDOF
 PAGEDOWN OF 
 TEDDY.W 20 + W@ 40 -  11 /  1 MAX DOARROW ENDOF
ENDCASE
;
: TEDDYCONTROL  ( Control )
 CASE ( In case of multiple controls... )
  TEDDY.SB @ OF TEDDYBAR ENDOF
 ENDCASE
;
: TEDDYCONTROL2 ( Control/Part )
 CASE ( In case of multiple controls and parts... )
     TEDDY.SB @ OF  
 CASE THUMB  OF DOTHUMB ENDOF  ENDCASE  
 ENDOF
 ENDCASE
;
( We go to sleep when we are not in use. Deactivate events
 look like Activate events if the program doesn't look hard
 enough )
: ACTIVATE-HANDLER
    RUN-ACTIVATE
    EVENT-RECORD 14 + W@ 1 AND 
        IF WAKE STATUS TASK-> TEDDY.TASK W!
           ACTIVE? ON
           TEDDY.T @ CALL TEACTIVATE
           SCRAP->TE
      ELSE SLEEP STATUS TASK-> TEDDY.TASK W!
           TEDDY.T @ CALL TEDEACTIVATE
           ACTIVE? OFF
           TE->SCRAP
           CLEAR.TESCRAP
      THEN
;
( The Enter key does indentation, return doesn't )
: TEDDY.ENTER { | LOCATION CNTER NSPACES }
 TEDDY.T @ @ 62 + @ @    -> LOCATION
 TEDDY.T @ @ 32 + W@  1- -> CNTER
 0 -> NSPACES
 BEGIN
  LOCATION CNTER + C@ 13 = NOT
  CNTER 1+ 0> AND
  WHILE
   LOCATION CNTER + C@ 32 = IF NSPACES 1+ -> NSPACES 
                            ELSE 0 -> NSPACES THEN
   CNTER 1- -> CNTER
  REPEAT
 13 TEDDY.T @ CALL TEKEY
NSPACES 0> IF
 NSPACES 0 DO
  32 TEDDY.T @ CALL TEKEY
 LOOP THEN
;
( These are done only once, so we have a flag to show if the
 routine must be called. Always Workspace before testing
 TEDDY or you will save the flag in the wrong state! )
CREATE CONFIGFLAG 0 ,
: CONFIGURE.TEDDY
 TEDDY.W ADD
 TEDDY.W TEDDY.TASK BUILD
 TEDDY.BAR ADD
 TEDDY.BAR APPLEMENU ADD
 TEDDY.BAR TFILE ADD
 TEDDY.BAR TEDITMENU ADD
 TEDDY.W TEDDY.SB ADD
 INITTEXT
 ADD.DRVRS
TEDDY.BAR  TEDDY.TASK MBAR>TASK
TEDDY.TASK 
 CONFIGFLAG ON
;
( The following can be done the first time )
: TEDDYGO
CONFIGFLAG @ NOT IF CONFIGURE.TEDDY ACTIVATE THEN
 ACTIVE? OFF
['] TEDDYMENUS       MENU-VECTOR    !
['] TEDDYUP          UPDATE-HOOK    !
['] CONTENTCLICK     CONTENT-HOOK   !
['] ACTIVATE-HANDLER ACTIVATE-HOOK  !
['] TEDDYCONTROL     TEDDY.SB 4 +   !
['] TEDDYCONTROL2    CONTROL-VECTOR !
['] CLICKPROC        TEDDY.T @ @ 42 + !
100 CURMAX ! CORRECT.CONTROL.RANGE
TEDDY.SB @ ['] TEDDY.S2 !
TEDDY.W    ['] TEDDY.W2 !
TEDDY.T  @ ['] TEDDY.T2 !
BEGIN       ( This is the beginning of our "Event" loop )
 ACTIVE? @ IF TEDDY.T @ CALL TEIDLE ( Caret blink, blink, blink...)
              ?TERMINAL ?DUP IF
                1 24 SCALE AND IF ( Is it a cmd key? )
                  KEY CALL MENUKEY DROP
                  ELSE
                  KEY CASE
                       3 OF TEDDY.ENTER                         ENDOF
                       9 OF 4 0 DO 32 TEDDY.T @ CALL TEKEY LOOP ENDOF
                       TEDDY.T @ CALL TEKEY 0 ( EndCase drops! )
                       ENDCASE
                  CORRECTSCROLL     ( Autoscrolling )
                  CORRECT.CONTROL.RANGE
                  CORRECT.CONTROL
                  THEN
                 THEN
     THEN
   PAUSE   ( This is the equivalent of GetNextEvent )
   AGAIN
;
: TED 
  ( TED always starts the editor...even if you hide the window ) 
 CONFIGFLAG @ NOT IF TEDDYGO THEN
  TEDDY.W CALL SHOWWINDOW
  TEDDY.W CALL SELECTWINDOW
  TEDDY.BAR @ CALL SETMENUBAR
  CALL DRAWMENUBAR
  QUIT  
;
Listing 2: Teddy.R, resource listing for editor.
[This file should be compiled with Rmaker and the resulting resources pasted into 
your Mach2 file with ResEdit. The picture is contained within the file Teddy.rsrc which 
is available on the MacTutor source disk for this issue.  JL] 

*   ReditX 1.1, resource decompile option.
*
*   Resource listing from file: "Teddy.RSRC".
*

Teddy.RSRC.rsrc

Type DLOG

     ,900
40 40 130 472
Visible 1 NoGoAway 0
900
New Dialog


Type DITL

     ,10822
5
*   1
BtnItem Enabled
168 312 189 344
Ok

*   2
PicItem Disabled
8 16 147 99
901

*   3
StatText Disabled
16 168 32 248
Teddy V1.0\0D

*   4
StatText Disabled
40 144 56 280
Mach 2
™ text editor\0D

*   5
StatText Disabled
64 120 80 320
Copyright ©1986, Juri Munkki

     ,900
8
*   1
BtnItem Enabled
64 8 88 96
Find

*   2
BtnItem Enabled
64 104 88 192
Replace

*   3
StatText Enabled
8 8 24 48
Find:

*   4
StatText Disabled
32 8 48 70
Replace:

*   5
EditText Enabled
8 80 24 424

*   6
EditText Enabled
32 80 48 424

*   7
BtnItem Enabled
120 104 144 192
Replace All

*   8
StatText Disabled
56 296 89 423
Editor 1.0\0D©1986 Juri Munkki


Type ALRT

     ,900
40 80 200 432
10822
4444


Type PICT

     ,901
*   No format specification available.
 
AAPL
$102.50
Apple Inc.
+0.25
MSFT
$45.43
Microsoft Corpora
+0.55
GOOG
$571.60
Google Inc.
+2.40

MacTech Search:
Community Search:

Software Updates via MacUpdate

Path Finder 6.5.5 - Powerful, award-winn...
Path Finder is a file browser that combines the familiar Finder interface with the powerful utilities and innovative features. Just a small selection of the Path Finder 6 feature set: Dual pane... Read more
QuarkXPress 10.2.1 - Desktop publishing...
With QuarkXPress, you can communicate in all the ways you need to -- and always look professional -- in print and digital media, all in a single tool. Features include: Easy to Use -- QuarkXPress is... Read more
Skype 6.19.0.450 - Voice-over-internet p...
Skype allows you to talk to friends, family and co-workers across the Internet without the inconvenience of long distance telephone charges. Using peer-to-peer data transmission technology, Skype... Read more
VueScan 9.4.41 - Scanner software with a...
VueScan is a scanning program that works with most high-quality flatbed and film scanners to produce scans that have excellent color fidelity and color balance. VueScan is easy to use, and has... Read more
Cloud 3.0.0 - File sharing from your men...
Cloud is simple file sharing for the Mac. Drag a file from your Mac to the CloudApp icon in the menubar and we take care of the rest. A link to the file will automatically be copied to your clipboard... Read more
LibreOffice 4.3.1.2 - Free Open Source o...
LibreOffice is an office suite (word processor, spreadsheet, presentations, drawing tool) compatible with other major office suites. The Document Foundation is coordinating development and... Read more
SlingPlayer Plugin 3.3.20.505 - Browser...
SlingPlayer is the screen interface software that works hand-in-hand with the hardware inside the Slingbox to make your TV viewing experience just like that at home. It features an array of... Read more
Get Lyrical 3.8 - Auto-magically adds ly...
Get Lyrical auto-magically add lyrics to songs in iTunes. You can choose either a selection of tracks, or the current track. Or turn on "Active Tagging" to get lyrics for songs as you play them.... Read more
Viber 4.2.2 - Send messages and make cal...
Viber lets you send free messages and make free calls to other Viber users, on any device and network, in any country! Viber syncs your contacts, messages and call history with your mobile device,... Read more
Cocktail 7.6 - General maintenance and o...
Cocktail is a general purpose utility for OS X that lets you clean, repair and optimize your Mac. It is a powerful digital toolset that helps hundreds of thousands of Mac users around the world get... Read more

Latest Forum Discussions

See All

Rhonna Designs Magic (Photography)
Rhonna Designs Magic 1.0 Device: iOS Universal Category: Photography Price: $1.99, Version: 1.0 (iTunes) Description: Want to sprinkle *magic* on your photos? With RD Magic, you can add colors, filters, light leaks, bokeh, edges,... | Read more »
This Week at 148Apps: August 25-29, 2014
Shiny Happy App Reviews   | Read more »
Qube Kingdom – Tips, Tricks, Strategies,...
Qube Kingdom is a tower defense game from DeNA. You rally your troops – magicians, archers, knights, barbarians, and others – and fight against an evil menace looking to dominate your kingdom of tiny squares. Planning a war isn’t easy, so here are a... | Read more »
Qube Kingdom Review
Qube Kingdom Review By Nadia Oxford on August 29th, 2014 Our Rating: :: KIND OF A SQUARE KINGDOMUniversal App - Designed for iPhone and iPad Qube Kingdom has cute visuals, but it’s a pretty basic tower defense game at heart.   | Read more »
Fire in the Hole Review
Fire in the Hole Review By Rob Thomas on August 29th, 2014 Our Rating: :: WALK THE PLANKUniversal App - Designed for iPhone and iPad Seafoam’s Fire in the Hole looks like a bright, 8-bit throwback, but there’s not enough booty to... | Read more »
Alien Creeps TD is Now Available Worldwi...
Alien Creeps TD is Now Available Worldwide Posted by Ellis Spice on August 29th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Dodo Master Review
Dodo Master Review By Jordan Minor on August 29th, 2014 Our Rating: :: NEST EGGiPad Only App - Designed for the iPad Dodo Master is tough but fair, and that’s what makes it a joy to play.   | Read more »
Motorsport Manager Review
Motorsport Manager Review By Lee Hamlet on August 29th, 2014 Our Rating: :: MARVELOUS MANAGEMENTUniversal App - Designed for iPhone and iPad Despite its depth and sense of tactical freedom, Motorsport Manager is one of the most... | Read more »
Motorsport Manager – Beginner Tips, Tric...
The world of Motorsport management can be an unforgiving and merciless one, so to help with some of the stress that comes with running a successful race team, here are a few hints and tips to leave your opponents in the dust. | Read more »
CalPal Update Brings the App to 2.0, Add...
CalPal Update Brings the App to 2.0, Adds Lots of New Stuff Posted by Ellis Spice on August 29th, 2014 [ permalink ] | Read more »

Price Scanner via MacPrices.net

Apple now offering refurbished 21-inch 1.4GHz...
The Apple Store is now offering Apple Certified Refurbished 21″ 1.4GHz iMacs for $929 including free shipping plus Apple’s standard one-year warranty. Their price is $170 off the cost of new models,... Read more
Save $50 on the 2.5GHz Mac mini, on sale for...
B&H Photo has the 2.5GHz Mac mini on sale for $549.99 including free shipping. That’s $50 off MSRP, and B&H will also include a free copy of Parallels Desktop software. NY sales tax only. Read more
Save up to $300 on an iMac with Apple refurbi...
The Apple Store has Apple Certified Refurbished iMacs available for up to $300 off the cost of new models. Apple’s one-year warranty is standard, and shipping is free. These are the best prices on... Read more
The Rise of Phablets
Carlisle & Gallagher Consulting Group, a businesses and technology consulting firm focused solely on the financial services industry, has released an infographic depicting the convergence of... Read more
Bad Driver Database App Allows Good Drivers t...
Bad Driver Database 1.4 by Facile Group is a new iOS and Android app that lets users instantly input and see how many times a careless, reckless or just plain stupid driver has been added to the... Read more
Eddy – Cloud Music Player for iPhone/iPad Fre...
Ukraine based CapableBits announces the release of Eddy, its tiny, but smart and powerful cloud music player for iPhone and iPad that allows users to stream or download music directly from cloud... Read more
A&D Medical Launches Its WellnessConnecte...
For consumers and the healthcare providers and loved ones who care for them, A&D Medical, a leader in connected health and biometric measurement devices and services, has launched its... Read more
Anand Lal Shimpi Retires From AnandTech
Anand Lal Shimpi, whose AnandTech Website is famous for its meticulously detailed and thoroughgoing reviews and analysis, is packing it in. Lal Shimpi, who founded the tech site at age 14 in 1997,... Read more
2.5GHz Mac mini, Apple refurbished, in stock...
The Apple Store has Apple Certified Refurbished 2.5GHz Mac minis available for $509, $90 off MSRP. Apple’s one-year warranty is included, and shipping is free. Read more
13-inch 2.5GHz MacBook Pro on sale for $999,...
B&H Photo has the 13″ 2.5GHz MacBook Pro on sale for $999.99 including free shipping plus NY sales tax only. Their price is $100 off MSRP. Read more

Jobs Board

*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
Senior Event Manager, *Apple* Retail Market...
…This senior level position is responsible for leading and imagining the Apple Retail Team's global event strategy. Delivering an overarching brand story; in-store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.