Re: Standalones and file icons

2002-10-11 Thread Tereza Snyder

on 10.11.02 7:56 AM, Shari wrote:

 I have a standalone, with embedded stacks, and with external stacks.
 
 The standalone has a creator code and custom icons, and all is well.
 
 I want the external stacks to also have custom icons, different from
 the standalone, but nothing I've tried gets the icons to stick.

...
 

 What specifically, needs to be done, to have stacks with custom
 icons?  The stacks are part of the standalone program, mostly to save
 data into, but have other uses as well.
 

Here's what I do:

Create icon resources for your auxiliary stacks, and set them up in the BNDL
resource to apply to files of type 'MSTK'.

Save your auxiliary stacks with stackfiletype MYAPMSTK where MYAP is
your creator code. Now, so long as you don't save the auxiliary stacks from
the development environment without setting the stackfiletype, they should
display your icon in the finder. You may need to rebuild the desktop for the
change to appear.

But to keep myself sane, I separate this task from development per se by
making it part of the build process. I run a lockup utility script before
building a standalone, that loads all my auxiliary stacks into memory one at
a time with lockmessages true, runs lockup on each (a handler in the stack
script that empties fields that ought to be empty, etc.) and saves each with
the correct stackfiletype into my distribution directory. In addition,
I've modified the standalone builder script to add resources (like the BNDL
resource, a version resource, and the icons) to my application from a
separate resource file during the build. After all, it doesn't matter what
icons those stacks have on my development machine - it's the distribution
that counts.

Hope this helps,

tereza



+ Tereza Snyder 
+ Senior Software Developer
+ Attainment Company, Inc.
+ www.attainmentcompany.com
+ 800.327.4269

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Front and back scripts

2002-10-11 Thread Richard Gaskin

Shari wrote:

 Interesting discovery...
 
 A stack retrieves scripts from (buttons in) another stack, and puts
 them into the front and back scripts.
 
 All is well.
 
 The stack opens another stack, does things, and closes it.  And the
 front and back scripts are now gone, and must be reset.
 
 I've put it in the resumeStack handler, to reset them.  Not a problem.
 
 Just a surprise when things quit working.  So many surprises...

Is there an opestack handler that triggers the replacing of the backscripts?

I've been relying on backscripts extensively for years and found MC's
implementation the most robust yet.   If this is indeed a bug I'd report it,
but first check the messaging to see if there may be something less
mysterious at play. :)

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Put URL - getting files from a remote computer

2002-10-11 Thread Phil Davis

If you're relying on an FTP server to return the file to you, it seems like the 
request should include info about the kind of service needed from the Mac. In other 
words, instead of this:

 put url  
 (file:username:password@address/hardDrive/users/myAccount/filePath/ 
 fileName) into fld X

Try this:

 put url  
 (ftp://username:password@address/hardDrive/users/myAccount/filePath/ 
 fileName) into fld X

I haven't tested it - just guessing.

Phil


- Original Message - 
From: Gregory Lypny [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 5:28 AM
Subject: Put URL - getting files from a remote computer


 Hi Everyone,
 
 Is there a way to use Put URL to get a file from a remote Mac (OS X)  
 that has FTP access turned on?  I've tried
 
 put url  
 (file:username:password@address/hardDrive/users/myAccount/filePath/ 
 fileName) into fld X
 
 but perhaps I have the syntax wrong.
 
 Greg
 
 Gregory Lypny
 Concordia University
 ___
 Better for us if you don't understand.
 The Tragically Hip
 
 http://pareto.concordia.ca
 
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Put URL - getting files from a remote computer

2002-10-11 Thread Ray Horsley

on 10/11/02 5:28 AM, Gregory Lypny at [EMAIL PROTECTED] wrote:

 Hi Everyone,
 
 Is there a way to use Put URL to get a file from a remote Mac (OS X)
 that has FTP access turned on?  I've tried
 
 put url  
 (file:username:password@address/hardDrive/users/myAccount/filePath/
 fileName) into fld X
 
 but perhaps I have the syntax wrong.
 
 Greg
 
 Gregory Lypny
 Concordia University
 ___
 Better for us if you don't understand.
 The Tragically Hip
 
 http://pareto.concordia.ca
 
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard
 


This is what I use:

put ftp://myName:[EMAIL PROTECTED]/folder1/folder2/myFileName/; into
binFile:myFolderPath/myFilePath

Ray Horsley
Developer, LinkIt! Software

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Standalones and file icons

2002-10-11 Thread Ray Horsley

on 10/11/02 5:56 AM, Shari at [EMAIL PROTECTED] wrote:

 I have a standalone, with embedded stacks, and with external stacks.
 
 The standalone has a creator code and custom icons, and all is well.
 
 I want the external stacks to also have custom icons, different from
 the standalone, but nothing I've tried gets the icons to stick.
 
 Setting the creator code to the same as the standalone, and creating
 the various icon resources, works until the stack is opened.  The
 moment the stack is opened, Metacard itself changes the creator code
 to Metacard's, and Metacard's icons replace mine.  I've tried with
 and without bundle bits, and with various settings checked in the Get
 File Info item of ResEdit.
 
 Even when the standalone opens the stack, and Metacard itself is not
 running except the embedded portion of the standalone, the icons
 change back to Metacard's.  And the standalone and stack, neither
 have Metacard's icons in the resource fork.
 
 What specifically, needs to be done, to have stacks with custom
 icons?  The stacks are part of the standalone program, mostly to save
 data into, but have other uses as well.
 
 I did not set a new file type for the stacks, as Metacard needs to
 recognize them and treat them as stacks.
 
 Walk me thru it guys, for I am baffled (again :-)
 
 Shari C

Shari,

To set the proper document associations on a Mac, get into ResEdit and study
other documents of other programs.  A littl experimentation should help you
do it in your own.  It takes more than just the Get File/Folder Info part of
ResEdit.

To set the proper document associations with your app, you can follow the
directions in the tip on Ken Ray's web site:

http://www.sonsothunder.com/devres/metacard/metacard.htm?file004

I'll also include for you, below, what Ken sent me on it.

Good Luck,

Ray Horsley
Developer, LinkIt! Software



From Ken Ray:


Setting Document Associations in Windows
 (Windows Only) 

 How do I go about setting up basic file association via
 the registry and how do I get the Rev standalone to recognize that it was
 launched with incoming parameters and access  use those parameters?

For the purposes of this example, I will assume a fictitious app called
TestApp, with a file extension of .tst and an installed location of
C:\Program Files\TestApp\TestApp.exe.

1) Create a key in HKEY_CLASSES_ROOT for the extension, and use the default
value to point to the name of the application:

get setRegistry(HKEY_CLASSES_ROOT\.tst\,TestApp)

2) Create a key in HKCR for the application itself, using the default value
to point to a descriptor of the kind of document used by the app - this will
be used in list views to show the kind of file a document of TestApp is:

get setRegistry(HKEY_CLASSES_ROOT\TestApp\,TestApp document)

3) Create a subkey of HKCR\TestApp to hold the default icon for the
application. The value used is the path to the application followed by a
comma, followed by the index of the icon resource inside the application.
MetaCard/Rev document icons are in the first position and I'll assume for
this example that I have used an icon editor to change the icon in the first
position of the TestApp executable:

get setRegistry(HKEY_CLASSES_ROOT\TestApp\DefaultIcon\,C:\Program
Files\TestApp\TestApp.exe,1)

4) Create a subkey three layers deep in HKCR\TestApp to hold the command to
open the application when the document with the .tst extension is
launched. The path to the document is defined in the registry as %1. Any
other info you want to pass to the application you can add to this line. The
nice thing about MC/Rev is that you can create all these keys at once in a
single command:

get setRegistry(HKEY_CLASSES_ROOT\TestApp\shell\open\command\,C:\Program
Files\TestApp\TestApp.exe %1)

OK, now you have all the registry settings. The next thing to do is add some
code to your app. When you launch an MC/Rev app, any command line
information is sent to the application and is retrievable via *environment
variables* numbered $0 on up. The $0 variable will always contain the path
to the application you just launched, and the $1 will contain the first
command-line parameter passed ($2 will be the second, etc.).

So some simple code for this is:

on openStack
  put $0 into theAppPath
  put $1 into theDocToOpen
  answer The doc to open is:   theDocToOpen
end openStack 
(Note that you'll need to bundle in the answer dialog box to your standalone
or you'll never see the message. ;-)

That's it! The next time you create a document with a .tst extension, it
will take on the icon in the first position in the TestApp executable (the
document icon), and if you double-click it, it will launch TestApp and its
path will be passed to the standalone as $1.

Hope this clears things up...

Posted 7/24/2002 by Ken Ray to the Use Revolution List   (See the complete

Put URL - getting files from a remote computer

2002-10-11 Thread Gregory Lypny
Hi Everyone,

	Is there a way to use Put URL to get a file from a remote Mac (OS X)  
that has FTP access turned on?  I've tried

	put url  
(file:username:password@address/hardDrive/users/myAccount/filePath/ 
fileName) into fld X

	but perhaps I have the syntax wrong.

		Greg

	Gregory Lypny
	Concordia University
	___
	Better for us if you don't understand.
		The Tragically Hip

	http://pareto.concordia.ca

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Standalones and file icons

2002-10-11 Thread Shari
I have a standalone, with embedded stacks, and with external stacks.

The standalone has a creator code and custom icons, and all is well.

I want the external stacks to also have custom icons, different from 
the standalone, but nothing I've tried gets the icons to stick.

Setting the creator code to the same as the standalone, and creating 
the various icon resources, works until the stack is opened.  The 
moment the stack is opened, Metacard itself changes the creator code 
to Metacard's, and Metacard's icons replace mine.  I've tried with 
and without bundle bits, and with various settings checked in the Get 
File Info item of ResEdit.

Even when the standalone opens the stack, and Metacard itself is not 
running except the embedded portion of the standalone, the icons 
change back to Metacard's.  And the standalone and stack, neither 
have Metacard's icons in the resource fork.

What specifically, needs to be done, to have stacks with custom 
icons?  The stacks are part of the standalone program, mostly to save 
data into, but have other uses as well.

I did not set a new file type for the stacks, as Metacard needs to 
recognize them and treat them as stacks.

Walk me thru it guys, for I am baffled (again :-)

Shari C
--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Front and back scripts

2002-10-11 Thread Shari
Interesting discovery...

A stack retrieves scripts from (buttons in) another stack, and puts 
them into the front and back scripts.

All is well.

The stack opens another stack, does things, and closes it.  And the 
front and back scripts are now gone, and must be reset.

I've put it in the resumeStack handler, to reset them.  Not a problem.

Just a surprise when things quit working.  So many surprises...

Shari C
--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Save stack as...

2002-10-11 Thread Shari
The goal:

To replace a stack that exists, with a newer version of the same stack.

The full filepaths to the stacks are in the variables, and the stacks 
are in different directories.

delete file origStack
save stack newerStack as origStack
delete file newerStack

This prompts the a stack exists, do you want to purge or save 
dialog.  Even though the stacks were all originally closed.  How do I 
bypass the dialog?   I don't want to open the stacks.  I simply want 
to replace file origStack with file newerStack, deleting the unneeded 
copies.  And do this behind the scenes.

Anybody?


--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Save stack as...

2002-10-11 Thread Ken Ray
Shari,

You need to make sure the destroyStack and destroyWindow of the stack is set
to true. This way it should purge itself as soon as it's closed.

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

- Original Message -
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 6:57 PM
Subject: Save stack as...


 The goal:

 To replace a stack that exists, with a newer version of the same stack.

 The full filepaths to the stacks are in the variables, and the stacks
 are in different directories.

 delete file origStack
 save stack newerStack as origStack
 delete file newerStack

 This prompts the a stack exists, do you want to purge or save
 dialog.  Even though the stacks were all originally closed.  How do I
 bypass the dialog?   I don't want to open the stacks.  I simply want
 to replace file origStack with file newerStack, deleting the unneeded
 copies.  And do this behind the scenes.

 Anybody?


 --
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-11 Thread Phil Davis
What happens if you:
  set the destroyStack of stack origStack to true
  close stack origStack
  wait for messages -- to assure that the mem-resident copy was destroyed
  delete file origStack
  save stack newerStack as origStack
  delete file newerStack

??

Phil

- Original Message - 
From: Shari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 4:57 PM
Subject: Save stack as...


 The goal:
 
 To replace a stack that exists, with a newer version of the same stack.
 
 The full filepaths to the stacks are in the variables, and the stacks 
 are in different directories.
 
 delete file origStack
 save stack newerStack as origStack
 delete file newerStack
 
 This prompts the a stack exists, do you want to purge or save 
 dialog.  Even though the stacks were all originally closed.  How do I 
 bypass the dialog?   I don't want to open the stacks.  I simply want 
 to replace file origStack with file newerStack, deleting the unneeded 
 copies.  And do this behind the scenes.
 
 Anybody?
 
 
 -- 
 --Shareware Games for the Mac--
 http://www.gypsyware.com
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Save stack as...

2002-10-11 Thread Shari
Shari,

You need to make sure the destroyStack and destroyWindow of the stack is set
to true. This way it should purge itself as soon as it's closed.

Ken Ray


They are.  Both boxes in the stack object dialog are checked.
--
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard