Re: Span Tags in HTML

2009-02-09 Thread Brian Yennie

Ray,

What happens if you include body tags? Your HTML probably won't render  
without them:


put htmlbodypThis is an example./p/body/html into  
myHtmlDoc



Greetings again,

The RevBrowser external works great in Metacard, even as far back as  
2.7.4.  Nonetheless, I'm trying to pass in my own html document  
instead of a real web page and it doesn't respond.  So, this works  
fine:


  put revBrowserOpen(tWinID,http://www.google.com;) into  
sBrowserId

  set the BrowserId of image BrowserImage to sBrowserId

But this doesn't:

  put htmlpThis is an example./p/html into myHtmlDoc
  put revBrowserOpen(tWinID, myHtmlDoc) into sBrowserId
  set the BrowserId of image BrowserImage to sBrowserId

Any ideas?

Thanks,

Ray Horsley
LinkIt! Software
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Script Editor problems

2008-11-27 Thread Brian Yennie
What happens if you set the defaultStack explicitly in your script?  
That might convince MetaCard to see your stack as this stack instead  
of the script editor.

i.e.

set the defaultStack to myStack
put the short name of this stack into s_name

= does this return myStack when debugging?


Hi friends,

does someone also experience this strageness?

I cannot debug script that contain this of any kind!?
Like in this little example:

on mouseUp
get 222
put the short name of this stack into s_name
## - Script Editor 1 in Variable Watcher

put the name of this cd into c_name
## - card Editor card

get fld field in original stack
## Error: can't find object

end mouseUp

Any hints are very welcome.

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Problems with delete folder someFolder

2008-08-04 Thread Brian Yennie

Alain,

The .. and . folders aren't actual folders - they are just  
symbolic. Thus there is nothing to delete. Problems deleting regular  
folders is another story, but the . and .. entries shouldn't be  
the source of your problem.


If you are really stuck in Transcript land, you could try using  
shell() to call through to the command-line where things behave like  
you are accustomed to? If you use rm on the command line (UNIX /  
Linux / MacOS X), there are options to recurse and force delete  
everything:


rm -rf /path/to/my/folder

Hope that helps.


Hello y'all,

I'm trying to script MetaCard 2.5 so that it can DELETE a FOLDER.  
But it just doesn't work, no matter what I try. Given my experience  
with the command-line in DOS and in UNIX, I know that one cannot  
delete a folder that has something *in* it. So I tried emptying the  
files in my to-be-deleted folder. This works fine, for the visible  
files but one-or-more of the *invisible* files are hard to get-rid- 
of, namely icon%OD or just icon ... it varies!


I think I have managed to empty all of the files from my to-be- 
deleted folder but it also contains an invisible folder, e.g. ...  
From my CLI experience I know that this is what one types in order  
to go UP one-level in the hierarchy of the filesystem, e.g. next- 
folder-up. But I can't seem to DELETE it ! It's like I'm not-allowed  
to do it. Do I need to set the access-priviledges to 777 or  
something? I test-for the existence of this .. folder, BEFORE 
+AFTER trying to delete it, and confirms the existence of this  
folder in BOTH cases ; IOW, the folder was NOT deleted!!!


I even tried setting the directory one-level-up so that the system  
is in a location that will still exist once I delete the folder the  
system used to be in .. again from my CLI experience.


So what gives ?? Can we delete folders or not ??

Please HELP me if you can, I'm feeling down_own_own. And I would  
appreciate you being around_own_own ... won't you PLEASE, please,  
PLEASE help me, help me HELP-me  ou hou !  ;-)


on deleteFolder folderPath
-- insert your handler here!  :-)
end deleteFolder

Alain



___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


---
Brian Yennie
QLD Learning
(310)-367-7364


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Help - Cannot delete a folder

2008-08-04 Thread Brian Yennie
Bummer... I guess the . and .. are artifacts of a dual Classic /  
OS X situation? Or maybe it's just a MetaCard thing.


In any case, the only other alternative I can think of would be to use  
AppleScript. I'm not an expert there, but undoubtedly there is a  
delete folder function.



Thanks for your advice, Brian. :)


If you are really stuck in Transcript land, you could try
using shell() to call through to the command-line where
things behave like you are accustomed to? If you use rm
on the command line (UNIX / Linux / MacOS X), there are
options to recurse and force delete everything ...


But.. unfortunately.. I'm NOT using a UNIX-based OS. In this case,  
I'm using a Mac Classic 9.x for my MetaCard work. As you probably  
know old Mac's don't provide SHELL-access!


OTOH, since MetaCard 2.5 runs on OLD macs, as well as new ones, and  
provides the delete folder fPath syntax, I should still be able to  
do this, without upgrading to a UNIX-based machine (Mac or otherwise).


Anyone-else want to chip-in some additional information ?  :)

Thanks nonetheless, Brian. :-)

Alain



___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: IsAstack ( )

2007-07-02 Thread Brian Yennie
Only problem I see is that you are going to get false positives if  
the file actually IS a shell script. You might try nibbling a little  
more to get something Metacard/Rev specific.


Also, I know the file format has changed a couple of times in recent  
history -- you might need to check if they have finally banished the  
old Metacard shell script prelude, in which case the function would  
fail.


Lastly, I think your script is still going to load the whole stack  
into memory before reading off the first line. If you want to read  
just 1 line, you'll need to use open / read / close file commands.


Is there a compelling reason to not just check for the existence of  
the file, and that it has the appropriate file extension? Then also  
check for errors when actually opening the stack?


return ((there is a file pFilePath) AND (char -4 to -1 of pFilePath  
is .rev))


HTH,
Brian

I need a robust alternative to if there is  a stack pFilePath  
that does
*not* load the file into memory and potentially  cause problems  
with shared stack

name space.

Can anyone improve or see  anything not foolproof with this?

function isAstack  pFilePath
return line 1 of  url(file:pFilePath)=#!/bin/sh
end isAstack

/H




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: IsAstack ( )

2007-07-02 Thread Brian Yennie

Hugh,

I had one last thought while reading this that might be a clever  
approach. Read a little bit off the front of the currently running  
stack (since you KNOW that's a valid stack) and compare it to the  
file in question. The advantages are that you only have to read a  
tiny bit of the file, and that the script should continue to work  
even if/when Rev formats change. It's not foolproof - there's always  
the chance that another type of file would have the same first bytes,  
but it's probably very unlikely in practice and could always be  
balanced with some sort of fatal error if the file did indeed end up  
being bogus when you actually try to load it.


Reading from a file should be perfectly safe even if it is in use -  
writing is the dangerous one. The only caveat I can think of is that  
the current stack that you are using to compare against must exist on  
disk and not *only* in memory.


function isAStack tFilePath
   ## the file path to the current stack
   put value(word 2 of the long name of this stack) into tStackPath

   ## nibble off the first 8 bytes
   open file tStackPath for binary read
   read from file tStackPath for 8
   put it into myFirst8Bytes
   close file tStackPath

   ## check the first 8 bytes of the file in question
   open file tFilePath for binary read
   read from file tFilePath for 8
   put it into testFirst8Bytes
   close file tFilePath

   ## are they the same?
   return (myFirst8Bytes = testFirst8Bytes)
end isAStack


Hi Klaus, Brian, David:

Good catches. I don't think I dare use  open/read/close in case the  
file (and

it could be any file) is in use, and  testing the suffix is not always
reliable (I am allowing data stacks to be  suffix-less). Since I've  
never used a
shell script, I'm not sure what  differentiates them from a  
'normal' stack in
terms of initial stackfile  characters. I don't think there are any  
differences,
so a bit hard to be 100%  foolproof it this case. Finally, since  
this is for
ssBk and it is purposefully  always saved in 2.4 format (as several  
people have
requested for project  compatibility purposes), I think I shall run  
with my

original.

BUT your comments have been most instructive, and I thank you  all.

/H




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: [ANN] automatic metacard IDE creation tool

2007-06-10 Thread Brian Yennie
There is one slightly unconventional option for hosting which we  
could consider for things Rev-related: Amazon's S3 service. There is  
no contract, and the cost is $0.15/month per GB storage and $0.18/GB  
download. I believe upload is $0.10 / GB.


You can add a CNAME DNS record to any existing domain name to point  
to the Amazon service space, so we could ask RunRev to redirect a  
subdomain, for example:  http://metacard.runrev.com


Obviously we would have to foot the bill somehow, but it wouldn't  
take much and there's no contract nor piggy backing on someone else's  
server space. I can't imagine we would have a GB of files too soon  
nor more than a few GB of transfer...


Incidentally, I've been contemplating writing an S3 library for Rev -  
but haven't gotten around to it. There are some passable desktop  
tools already out for managing files on the service.


Related to that: Would it be possible to mirror the IDE stack files  
somewhere, where a program can download them (maybe ask runrev for  
a bit of space on their server?)? Additionally, is it possible not  
to use zip files (because that needs the zip.dll)? I recommend  
plain stack files, maybe gz, because these can be used within rev/mc.


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: More about image timing

2006-10-22 Thread Brian Yennie
If this is truly just a lock screen issue, wouldn't it stand to  
reason that the Rev IDE is slower because it has a lot more stacks  
open and affected? Or am I missing a crucial piece here?


It would seem that having a bunch of extra stacks open (and in some  
cases visible, including the toolbar) could easily add 1 millisecond  
to every 10 loops of a screen altering script...?


- Brian


J. Landman Gay wrote:
This is interesting. I thought I'd do a very quick, rough test. I  
wrote a fast script:

on mouseUp
  put fld 1 into tPath
  put the milliseconds into tStart
  repeat 100
set the filename of img testImg to 
set the filename of img testImg to tPath
  end repeat
  put the milliseconds - tStart
end mouseUp
I realize there aren't many repetitions in the repeat loop, but I  
just wanted to get an idea. Just as Wilhelm says, in MC it took  
between 139 and 142 milliseconds. In Rev, the same script took  
about 159-161 milliseconds. So that's consistent with what he  
reports.

Then I added a lockscreen:
on mouseUp
  put fld 1 into tPath
  lock screen
  put the milliseconds into tStart
  repeat 100
set the filename of img testImg to 
set the filename of img testImg to tPath
  end repeat
  put the milliseconds - tStart
  unlock screen
end mouseUp
The results were identical on both IDEs -- 45 milliseconds  
consistently with no deviation.
I don't know what this means. The refresh rate of the screen  
appears to vary, but I thought that was set in the engine. Locking  
the screen made my test give identical results though.

I understand this is not conclusive. Just interesting.


Very, more so for RunRev than anyone else.  Given that only their  
system is affected, and us MC users appear to be immune to whatever  
anomaly is at play here, I'm confident they'll take a keen interest  
in identifying the root cause.


--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-28 Thread Brian Yennie

Tariel,

Would not this mean that in this case it's not a CGI solution any more 
but a regular f MC running Stack that listens to some port and 
behaves like web server?
Something  like mchttpd.mc  stack  that Scott Raney put together and 
Andre later enhanced?
If this is the case, what PHP adds to it other than robustness and 
reliability ?


Yes - it is a lot like mchttpd. Using PHP as an intermediary buys you a 
few things which may or may not be important to you:
1) You don't have to open another port to the outside world, since the 
incoming connection is just coming through your web service (port 80)
2) With PHP, you don't have to manage your own incoming HTTP headers - 
PHP does this automatically with the $_GET and $_POST variables.


Other than that, it's mostly personal preference - but I feel better 
with PHP handling the connection to the outside world to let the 
existing web server do the heavy lifting.


In other words, is PHP absolutely necessary for such a solution or not 
?


Not at all! I personally prefer it, but it can certainly work without.

- Brian

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ColorizeScript challenge

2006-04-27 Thread Brian Yennie
I've been silently following this thread, and one more out-of-the-box 
idea comes to mind. What about just colorizing the lines of the script 
currently visible in the editor, and updating when the user scrolls? If 
that limited the whole job to say, 50 lines of script, would the 
original slower, simpler version of the script suffice?


It might not give live scrolling in color - but the update could still 
be snappy enough to not slow down anyone actually reading the script?


- Brian




On 27 Apr 2006, at 01:49, wouter wrote:



On Apr 26, 2006, at 4:34 AM, Dave Cragg wrote:

-snip-


I see a problem with using htmlText. Say a script contains html 
entities such as gt;, for example in a script that builds some 
html strings. Under my script, these would get converted to the 
actual character in the colorized script.

Some more thinking to do.


Another one of which could cause colorizing problems in your script, 
are those #9; and the likes.

Everything behind the # will be considered a comment.


You're right, Wouter. And I think any # or -- in quotes will get 
treated as a comment in my latest version.


Richard, I don't think you should rush to include this in the IDE just 
yet.


Cheers
Dave
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-27 Thread Brian Yennie

Tariel,

I have. What I did was originally based on some of Pierre's comments 
that you referenced.
Basically, you leave the MC stack running normally, and you communicate 
with it via PHP and sockets.


You'll need to install a PHP script such as this one as the 
intermediary:

http://istream.homeunix.com/insead/page4_en.html

Then you need mostly the first two handlers from here:
http://istream.homeunix.com/insead/page5_en.html

The PHP scripts will pass the POST args to your stack, which then sends 
back an HTTP reply. This definitely works - if you have specific 
questions, I may be able to answer them also.


Basically, it would be great to know if anybody succeeded in making MC 
CGI stay-resident on OS X (I don't have linux box) and thus preventing 
 engine quitting  after CGI script is executed and launching the new 
copy of the engine on each call.


Any insights ?

best regards
Tariel


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-27 Thread Brian Yennie

It is rather crud to use PHP - socket - MC.
The MC socket port listening method is not robust enough, and may went 
deaf under some loads.


I think Pierre would disagree. I would also - it's a whole lot more 
likely to handle a big load than a CGI that loads the whole engine with 
every request. There's nothing crud about it, it works quite well.


You don't have to use PHP to handle the browser POST queries. We have 
pure MC CGI written to handle POST running for years without problem.


Unless you need to MC running as daemon explicitly, I don't see the 
need of PHP here.


That was the point of this thread... I think you missed the 
requirements. The original poster already has a working CGI, but wanted 
a daemon solution to easily solve read/write conflicts for the stack.


- Brian

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Answer Dialog at ScreenLoc?

2005-09-06 Thread Brian Yennie

Scott,

What about inserting a frontScript which traps the preOpenStack 
message, checks the target, and reacts if there is an ask/answer dialog 
forthcoming. Same effect, no IDE modification?


- Brian


Recently, Wilhelm Sanke  wrote:

You can of course use the available IDE dialogs: Just add the two 
script

lines I have proposed (at the right place) to them, this is what I
normally do when a new version appears.


Not when I'm delivering tools to other developers, no.  I have no 
problem

messing around with my own development environment but I don't want to
modify other developers' IDEs.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia  Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: savingStandalone and standaloneSaved messages

2005-06-30 Thread Brian Yennie

Richard,

Sounds good to me. It would be great to be able to create StripAndShip 
plugins which worked automatically rather than as a separate tool to 
be triggered manually.


Just the other day I cooked up a script to minimize script size- 
nothing ground breaking, but if this API was available I would throw it 
in a plugin and make it available because people would only have to 
install it once to get it's benefits. As it is now, it's probably not 
worth having to manually use it for the meager impact.


If I'm understanding it correctly, I definitely like it- and I'd 
probably immediately write a thing or two for it.



There are two Rev IDE message which may be useful to add to the MC IDE:

savingStandalone -- sent just before the build
standaloneSaved  -- sent just after

In spite of the departure from convention, the absence of the rev 
prefix does NOT mean these are engine messages.


This means that to support them we need to add them ourselves.

It wouldn't be hard to do, and would allow folks to have an automatic 
trigger for things like StripAndShip handlers.


Any objections to my adding these?

--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Word Wrap, crossed-eyes, and so forth with text-fields

2005-06-07 Thread Brian Yennie

Richmond,

I believe the property is actually dontWrap, and is FALSE by default.
What text do you see getting broken inside words? I've never seen this 
behavior, wrapping works fine here...


- Brian


I suppose I am trying to reinvent the wheel (my problem is
that my wheels are square), but . . .

If I set wordWrap to true words get chopped in half



if I set wordWrap to false one has to scroll laterally and
vertically,

and the whole thing is unusable.

I would like (as, I suspect, would quite a few others) to
know how to wordWrap, but only at the word-boundaries


. . . OK, OK, OK  . . .

just waiting for some smart linguist to point out that
word-boundaries are arbitrary conventions forced on us by
schoolteachers, and so forth.

Notwithstanding this, it is bloody hard work trying to read
a text field where half the words are chopped in half.

Help gratefully recieved,

Richmond

__
See Mathewson's software at:

http://members.maclaunch.com/richmond/default.html
___
---
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: image compress

2005-03-21 Thread Brian Yennie
Rick,
on mouseUp
  answer file image to compress:
  if it is empty then exit mouseup
  put it into timage
Looks like you're just saving the file _path_ here.
Change this:
put it into timage
TO
put url (binfile:it) into timage
  put compress(timage) into URL binfile:/CSMLS Moncton/DATA/AREA
end mouseUp
Keep in mind that a lot of image formats are already compressed, and 
zip compression is much better suited for text than binary... so you 
may want to keep an eye on how much you're actually saving. It won't 
hurt, but worth checking out...

HTH,
Brian
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Link Grammar

2005-01-27 Thread Brian Yennie
This works!
You have to put MC in the LinkParser folder first.
You can also set the directory, if needed, instead:
set the directory to /Users/MyName/SomeFolder/
get shell(...)
Thanks.
Steve
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Link Grammar

2005-01-26 Thread Brian Yennie
How about something like this:
on mouseUp
   put shell(echo 'This is a test sentence' | ./parse)
end mouseUp
HTH,
- Brian
The Link Grammar is a free download that parses English sentences.
http://www.link.cs.cmu.edu/link/index.html
If you have the Xcode Tools loaded, it will compile on Mac OSX.
After that if you enter ./parse in the terminal you can input 
sentences and
it will attempt to assign a grammatical structure to them.

Problem: I wanted to put a MetaCard front end on it by using the
shell(.../parse) command.  It works halfway.  The Link Parser 
attempts to
start but says it can't find some stuff.

Any smart people out there who understand this stuff?
Steve Tripp

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: easy externals question

2004-09-23 Thread Brian Yennie
I would try setting a relative path to your externals- then there 
should be no need to reset the paths. Or is there a reason that you 
would need to change even the relative path?

That's silly. How does RunRev get around it? Or  do they just assume 
we don't
use an external until the next  session?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: 2lz3

2004-08-05 Thread Brian Yennie
Klaus,
It looks like it all came through just fine here, hopefully intact in 
my quote below- perhaps it's your mail client that doesn't like it?

- Brian
Hi MetaCarders,
i just uploaded my new 2lz3 palette, the nice and handy replacement
for the MC tools palette...
What's new:
It is a real plugin now, no installation required, just put it into 
the plugin folder...
You can have new stacks with drag'n'drop functionality...
Preferences are now saved outside the stacks :-)

The following stacks are integrated now:
Analyze it...
Favourites...
Einstein...
Albert can convert all absolute pathnames of images and/or players to
relative pathnames! And import all referenced images into your stacks
in a batch...
So you can work with (possibly changing) referenced images and import
(or convert to relative paths) them before building your standalone...
And much more...
I provide 2 versions, but both have the OS X look, since i faked a 
palette behaviour,
and the overwhelming (?) response to my announcement did not encourage 
me to make
this extra cosmetic work...

But there were some issues with the look of standard buttons on win, 
so i changed
this at least (to please my eyes ;-)...

Mac-Version:
http://www.major-k.de/staxx/MAC2lz3.sit
And for WINDOWS/*NIX:
http://www.major-k.de/staxx/WIN2lz3.zip
I also integrated some of the more handy REV handlers like revGourl 
etc...
into a frontscript (button revfake) and also this handy little 
sucker of Richard's:

on IfX pIt
  if pIt = empty or pIt = Cancel or the result = cancel then exit 
to metacard
end IfX

EXTREMELY handy, once you got used to that ;-)
Thanks Richard!
Donwload and test it, if you like, it's free!
I cannot be without it anymore :-D
And of course you can still have verical or horizontal alignement!
Hope you like it!
Regards
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
P.S.
Feedback very welcome!
___
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: IDE and libUrl

2004-07-27 Thread Brian Yennie
Ah, right. Yes that would cause extra difficulty.
With that said, should the IDE generally be doing something along the 
lines of:

try
   start using stack libURL
catch tErr
   answer error Error loading libURL... version conflict?
end try
And would that relieve some of the problems with any incompatible 
library, in general?

It may not be so straightforward. In the case of a new version of 
libUrl (= 1.1) with an old engine ( 2.6.1) I think a script error 
will pop up as soon as the engine tries to run/compile the script. I 
haven't checked out the details yet, but doesn't the engine start 
compiling scripts as soon as a stack is loaded?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Don't autoinsert default handler ('on mouseup/end mouseup')?

2004-07-21 Thread Brian Yennie
FWIW, I've had exactly this problem: I wanted buttons to pass mouseUp, 
but if I accidentally saved them with the auto-inserted empty mouseUp 
handler, it broke.
My vote would be for it to set the script to empty if it's identical to 
the auto-inserted script.

I don't know how many of you have run into this same kind of thing, 
but it's
an annoyance to me so I thought it might be an annoyance to others as 
well,
and if we're getting set to get a new IDE, now would be the time to say
something. :-)
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Don't autoinsert default handler ('on mouseup/end mouseup')?

2004-07-21 Thread Brian Yennie
The IDE does remove the empty script if you don't change it. If you 
close the script editor without entering anything, the fake handler 
goes away. So it sounds like hitting the enter key is the problem. (I 
always close the editor with Cmd-Opt-click, which doesn't put anything 
into the handler. I miss this behavior in Rev.)

So, if the problem is that people are hitting the enter key, then the 
IDE should probably check for that since it already removes the fake 
handler otherwise.
Huh. Never occurred to me that it would make a difference, but I can 
confirm- I almost always just hit the enter key to dismiss script 
editors...

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


Re: Resize aspect

2004-06-13 Thread Brian Yennie
Simon,
How about something like this:
1) When you create a new stack, set a couple of properties of the stack 
to remember what size it wants to be:

set the actualHeight of this stack to (11*72)   ## 11 inches at 72DPI
set the actualWidth of this stack to (17*72)## 17 inches at 72DPI
set the zoomPercent of this stack to 100   ## start viewing at 100%
2) Ditto for objects- you want to remember what size they _want_ to be 
as accurately as possible (if you just translate each time, 
cumulatively, you'll probably notice them start to drift)

ex:
on newButton
   set the actualHeight of the target to (the height of the target * 
100 / the zoomPercent of this stack)
   set the actualWidth of the target to (the width of the target * 100 
/ the zoomPercent of this stack)
   set the actualLeft of the target to (the left of the target * 100 / 
the zoomPercent of this stack)
   set the actualTop of the target to (the top of the target * 100 / 
the zoomPercent of this stack)
end newButton

3) Create a simple handler which resizes the stack itself and you can 
call when needed:

on zoomLayout toPercent
   set the zoomPercent of this stack to toPercent
   get the rect of this stack
   put (item 2 of it +  round(the actualHeight of this stack * 
toPercent / 100)) into item 4 of it
   put (item 1 of it +  round(the actualWidth of this stack * toPercent 
/ 100)) into item 3 of it
   set the rect of this stack to it
end zoomLayout

4) Catch the resizeStack handler to fix your objects:
on resizeStack newWidth, newHeight, oldWidth, oldHeight
   repeat with i=1 to (number of cd parts)
  put the actualLeft of cd part i * (the zoomPercent of this stack 
/ 100) into newLeft
  put the actualTop of cd part i * (the zoomPercent of this stack / 
100) into newTop
  put the actualHeight of cd part i * (the zoomPercent of this 
stack / 100) into newHeight
  put the actualWidth of cd part i * (the zoomPercent of this stack 
/ 100) into newWidth
  set the rect of cd part i to 
(round(newLeft)commaround(newTop)commaround(newLeft + 
newWidth)commaround(newTop + newHeight))
   end repeat
end resizeStack

All of this (with some work I'm sure, this is off the top of my head) 
should buy you fairly reasonable resizing, although you probably won't 
achieve ultra-accurate layout by nature of the beast- Rev isn't vector 
graphics nor able to store higher zoomable resolutions for you to 
maintain in the background when someone is zoomed out. When the user is 
working at 800x600 pixels, newly created objects are going to be 
limited by the available pixels and when you zoom way back out, you 
might get nudged slightly by rounding inconsistencies.

If you need finer alignment, you might consider other tactics, such as 
allowing objects to be aligned horizontally / vertically and carefully 
honoring that when zooming, etc. But the above approach should give 
reasonable results.

You might also investigate the Rev geometry manager for inspiration...
HTH

Hi all, I want to throw out the following question to see if anyone 
has a stack already done that can do the following...

My stack allows users to create a layout using template objects that 
fit the printed page.  However, some users don't have monitor that can 
display the full resolution, and 11 x 17 layouts are near impossible 
for most.

So I'm looking to make a stack that can resize all objects on a card 
*proportionally* to fit the new stack size (for example, a user wants 
to scale the stack down to 77% because that's all that fits on his 
viewable screen space).  But it will always be an aspect ratio 
proportionate to the layout they are working on.  That way when it 
comes time to print (or preview a print) I can scale everything to 
100%.

Or is there another way?
Sincerely,
Simon
___
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: Scripting the new stack

2004-06-04 Thread Brian Yennie
Shari,
FWIW, I would be careful when scripting the transfer of properties to 
you new stack- as one of those stack properties _is_ the password and 
possibly how you got into the pickle if it wasn't copied exactly...

The script I threw together to copy objects from the old stack to the 
new stack is in the new stack, which I cannot access the scripts of. 
So I am back to the drawing board to write a script to recreate the 
old stack into a new one.  If anyone has such a script already written 
it would be much appreciated.  I meant to save the one I wrote 
yesterday for future reference, but hadn't yet done it.

Removed the password from the original stack, and will now try to 
create a new stack (again) and hopefully no password will be needed.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: colorize script bailout

2004-06-02 Thread Brian Yennie
Did I hear an optimizing challenge
Just kidding- many of you probably have noticed I tend to get a little 
over-zealous when a script gets to being optimized on-list.

I'd be happy to take a crack at the colorizing script over the weekend 
provided nobody is anxious to do it themselves before then.

That and commenting could be made faster if the screen was locked 
first, and faster still if done with htmlText.

Anyone want to tackle that for the IDE?
-
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
(941)-928-7127
[EMAIL PROTECTED]
--
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: erroneous error codes

2004-04-15 Thread Brian Yennie
Could it be that the error is actually rooted in the error dialog, 
which is reading some sort of property or global too soon, and then 
*cough* it gets the fresh one the second time?

On 4/15/04 10:31 AM, Richard Gaskin wrote:

When using MC 2.6 (Rev 2.3 engine) all errors are first reported as 
Not an integer, and only when I dismiss the error dialog and repeat 
the action that caused error do I get the proper error string.
1. Are you folks seeing the same thing?
2. Have any of you taken the time to find out why?
Using the older engine does not produce this issue, but Tuv tells me 
the error codes have not changed.  Obviously something has, so if any 
of you have some insight it'll help save some time in getting this 
addressed.
I get the same thing, and it is driving me nuts. I assumed the codes 
had changed and that we could just dump in the new ones to fix it. If 
that isn't true, I'm not sure what to do from here.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.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: htmltext

2004-03-10 Thread Brian Yennie
FWIW, if anytime you want raw HTML tags to show up in emails for 
everyone, just encapsulate the whole HTML section inside of pre tags. 
Then it will render as source even if HTML interpreted.

For example:

pre

The font tag is not very interesting.

/pre

HTH,
Brian
A text file that contains my previous post:
http://ufp.uqam.ca/mc/htmlTags.txt
Enjoy!
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Storing cgi data in stacks

2004-02-18 Thread Brian Yennie
I can't speak for MetaCard's behavior here, although my hope would be 
that it gives you an error message when you try to perform the second 
write.

However, what you are generally referring to would be acquiring a write 
lock on the stack, which is something you can manage yourself. It's 
mostly as simple as it would seem- you just need to be able to 
communicate some sort of global flag that you scripts can check.

For example:

## check if another script has a write lock
put isLocked() into someFlag
put the seconds into startTime
repeat until (someFlag is FALSE) or (timeElapsed  10)
   ## wait until it's available
   put isLocked() into someFlag
   put the seconds - startTime into timeElapsed
end repeat
if (someFlag is TRUE) then
   put Error: scripts too busy, couldn't write for 10 seconds!
else
   lockStack
   writeToStack
   unlockStack
end if
You could implement the lock/unlock through an external file, say:

function isLocked
  return (there is a file mc.lock)
end isLocked
on lockStack
   put empty into url file:mc.lock
end lockStack
on unlockStack
   delete file mc.lock
end unlockStack
There are more efficient ways to do locking, but this seems appropriate 
here.

HTH,
Brian
And, more importantly, what steps could be taken in a cgi script to 
make
this approach work, if any?  Like, if a stack was currently being 
written
to, would darwin mc know that?  Is there some message returned like 
stack
is in use or something that you could trap for?  And maybe make your 
own
timeout?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Storing cgi data in stacks

2004-02-18 Thread Brian Yennie
Agreed!

I only offer the former since it may be suitable here and Richard 
mentioned he'd rather not learn a DBMS for this task...

- Brian

Even if MC/Rev is really able to perform good results in accessing 
datas
in write mode concurrent accesses with flat-files accesses and locking
procs on stacks, a best practice is to bind it to an ACID compliant
RDBMS (PostgreSQL and Sybase ASE best suitable than Oracle, today) for
such kind of jobs. I use this way all the time and it rocks, even in
about hundreds of concurrent requests peer second (i never had any
server crash over the years).
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Storing cgi data in stacks

2004-02-18 Thread Brian Yennie
I agree with some of your points, but keep in mind that MySQL is 
perfect for some projects.
MySQL 4.0 is much faster than anything you can do inside of MC/Rev 
(unless perhaps a database is so small it doesn't belong in a RDBMS), 
and I've had no crashes in more than 6 months...

I know it is very easy to have a long discussion of MySQL vs other 
databases, but surely you overstate things here based on old 
experiences with MySQL.

No argument that PostgreSQL is another good open source option.

Please, don't never spend time in binding MC/Rev to MySQL 3.23. MySQL 
is
not a real DB server (don't contain any transactions management engine)
and all it can perform (without crashing) will always be better done
inside MC/Rev (even, if needed in connecting the stacks to flat-files).
Else, you will get very good results too, in conecting MC/Rev to
rock-solid real ORDBMS (PostgreSQL, Sybase ASE, Oracle or, even,
OpenBase...).
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Using php

2004-02-18 Thread Brian Yennie
FWIW, I've also used a method similar to Pierre's for PHP script - 
MetaCard daemon work.
I have easily supported 50+ users hitting the system hard (with many 
database queries and a lot of HTML generation) on a modest server. Have 
yet to see where the maximum is.

- Brian

And if the speed is as good as you keep telling us,
then that's even more proof of MC/RR as an excellent
platform for developing distributed business
applications.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Using php

2004-02-17 Thread Brian Yennie
Shari,

If you control the php script, you can always return simple HTML than 
will render using a field's htmlText property, and display that.
You can also just search for the name in the HTML.

HTH,
Brian
The .php script can dynamically insert a person's name onto a web 
page, to personally thank them or whatever.  But for my Metacard 
script to go to that web page and check to make sure the name is 
there, fails.  When you get an URL, what you are getting is the raw 
HTML, not the finished page the surfer sees.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: PHP versus CGI

2004-02-17 Thread Brian Yennie
FWIW, PHP sometimes _is_ run as a CGI script. It's not the norm, but 
PHP is just the language.
The advantage that PHP, Perl and others have it that they have commonly 
installed web-server modules installed, which is basically a built-in 
CGI.

- Brian

* PHP is widely-used and popular ;
* PHP deals with many of the intricit details ;
* PHP is safer than CGI unless you add a lot to CGI ;
* PHP is supported by most service providers/hosts ;
* PHP is part of the very dominant dev platform: LAMP
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: PHP versus CGI

2004-02-17 Thread Brian Yennie
I think the mitigating factor here that's being missed somewhat 
(although many of the point raised are valid), is that all of these 
setups are mostly dependent on a properly-configured webserver.

If you configure things in a secure fashion, someone can write the most 
malicious of CGIs and it won't be able to do anything. It'll run under 
a user that doesn't have write access to anywhere secure, and even if 
it purposefully crashes itself, it'll just go away and end up making 
the webserver return an error page. MetaCard can't write to disk if the 
user that launched the application can't.

Bad configurations make modules and CGIs both a potential hazard, good 
configurations make it nearly impossible to do any harm with either.

Well, unless you are on a Microsoft platform...

- Brian

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


Re: Mail

2004-02-13 Thread Brian Yennie
If you just want to email from a CGI on a machine your control, you may 
want to try using shell() with sendmail.
What platform? OS X has a broken sendmail configuration, but there are 
article on Apple and Oreilly sites for fixing it.

HTH,
Brian

So I tried setting up a form on my web page via CGI, Metacard can take 
them to that form and they can fill it out.  Trouble so far is that 
either I can get the form to update the info on a web page, but not 
email me.  Or I can get the form to email me, but not update the data 
of a web page.  It needs to be both so that I can verify that they did 
indeed enter their name as it appears on my list.

Any suggestions?

(Specific suggestions...  with actual usable code for either Metacard, 
SMTP, or CGI much appreciated.)
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: The Get-Post option...

2004-02-13 Thread Brian Yennie
Shari,

I think you are misunderstanding the meaning of post. POST sends a 
request in POST-format to a url, e.g. a CGI app.
I think what you are looking for is an FTP upload?

put userList into url ftp://www.someurl.com/list.txt;

OR

If you had a CGI that adds a name, you could do something like:

get url http://www.someurl.com/list.cgi?name=urlEncode(newUserName)

 post userList to url http://www.someurl/list.txt;
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Flushing events

2004-02-06 Thread Brian Yennie
It sounds like your mouseUp is considered a message, rather than an 
event- since you are generating it yourself rather than it coming from 
an event queue. We wouldn't want FlushEvents() to cancel all of the 
pending messages, no? I think it may just be a coincidence due to the 
fact you are sending your own mouseUps, perhaps it would be clearer to 
send yourself a custom message and use cancel?

- Brian

tried it. in the message, in the stack, in a palette just to be 
shure...

Tried what's written in the reference.

Is it a bug?

using a conditional whether to send the next mouseup cleaned the queue 
but
it's puzzling that it doesn't work...

I'll test RR...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Scott Rossi
Sent: Friday, February 06, 2004 20:32
To: [EMAIL PROTECTED], Discussions on Metacard
Subject: Re: Flushing events
Recently, MisterX  wrote:

Any experience anyone?

get flushevent(mouseup) doesn't remove my mouseup events... ;(((
Try flushEvents()  [plural].

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia  Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.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

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


Anyone care about stack size?

2004-01-29 Thread Brian Yennie
I'm curious, how many of you consider stack size a major concern?
I was playing around the other day, and realized there is a pretty 
simple way to shrink your stacks permanently:

1) Create an invisible, empty stack, Wrapper

Do this:
set the stackData of stack Wrapper to compress(stack SomeStack)
set the visible of stack Wrapper to false
Then add a script like this to Wrapper:
on openStack
go stack (uncompress(the stackData of this stack))
close stack Wrapper
end openStack
Voila! Save the wrapper to disk and it made my 900k stack shrink to 
about 300k, and it still opens in virtually the same amount of time. Of 
course if I want to make changes, I would need to make the changes and 
re-stuff the stack into the user property.

Obviously most files are compressed anyway when they are distributed, 
but in this case they remain compressed on disk regardless.

It seems that one could write a plugin which cloned itself, prompted 
the user to pick an open stack, and then created a new, wrapped and 
compressed stack which could then be built into a standalone, etc.

Personally, I'm not working on anything where file size matters, but 
does it to others?

- Brian

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


Re: Compression and Encryption

2004-01-08 Thread Brian Yennie
Well, I can confirm the problem... the simplest string I could 
replicate the problem with was a bb a bb.
As for mcEncrypt, I believe it is undocumented and possibly used in the 
licensing scheme, so it's on purpose that there is no function to 
reverse it.

HTH a little,

Brian

Greetings,

I've run into an interesting compression problem.  The second 
character in
each line of myData is a tab.

on mouseUp
  put Ate into myData
  put Bte into line 2 of myData
  put compress(myData) into myDataCompressed
  put decompress(myDataCompressed) into myDataUncompressed
end mouseUp
I get an error trying to decompress this simple bit of data after
compressing it.  Any ideas anyone?
On a related note, if I use the following:

  put mcEncrypt(anyData) into anyDataEncrypted

It works fine.  But how do I get it back out?  There seems to be no
corresponding mcDecrypt() function.
Any help is greatly appreciated.

Thanks,

Ray Horsley Developer, LinkIt! Software

___
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: Metacard support

2003-12-05 Thread Brian Yennie
I second that thought- for all of those here that have enjoyed the 
benefits of Scott's obsessive responsiveness in the past and want to 
weigh database options, Valentina really is in many ways the MetaCard 
of the database world, complete with their own Mr. Raney disguised as 
the entirely enjoyable Ruslan. It's a damn nice database emgine for 
many projects, also.

- Brian


Well, I know of another person that provides great support in the same 
spirit: Ruslan Zasukhin of Paradigma Software, the main developer of 
Valentina Database family. Coincidently MC/Rev and Valentina are a 
great match. Ruslan participates very actively in his product support 
list, his replies are often within short time of the question showing 
there, and even helps to some degree with user issues, like help with 
designing databases. He is also reknown for acting quickly on the 
reported bugs and listening to user input in product development.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: URL exists?

2003-11-07 Thread Brian Yennie
I think the only way that will be technically faster than this would be 
to use sockets, and make a HEAD request, rather than a GET for the url 
in question.

You'd have to look up http protocol, but basically what it does it let 
you get just the http headers for a page rather than the contents. 
You'd also have to parse the return code...

But it would be faster than fetching the whole page when it exists. If 
you want to try that, I can probably dig out a URL to read up on it.

Depending on the circumstance, it might also help to do some sort of 
lookup on the domain name first and see if that fails- 
hostnameToAddress() for example.

HTH

- Brian

What's the fastest way to check if an URL exists?

I tried:

if URL http://www.whatever.com/something/else.html; is empty then
  blah blah blah
end if
Very very slow.  Is there a faster way?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Getting MC CGI to work on OS X with Web Sharing turned on

2003-10-18 Thread Brian Yennie
The cgi-bin alias is for the whole domain. If you want separate 
cgi-bin folders for each user account, you'll need to edit the Apache 
config file (/etc/httpd/httpd.conf). Don't ask me how.
Check out this section to set specific options for user directories:

#Directory /home/*/Sites
#AllowOverride FileInfo AuthConfig Limit
#Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#Limit GET POST OPTIONS PROPFIND
#Order allow,deny
#Allow from all
#/Limit
#LimitExcept GET POST OPTIONS PROPFIND
#Order deny,allow
#Deny from all
#/LimitExcept
#/Directory
Just uncomment and modify, I would try adding ExecCGI to the list of 
options.

You'll have to cruise to apache.org if you want documentation on all of 
the options...

HTH

Brian

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


Re: Getting MC CGI to work on OS X with Web Sharing turned on

2003-10-18 Thread Brian Yennie
There's also this:

#AddHandler cgi-script .cgi

Uncomment it and change the file extension to whatever you want: files 
with that extension will become executable from anywhere.

IOW:

AddHandler cgi-script .mt

The cgi-bin alias is for the whole domain. If you want separate 
cgi-bin folders for each user account, you'll need to edit the Apache 
config file (/etc/httpd/httpd.conf). Don't ask me how.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: 10000 fields and crash

2003-10-05 Thread Brian Yennie
FWIW, I don't think you would want to create a huge number of fields to 
accomodate a spreadsheet implementation: you're better off creating 
only as many as need to be visible and shuttling the data through them.

You do seem to have pointed out a serious inefficiency in MetaCard's 
save routine, however.

Not exactly, but as I'm exploring the possibility to use MC to
simulate a spreadsheet, I could use 10,000 flds to display data,
and therefore for some direct user interaction, like selecting / moving
rows  cols...
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Compress/decompress

2003-08-29 Thread Brian Yennie
Could you use combine and split to shuffle it between text and back? 
Something like:

combine myArray using tab and return
set the compressed_data of fld 1 to compress(myArray)
...
put decompress(the compressed_data of fld 1) into myArray
split myArray using tab and return
I could not figure out how to compress an array.  A multi-dimensional 
array.  The array is stored as a customPropertySet.  Is there a way to 
do it?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Squishing data

2003-08-28 Thread Brian Yennie
I'm not sure what you mean by putting data in an array changing the 
stack size: arrays are held in memory. Do you mean that you write the 
arrays to custom properties?

You may want to try using compress() on the field data, i.e.
set the compressed_data of fld 1 to compress(fld 1)
Then just access the fields with:
put decompress(the compressed_data of fld 1) into fieldData
For performance, you would want to only decompress() once- although 
keeping the uncompressed data in memory bumps your memory requirements 
so you'll have to balance memory vs. performance.

Compress() should get you a reasonable shrink on text, hopefully 50% or 
so.

Brian

The stack with 300 fields is about 15 MB.  I tried putting the data 
into an array, and deleting the fields.  But it actually makes the 
stack bigger to do this.  I created an array with 300 elements, 
myArray[1] held the data from field 1, and so forth.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: MC IDE

2003-08-25 Thread Brian Yennie
Huh? That's exactly the point... it's a BETTER GUI (in some cases, not 
all) which absolutely can be used with the Revolution engine.

So how exactly is anyone doing anything except choosing the best 
product? If the underlying issue here is with Hypercard stragglers from 
the past, I hardly think it's fair to somehow apply that in a negative 
light here.

The Metacard IDE is a better IDE for more than a few people for more 
than a few projects. What else is there to say? Those who agree will 
maintain it, those that don't need not worry about it.

Brian

Maybe you missed something but MetaCard is now only an IDE that can be 
used
with the Revolution engine ;-)

Sorry but our world has changed no matter how much you try and keep it 
the
same.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: MC IDE

2003-08-25 Thread Brian Yennie
Fair enough. It is frustrating encouraging the adoption of a new tool 
when undoubtedly some old users stay out of loyalty, habit, religion, 
whatever you want to call it. What can I say? If Windows really did 
undoubtedly surpass MacOS in every logical person's eyes, I might still 
cling to my Mac- and on the same token Windows users would have a right 
to be frustrated by my fanatacism.

To quote Gandhi, All religions are true.

Ditto on offending anyone- I don't think of even the biggest 
disagreements about MetaCard on this list as anything personal or 
offensive.

In any case, I suggest we kill this portion of the thread (says the one 
adding to it) since there's not really an issue at hand at this point.

Brian

There seems to be two groups of people still interested in MetaCard. 
Those
that for logical reasons made a planned and well informed decision to 
stay
with the IDE and those that are scared of the move and haven't 
investigated
properly as a result. My comments were aimed squarely at the second 
group.

I certainly wasn't trying to offend anyone
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: MC IDE

2003-08-24 Thread Brian Yennie
Monte,

I sympathize with some of your thoughts here, but I think you are 
missing some of the appeal. As someone who has moved from Hypercard to 
Supercard to Metacard (and then to Rev) as each has come out, I have 
always taken the leap to the next tool at whatever point it proved to 
be worth it.

I've been using the Rev IDE for months and am quite comfortable with 
it; however, for about 40% of my work I would still prefer to work in 
the MetaCard IDE. I can't quite quantify a rule for when I use each 
one, but I can tell you that there's no doubt in my mind that when I do 
use the MetaCard IDE, it's because for that particular project it's 
faster, easier and bottom line more efficient.

Maybe some day the Rev IDE will reach a point where it's utterly 
pointless to use the MetaCard IDE, but I kind of doubt it.

If I had to pick one, it would probably be the Rev version. But that 
certainly does not make maintaining the MetaCard IDE worthless!

Please don't insinuate that this has anything to do with Hypercard 
lingerers- I haven't used Hypercard since about 1996 (and by then I had 
a copy of Supercard and was soon to buy Metacard). I've got all sorts 
of IDEs here, and they are most certainly not stuck back in time- don't 
throw out my emacs just because SimpleText looks nicer!

Brian

I still haven't thought of a reason to maintain the MetaCard IDE let 
alone
the documentation. Just because you're comforatable using the MC IDE 
it's no
reason to waste time maintaining it yourselves. It'sll only take you a 
few
weeks to get the same level of comfort with Rev. 2 1/2 years ago 
people on
this list couldn't comprehend why people were still using HyperCard. I 
guess
this is history repeating itself?

Maybe the people lingering here are the ones that only just realised 
that
Apple has stopped working on HyperCard? Well let me tell you that in 10
years time when you realise that MetaCard corp is no longer working on
MetaCard you will move to Revolution anyway. Why not make the move and 
get
it over with? If there's something you're not happy with in the IDE 
then ask
the team to change it. Even spend your time developing a reference
implementation for the runrev team (as I did with the distribution 
builder)
rather than making your life hard and working on MC.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Launching a local file in the default browser

2003-08-17 Thread Brian Yennie
I tried it without the file:/// in OS X as well as with other
variations with less than three slashes. All did nothing. Perhaps it's
the fact they are /-delimited paths that they require file:/// ?
I would suspect this is true. file:// (with two colons) is really the 
proper protocol, as it corresponds to http://;, ftp://;, etc.

Using file:// is really just forming a proper URL- the oddity is that 
file paths also start with a slash, so you get the three slashes. But 
if you think of URLs as a protocol followed by a path, it starts to 
make sense- especially if you are accustomed to seeing http://; by now.

FWIW

Brian

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


Re: Launching a local file in the default browser

2003-08-15 Thread Brian Yennie
Still works... I did miss the local though and skipped my eyes to the 
browser.

In any case, try this form:

tell application Finder
  open location file:///Users/yennie/Desktop/test.html
end tell
The trick seems to be adding the browser-style protocol to the front 
for local files: file://
You should have 3 slashes total- the third is part of the file path.

HTH

Brian

Uh, Brian... he mentioned a local file not a web site. Will this 
still
work?

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Yennie
Sent: Saturday, August 09, 2003 1:49 AM
To: [EMAIL PROTECTED]
Subject: Re: Launching a local file in the default browser
tell application Finder
open location http://www.apple.com;
end tell
... do as AppleScript of course

Yep, the same ol' question:  how do I launch a local file in the
default
browser on Mac OS X?
And for future reference:  Where is the definitive answer archived?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metac ard


___
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: Launching a local file - NEW SOLUTION

2003-08-15 Thread Brian Yennie
To pass file paths to cp, you'll need to escape spaces in the file 
path or put the path in quotes:

replace space with (\space) in filePath

or

put quotefilePathquote into filePath

HTH

Brian


on mouseup
  LaunchIt /Volumes/FourthWorld/4W Catalog/webmerge/WebMerge 
2.0/WebMerge
Help/WebMerge_Help/WebMergeHelp.html
end mouseup

And got an error:

Error:usage: cp [-R [-H | -L | -P]] [-f | -i] [-p] src target
   cp [-R [-H | -L | -P]] [-f | -i] [-p] src1 ... srcN directory
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Unified Revolution

2003-08-15 Thread Brian Yennie
Dear Rev-carders,

It's been bugging me for quite some time that the Rev/MetaCard 
community lacks central resources. As fantastic as the discussion lists 
are (and they are good ones), there's no one way to find an answer, 
obtain an external, submit something you wrote, etc, etc. A few list 
members have taken the time to provide resources online- Ken and 
Richard for starters have excellent stuff available on their sites. I, 
for one, do not, simply because I don't have the time to create a site 
just for that purpose.

So here's the question: how can we, as the user base for Rev/Metacard, 
create a central resource that serves all of us, promotes development 
of useful resources, and brings glory to RunRev?

What I would really love to see is an open source project that 
incorporates several things at once:

1) The now open-source Metacard IDE and any other alternative IDEs 
(i.e. FreeCard)

2) Open-source externals (i.e. custom controls, movie editing, etc)

3) Open-source plugins (i.e. RevNet)

4) Open-source stacks, widgets  scripts (i.e. libSMTP, libURL, etc)

The LAST thing I would want this to be would be a free-for-all. We 
would need people to take on roles in managing these projects. Projects 
would have to be approved, and code would have to be submitted. All of 
the best practices of other open source projects would potentially 
apply.

Would anyone else like to see this kind of organized effort? Who could 
actually contribute to running the entity (as opposed to submitting 
code)?

Would we elect a board? Would this make a difference?

-
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
(904)-997-0212
[EMAIL PROTECTED]
--
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Launching a local file in the default browser #3

2003-08-14 Thread Brian Yennie
FWIW, there's also this nugget:

~/Library/Preferences/com.apple.internetconfig.plist

You can also dig around in:

~/Library/Preferences/LaunchServices.plist

It seems that you can use these to find the actual applications 
assigned to various file formats.

Brian

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


Re: Launching a local file in the default browser

2003-08-14 Thread Brian Yennie
Er... I guess I should probably get some sleep: my solution has this 
problem also for files that don't normally open in a browser.

If there's not a better way, you could work around this by creating a 
dummy HTML file that just redirects the browser to the correct file. 
That'll get you in the right app, *then* open the file.

There must be a better way buried somewhere in AppleScript...

Brian

Same here:  it launches the local file, but in the application that 
matches
the file's creator code and not the default browser. :(
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Launching a local file in the default browser

2003-08-09 Thread Brian Yennie
tell application Finder
   open location http://www.apple.com;
end tell
... do as AppleScript of course

Yep, the same ol' question:  how do I launch a local file in the 
default
browser on Mac OS X?

And for future reference:  Where is the definitive answer archived?
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Memory and Type 2 error

2003-07-31 Thread Brian Yennie
OT Question:  My computer has 128 MB RAM built in.  So I use virtual 
memory to up the ante in PPC.  But OSX seems to have no virtual memory 
to tinker with.  What happens if the computer needs more than 128 MB 
RAM?  I'm outta luck?
This is an over-simplification, but basically UNIX operating systems 
have virtual memory built-in. MacOS X will first swap out memory from 
other running processes, and then eventually when those resources have 
been exhausted, start swapping your own app's memory too and from disk.

Things will slow down, but theoretically you have about as much extra 
memory as disk space.

In the end, it works much better than virtual memory and application 
settings do in OS 9.

But as a last resort, I tried upping Metacard's memory usage from 
1 to 25000, and the stack finally launched.  *sigh*  Two hours on 
this.  I must have last launched this stack when I had Metacard's 
memory set to some really high number.  I think at one time I had it 
set to 75000.
Since you say it's for internal use, this may be acceptable, but if 
you're looking for a suggestion, you might try breaking the stack up 
into a few smaller stacks, or just keeping all of your images on disk 
in a directory and use fileName properties rather than importing the 
images.

Since Metacard loads the entire stack into memory, you can probably get 
a ballpark figure for how much memory it needs to launch by taking the 
file size and adding a few MBs.

HTH,

-
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
(904)-997-0212
[EMAIL PROTECTED]
--
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Buggy post url cmd - socket stays open

2003-07-24 Thread Yennie
FWIW, since this is in fact part of libURL, it is possible to edit the scripts in question and change their behavior if either the need is urgent or it doesn't get officially changed.

If you truly want the socket immediately closed, is there any reason why you can't check for it and close it yourself after the transfer is complete? i.e.

repeat until the openSockets is empty
  close socket (line 1 of the openSockets)
end repeat

HTH,
Brian

I believe you. But the behavior is intentional. By default, the
libUrl script doesn't close the socket after completing a request.
This allows re-use of the same socket which is useful if you are
making a series of requests to the same server, and is in line with
the HTTP 1.1 spec. (The socket will eventually get closed by the
server.)






--
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Buggy post url cmd - socket stays open

2003-07-24 Thread Yennie
Alain,

Glad it worked.

"close socket" is documented under the "close" command, although a bit buried and sparse. You'll find it on the very last line of both the syntax listing and the help text.

FWIW, the Rev documentation is more complete on this particular command- I often find it helpful to have both sets of docs on hand.

Happy post-ing

------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: METACARD ACQUIRED BY RUN REV!!!

2003-07-10 Thread Yennie
In this particular case, I can't argue that either proposition is at all unreasonable, but there is a simple way of looking at this: just imagine that Rev 2.1 (or 2.5, whatever the next major upgrade becomes) is "Metacard 3.0" when it comes out. Seeing as how the Metacard GUI will still be available, and the engine has always been the same, isn't it??

Brian

 What I was saying was this - If Revolution transferred my MetaCard 2.5
 license, right now, to Revolution 2.0.1, for free, I would switch from
 MetaCard development to Revolution development immediately and not look
 back.  Revolution is the future.







------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Moving image contents

2003-07-08 Thread Yennie
I can confirm that "put image 1 into image 2" doesn't work here on OS X. I've tried JPEG and GIF images, nothing unusual about them (as far as I know). I just get an empty image.

ImageData works well in my tests.

------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: METACARD ACQUIRED BY RUN REV!!!

2003-07-08 Thread Yennie
I'm glad you're still on board, Scott- and applaud your willingness to combine efforts with RunRev in expanding the Metacard/Rev community.

I'm not up for hosting a list, but count me in as a helper for the Metacard GUI: I'd love to see it kept up-to-date with the lastest versions of Rev without losing it's original simplicity.

PS: it's at times like this that I miss Grant Schampel
([EMAIL PROTECTED]).  He always loved a good brouhaha, and always had
something insightful to say about the back-room dealings that make
them possible...

Indeed! Thanks for the fond memory, I haven't heard that name passed around here in some time.




--
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Process Handle?

2003-07-03 Thread Yennie
Scott,

If you are on an OS which supports the "ps" command via shell() (such as MacOS X), you can get a process listing which shows the ppid of each process- that is, the parent process ID that launched it.
For example, "ps -l -x" from Terminal on Mac gives me this:

UID  PID  PPID CPU PRI NI  VSZ  RSS WCHAN  STAT  TT  TIME COMMAND
...
502  4051  183  0  62  0  109848  13008 -  S  ??  8:17.17 /Users/yennie/Desktop/MC 2.5/MetaCard.app/Cont
...

Thus 4051 is the process id of Metacard- anything with 4051 as the PPID would have be launched by Metacard, and in turn you could use that process ID to see what processes the sub-process had launched (again by looking for that process ID as the PPID).

Dunno if that helps...

------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Directory to URL?

2003-06-20 Thread Yennie
The best you can do is to try and grab the URL's directory by itself:

put url "http://www.myserver.com/test/" into fileList

The problem is that different web servers (or FTP servers) may return different formats. Some web servers won't give a directory listing at all (or will send back the contents of "index.html" or some other default page).

If you really need to get a list of the files reliably, I believe you would need to send specific FTP commands to a FTP site. There is no reliable way over HTTP unless you have control of the server side, AFAIK.

Perhaps there is something you can glean from the FTP libs?

HTH

I've been trying the following without success:

  set the directory to url "http://www.myserver.com/test/"
  set the directory to url "ftp://ftp.myserver.com/test/"
  set the directory to url "ftp://uname:[EMAIL PROTECTED]/test/"

Result = "Can't open directory."

Am I missing the obvious?






--
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Try, try again

2003-06-16 Thread Yennie
Just a poor choice of variable name.

 get shell("echo '"pwd"' | sudo"cmd)

This won't actually put "pwd" in the shell command, it's a variable.

You'll still get something like:

 echo 'MyPassword' | sudo MyCommand

as the final shell command.


'pwd' puts the working directory ie the directory you are currently
working in for operations like file listing. copying etc...






------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Try, try again

2003-06-15 Thread Yennie
If you don't mind the password being briefly sent in the clear (as part of the name of the process), you can use this:

get shell("echo '"pwd"' | sudo"cmd)

Which comes out to something that looks like:
echo 'MyPassword' | sudo MyCommand

Unfortunately, open process appears to be still broken on OS X. If it wasn't, you could use the "-S" option to sudo to write the password to the process. This is really the way it should be done security-wise.

(something like this)

put "sudo -S"myCmd into theProcess
open process theProcess
write MyPasswordcr to process theProcess
read from process theProcess until eof
close process theProcess

You can also, of course, execute AppleScript on Mac which should give you the same results as AppleScript Studio can achieve.

You could also write the password to a temporary file and pass that to sudo.

HTH.

------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Help! Has anyone compiled an external for OS X?

2003-06-06 Thread Yennie
Tereza,

I haven't built an mach-o external with Codewarrior for quite a while, but what I DO have are several examples in ProjectBuilder.

If you're interested, I'll send you a small one off-list.

As far as outputting the binary, what you want to do is:

1) Compile your external code as a MacOS "bundle", i.e. "MyExternal.bundle".
2) Set the 'externals' property of your stack to the path to the bundle. This can be a relative path, just as with images / movies etc.
3) Quit and reload the stack

HTH

------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: Help! Has anyone compiled an external for OS X?

2003-06-06 Thread Yennie
Well that's what I get for not looking first. Seems there is now a ProjectBuilder example in the external package.

It looks like an oversight if the Mach-o target is missing from the CW project- there seems to be all the remnants of that target including settings and precompiled header files... unfortunately I don't have a machine with CW loaded at the moment to check it out.

You *should* be able to add a target for a mach-o bundle and compile with the mach-o precompiled header in place of the Carbon, PPC, 68k, etc. You'll need to add frameworks (instead of libraries) to the target- i.e. Carbon.framework or others you may need such as Quicktime. Other than that, the example external code should compile into a bundle for you with little modification. Follow the install procedure from my previous email and you *should* be golden...

HTH

--
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: handling print cancellation

2003-05-29 Thread Yennie
I believe these will do the trick:

answer printer
if (the result is "cancel") then
...
end if

open printing with dialog
if (the result is "cancel") then
...
end if



------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: handling print cancellation

2003-05-29 Thread Yennie
Unless I'm misunderstanding, it seems to work here.

open printing with dialog

Always seems to show the dialog immediately- *unless* another open printing call hasn't been closed.

I don't know if it is worth noting, but Rev seems to behave differently: Rev's printing library actually shows the dialog when you execute the specific print command. Any chance you're using Rev, and this is a Rev problem? It sounds curiosly akin to Rev's implementation.

HTH

Brian

Not on OS X, at least not reliably.   In OS X, the print dialog is not
actually triggered by the open printing commamd that specifies it;
accordingly the result for the open printing command will always be empty.






--
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com

PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---


Re: weblog: detailed files, spaces - +

2003-02-16 Thread Yennie
For the record, they are urlEncoded.
A quick urlDecode() will bring them back to normal if desired...

In detailed files, be careful to note that spaces in file names become
"+" chars.

http://radio.weblogs.com/0118367/categories/metacard/2003/02/17.html




Re: The Case Of The Unreadable File

2003-02-06 Thread Yennie
What kind of value do you get for "increment" in your script by the time you get an error in "the result"? Is it larger than the supposed file size returned by the detailed files()?

Here's one idea if it is:

function isValid theFile, fileSize
  open file theFile for read
  read from file theFile for 1 at (fileSize+1)
  put (the result = "eof") into vBool
  close file theFile
  return vBool
end isValid

I tested a variation here, and it works for valid files. Dunno if it helps any with your invalid ones- that might be hardwired underneath into whatever system file routine is returning the error.

HTH

Any ideas?




Re: copying packages in OSX

2003-02-02 Thread Yennie
Just a thought without seeing your scripts: are you using "binfile:" URLs to reference the files?
If not, you may not be copying them as binary, but rather as text.

Brian

When I compare the file sizes (original and copy) I see no difference, but
going back to OS9, and using ResEdit, I do notice that some of my files have
garbage in the 'Creator' (the 'Type' is empty). In the 'good' file, these
are supposed to be empty...changing this and saving the file does not work
of course.




Re: CGI Frustration

2003-01-22 Thread Yennie
Ken,

Can you run the script from the command line?
That is, can you connect via Telnet, ssh, etc, and run something like:
 ./linux test.mc

?

If so, then it probably has something to do with the ISP setup / Apache configuration (assuming they use Apache). If not, then it may be your setup.

Some tidbits that *could* help (or at least narrow down the problem):

1) Try putting a full path to the mc engine.
2) Try changing the extension to ".cgi". The ISP configuration could possibly only accept cgis with certain extensions.

HTH.
Brian

OK, I'm finally trying to get MC set up as a CGI. I have an ISP that uses
Linux, so I DL'ed the linux engine and uploaded it to my cgi-bin folder. I
set the permissions to 755, and have a simple script called "test.mt" that
sits in the cgi-bin folder as well, and its permissions are 755. The script
is this...

#!linux

on startup
 put "Hello World!" into tResponse
 put "Content-Type: text/HTML" crlf
 put "Content-Length:" (the length of tResponse) crlf crlf
 put tResponse
end startup

... and I keep getting an internal server error 500. I tried exactly the
same thing on another ISP using BSD (with the exception of the first line
being "#!mc"), and got the same result. I'm convinced I'm just not calling
it properly... any ideas?

Thanks for any help anyone can provide.



Darwin Engine with X11

2003-01-13 Thread Yennie
A while back I tried using the Darwin engine with various XWindow ports for MacOS X... no luck.
I had hoped that with Apple's own port of X11 coming out, things would clear up.

However, the Darwin engine still bombs all over the place running under X11. It DOES launch, but you can't get far without a sudden "Abort" message in the terminal (and no more GUI).

So, my question is... is there any remedy (missing libs?) that would allow me to run the Darwin engine with a GUI as-is on MacOS?

Granted, it may not be that useful with a mach-o version already natively available, but I'd be at least curious to see this work.

Brian


Re: Metacard CGi's

2003-01-09 Thread Yennie
Does anyone have any other suggestions about how I could get this to work?

You may be able to create an ordinary library stack with the image-creation objects and routines... then within your script:

start using stack "imageLib"
makeImages()

In limited tests, I've found this to be the way to do stack-specific work from a CGI script.

HTH,
Brian




Re: Web-Dedicated Metacard

2002-12-22 Thread Yennie
Well, there is one nugget already in the language which would help:

set the secureMode to true

Brian

Ouch! I didn't think about that.

 The big problem with a *sanctioned* web-savvy MetaCard or RunRev player is
 the potential for *very dangerous viruses*!!




Re: Web-Dedicated Metacard

2002-12-22 Thread Yennie
My guess would be per session, but I've never used it.

Anything built from libmc ("embedded Metacard") could presumably always set the property if need be, which would pretty much tackle the browser plugin problem.

As far as helper applications, a standalone player could probably be made that did the same thing and always set the secureMode property. Of course anyone could get around this if they *wanted* to by using the ordinary Metacard engine, but it would be a user-safe engine for those that want it.

I'd love to see someone find the time to create all of the delivery goodies for Metacard: browser plugin, apache module, player application. I know there are various pro/cons and reasons that they don't already exist, but they are all very much technically feasible, and could go a long way towards a growing anti-Java following.

Mozilla is open source, and so is Apache...

Brian
Wow, Brian... cool stuff!  I noted that once set to true, it can't be set to
false. Is that per session? Or is it saved with the stack? Just curious...




Re: Web-Dedicated Metacard

2002-12-22 Thread Yennie
One tidbit from playing around:

You can easily secure your Metacard distribution from third-party stacks (as far as I can see), by adding the following to your home stack:

on startup
  set the secureMode to true
end startup

Of course, it's easily hackable on your own machine (just move the home stack), but I can't see any way a third-party stack could do anything running under such a setup- it's effectively on lock-down.

FWIW,
Brian


Re: Web-Dedicated Metacard

2002-12-22 Thread Yennie

In a message dated 12/22/02 8:56:56 PM, [EMAIL PROTECTED] writes:

Oops, that was a little premature. The home stack won't get this message if you drag the stack directly onto the Metacard application. Perhaps on openStack would be better, or maybe this needs a whole standalone to be built...

Brian

You can easily secure your Metacard distribution from third-party stacks (as far as I can see), by adding the following to your home stack:

on startup
   set the secureMode to true
end startup





Re: xcmd

2002-12-06 Thread Yennie
I think you are either mistaken or were using a stack with the external property already set by someone else. Or recall using a CFM-based version / CODE resource.

If the path was not specified, how would MetaCard ever find and load  it?

But of course you only need to set the property of the stack once.
And further, you can use the stack as a library stack, so you don't have to set the property in every stack that wishes to use Valentina- only the library stack.

HTH,
Brian

Brian, but I wonder if this is 100% required ?
I have run example stack without this path to external set up.




Re: Answer File Command

2002-12-05 Thread Yennie
Also, you'll notice that when you try to open an unknown file type in OS X and switch the application-chooser popup from "Recommended Applications" to "All Applications", the grayed-out applications remain grayed out... *except* for their icons. Happens every time here on 10.2.1.

So the bugginess is clearly an OS thing.

However, I have noticed several times that OS X doesn't always 
"recognize" files right away. There have been times when a file was 
dimmed in the file dialog that shouldn't be. These are almost always new 
files, just downloaded or just created. Sometimes moving the file to the 
desktop and back will fix it, sometimes it takes hours before the Finder 
"sees" it as the right file type.




Re: launching on Wintel/inter-process communication

2002-12-03 Thread Yennie
Simple. Write the milliseconds into the file. Then, when the app launches,
grab the milliseconds as its "launch date". When it goes to look in the
folder, it will read in the "leftover" file, but because the milliseconds in
the leftover is *earlier* than the launch date, it is ignored. It will only
read files written into the "watched" folder *after* the launch date.

The time stamp seems logical- but here's my question: how does a second instance of the application know what file to look for? That is, if the file is already there from the first instance which was launched hours ago, how can it tell the difference between that file and a crashed one. Without using inter-application communication of course =).

Or am I missing something?

Brian




Re: md5digest

2002-11-22 Thread Yennie
HTTP Digest Authentication for a server app. Presumably you could use it for the client side as well.

Are any of you using md5digest, and if so what are you doing with it?

Brian




Custom Objects?

2002-11-18 Thread Yennie
Hi guys,

This one is a question for any external developers. I know there are considerable reasons why you don't see a lot of "plug-in" objects powered by externals for MetaCard- among them cross-platform considerations, and the rarity in which they are even needed.

However... is there a preferred method for going about this?
For example, say I want to create a simple "graph" object from a C library (note: this is *not* what I'm doing, just an example). How would I trap for update events in the MetaCard window? For mouse clicks, should I use a "dummy" object to trap for the clicks?

Has anyone had success with this sort of thing?

Best Regards,
Brian


Re: the large file challenge

2002-11-10 Thread Yennie
All right... I tweaked a little more outside of email.
For accuracy in the case where "mystic_mouse" occurs multiple times on one line, uncomment the line: 
"add offset(return, thisChunk, theOffset) to theOffset"

This just skips to the next line whenever a match is found.

This should run faster than my previous attempts:

on startup
  ## initialize variables: try adjusting numLines
  put "/gig/tmp/log/access_log" into the_file
  put ($1*1024*1024) into chunkSize ## this is for MB
  put 0 into counter
  put FALSE into isEOF
  
  open file the_file
  
  repeat until (isEOF = TRUE)
  ## read the specified number of lines, check if we are at the end of the file
  read from file the_file for chunkSize
  put it into thisChunk
  put (the result = "eof") into isEOF
  
  ## count the number of matches in this chunk
  put offset("mystic_mouse", thisChunk) into theOffset
  repeat
  add 1 to counter
  get offset("mystic_mouse", thisChunk, theOffset)
  if (it = 0) then exit repeat
  put theOffset + it + 12 into theOffset
  ## add offset(return, thisChunk, theOffset) to theOffset
  end repeat
  
  end repeat
  
  close file the_file

  put counter
end startup

HTH.
Brian


Re: the large file challenge

2002-11-08 Thread Yennie
I'm pretty sure the problem with speed here is from reading in the entire file.
Unless of course you have enough free RAM- but that's hard to imagine when the files are 300MB+.

How about this, which you can adjust to read any given number of lines at a time.
Try it with 10, 1000, 1, etc and see what gives you the best performance!
Hasn't been tested but hopefully it'll run with a tweak or less.

#!/usr/local/bin/mc
on startup
 ## initialize variables: try adjusting numLines
 put "/gig/tmp/log/xaa" into the_file
 put 1000 into numLines
 put 0 into counter

 open file the_file

 repeat until (isEOF = TRUE)
 ## read the specified number of lines, check if we are at the end of the file
 read from file the_file for numLines lines
 put it into thisChunk
 put (the result = "eof") into isEOF

 ## count the number of matches in this chunk
 put offset("mystic_mouse", thisChunk) into theOffset
 repeat until (theOffset = 0)
 add 1 to counter
 put offset("mystic_mouse", thisChunk, theOffset) into tempOffset
 if (tempOffset  0) then add tempOffset to theOffset
 else put 0 into theOffset
 end repeat

 end repeat

 close file the_file

 put counter
end startup


HTH,
Brian


Re: the large file challenge

2002-11-08 Thread Yennie
One last note:

Be careful of using read from file xxx for yyy

If you do not read for "lines", you run the risk of cutting a line in half on the spot where your magic string occurs.

So always use read from file xxx for yyy LINES

HTH.
Brian


Re: Read and Analyze Giant Files

2002-11-07 Thread Yennie
Problem here most likely is that you are trying to read the entire 300MB file into memory at once. Unless you have an extra 300MB block of RAM floating around, this will start beating on virtual memory pretty hard (and increasingly slow).

You'll notice that your non-MetaCard script reads one line at a time- I would suggest doing the same.
If you are just looking for occurences of a single string, you could also try using the grep command-line tool. Type "man grep" into the Terminal for syntax.

HTH,
Brian


Re: Aliases in cgis

2002-10-26 Thread Yennie

In a message dated 10/26/02 7:50:23 PM, [EMAIL PROTECTED] writes:
Oop, just caught this one after hurredly replying to the last!
I never knew that Terminal tip, however =). While we're at it, for anyone not familiar, if you are ever trying to *type* a path into the terminal as a command-line argument, you can always hit tab to auto-complete the path.

Brian


Wait -- it works. I found a stupid mistake in the file path. Funny how 
using the right path makes a difference. :)

So here is today's tip for anyone like me who has fat fingers: drag the 
file whose path you need directly into the Terminal window. It figures 
out the file path for you, and all you have to do is copy/paste it into 
your script. I wish I'd done that to begin with...





Re: XCMD Limitations

2002-10-24 Thread Yennie
 Obviously Scott knows which callbacks he implemented. Is there a published
list anywhere?

If you really want to be safe, I would suggest recompiling as a Metacard-native external. Or else eliminate all the callbacks- are there any that really need to be made and not done internally?

You can find the MetaCard external package at ftp.metacard.com- you should only need to change the code in your main() routine to use the appropriate MetaCard callbacks.

HTH,
Brian


Re: XCMD Limitations

2002-10-24 Thread Yennie
I think there are pretty much two options here.

One is to recode as a native MetaCard external- this is not hard to do, the only things that change are a) callbacks and b) parameter parsing and return values. If the XCMD is written clearly (i.e. one parameter parsing block of code and a generic routine for building the return value), this is usually trivial. I've managed to write code in the past that compiles as XCMD or Metacard-native based on a couple of #ifdef's.

The only other options I see would be to carefully recode the callbacks. What callbacks exactly does it use? I find there is almost never a compelling reason to use any callbacks that you couldn't code yourself instead. The exception with Hypercard of course was their external windowing code. That you won't be able to replicate without wholesale changes to your approach.

One suggestion if you decide to stay with the XCMD: try taking your copy of HyperXCmd.h and commenting out the prototypes for all of the callbacks. Now recompile and you should get an error for each one. From this you should be able to compile a list of the callbacks used. The simple ones are trivial to replace: StrToRect, StrToNum, etc. In fact, they'll run faster if you just call the appropriate C function instead.

If you are really stuck, you'll probably need to post some actual code to get much better suggestions. If you'd like and you can, send me something off-list and I'll look it over.

HTH,
Brian

Thus far I've managed to avoid writing a single external since I started
working with MC in '97 (I hired out the only one I couldn't make in native
MetaTalk), so my knowledge of how MC works with externals is very limited.
Hopefully somone with experience with this can take a moment to fill in the
details... 




Re: MC after OS X Upgrade...

2002-10-24 Thread Yennie
What version of MetaCard are you using? 
And what version were you running under OS9?
Do other stacks run correctly for you?
And finally... any externals?

Brian

Just a small problem.
My stack created using system 9.2 no longers seems to open after I finally
made the leap to OS X.2. (even in the Classic environment).
Do I need the OSX version or is it a MC memory allocation problem. 
The stack is quite large ( ~200 MB - mostly sound samples).




Re: Looking For Suggestions

2002-09-17 Thread Yennie
There may be something more elegant, but how about a time-stamped file?
Could your app just stamp the current time into the file once per minute?
A second app could then check if the file is "alive" by checking the time contained within.

One other trick that might work: what if the main app opens up a socket or other means of IAC? Then the secondary app could attempt to "ping" it locally.

Brian


UNIX C/C++ programmer wanted

2002-09-12 Thread Yennie
Hello list,

I'm gathering resumés to consider for a programming spot in a startup company.
The ideal candidate would have:

* UNIX experience, esp. in C/C++ , networking
* MetaCard experience

The rest is gravy- your responsibilities would most likely include programming in C/C++ with embedded MetaCard, and possibly taking on scripting work. If things work out well, you may have your choice of work in several areas.

Please contact me off-list to follow up.

Regards,
Brian Yennie
Chief Techonology Officer
QLD Learning


Re: MC concurrency performance?

2002-09-08 Thread Yennie
1. How well does MC handle multiple connections at once ('concurrency')?

There are a few issues here. First off, Metacard basically handles one connection at a time; however, there are several ways to work with this. First, when reading/writing to sockets, you can use asynchronous calls which will allow other connections to come in. The pitfall here is that while a handler is executing, no others will. So its possible to have more than one connection get in, but they are basically processed one at a time if they are calculation-intensive. If most of the work *is* the data transer, you'll be able to handle a few connections at a time, maybe even many.

If you truly want "multiple connections", you can run multiple processes. This is really only sane if you are using one of the UNIX engines (or Darwin under MacOS). With such an engine, you can spawn many processes running on separate ports which will behave nicely in serving many requests. This is a memory hog with non-UNIX builds (i.e. GUI apps). If you search the archives, I posted some code using "open process" under the Darwin engine for this in the last month.


2. Better of using shared or multiple ports?

Myself, I haven't found a way to have multiple processes share the same port. It is most likely possible if you can work at a lower level (i.e. embedded MetaCard); but scripted socket support won't let you listen on the same port twice. So, if you want one port you are probably stuck with one process. Unless you are using multiple processes, I don't see much advantage to multiple ports- although it could have marginal benefits. I think the possible confusion added would be more than its worth.

HTH,
Brian


Re: More CGI Stuff

2002-09-02 Thread Yennie
You can easily use a long-running Metacard stack in the background- just launch it normally and communicate from your CGI using sockets (or any other IAC).

Problem is- you can only handle one connection at a time with the long-running stack.
That is why I've been investigating using multiple processes with the Darwin engine.


Not sure on this one - seem to remember some comments on the list b4 -
but not tries it yet... something to do with having MC already running
in background on the server (ie not started by a cgi)?

Is it then possible for the CGI to start using / send messages to the MC
stacks already up and running? This has to be possible via some type of
IAC but is the process started via the same as the mc engine running in
the background...




Re: More CGI Stuff

2002-09-01 Thread Yennie
It exists, it just hasn't made it on the site yet.
Ruslan?

Ruslan

Does this mean there is a Mach-o version available now? I don't see 
it on your site.

Cheers
Dave




Re: More CGI Stuff

2002-08-31 Thread Yennie
Which is very cool stuff! 

I just want to point out one difference that I'm trying to obtain, however: *multiple* long running processes with shared memory, and everything done with Metacard! =).

Since I want most of the work to happen in Metacard, its not as valuable if I can only maintain one Metacard process- then the server can only handle one connection at a time. And simply launching multiple copies of say, MetacardCarbon, works- but its a major memory hog. Thus I'm trying to work with scripts, rather than GUI processes. I can spawn 20 long running scripts and it barely requires more memory than 1!

Of course- PHP is still an option with multiple Metcard processes doing the work, its just one more language to throw into the mix.

Brian


FWIW, I believe Pierre Sahores explained a way to use PHP to manage sockets and enable backend use of MC as a long-running process. I think it's related to this thread. (Wherever that explanation is in the archives, maybe Ken Ray would consider adding it to his already excellent Developer Resources section at http://www.sonsothunder.com !)




  1   2   >