Building 2 interacting standalones?

Using Standalone Maker to build executables or delivering projects for use with the SuperCard Player? Discuss it here.

Building 2 interacting standalones?

Postby drpitcairn » Sun Apr 22, 2012 8:44 am

I have started a job that involves two separate projects that interact with each other. I have not done this before so asking, before I can too far along with it, will this work OK or does it need some sort of special treatment?
To be more clear, I am expecting to work with these 2 projects in development, having them open each other, transfer information back and forth, and when all ready to make 2 standalones that I am assuming will work in the same way.
Is this a reasonable expectation?

Thanks,
Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Building 2 interacting standalones?

Postby Lisa » Sun Apr 22, 2012 11:49 am

I'm not really sure if one standalone can be scripted to access another. I mean, I guess you could access the base project inside the standalone bundle, but that sounds like a bad idea to me, even if you're sure the second standalone isn't running.

Is there some reason you can't set it up so that one project is the standalone and the other project is defined as a document of the first? (I have a vague recollection you had a thread on that subject some time ago...)
iMac 24" 3.06 GHz Intel Core 2 Duo, 4 GB RAM, Mac OS X 10.6.8, SC 4.7.3
User avatar
Lisa
 
Posts: 303
Joined: Sun Jul 06, 2008 12:33 pm
Location: San Diego, CA

Re: Building 2 interacting standalones?

Postby drpitcairn » Sun Apr 22, 2012 1:00 pm

Lisa,
Sounds like I should define it as a document of the first but I don't know how to do that. Hints as to words to look up?

Reason I am wanting to have it separate as it is where all the medical case workups are stored and every time I give them a new version, they lose what is already there, stored.
Here is a picture of each card saved.
case analysis.gif
case analysis.gif (47.93 KiB) Viewed 3423 times
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Building 2 interacting standalones?

Postby Lisa » Sun Apr 22, 2012 2:37 pm

You would do that in Standalone Maker when building the main project. You need to assign appropriate type/creator codes so the OS will recognize them as an app/document pair. I could swear there's a thread on this somewhere, try searching the forum on "document"?
iMac 24" 3.06 GHz Intel Core 2 Duo, 4 GB RAM, Mac OS X 10.6.8, SC 4.7.3
User avatar
Lisa
 
Posts: 303
Joined: Sun Jul 06, 2008 12:33 pm
Location: San Diego, CA

Re: Building 2 interacting standalones?

Postby vinnie-bob » Mon Apr 23, 2012 5:43 am

I think there is just a little blurb about using documents with Standalones in the User's guide.

There is another option, though. If this was all just plain text data (i.e., not RTF) you could just save all the card data in a tab-delimited text file (which would require some reformatting of the line-delimited fields with commas) or save it as a text file with special delimiters (which would not require conversion of the line-delimited fields).

The advantage here is that you simply have to add the data from a newly created card to the data backup file when the user saves the case as a "saved case card", and store that text data file in the Supercard folder in Application Support, or store it somewhere else where it is hidden from deletion when the user upgrades the project. Another added advantage here is that you have a "safe copy" of the saved data which is available should the original project become corrupted.

The *problem* with your data as it is now, is that several of the fields contain formatted text, either colored or underlined. This would be lost if you used just a text file to save the data. To overcome this problem, you would probably need to save those particular fields as separate RTF files in your "safe location". These could be named files, and each one would be named so that you can re-import it into the original file when needed. For example, file names like "card 1 rubric 1", "card 1 rubric 2", and "card 1 notes".

Then when you send users an updated project, and they "lose" all their saved cards, they just have to select "Import Saved Cases data…" from the File menu. You script the recreation of the saved cases on the fly reading it from the saved data text file and/or rtf files. Violà

Edit: Looking at your card, I wonder whether underlined text in "rubric" fields are actually hyperlinked. If they are, forget all the above -- you need to used a Standalone document.
------
vince
------
User avatar
vinnie-bob
 
Posts: 219
Joined: Sun Jul 06, 2008 10:55 am
Location: Des Moines, Iowa, USA

Re: Building 2 interacting standalones?

Postby drpitcairn » Mon Apr 23, 2012 8:13 pm

I took Lisa's hint and read about creating a document in the User Guide. Here is what it says in that regard:
A standalone may have documents, just like any other application. As mentioned above, when a standalone is built, it takes the place of the SharedFile in the message passing hierarchy. Projects created by a standalone with the new project command, and given the appropriate File Type and Creator codes (see below) can be opened as “documents” of the standalone (called “project documents”).
All messages that would normally pass from the Project Script of a SuperCard project to the SharedFile will pass through the Project Script of a project document to the standalone which “owns” it. For example when a standalone opens one of its project documents, the openProject message is sent to the Project Script of the project document and, if not trapped, will go to the Project Script of the standalone.
NOTE: If your standalone needs to access other projects, you will have to change the creator code of all of these projects to the same creator code which you assign to your standalone; if you do not do this, your standalone will not be able to access these projects. When Standalone Maker builds your standalone, it will set the creator code for your standalone to that which you stipulate, but it will not set the creator code of any other projects. For more detailed information on type and creator codes, read the section entitled Creator Code Information presented later in this document.

So I opened my project in SC and made a new project while it was open but, best I can tell, it is a separate project like any other. I am realizing I don't really understand the user guide. I don't see how a standalone can come to "own" a document. I am assuming there is something else I have to do other than just making a new project, but the guide does seem to say that the document is different. Since it says:
Projects created by a standalone with the new project command, and given the appropriate File Type and Creator codes (see below) can be opened as “documents” of the standalone (called “project documents”).

it would seem that there is a difference between making a new project from within a standalone vs. the working copy. Do you read it that way too?
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona


Return to Building Standalones

Who is online

Users browsing this forum: No registered users and 1 guest

cron