Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!agate!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.hypercard Subject: Re: Dynamic Cards? Message-ID: <1057@helios.ee.lbl.gov> Date: 4 Oct 88 17:34:19 GMT References: <4.2348DA08@mailcom.UUCP> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 56 In article <4.2348DA08@mailcom.UUCP> postmaster@mailcom.UUCP (Bernard Aboba) writes: > >I've been asked to write a HyperCard stack which would analyze an >atmospheric pollution problem. It's going to use a large xcmd written in >MPW fortran, run a numerical simulation, and then draw contour maps of >the output for display in HyperCard. What I need to do is to be able to >create COLOR cards with the contour maps drawn on them, so as to create >an animation. >I have several questions: Firstly, can one write XCMD's in MPW Fortran? I don't know about this. But I would assume so since the Language Systems fortran is supposed to produce the exact same object as MPW Pascal. >I know that MPW C is a problem, but I have no idea whether MPW Fortran >from Language Systems messes with register A5 or not. >Next, can one create a card dynamically and paint on the foreground >easily? In the background would be a map of the area or something. Yes, one can send a message from an XCMD to create a new card, you can then place whatever bitmap (black & white only) you want on the card by copybits'ing it to the desired rectangle while creating a picture, putting the picture on the clipboard, and telling hypercard to paste it on to the card. >I also need to do the contour maps in COLOR. I have the COLOR X-CMD, but >that doesn't look too helpful here. Now, hypercard doesn't know anything about color. Maybe the new version will, so if you were to create a format 2 PICT above (with color), it would paste it in black & white. The only solution is to have the XCMD create a color GrafPort and draw the map itself and maintain control for updates etc. I suppose the XCMD could call Hypercard's on idle handler? >. >Am I trying to do something impossible? The most irritating thing of all >is that this is a piece of cake on the IBM PC, using software like >Graphics FX, PC Storyboard, Graphix Designer, etc. I'd appreciate any >suggestions to help save my Mac Honor. > > It seems to me that doing it in hypercard is going to be more difficult than just writing a small application to do it. Also, one suggestion I have is that the XCMD should only be in charge of the display of the results of the simulation, so write a down and dirty file oriented program to calculate the simulation. Write the XCMD in a language more suited for building code resources, i.e. C or Pascal (or ASM for that matter) and run the simulation in Fortran. Until Hypercard can fully utilize the Macintosh's resources (color on the Mac II), I don't think it is very useful for complicated applications. (Flame on.) Patrick Beard Lawrence Berkeley Laboratory beard@ux1.lbl.gov