home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!apple!applelink.apple.com
- From: D6431@AppleLink.Apple.COM (OptImage Interactive Svcs,PRT)
- Newsgroups: comp.sys.mac.oop.macapp3
- Subject: Resources and XCMDs in MacApp
- Message-ID: <724715937.5133990@AppleLink.Apple.COM>
- Date: 18 Dec 92 17:22:00 GMT
- Sender: daemon@Apple.COM
- Organization: AppleLink Gateway
- Lines: 27
-
- Help, I need help with a MacApp Problem:
-
- Earlier this year I developed a series of XCMDs for Hypercard that did digital
- audio conversions, ie sample rate converters and so forth. We built a
- Hypercard stack as a front end and shipped the product. Now I'm developing an
- application in MacApp that launches these XCMDs as well as a few others.
- Moving these XCMDs to MacApp wasn't entirely painless, but I have eventually
- gotton all of them to work exept one. This particular XCMD consists of posing
- a Custom SFGetFile dialog, very similar to the one in THINK C 5.0 that lets the
- user "Get" multiple files in one "Get". Keep in mind this XCMD works
- beautifully in Hypercard. From my MacApp application however it launches fine
- the first time it is fired off, but if you fire it off again within the same
- run of the application it causes a bus error in "MDEF + 014". The Custom
- SFGetFile dialog my XCMD poses does have a pop-up menu in it the allows the
- user to filter the type of files they are looking at. The DITL for the
- SFGetFile has a control for the Pop-up. I have used both a Public domain
- Pop-up CDEF and Apple's System 7 Pop-up CDEF and got the same problem. On
- entry to the XCMD the cntl resource associates an empty menu resources of ID
- 128 with the CDEF. On exit, I call release resource on the MenuHandle, because
- the next time the XCMD is launched I might put different Items into the Pop-up
- menu. Again this works fine in hypercard. What is MacApp doing to what seems
- to be my resources during execution of my app that hypercard wasn't doing???
- I've tried many senarios of the above trying to isolate the problem, but have
- had no luck. Any help would be most appreciated.
-
- Jay Bartot @Optimage interactive services
-
-