Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > HyperCard externals development

HyperCard externals development
Thread Tools
Clinically Insane
Join Date: Apr 2000
Status: Offline
Reply With Quote
Feb 9, 2001, 06:38 AM
 
Ok I'm developing something in C++ sorta, and for the interface and all that I want to use HyperCard to control it all, and whatever.
So heres the deal, I know a little C++, and I know HyperCard/HyperTalk. So how do I combine the two using XCMD's and XFCN's?
Like, how do I do it?
If I were to write a script in C++, and I wanted to call it in my HyperCard stack, what kind of headers and stuff do I need in the C++, and how do I compile it for it and all that?
What file do I paste into HC with ResEdit?
And how could I decompile/reverse engineer an already made XFCN/XCMD, just to check like the headers and whatnot...
I haven't had a chance to look all this up on the net, I will soon, but any help/tips etc. would be appreciated...
TIA

Cipher13
     
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Feb 9, 2001, 11:35 PM
 
Hi Cipher13,

The best source of information on writing HyperCard externals is probably Apple's own official 'HyperCard Script Language Guide' (HSLG), particularly Appendix A, "External Commands and Functions" (in recent HC retail versions such as 2.3.5+, the HSLG doc is also included as a PDF file). There you'll find a thorough overview of writing & attaching HC externals, and illustration via a 'flash' example XCMD. Note that the discussion is based on the Pascal language, but it's not difficult to translate it into C/C++. [If you don't have access to a copy of HC retail (i.e., to the HSLG doc), let me know and I could probably make the doc available via my iDisk; it might even already be available online somewhere.]

In addition, Apple lists other third-party HC documentation sources, as well as links to Peter Fleck's downloadable HyperCard FAQ, on the official HyperCard - Education & Support web page.

In terms of other source code for HC externals, your C/C++ compiler or IDE might include some useful XCMD/XFCN examples. E.g., MW CodeWarrior Pro usually ships with a few XCMD sample projects (in CW Pro 5.x, they're located in the 'CodeWarrior Pro Folder:CodeWarrior Examples:MacOS Examples:Code Resource Examples:XCMDs' subfolder).

I myself don't know of any tools that are specifically geared toward disassembling binary HC externals, not at the level of generating full-fledged Pascal interfaces/sources or C/C++ headers/sources. I suppose that a general-purpose debugger/disassembler such as Jasik Designs' MacNosy or Debugger could be of some value. Other folks might also be able to help out here.

[There are also some potentially useful HC links listed in the vaguely related TCP/IP Tools for Hypercard and Applescript... thread in this Forum, which you might not have already seen.]

Regards, and happy developing,

--Paul

[This message has been edited by Paul Crawford (edited 02-10-2001).]
     
Clinically Insane
Join Date: Apr 2000
Status: Offline
Reply With Quote
Mar 2, 2001, 03:16 AM
 
Thanks man
Sorry for the long reply time... lol.
I could've sworn I replied to this...
Anyway, I'm still looking into how to compile it right
Thanks again.

Cipher13
     
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Mar 8, 2001, 10:30 AM
 
Hi Cipher13,

No problem... :-) I hope that you did already (or do now) have a copy of the HyperCard Script Language Guide? BTW, if you encounter a specific stubborn compilation issue, then feel free to post back here, and either I or someone else will try to help out.

Regards,

--P
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:09 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2