Re: Mystery with arrays (lost key)

2002-04-10 Thread Dave Cragg

At 7:11 pm -0400 9/4/02, andu wrote:
In this case test2 is still a variable but it also has a value and
keys() returns the correct number of keys. Having to quote or not a
variable name depending on it having a value is not exactly the Metacard
I use to know ;-).

Don't you have this the wrong way round? :)

Going back to the original example in this thread 
on mouseUp
   IF 1=2 THEN
 put  1 into test2
   else
 put 55 into  GrandTotals[test1]
 put 66 into GrandTotals[test2]
 put 22 into  GrandTotals[test3]
   end if

   put keys (GrandTotals)
end mouseUp

The poster (T.G.) seemed surprised that test2 wasn't a valid key. I 
think the bigger surprise should be that test1 and test3 are valid 
keys. The standard way to use literals is to quote them. The fact 
that Metacard let's us get away without quoting literals if there is 
no variable with the same name isn't a good reason to do it that way. 
For our sanity, we should probably always presume the following two 
statements will produce different results.

put 66 into GrandTotals[test2]
put 66 into GrandTotals[test2]

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



Re: Mystery with arrays (lost key)

2002-04-10 Thread Robert Brenstein

For me, the use of non-quoted literals is more the source of 
confusion than any other factor. If they weren't allowed, then MC 
would require the above lines in question to look like this:
  put  1 into test2
  put 55 into  GrandTotals[test1]
  put 66 into GrandTotals[test2]
  put 22 into  GrandTotals[test3]

Then it would be explicit and clear why keys(GrandTotals) are what 
they are above:
1-- (value of 'test2' variable, used as a key)
test1-- (test1 string)
test3-- (test3 string)

I believe MC's assumption about 'test1' and 'test3' being char 
strings was meant to make life easier for us. In this case, however, 
MC's ease-of-use string-handling seems to be giving us enough rope 
to hang ourselves!


As far as I know, the use of non-quoted literals comes from HyperTalk 
and Scott strongly recommends to always quote literals. It is 
definitely a cleaner way to code and eliminates any ambiguities.

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



MetaCard 2.4.2 gamma-test

2002-04-10 Thread Scott Raney

The MetaCard 2.4.2 gamma test (release candidate) is now available in
the directory ftp://ftp.metacard.com/MetaCard/2.4.2/

Only the usual Win32/Mac/Linux engines are available there now, but
we'll be building the rest of the UNIX platforms over the next couple
of days and will put them in that directory as they become available.
  Regards,
Scott


Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...

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



Re: Determine Write Protection?

2002-04-10 Thread Scott Rossi


I asked:

 On Windows, is there any way to determine if a folder or the drive is 
 write-protected without actually trying to write a file?

In answer to the above, it is correct that I can use the detailed 
folders function to retrieve the file permissions of a folder?  If yes, 
then apparently 777 is OK to write, but 555 is read-only?

Thanks  Regards,

Scott Rossi
Creative Director, Tactile Media
[EMAIL PROTECTED]
http://www.tactilemedia.com


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



RE: Determine Write Protection?

2002-04-10 Thread Yates, Glen



 -Original Message-
 From: Scott Rossi [mailto:[EMAIL PROTECTED]]
 In answer to the above, it is correct that I can use the detailed 
 folders function to retrieve the file permissions of a 
 folder?  If yes, 
 then apparently 777 is OK to write, but 555 is read-only?

Well, more accurately 777 is read, write, and execute for owner, group,
and world. And 555 is read and execute for owner, group, and world.

But, I see now that you are talking about folders (directories), and they
must have execute privileges. If, however you only wanted read permissions
for everyone for a file, with no ability to execute the file, then the
proper permissions would be 444

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



Re: Determine Write Protection?

2002-04-10 Thread andu

Scott Rossi wrote:
 
 I asked:
 
  On Windows, is there any way to determine if a folder or the drive is
  write-protected without actually trying to write a file?
 
 In answer to the above, it is correct that I can use the detailed
 folders function to retrieve the file permissions of a folder?  If yes,
 then apparently 777 is OK to write, but 555 is read-only?

Don't know on Windows but on Linux 666 is read/write for all and 644 is
read/write by owner and read by others. Maybe that helps.

 
 Thanks  Regards,
 
 Scott Rossi
 Creative Director, Tactile Media
 [EMAIL PROTECTED]
 http://www.tactilemedia.com
 
 
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard

-- 

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



Re: Determine Write Protection?

2002-04-10 Thread Scott Rossi


 From: Scott Rossi [mailto:[EMAIL PROTECTED]]
 In answer to the above, it is correct that I can use the detailed
 folders function to retrieve the file permissions of a
 folder?  If yes,
 then apparently 777 is OK to write, but 555 is read-only?

 Well, more accurately 777 is read, write, and execute for owner, 
 group,
 and world. And 555 is read and execute for owner, group, and world.

 But, I see now that you are talking about folders (directories), and 
 they
 must have execute privileges. If, however you only wanted read 
 permissions
 for everyone for a file, with no ability to execute the file, then the
 proper permissions would be 444

Thanks for this Glen.  Actually, what I need to verify is that a 
selected directory has write permissions.  It appears from checking 
several pre-existing writable folders that the octal is 777 on these.  
So in my script I was planning to use:

# tFolderInfo is the detailed folder
# information of a user-specified folder
if item 10 of tFolderInfo  777 then doAlertStuff

In your opinion, will this suffice?

Regards,

Scott Rossi
Creative Director, Tactile Media
[EMAIL PROTECTED]
http://www.tactilemedia.com

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



RE: Determine Write Protection?

2002-04-10 Thread Yates, Glen

 -Original Message-
 From: Scott Rossi [mailto:[EMAIL PROTECTED]]

 Thanks for this Glen.  Actually, what I need to verify is that a 
 selected directory has write permissions.  It appears from checking 
 several pre-existing writable folders that the octal is 777 
 on these.  
 So in my script I was planning to use:
 
 # tFolderInfo is the detailed folder
 # information of a user-specified folder
 if item 10 of tFolderInfo  777 then doAlertStuff
 
 In your opinion, will this suffice?

No.

Because, lets say I create a directory mydir and I don't want other people
to muck with it, so I do a:

chmod 755 mydir

Now if I run your program, I should still be able to write to this
directory, but if someone else ran your program, then they would not be able
to write to that directory. Remember, that the permissions are in the order
(user, group, other).

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



Re: Protecting Things from prying eyes....

2002-04-10 Thread Michael Crawford

I recently ask the list for suggestions about the best method for
protecting images that are stored on an web server but accessed from within
Metacard. Thanks to everyone who responded. Here are a couple of follow up
notes...

Dave Cragg suggested.

One way would be to store the images as custom properties in a
metacard stack (one or more images per stack).  This would stop them
being viewed by a browser or other application. (But the image data
could be retrieved by anyone with Metacard.)

Then download the image stack, open it invisibly, put the custom
property that holds the image into the image object in your Metacard
application.

I did think about doing that. What I liked about having each image seperate
(if encoded and compressed) is the fact that I can get Metacard to start
downloading the images individually and storing them in the cache. In some
cases there may be lots of pictures in some sections (may be 50 -60) other
sections will only have a few (perhaps 5 or so). Only one picture will be
shown at a time. By individually downloading each picture the app should
seem much more responsive.


Dar Scott thought

 1) I could either encrypt the images using some other method than
 base64 I
 am open to suggestions about how I could do this.

Any simple method I give you would hardly be better than the
obfuscation that you already have.

If you must do more, the next step is serious encryption.

One approach is to have the stack run a command line PGP
application.  Since NAI dropped the PGP line, your choices are
limited if this is a commercial application.  I'd consider GnuPG.
It is available on several platforms.  It is a little rough around
the edges but should work for your narrow need.  (If you find a
shrink wrapped legal copy of PGP 6.5.8 command line commercial and
don't need it, contact me.)

I did consider a better form of encryption and even started doing some
preliminary investigations into it. I concluded that while doing this would
be very interesting and very useful for me and other people (I don't think
I will be the only person interested in encryption of material for use in
Metacard :-) )It kind of turns a small project into a big one.

Alternately, if you have control over all computers involved, turn
on IPSec for the applicable connections.

Unfortunately the requirements of the app mean this won't be possible.
Users will need to be able to access the suff from home as well.

 2) I could build a better password protected site with cgi's or
 ASP or some
 such thing though then I have issues with server hosting etc.

Same problems

What I was thinking of doing was something along the lines of

Metacard app contacts server.
Server sends out the password for the day, hour or minute for example...Bob

Metacard then compares the password, Bob with an internal list, which
could be very long...
-- Bob =Eachway
-- Fred =ies_back
-- Jack =Upped

Metacard logs on as Eachway with a post type of action and gets the
images etc required.

A bit of time passes. An internall function on the server changes the
required password for access to Jack

So while the passwords will be visible it will takle a resonable amount of
effort to get all of the required passwords. Basically you will have to
monitor what the Metacard app is up to over a period of time. That could be
quite a considerable period of time.

Not that I am actaully going to do this. Just an idea

 3) I am just being to paranoid about the whole thing. If anyone get's
 through all of the road blocks I have created perhaps I should
 just give
 them a chocolate fish  and a certificate and not worry about it...

Simple obfuscation is appropriate in some cases and it may be in
this case.  You have to look at the economic factors for the spy
and use that to assess the probabilities in assessing your risk
(prob and cost).  You also should look at other factors such as the
cost of the stack getting bogus pictures.

If these are pictures of a new product and you don't want Ford,
Microsoft or France to see them, then you may need strong
encryption.  On the other hand, if you don't want people to see
your maps of NZ that you worked so hard to make unless they pay for
it, then encryption is less important.

My wild guess is that you can probably get by with even simpler
obfuscation and then forget about it.

You are correct. I think Ken Ray's response says it all...


 1) I could either encrypt the images using some other method than base64 I
 am open to suggestions about how I could do this.

 2) I could build a better password protected site with cgi's or ASP or
some
 such thing though then I have issues with server hosting etc.

 3) I am just being to paranoid about the whole thing. If anyone get's
 through all of the road blocks I have created perhaps I should just give
 them a chocolate fish  and a certificate and not worry about it...

3.

:-)

Ken Ray



Thanks to all of you


Michael Crawford..



Re: MetaCard 2.4.2 gamma-test

2002-04-10 Thread erik hansen

is Metacard 2.4.2B4 PPC good for Mac 9.2.2? 

=
[EMAIL PROTECTED] http://www.erikhansen.org

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Call WinAPI?

2002-04-10 Thread Scott Rossi

I have a MetaCard stack that launches a client's installer 
(InstallShield).  The client wants to me to determine if I can hide the 
decompress progressbar of their installer using my MetaCard stack.  I 
was asked by the programmer of the client to see if I can get MetaCard 
to call WinAPI to launch our setup and use Shell32.ShellExecute with 
SW_SHOWMINIMIZED to hide the progress bar.

Anyone know if the above can be translated into a command/script that I 
can issue from MC?

Thanks  Regards,

Scott Rossi
Creative Director, Tactile Media
[EMAIL PROTECTED]
http://www.tactilemedia.com

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



Re: Call WinAPI?

2002-04-10 Thread Dar Scott


On Wednesday, April 10, 2002, at 07:24 PM, Ken Ray wrote:

 If they don't have a command line argument, you will need to have 
 some other
 app (such as a small VB app) do this for you (unless someone else 
 knows how
 to do this).

Try the shell command start.  I use it for console apps and it 
might work for GUIs.  I'm not sure what Windows has that, though.  
My W2K does.

Dar Scott

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



Re: Call WinAPI?

2002-04-10 Thread Phil Davis

I opened a DOS window on my Win98SE machine and got this info about 'start'. Looks 
like it should indeed be able to launch an app minimized.

= beginning 

Microsoft(R) Windows 98
   (C)Copyright Microsoft Corp 1981-1999.

C:\WINDOWSstart /?
Runs a Windows program or an MS-DOS program.

START [options] program [arg...]
START [options] document.ext

/m[inimized] Run the new program minimized (in the background).
/max[imized] Run the new program maximized (in the foreground).
/r[estored]  Run the new program restored (in the foreground). [default]
/w[ait]  Does not return until the other program exits.

C:\WINDOWS

=== end =

Phil

- Original Message - 
From: Dar Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 10, 2002 6:53 PM
Subject: Re: Call WinAPI?


 
 On Wednesday, April 10, 2002, at 07:24 PM, Ken Ray wrote:
 
  If they don't have a command line argument, you will need to have 
  some other
  app (such as a small VB app) do this for you (unless someone else 
  knows how
  to do this).
 
 Try the shell command start.  I use it for console apps and it 
 might work for GUIs.  I'm not sure what Windows has that, though.  
 My W2K does.
 
 Dar Scott
 
 ___
 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: Return Character Substitute

2002-04-10 Thread Sjoerd Op 't Land

Ray Horsley wrote/ schreef:

 Any suggestions on a good substitute for the return character.
What about urlEncode() -ing the input?

 Thanks,
 
 
 Ray Horsley
Regards, / Groeten,
Sjoerd

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