• MacTech Network:
  • Tech Support
  • |
  • MacForge.net
  • |
  • Apple News
  • |
  • Register Domains
  • |
  • SSL Certificates
  • |
  • iPod Deals
  • |
  • Mac Deals
  • |
  • Mac Book Shelf

MAC TECH

  • Home
  • Magazine
    • About MacTech in Print
    • Issue Table of Contents
    • Subscribe
    • Risk Free Sample
    • Back Issues
    • MacTech DVD
  • Archives
    • MacTech Print Archives
    • MacMod
    • MacTutor
    • FrameWorks
    • develop
  • Forums
  • News
    • MacTech News
    • MacTech Blog
    • MacTech Reviews and KoolTools
    • Whitepapers, Screencasts, Videos and Books
    • News Scanner
    • Rumors Scanner
    • Documentation Scanner
    • Submit News or PR
    • MacTech News List
  • Store
  • Apple Expo
    • by Category
    • by Company
    • by Product
  • Job Board
  • Editorial
    • Submit News or PR
    • Writer's Kit
    • Editorial Staff
    • Editorial Calendar
  • Advertising
    • Benefits of MacTech
    • Mechanicals and Submission
    • Dates and Deadlines
    • Submit Apple Expo Entry
  • User
    • Register for Ongoing Raffles
    • Register new user
    • Edit User Settings
    • Logout
  • Contact
    • Customer Service
    • Webmaster Feedback
    • Submit News or PR
    • Suggest an article
  • Connect Tools
    • MacTech Live Podcast
    • RSS Feeds
    • Twitter

ADVERTISEMENT
Volume Number:6
Issue Number:5
Column Tag:Mousehole Report

HyperCard XCMD DB Routines

By Larry Nedry, Contributing Editor

From: Jhannah

Re: Using Copybits()

The structure of a PICT resource is a bit different than a bitmap! You need to create an offscreen bitmap, paint the PICT to that offscreen bitmap, then make your own bitmap’s baseAddr point to the offscreen bitmap’s baseAddr and then you may use CopyBits with your own bitmap.

From: Scope

Re: Text Rotation - HELP!

I thought that it would be simple, but I am stuck. I want to be able to write a vertical (up or down) text string on a Mac. I can easily do it under HALO or GSS on the IBM by simply setting the text rotation to the desired angle and writing away, but I can’t find any related commands in IM I..V. The only solution to providing a rotated object I have ever seen mentioned was in “The Best of MacTutor-I”, which had an algorithm for bitmap rotation. This seems too complicated for such a (seemingly) simple operation. Can it be that the Mac can’t do it? Or did I just miss something. Please help.

[Check out John Olsen’s article in Vol. 4 No. 2 on page 62 for a 90 degree text rotation article (it is also found in the Definitive MacTutor on page 9. The source code is found on disk #29.-ed]

From: Dont

Re: HyperCard XCMD db routines

From that terminal illness Married & Mortgaged. The programming I do get a chance

From one of the above. It must be multiuser and be able to use the Mac as a host.It must be able

Flipping through MacTutor one finds four obvious choices...

1. c-tree from Faircom

2. db_VISTA ||| from Raima

3. Inside Out from Shana Corp.

4. HyperHit from SoftStream.

Items 1-3 are C routines designed for developers and would require XCMD routines. Item 4 is already built for HyperCard. Does anyone have experience with these products? If so, do the perform as advertised. For items 1-3 are there any XCMD implementations?

From: Drunkle

Re: HyperCard XCMD db routines

DonT -- Something you may want to investigate is the XCMD package being marketed by Dan Shafer: HyperFox. Allows opening, reading, updating FoxBASE format data and index files from within HyperCard. Single User commercial license is $75, multi-user and site licensing also priced on a sliding scale. Marketing company is Apricot Press, 277 Hillview Ave., Redwood City, CA 94062. Shafer is available via CompuServe [71246,402], MacNET or AppleLink (DSHAFER). I’ve sent for a copy but haven’t yet received it.

From: Tomt

Re: HyperCard XCMD db routines

I think that several other mainline databases have Hypercard front ends available. You might check on that first before buying one of the products you listed. There was a review of HyBase and HyperHit in this weeks Macweek.

From: Jersquare

Re: Floating Windows

Floating windows “float” over any active window. They are windoids. But lately I have found if I ask for windoids I get advice on WDEF’s I needed to know how to make my windoids work once I had them on the screen.

The rules seem to be these

1. Windoids are always in front of document windows.

2. When you leave the Application (under multifinder) they disappear. That seems to be it really. I needed to know how to make it look like they were always on top, especially when I moved a document window.

From: Rastamon

Re: Floating Windows

Regarding, when floating windows should be hidden:

Although I haven’t (yet) seen any Human Interface notes on it yet, I would say that floating windows should be hidden ANY time the “parent” window is deactivated, not just when swapped out under MultiFinder (ie. DA to front, unrelated window to front). They should probably be hidden when alerts are brought to the front, but since this situation does not “truly” deactivate the front window, lots of apps don’t take care this case.

Not all applications behave this way, but they probably should.

H.I. notes for Layer Manager (or present ones I haven’t seen, yet) may prove me wrong, but I believe the notes will probably say something similar.

From: Dorothy

Re: Modifying ‘STR ‘s in LSP on Mac

Hi, I’m trying to update my two games Glider+ and Glypha. Problem: Too dumb!

Well, everyone has insisted on a highscores board that saves. I’ve tried both reading in from a ‘STR ‘ resource and then, at the close of the game, modifying it. I’ve tried AddResource after a RemoveResource, etc... Well, with Lightspeed Pascal and 1 meg of memory, I keep damaging my application zone or crashing the whole system. It will claim address errors or low memory errors.

That could well be. I have sampled sounds (although very short ones) and a couple of offscreen ports open during the games. So, I close them, dispose their pointers and still get crashes.

What am I forgetting here? Is there a good way to insure the memory? And how much do I need?

Well, so I tried just creating and opening a file on the disk to save the scores. No. No memory for that operation either. Crash, crash. I’ve bumped the Stack and Zone settings in Lightspeed as high as I dare, but still run out of memory.

From within the program? Specifically ‘STR ‘ resources. How do you correctly define the resource handle so that it’s pointing

Also, what does MoreMasters do? Do I need to call that routine a dozen times?

From: Jhowarth

Re: Modifying ‘STR ‘s in LSP on Mac

I have a STR resource that I change and save in my Reminder INIT. The code is

{1}
var
   myStringHandle:StringHandle
   myNewString:STR255;

begin
...
  myStringHandle := StringHandle(GetResource(‘STR ‘,theID));
  myNewString := myStringHandle^^;
.... Do whatever you need to with the STR255 myNewString ...
  SetString(myStringHandle,myNewString);
  ChangedResource(handle(myStringHandle));
  WriteResource(handle(MyStringHandle));
...
end

You may want to lock the StringHandle when you work on it. ChangedResource marks it for writing out and WriteResource is there for good measure to make the Mac do it immediately and not later. Hope this helps out.

From: Beamer

Re: Moon Phases

Does anyone out there have a formula(e) for calculating the date of the next New Moon, or the current phase of the moon? I program in C, but C or Pascal source, or pseudocode, or even good ol’ algebraic formulas would be greatly appreciated!

From: Venture

Re: Just black screen saver ?

From the stock market opening to the closing bell I would like to blank the screens when there has been no user interaction for a few minutes. Is there a package which just blanks the screens to save them. Packages like Pyro take up

As a last resort I would build the save function into the application, but that is a less than optimal solution.

Your ideas would be appreciated.

From: Jmoreno

Re: Just black screen saver ?

I don’t know of any offhand but blanking the screen is very simple. It takes about six or seven lines of code to do it. Doing it yourself would seem to me to be a better answer than the hassle sure to be involved in bundling someone else’s INIT.

From: Venture

Re: Just black screen saver ?

Thanks, you may be right. My main reason for not wanting to stick it into my own application is that I am running under multifinder and I was anticipating problems with handoffs when running in the background.

I may not have thought enough about it yet and have never written an init so that did not occur to me.

Thanks for the reply.

From: Jmoreno

Re: Just black screen saver ?

A simple way to check to see if you might be interfering with somebody elses app is to make sure that your window is the FrontWindow if it’s not then you can forget about blanking the screen under the theory that the user is working and doesn’t want to see a black screen.

From: Darryl

Re: Where’s the PiMI? (In SuperPaint)

I just finished typing in the ‘Fuzzy Brush’ SuperPaint Plug-In as featured in the Feb. 1990 issue of MacTutor. Every thing that is present in the article looks fine, but what happened to the ‘PiMI’ resource? Looks like I’ll be designing my own About box and icon while a certain editor turns slightly red... I was hoping I could find it here, but I haven’t had any luck. If I can get it here, will someone leave me a message? Either here or (preferably, since this is long distance) on CompuServe (User ID 70157,751). Thanks in advance.

[The PiMI Resource has an ID number of 1600 and only contains $0001 which is the version number. Just create it with ResEdit or another resource editor- ed]

From: Yoda

Re: Tear Off Menus & Palettes

From the routine in the MDEF called DragMenu() where the position is set to the rgnBBox of the dragRgn. Interestingly if the position is set to say (100,100) it works just fine positioning all palettes to (100,100). Somewhere along the way for the Mac IIci the dragRgn’s rgnBBox is getting corrupted. Has anyone else seen this behavior? Anyone know the reason and a solution?

Any help appreciated. Is any one interested in the code for the MPW 3.0 version - particularly if this problem is solved?

From: Madmacs

Re: Multifinder

I need to use a program to start up another program and not to exit itself, sort of the way Multifinder does. I guess the easiest way to explain it is that I want to do a unix like fork() and exec(). I have looked but I can’t find mention of this anywhere and I have never seen a program that needs it. But now I do, does anyone have any suggestions??

From: Pkram

Re: C++ compiler

What really IRRITATES me about Apple’s C++ interpreter, is that it is not a compiler. Why can’t they come up with an AT&T 2.0 true compiler. That they haven’t is truly PATHETIC.

Anyone read the “Nanobytes” section of the Nov ’89 BYTE? AT&T is offering a deal to colleges and universities for students to purchase an AT&T C++ compiler for $25.00. A toll free number 800-828-8649 was also listed in the article.

It is necessary for someone either faculty or administration to purchase the source code for $300.00. After porting the code to the target machine, then students may be licensed to use the binary (not the source) compiler. When I called the 800 number, they said that porting the source should not be very difficult. Now I ask, if a professor at a college or university can produce C++ compilers by porting the source, why can’t Apple do the same? Sure this particular offer is only for educational or non-profit research institutions, but surely Apple could purchase the source for a higher than $300 price.

Surely some decent arrangement between Apple and AT&T could make true C++ compilers for the Mac development community available. Why oh why hasn’t this happened????????

I will NEVER pay more than a few (and I mean $25 or less) for a C++ interpreter. If its not a compiler and if its not TRUE C++ FORGET IT!

From: Siegel

Re: C++ compiler

Actually, Apple C++ is C++ 2.0, with a couple of extensions for greater Mac compatibility. Also, MPW C++ is a preprocessor, not an interpreter. It’s a legitimate, if not ideal, way to implement a C++ compiler.

From: Jhannah

Re: More pixels for your video!

Has anyone ever hacked around and tried to get a Hold-And-Modify effect so that we could have an 8 bit card think it is 16 or 32 bit (or should I say 15 or 24 bit)... is there a small hardware modification to any of the video cards out there that could do this?

By the way, does BIGVIDEO increase the DPI or the # of lines & column of pixels on the monitor?

From: Sysop

Re: More pixels for your video!

BIGVIDEO which is actually called MaxAppleZoom is pretty slick. The DPI is the same at 72 DPI and width and height are increased to use ALL of the screen including the edges that are normally black. Try it if you have a single video card Mac. (It doesn’t work with multiple video cards).

From: Jhannah

Re: More pixels for your video!

Yes but have you ever heard of Hold-And-Modify for the Mac II? (the Amiga sometimes uses this to get more colors).... also, some alternate video cards on the market can squeeze out 768x512 pixels.. thats 64 more horizontal pixels then MaxAppleZoom... is it just a matter of how much video memory is available?

From: Wildman

Re: Tickcount accuracy for stopwatch routine

Another option you consider if you really need better accuracy is to make a little hardware widget to hook to your serial port. A crystal and a driver chip could generate 1Khz square waves. This would give you a character input interrupt 100 times a second. The accuracy could be made comparable to an electronic stopwatch. With a little cleverness and a UART you could even clock in inputs like gun-fired and feet-in- blocks and finish-ribbon-broken. This would get your human reaction time out of the loop, a considerable improvement in timing accuracy. It you are willing to live with keyboard scan randomness, then I suspect that the error drift between Macs is nominal.

 
MacTech Only Search:
Community Search:

 
 
 

 
 
 
 
 
  • SPREAD THE WORD:
  • Slashdot
  • Digg
  • Del.icio.us
  • Reddit
  • Newsvine
  • Generate a short URL for this page:



MacTech Magazine. www.mactech.com
Toll Free 877-MACTECH, Outside US/Canada: 805-494-9797
MacTech is a registered trademark of Xplain Corporation. Xplain, "The journal of Apple technology", Apple Expo, Explain It, MacDev, MacDev-1, THINK Reference, NetProfessional, Apple Expo, MacTech Central, MacTech Domains, MacNews, MacForge, and the MacTutorMan are trademarks or service marks of Xplain Corporation. Sprocket is a registered trademark of eSprocket Corporation. Other trademarks and copyrights appearing in this printing or software remain the property of their respective holders.
All contents are Copyright 1984-2010 by Xplain Corporation. All rights reserved. Theme designed by Icreon.
 
Nov. 20: Take Control of Syncing Data in Sow Leopard' released
Nov. 19: Cocktail 4.5 (Leopard Edition) released
Nov. 19: macProVideo offers new Cubase tutorials
Nov. 18: S Stardom anounces Safe Capsule, a companion piece for Apple's
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live