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
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
-- 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
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
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
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
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
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
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
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,
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:
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.
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
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
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 . .
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
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
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.
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
#
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
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,
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
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
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
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
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
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
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
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
(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
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
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
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?
,
-
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
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
ften 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]
---
Revolution is the future.
------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com
PH: (904)-997-0212
EMAIL: [EMAIL PROTECTED]
---
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
QL
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]
---
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
est/"
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]
---
ing 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]
---
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.
-----
"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 Offic
. 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
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
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]
---
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
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
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
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
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
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
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*!!
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
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
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...
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1 - 100 of 147 matches
Mail list logo