XFcns in Player & Standalone

Having trouble using an XCmd or XFcn? Post your questions here.

XFcns in Player & Standalone

Postby kgeiger61 » Tue Jan 06, 2009 9:29 am

I have a project that uses a couple XFcns. In SuperCard (4.6.3), it works fine. The XFcns are installed in the resource fork. When I try to run the project in SC Player, it can't find the XFcns and when I built the application with Standalone Maker, I get the same error. In Standalone Maker, since the XFcns are in the resource fork of the project, they appear in the Resource tab. Nevertheless, the application doesn't find them and an error results.

Any ideas?
kgeiger61
 
Posts: 5
Joined: Tue Jan 06, 2009 8:58 am

Re: XFcns in Player & Standalone

Postby bmartin » Tue Jan 06, 2009 9:53 am

Make sure you issue an open resources command prior to calling the first external. If you install the externals in the dataFork then you do not need to do that, but when they are in the resourceFork you need to open resources.
Bruce Martin

Mac Os 10.6.3
2.8 Ghz Intel Core 2 Duo
4GB 1067 MHz DDR3
User avatar
bmartin
 
Posts: 149
Joined: Mon Jul 07, 2008 7:26 am
Location: Stroudsburg, PA

Re: XFcns in Player & Standalone

Postby kgeiger61 » Tue Jan 06, 2009 10:30 am

Thanks for your reply... I tried both solutions:

1. called "open resources" before the first call to the external
2. Moved the externals to the data fork.

Both changes resulted in the same error: SuperTalk Error Number 41: Never heard of that function name.

other ideas?
kgeiger61
 
Posts: 5
Joined: Tue Jan 06, 2009 8:58 am

Re: XFcns in Player & Standalone

Postby kgeiger61 » Tue Jan 06, 2009 2:41 pm

A little more information... The function I am having problems with is sortFieldByItem, which appears to be in the XTend project. I don't know if that makes any difference...
kgeiger61
 
Posts: 5
Joined: Tue Jan 06, 2009 8:58 am

Re: XFcns in Player & Standalone

Postby S. Leys » Wed Jan 07, 2009 2:15 am

kgeiger61 wrote:The function I am having problems with is sortFieldByItem, which appears to be in the XTend project.


It is in XTend, indeed, but the reason why it works in SC is that it is in the sharedfile and a possible reason why it doesn't work in the player or a SA is that you wouldn't have included it in your project. The player or SA don't have access to the sharedfile, thus, you need to copy all the resources you're using into your project.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: XFcns in Player & Standalone

Postby kgeiger61 » Wed Jan 07, 2009 5:59 am

It is in the project. I copied the XFcn from the SharedFile to the Data Fork of the project. I also tried copying it to the resource fork and including the command "open resource". Still I get the same error.
kgeiger61
 
Posts: 5
Joined: Tue Jan 06, 2009 8:58 am

Re: XFcns in Player & Standalone

Postby S. Leys » Wed Jan 07, 2009 6:26 am

kgeiger61 wrote:It is in the project. I copied the XFcn from the SharedFile to the Data Fork of the project.
Still I get the same error.


Which error exactly ?
In which line of script ?

If the X is in the data fork, SC should find it.

The problem may not be where you think.

Post your script. Describe precisely, step by step, what you're doing.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: XFcns in Player & Standalone

Postby bmartin » Wed Jan 07, 2009 6:33 am

There are 2 reasons that I can think of. 1) the external is an older format external and you are trying to run it on an Intel machine. 2) the syntax is incorrect. I have see this myself, but since it runs under SuperCard in the RTE this is doubtful.

Can you create a smaller simple project to test the externals in? Build the standAlone and project file and try both?
Bruce Martin

Mac Os 10.6.3
2.8 Ghz Intel Core 2 Duo
4GB 1067 MHz DDR3
User avatar
bmartin
 
Posts: 149
Joined: Mon Jul 07, 2008 7:26 am
Location: Stroudsburg, PA

Re: XFcns in Player & Standalone

Postby kgeiger61 » Wed Jan 07, 2009 7:36 am

Problem is resolved... I was using both sortField and sortFieldByItem, but only had sortFieldByItem in the data fork. D'oh! (as Homer Simpson would say!)
kgeiger61
 
Posts: 5
Joined: Tue Jan 06, 2009 8:58 am

Re: XFcns in Player & Standalone

Postby ChuckKalish » Sun Feb 22, 2009 10:00 am

I'm having the same problem-- though not because I've left out one of the XFcns.
I suspect I may have the "older" version of the function (referenced above, and I am using an intel machine). How can I tell?

In Supercard Help I cannot install sortfield into my project because most of my projects are grayed-out in the menu. If I copy it from an older project, it doesn't work when I create a standalone.

I have had success in only one way: I use supercard help to export the external, then I open my project, go to the resource manager and copy the function from the external file into the data fork. This suggests something awry, but I don't know what.
Thanks for any pointers.
-Chuck
ChuckKalish
 
Posts: 8
Joined: Tue Nov 04, 2008 10:25 am

Re: XFcns in Player & Standalone

Postby Scott » Tue Feb 24, 2009 7:22 am

cwkalish wrote:I'm having the same problem-- though not because I've left out one of the XFcns.
I suspect I may have the "older" version of the function (referenced above, and I am using an intel machine). How can I tell?

Most externals will return version numbers when passed a "??" or a "!". Of course you'll need to get them to run in order to determine what version they are. :)

In Supercard Help I cannot install sortfield into my project because most of my projects are grayed-out in the menu.

I am assuming you mean the file dialog here. This would tend to indicate the projects you are trying to install into are not current SuperCard projects based on creator code or extension.

If I copy it from an older project, it doesn't work when I create a standalone.

Starting in SuperCard 4.6 externals became Universal Binary. The are not compatible with older versions of SuperCard; and older externals are not compatible with SuperCard 4.6 (unless it is running under Rosetta).

This suggests something awry

Indeed... but without more info we're just throwing darts in the dark.
User avatar
Scott
Site Admin
 
Posts: 1217
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: XFcns in Player & Standalone

Postby ChuckKalish » Wed Feb 25, 2009 2:28 pm

Cool. I didn't know about the version info.
I get Sortfield copyright 2006 when I pass it a !
In Supercard help Sortfield is listed as version 4.6

I think the problem is that some of my projects are 4.5 projects. I often start a new project by editing an old one. (Get info indicates the the "kind" of my project is Supercard 4.5 project). Can I update these projects somehow?
ChuckKalish
 
Posts: 8
Joined: Tue Nov 04, 2008 10:25 am

Re: XFcns in Player & Standalone

Postby Scott » Wed Feb 25, 2009 3:15 pm

Both SuperCard versions 4.5 and 4.6 use the same project file format (.sc45). Type="MDOx" Creator="RUNx". Only the externals have changed due to Universal Binary architecture.
User avatar
Scott
Site Admin
 
Posts: 1217
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada


Return to Using Externals

Who is online

Users browsing this forum: No registered users and 1 guest