MetaCard runs fine in Classic

2000-09-26 Thread Geoff Canyon

Just to let everyone know, I've run MC in the Classic environment of OS X
now. I haven't tested every feature by a long shot, but so far, so good.

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: resizing and screen resolution

2000-09-25 Thread Geoff Canyon

On Monday, September 25, 2000, at 04:21 AM, Kevin Miller wrote:

> There may be - but changing resolution with MC open is not supported.   

I'm curious what you mean by "not supported." While building an 800x600 version of my 
app's main window earlier today/yesterday, I was dropping from 1024x768 to 800x600 and 
back again repeatedly with MetaCard running, checking to see what I was doing, with 
seemingly no ill effects.

So is it just that there aren't any known issues, but it's not officially supported, 
or is there actually something bad happening and I just didn't notice and/or dodged a 
bullet?

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Multiple resolutions

2000-09-25 Thread Geoff Canyon

Just a brief follow-up, over the weekend I got two different sizes of my application 
to work pretty well. I'll go for a third tomorrow/today (it's pretty late). A few 
things I noticed are:

MetaCard ROCKS! This feature was fairly easy to implement, and had only a few gotcha's 
along the way.

If you expect a group to resize along with the objects it contains, don't lock its 
location. It worked the first couple times, then stopped resizing. I don't know what 
caused it to stop working, but unlocking the location fixed it.

If you are using a group in the stack as the menu, expect problems when you resize the 
stack. The method that seemed to work for me was, I think: set the rect of the stack; 
this causes the menubar group to show. Then set the edit menus property of the stack 
to true, which seems to cause nothing to happen. Then set the edit menus property to 
false, which causes the group to disappear and the stack to resize. Don't mess with 
the rect of the stack while editing a group.

You can place text with the group property into a field using the HTML text property: 
set the htmltext of fld "whatever" to someTextWithGroups. Works great, thanks Scott!

Finally, I'm sending this from the mail application in Mac OS X. Who wants to touch 
me? :-) I haven't run MetaCard yet, because I don't have a Classic environment in 
which to do so. The iMac I'm running on had a nervous breakdown a week ago, and 
refuse(d) to realize that it could boot from its perfectly fine hard drive. 
Reformatting in the process of installing OS X fixed the no-boot thing, but leaves no 
Classic behind. By the way, 96MB of RAM, and so far so good...

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Can of Worms...

2000-09-23 Thread Geoff Canyon

on 9/23/00 2:49 PM, Gary Rathbone at [EMAIL PROTECTED] wrote:

> The question is 'Do I maintain my competitive advantage by keeping quiet...'
> or 'assist by suggestion...'

To me, there's no question here. You help out if you can. The only question
I ask is, "Am I being intrusively promotional of a competing product on this
product's list?" And that question tends to cause me to be quiet. If there
is an obvious case for MetaCard, then I'll state it. If someone mentions
looking for a way to solve a problem, as someone recently did on the 4D (a
database product with rapid application development capabilities) list, and
doesn't mention MetaCard, then I'll point out that they should consider it.
But I don't go much farther than that unless someone asks me directly off
the list. 

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: resizing and screen resolution

2000-09-23 Thread Geoff Canyon

on 9/21/00 8:48 AM, Mark Mitchell at [EMAIL PROTECTED] wrote:

> If not, I could work for an "average" monitor resolution...what would that be
> these days...or preferably in about a year in the future?  What is the
> resolution of the newer imacs?

The iMacs do 640x480, 800x600, and 1024x768. I always use 1024x768, but I've
seen lots of people use 800x600.

The iBook is 800x600, the powerbooks and the LCD studio displays 1024x768.
LCDs can try to do lower resolutions, but it doesn't look nearly as good,
and I've rarely seen anyone do it.

I'm considering doing separate resolutions in my kid's software. If I do,
I'm likely to support 600x400, 800x600, and 1024x768 for now. But my layout
is fairly simple, making it fairly easy to do.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Indenting?

2000-09-22 Thread Geoff Canyon

on 9/22/00 3:27 PM, Scott Rossi at [EMAIL PROTECTED] wrote:

> Is there any way to indent text in a text field?  I want to try to avoid any
> "hardwired" spacing in the text and MC doesn't seem to understand HTML 
> tags.  Any other options?

Fields understand tabs, which is better than padding with spaces, but still
involves changing your text, I expect.

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Pagination experiences

2000-09-22 Thread Geoff Canyon

on 9/21/00 6:26 PM, Kevin Miller at [EMAIL PROTECTED] wrote:

>> ...By slow I mean more than a second on a fast computer.
> 
> That sounds quite fast: how fast do you need it to be?

Actually, now that you mention it, it is. :-) MetaCard is amazing. But
still, one second on a fast machine could be as much as ten or fifteen
seconds on a slow machine that I would still want to support.

and on 9/21/00 6:35 PM, Scott Raney at [EMAIL PROTECTED] wrote:

> Just one: Use the pageHeights property of the field, which does all of
> this work automatically for you ;-)

You know, nobody likes a wiseguy, Scott :-)

After considering the issue for a moment, I think the pageHeights property
_may_ do the trick, but I'll still have to do a little work (this assumes
constant line heights, which is safe for my application):

1. Put the text from the start to the text that must be included into the
field.
2. Get the page heights.
3. Add up all but the last.
4. Count the pageHeights to see what page I'm on.
5. Figure out the chunk description for the beginning of the last page.
6. Add text, and figure out how much will fit on the last page.
7. Place that text in the field, and put in the page number from step 4.

By the way, the pageHeights doesn't support widow and orphan control, does
it? I'll have to adjust to that.

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Pagination experiences

2000-09-21 Thread Geoff Canyon

I'm wondering if anyone here has experience writing pagination routines in
MetaCard. I'm considering writing a routine that would take a 50-100k block
of text, a font, a font size, a field size, and figure out where the page
breaks should occur from beginning to end.

The actual goal is to be able to go to an arbitrary chunk of the text, and
know what page number to put under it.

My first instinct is to use the height of the field and the formattedHeight
function on chunks of text, finding page-sized chunks and counting them
until I get to the chunk I want to display. but this is fairly slow across
perhaps hundreds of pages. By slow I mean more than a second on a fast
computer.

But my second instinct is to figure out how many lines will fit onto one
page, figure out how tall those lines are individually, and then just search
for the largest n such that n*(the number of lines that will fit on a page)
is still less than the chunk I want to display, and then use n+1 for a page
number. I'm sure that's not clear, but if someone's done it, I'm betting it
will be clear to them. This might be much faster, but will it work?

Thanks to anyone who has a suggestion,

Geoff



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Searching backwards?

2000-09-21 Thread Geoff Canyon

on 9/21/00 12:23 PM, David Bovill at [EMAIL PROTECTED] wrote:

> The XML parsing I need to do needs to be done backwards from the end of the
> file - extracting one tag at a time from the end of the file. I am wandering
> if there is a fast way to do this or I have to consider, converting the data
> first by reverse sorting it?
> 
> Any ideas on searching backwards for XML tagged data?

Can you post a (small) sample of the data--or send it to me? I'm curious to
understand better what you're trying to do.

Geoff



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: "the owner" is not always "the owner" - was best way torefer to objects in groups...

2000-09-21 Thread Geoff Canyon

on 9/21/00 5:32 AM, David Bovill at [EMAIL PROTECTED] wrote:

> "btn x of the owner of me" however equates to "btn x of group someName", and
> if there are two groups called someName then it picks the first one,
> regardless if this group is the real owner! This is the problem.

Granted that this should work, why do you need to have two groups named the
same?

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Writing and submitting a form from a browser

2000-09-20 Thread Geoff Canyon

on 9/20/00 3:38 AM, Kevin Miller at [EMAIL PROTECTED] wrote:

> On 19/9/00 3:15 am, Sound Medicine, Inc. <[EMAIL PROTECTED]> wrote:
> 
>> I am very unsophisticated as a programer. I can't for the life of me get the
>> post comand to work submitting a form. Is there any simple way to have
>> metacard fill in the fields of a form on a browser like Internet Explorer and
>> somehow hit the submit button? And, while I'm asking, is there an easy way to
>> get the source code of the resultant web page sent back to the browser read
>> into metacard?  Thanks to all you folks who have helped me in the past.
>> Peter Bower, M.D.
> 
> As far as I know, you can't do this.  Actually communicating with an open
> browser to fill in fields on a page and then press a button is not something
> I've ever though about doing.  As a long shot, it might just about be
> possible on Windows with DDE and the Externals Collection, but I don't think
> this is very likely and wouldn't have any idea where to start.
> 
> What you *can* do is post to a URL from inside MetaCard, and then get back
> the resulting page.  Use the post command to do this, and search through the
> list archives for examples of this command in action.

Agreed that it would be better to simply post from MetaCard and get the
results (you could even, with some effort, save the results to a file and
then tell a browser to open the file--but that would be difficult to
implement cleanly, what with relative paths, etc.).

But it looks like you can do what you're asking to do, at least on a Mac. I
haven't tried this, but from the Apple Event dictionary of Communicator:

register URL echo : Registers the ³echo² application. Each download from now
on will be echoed to this application.
register URL echo [ «class sign»] -- Application signature


Internet Explorer doesn't have this event, but does have:

GetSource : Get the HTML source of a browser window
GetSource [ integer] -- Window Identifier of window from which to get
the source. No value means get the source from the frontmost window.
Result : string --


regards,

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




An interesting problem solved

2000-09-20 Thread Geoff Canyon

I came across an interesting problem, and Kevin helped me solve it (thanks,
Kevin!) so I thought I would post the solution here.

The problem is the way background messages get passed when you have more
than one background/group on a card. That's openBackground, closeBackground,
and preOpenBackground. They go to the card first, and then to each
background in turn, from highest to lowest, and then on up through the
stack(s). Regardless of which background is opening/closing, they all get a
shot at it. The target is the card, so how do you know _which_ background is
opening or closing?

The answer Kevin gave me was that these messages actually have a parameter,
which contains the id of the background that caused the message. So
something like the following will do the trick:

on openBackground whichOne
  if whichOne is the id of me then
--the background containing this script
--caused the message. Do stuff here
  else
--this background didn't cause the message;
--let something else handle it
pass openBackground
  end if
end openBackground

Regards to all,

Geoff Canyon



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




All I want to do...

2000-09-19 Thread Geoff Canyon

...is log any errors that occur in my program. In the past (in SuperCard) I
did this by locking error dialogs, and setting a handler at the top level
for the errorDialog message. The handler would dutifully write the
information on the error to the end of a property, which was later
exportable, in case I needed information to help debug a user's problem.

I don't do any specific error handling in this program. Most errors are
simple, non-fatal, and therefore I don't need to do specific error handling.
Given that, is there a reason to replace one lockErrorDialogs command, and
two handlers, with a ton of try...catch...end try constructs? I know
lockErrorDialogs is deprecated. Does that mean it's actually going away, or
just a recommendation against it?

Thanks in advance to those who register an opinion on this.

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Feature request: clone as substack

2000-09-19 Thread Geoff Canyon

on 9/19/00 10:41 AM, Scott Raney at [EMAIL PROTECTED] wrote:

> If you clone a substack, the copy *is* a substack of the same main
> stack.  It's not possible in general to do what you want, though,
> because that would require nested substacks (which is something
> MetaCard supported before the 1.0 release, but which confused so many
> people that we took it out).

Just out of curiosity, what would have been the advantage to having nested
substacks? Increased script inheritance could be handled by frontscripts,
backscripts, and start using. Stacks don't physically enclose each other, so
what else is there?

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Feature request: clone as substack

2000-09-19 Thread Geoff Canyon

on 9/19/00 2:02 AM, David Bovill at [EMAIL PROTECTED] wrote:

> If you are doing anything fancy with cloning multiple windows it would be
> really nice to be able to have the new cloned stack behave as a sub-stack,
> and be able to use the main stacks scripts without a lot of fiddling (ie
> send) or using the stack (which can interfere with the global environment.

This is off the top of my head, but if you had a stack "smith" with a
substack "jones" wouldn't something like this work:

clone stack "jones"
set the name of it to "jones clone"
set the mainstack of it to "smith"

and then proceed as normal. In a stack, if you don't want persistence you'd
have to not save, or delete the clone before saving. In an application there
is no saving, therefore no problem.

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Metacard Macro?

2000-09-18 Thread Geoff Canyon

on 9/18/00 7:14 AM, Blair Moxon at [EMAIL PROTECTED] wrote:

> through it. I would like to automate the 'walk through' process; record all
> of the mouse movements and mouse clicks and turn it into a Macro. Then I can
> hand it off to anyone and they can watch a canned version.
> Has anyone ever figured out a way of creating a macro for Metacard?

Another way to do this would be to use a screen capture utility. Gif-gIf-giF
from pedagoguery software is inexpensive and available for Mac and Windows,
and results in a gif file (surprise :-) The resulting file is generally
smaller than you might think--roughly 100-200k per minute, depending on
screen size and what you're recording. And for added points, you can import
the gif into QuickTime in order to allow better control, sound, etc., with
very little increase in file size.

http://www.peda.com

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Problem with writing a patch stack

2000-09-17 Thread Geoff Canyon

on 9/17/00 5:29 AM, Raymond E. Griffith at [EMAIL PROTECTED] wrote:

>> 2. Edit the old stack as a pure text object. Obviously this is tricky, not
>> recommended, perhaps not possible at all, possibly a violation of the
>> license agreement, and in general Not A Good Idea. But it would certainly
>> not produce the script limits problem your current method does.
>> 
>> gc
> But this will not work for two reasons. First of all, the stack is binary,
> not text. Editing as text means also saving as text, thus destroying the
> stack. Even if your stack has a .txt ending, it is still written as a
> binfile. 

I misspoke saying text, but I believe it _is_ possible. Open the standalone
builder to see how. The only roadblock I see possible is if MetaCard stores
internal references to the length of a script, for example, that might need
to be updated at the same time. Stack integrity could be an issue.

> 
> I tried opening a stack I had so edited. Kablooey.
> 
> And even so, there are some things that should not be done wrg the license
> agreement. If changes in the stack's script need to be done so that the
> scriptlimits are not violated.
> 
> And there *are* ways to legally handle scripting with the unlicensed version
> so that you are doing everything you want to do. I know. I have been doing
> it for some time. I never violate the scriptlimits, yet I can do a great
> deal. Basically it involves placing code in non-script places, as custom
> properties, and running them with do statements.

The scriptlimits also apply to do statements, I believe. But Scott, isn't
this whole conversation moot? I thought the licensing limitations were to
limit an end user's ability to add their _own_ code, not to prevent them
from applying a patch that a licensed developer provided them?

>There are also other
> techniques. If you want to know more, start a new thread and ask.
> 
> One other suggestion. Create the stack with other stacks as plugins that
> your main stack accesses. You can upgrade the plug-in.

This last is certainly a good suggestion.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Problem with writing a patch stack

2000-09-16 Thread Geoff Canyon

on 9/16/00 12:59 AM, Andy Bailey at [EMAIL PROTECTED] wrote:

> I am trying to write a patch to an existing application.

Two other possible solutions, which may or may not violate your license,
would be:

1. Instead of trying to copy the new stuff into the old stack, copy the
user-customized stuff out of the old stack into the new stack. This doesn't
really qualify as a "patch" in my book, but depending on your goals might do
the trick.

2. Edit the old stack as a pure text object. Obviously this is tricky, not
recommended, perhaps not possible at all, possibly a violation of the
license agreement, and in general Not A Good Idea. But it would certainly
not produce the script limits problem your current method does.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Metacard on MacOS X?

2000-09-15 Thread Geoff Canyon

on 9/15/00 5:37 PM, Scott Raney at [EMAIL PROTECTED] wrote:

> On Fri, 15 Sep 2000, James Kelly wrote:
> 
>> Anybody know if Metacard will run under MacOS X Carbon?
> 
> I know, it will.  *When* it will, I don't know (or at least can't say ;-)
> Scott

So who knows Scott's weakness? Money? Beer? Beer money?

Come on, Scott, what's it going to take? For pete's sake, my cd shipped
today! :-)

Geoff Canyon, who is busily gassing up the Trooper and throwing contraband
in the back for a quick trip to Colorado...



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Something counter to my intuition

2000-09-15 Thread Geoff Canyon

Now I have a question, related to the previous post.

I have an intro to my program on the first several cards: 1, 2, 3, and 4.
The actual first card where the user can interact (except to abort the
introduction) is card 5. There are sounds that accompany cards 1-4, and a
sound for card 5.

Normal behavior is for each card in turn to display and play its sound, and
when the sound is done to go on to the next card. When we get to card 5, we
play its sound, and wait for the user to do something.

My first method used a succession of on openCard/on playStopped handlers.
This was very annoying, because it made the cards impossible to work on
without the use of a front script to stop the messages from being processed
all the time. Maybe I'm being sensitive, and that's the way to go. But my
background is more SuperCard than HyperCard at this point, and it really
irks me to have to restrain the thing from running all the time. Now that I
write this, it does seem like the simple way to do this, but I'll wait for
everyone's opinion.

So I didn't like having to stop that method all the time. I got rid of the
on openCard messages, and instead put in a series of custom handlers, so
that each playStopped could control the situation better, and missing sound
files were accounted for. But now I'm sending custom messages just to
accomplish what openCard could have done, again all so I can operate in a
more SuperCard-like way. Plus, my code isn't nearly as clear.

So how does everyone handle this? Are you all using frontscripts? Coding
around the obvious cases for openCard? Does this just not come up for you?
Or something else entirely?

Thanks,

Geoff



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Something counter to my intuition

2000-09-15 Thread Geoff Canyon

I don't think this is a bug, but it tripped me up, so I thought I would
point it out so everyone can benefit, or poke fun as the case may be.

I had set up scripts on several succeeding cards to play some sound files,
and proceed on to the next card when the sound stopped. I used the on
playStopped message to accomplish this, and it worked fine. I also wanted
the user to be able to abort the process, so I put in a script that said, in
part:

on mouseUp
play stop
visual effect push left slow
go cd "readers"
end mouseUp

But this didn't work correctly; the script went to the appropriate card, but
then went on to the card after it!

After much futzing around trying to narrow down the cause, I figured out
that the playStopped message was still being delivered, even though I was
the one cancelling playback, and in the middle of a script. Changing the
script to:

on mouseUp
visual effect push left slow
go cd "readers"
play stop
end mouseUp

Fixed it right up. It bugged me at the time, but in retrospect it seems
logical. But it bears keeping in mind.


Also:
on 9/14/00 8:30 PM, Richard MacLemale at [EMAIL PROTECTED] wrote:

> I'm REALLY looking forward to
> an OS X MetaCard engine.  I may never leave my computer again!

I second that thought. I can't wait to send out the press releases...

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Apple has released Mac OS X Beta

2000-09-14 Thread Geoff Canyon

on 9/13/00 7:19 PM, Raymond E. Griffith at [EMAIL PROTECTED] wrote:

> I can't order it. My iMac has only 96 MB of RAM. Sigh. Maybe they will get
> the memory requirements down. Then again, maybe not.
> 
> At least MetaCard has a reasonable memory requirement!
> 
> Raymond

Great minds think alike. My iMac also has 96mb. But 128 is what they
_recommend_, not _require_. I still might try it...

Or I might upgrade, or find another machine to try it on.

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: "lock screen" doesn't?

2000-09-13 Thread Geoff Canyon

on 9/13/00 4:36 PM, Dave Cragg at [EMAIL PROTECTED] wrote:

> If you need to control the visibility from the calling stack, I think
> you can use the following (from memory):
> 
> open invisible stack theStackFile

This worked. I also had a vague memory about the invisible keyword, but I
didn't see it in the MetaCard documentation. It is in the SuperCard (not
HyperCard) documentation. I did see in the MetaCard docs that "open" in this
sense is simply mapped to "go" in MetaCard, so:

go invisible stack theStackFile --worked as well


I assume the

on preOpenStack
   hide this stack
end preOpenStack

solution would also work. This one I should have thought of--I _must_ stop
trying to code in my sleep! :-)

Thanks to all who answered,

Geoff



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




"lock screen" doesn't?

2000-09-13 Thread Geoff Canyon

This seems like a simple question, but my pea-brain isn't cooperating with
me today, so:

I'm using the following code to open a stack invisibly:

  set the lockscreen to true --locks the screen?
  if there is a file theStackFile then
go stack theStackFile --shouldn't show, but does
hide stack "prefs" --then hides here
  end if
  go stack "Main"

And it isn't working. When it executes, the second stack, indicated by
theStackFile above, flashes into existence visibly before hiding.

First, is there a better way to do this? I want to store the second stack
("theStackFile") separately, because it will be modified, and you can't
modify a standalone. Second, why isn't the lockScreen property actually
locking the screen through opening the second stack? Doesn't it do that?

Thanks

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Apple has released Mac OS X Beta

2000-09-13 Thread Geoff Canyon

It's not downloadable--you have to buy the cd for $29.

Does it make me a simpering MacFool that I already ordered mine? Don't
answer that. :-)

http://www.apple.com



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Avoiding home... script limit problem.

2000-09-07 Thread Geoff Canyon

on 9/7/00 9:36 AM, Scott Raney at [EMAIL PROTECTED] wrote:

>> How about a property for the stack, which would allow you the developer to
>> determine how the stack behaved, regardless of the machine it was opened on?
> 
> Sounds good to me.  Anyone else?  What's the default?

How about a preference at the home stack level? :-)

In any case, my personal vote goes for the default being to open in the dev
environment, but I would think that based on precedence the default should
be the existing, no dev environment way.

> 
> Doing it by extension is a possibility, but doesn't sound so great to
> me.  Mac users tend not to use them at all, and even on Windows and
> UNIX you run into all kinds of problems trying to map two different
> extensions to the same engine.  I'd say a stack property would be a
> better way.
> Scott

Sorry, my lack of clarity. I wasn't suggesting basing it on extensions on
the Mac. I was thinking that it would be that execute bit thing on Unix,
file extension on the PC, and file type on the Mac. But a stack property
works for me.

Thanks!

gc



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Avoiding home... script limit problem.

2000-09-07 Thread Geoff Canyon

on 9/6/00 1:04 PM, Scott Raney at [EMAIL PROTECTED] wrote:

> OK, for you Mac users, how about each time you try to run an
> AppleScript it instead brings up the Script Editor?  Wouldn't be very
> convenient, would it?

But this is exactly the way it works. You can save an AppleScript in two
ways, for the purposes of this discussion: as a script, and as an
application.

Double-clicking the script brings it up in the development environment.
Double-clicking the application brings it up as an application. Seems pretty
comparable to a stack and a standalone to me.



on 9/6/00 12:34 PM, Jacqueline Landman Gay at [EMAIL PROTECTED]
wrote:

> How about adding a preference setting to MC, allowing the user to set
> whether the development environment launches or not?

How about a property for the stack, which would allow you the developer to
determine how the stack behaved, regardless of the machine it was opened on?



on 9/6/00 7:50 PM, Scott Raney at [EMAIL PROTECTED] wrote:

> Another example: try
> creating a text file in a Windows text editor and save it as
> "whatever.bat".  Then find it in Windows explorer and double click on
> it.  Does it open in the application you used to create it?  No, it
> runs it as a batch file.  The same kind of thing happens on UNIX
> systems with a GUI, except that instead of keying off the file
> extension, it distinguishes these files with an execute bit in the
> file permissions.  MetaCard stacks have this bit set on UNIX systems
> so they can be run directly from the command line, or by
> double-clicking on them in a GUI file browser.

So what would happen if the execute bit weren't set on Unix? It sounds like
the stack property idea I proposed above is fairly close to what already
exists. In windows, you have to _change_ the file to make it an executable;
until you set the extension to .bat, it's an editable thing, not an app. So
MetaCard stacks, extension .mc, open in the editing environment. MetaCard
executables, .me (or whatever) just open and run, no editing environment.
Couldn't this be set up as easily on Mac and Unix?



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Valentina XCMDb2 Released

2000-09-03 Thread Geoff Canyon

on 9/3/00 11:28 AM, Scott Raney at [EMAIL PROTECTED] wrote:

> If you have
> any questions or download it and can't figure it out, don't hesitate
> to contact either me or Paradigma Software.  This is a key technology
> for MetaCard developers to have in their arsenal and we need to do
> what it takes to make sure that it works well.
> Regards,
> Scott


Funny you should post this, Scott, I was about to send this to the list
anyway, so now it's a reply to your message:

Does MetaCard support COM? If so, how easy/difficult is it? I'm asking
because the Valentina database comes in an XCMD format, which should work on
the Mac (but I haven't tried it yet) and what they call a VCOM/ActiveX
format.

So, can you use the VCOM/ActiveX version of Valentina with MetaCard on the
PC?

Thanks

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Query SQL database

2000-08-31 Thread Geoff Canyon

http://www.php.net/

Just to make sure everyone is clear: I have _no_ experience with PHP, and
therefore can't make a recommendation one way or the other. I just know that
direct access from MetaCard into any SQL-based database seems to be a big
hurdle, whereas access from MetaCard to an HTML server is easy. PHP, ASP,
ColdFusion, etc. are all designed to allow you to put an HTML front onto a
SQL database, so to me it seems like a logical thing to use them as an
intermediary. But I could be wrong.

PHP is free and open source, so it's the first thing I plan to try. But that
won't be  for a few months. If any pioneers get there first, I'll be happy
to hear how it works out.

gc

on 8/31/00 6:56 AM, Gary Rathbone at [EMAIL PROTECTED] wrote:

> 
> Continuing on the database access theme can anyone please tell me (briefly)
> what PHP is and where I can get it ...
> 
> I currently evaluating Valentina from http://www.paradigmasoft.com for new
> projects but I would like to access existing SQL databases.
> 
> TIA
> 
> Gary Rathbone
> 
> 
>> MacConsult <[EMAIL PROTECTED]> said, on 8/9/00 6:35 AM:
> --snip-- 
>>> Is there any way to get data from a remote server running a SQL
>>> Database? 
>>> 
>>> Javier Miranda V.
>>> MC Multimedia
> --snip--
> 
> on 9/8/00 7:33 pm, Geoff Canyon at [EMAIL PROTECTED] wrote:
> 
> --snip--...but I think the solution I would try would be PHP... --snip--
> 
> 
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Large amount of data

2000-08-22 Thread Geoff Canyon

MacConsult <[EMAIL PROTECTED]> said, on 8/22/00 6:17 AM:

>To clarify more the nature of the project, the intention is to put a
>telephone guide in a CD. Basically its a kardex where the implementation
>of a good interface for searches are important. Also I remember reading
>in the list something about indexing.


This is what my product iDirectory does. iDirectory allows you to create 
your own distributable telephone guide (or any other list of data). You 
can read about iDirectory at 

http://www.inspiredlogic.com/idirectory/

and download the Mac version at:

http://www.inspiredlogic.com/idirectory/idirectory_builder.hqx

I haven't had time to put up the PC and Linux demos.



In iDirectory, I break up the information into 1000 line chunks, then 
copy and filter them for display during searches. One important benefit 
of this is that, by using the send command, the search can be interrupted 
at any time. That way, on slower machines, the program is still 
responsive.


gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC, the Web, and you

2000-08-14 Thread Geoff Canyon

Richard Gaskin <[EMAIL PROTECTED]> said, on 8/13/00 4:09 PM:

>A quick survey of MetaCard developers, if you don't mind:
>
>Of work you've performed over the last year, what percentage has been
>related to the Web?

Almost all of it, in one way or another.

>
>Does your work focus more on the client side of the Web, the server side, or
>both?

Both
>
>Of the time spent with your tools on a project, what percentage do you spend
>with MetaCard?

10-20 percent

>
>And what percentage with client-side tools/languages like JavaScript, Perl,
>and of course HTML and others?

40-50 percent

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Query SQL database

2000-08-09 Thread Geoff Canyon

MacConsult <[EMAIL PROTECTED]> said, on 8/9/00 6:35 AM:

>Is there any way to get data from a remote server running a SQL
>Database? I understand that programs such as FileMaker use ODBC to send
>SQL commands to the server. Any suggestions?
>Saludos,
>
>Javier Miranda V.
>MC Multimedia

Disclaimer: I haven't connected to any database from MetaCard yet--I 
haven't needed to.

But I think the solution I would try would be PHP. Depending on the 
actual database you use, ASP, ColdFusion, or Lasso might be other options 
to consider. In any case, by using one of these products, you abstract 
the SQL database into HTML, at the cost of doing some of your development 
outside MetaCard. But they all take care of the hassle of interfacing to 
the SQL database backend, and return the result in form you should be 
able to easily get at within MetaCard.

Again, I haven't tried this yet, so there may be issues I'm not 
considering that make this less than optimal. At the least, you add an 
additional layer of complexity and an additional point of failure.

geoff

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Duplicate Backgrounds/How to Delete

2000-08-09 Thread Geoff Canyon

Sivakatirswami <[EMAIL PROTECTED]> said, on 8/8/00 6:04 PM:

>I somehow am creating multiple backgrounds with the same name and am not
>sure how they got there. Possibly by option selecting and dragging. 

One thing to note is that it doesn't take an option-drag; option-clicking 
something duplicates it in place over the original. In another 
environment I use (4D) you option-click to open the script of an object. 
Going back and forth between MetaCard and 4D has been challenging :-)

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Metacard kills new users

2000-08-07 Thread Geoff Canyon

Check out

http://www.xworlds.com/metacard/index.htm

Also, stick with it. _Everyone_ goes through the "What the heck??" phase 
when checking out MetaCard. It's a fact of life, and we've all learned to 
get past it. The development environment has good points to go along with 
the bad. Each of us has formed our own opinion on how it balances out.

BUT--setting aside the development environment, I think we're all agreed 
that MetaCard, especially for the HyperCard expatriots, offers an 
incredible step up in power and capabilities, while offering a very 
similar syntax. You get used to the development environment, but you'll 
never get used to continually being amazed by what you can do that you 
wouldn't have attempted before.

And no post would be complete without praising Scott and Kevin, and the 
whole crew, for the great support provided through this list.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Help with handler "stripAllTags"...

2000-08-06 Thread Geoff Canyon

I haven't tried this in MetaCard, but you might try 

  put "<[^>]*>" into someReg

That translates to a <, any number of anything but >, and a >

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Metacard based browser?

2000-08-05 Thread Geoff Canyon

Scott Rossi <[EMAIL PROTECTED]> said, on 8/4/00 6:14 PM:

>If your goal is to create a new standard for page description, then maybe 
>you have a reachable (and laudible) goal, but for current HTML, I would 
>suggest taking a step back and evaluating if you really have that kind of 
>time available.

I agree. Limited compatibility with existing pages is fine, but if this 
quixotic quest has any chance (let's face it--against Microsoft, a 
snowball has a better chance in...) then the focus has to be on 
downloadable stacks/scripts as "pages."

I can see it now--little badges everywhere on the web saying "This site 
best viewed in MetaCard!" This morning, www.warnerbros.com said I had to 
have Netscape or Internet Explorer, _and_ Flash, in order to use their 
site at _all_ What a thrill it would be to have some major site do a 
slight twist on that, and tell me that I needed the free MetaCard viewer 
to access their site...sorry, I was daydreaming for a moment there...

gc, who still thinks this idea could be great fun...

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Metacard based browser?

2000-08-04 Thread Geoff Canyon

Richard Gaskin <[EMAIL PROTECTED]> said, on 8/4/00 10:12 AM:

>David Bovill at wrote:
>
>> Is anyone working on a Metacard based browser? I'm just starting on that
>> trail, and either I am making some basic mistakes, or it is more complex 
than
>> I thought (as ever).
>
>What would be the advantages of a MetaCard-based browser over MSIE or NN?

For a start:

Reliable cross-platform deployment--current browsers don't truly look the 
same on all platforms, and some don't support all three platforms 
MetaCard does.

Reliable cross-platform scripting--javascript and the rest don't come 
close to what MetaCard offers.

Ditto for Java.

Built-in vector object support--with other browsers, requires the Flash 
plugin, or equivalent.

Low memory requirements--Netscape and IE, by comparison, are hogs.


Not that there aren't obstacles as well...

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Mac file types

2000-07-26 Thread Geoff Canyon

Kevin Miller <[EMAIL PROTECTED]> said, on 7/26/00 3:31 AM:

>> such a suffix), I don't have a good way of making sure that a file is
>> an image file on a Mac before trying to use it's name as the fileName
>> of my image object.  Is there any way to do this?
>
>Not that I'm aware of.  You might be able to do this with AppleScript in the
>Externals - does anyone know if this is possible in AppleScript and what
>would be the syntax?

set theFile to choose file  --pick a file
tell application "Finder"
set theType to the file type of theFile
set theCreator to the creator type of theFile
end tell

--with paths it would be:

tell application "Finder"
set theType to the file type of file thePath
set theCreator to the creator type of file thePath
end tell

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: System font

2000-07-25 Thread Geoff Canyon

Richard Gaskin <[EMAIL PROTECTED]> said, on 7/25/00 4:21 PM:

>> MetaCard took 0, but seemed to do something strange with it. My system
>> font (Charcoal) didn't display right.
>
>What exactly happened?  Could it be an anti-aliasing issue?

Nope, an old-fashioned brain freeze. My system font is Charcoal. The 
default font size for a button is 14. I set the font (not the size) to 0, 
saw something that looked funky in comparison to the text in the menu bar 
(which is 12 point) and jumped to conclusions. Once I set the button to 
12 point, all was right with the world.

Sorry--I'll slink back to my corner now...  :-)

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: System font

2000-07-25 Thread Geoff Canyon

Richard Gaskin <[EMAIL PROTECTED]> said, on 7/25/00 1:53 PM:

>Jacqueline Landman Gay at wrote:
>
>> Is there a way to detect the system's menu font on the machine running
>> MetaCard? On Mac, that could be Chicago, Charcoal, or several others. On
>> Windows, probably MS Sans Serif.
>
>Set the font to 0 (zero)

MetaCard took 0, but seemed to do something strange with it. My system 
font (Charcoal) didn't display right.

With the externals collection (maybe other xcmds as well) to run 
AppleScripts, you could run the following to get the system font:

tell application "Appearance"
the system font of the current theme
end tell

Presumably that could be translated into an apple event, so you could do 
it directly with MetaCard's built-in send command, but I've never 
developed the skill of translating from applescript to apple events.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Basic question: opening cards in their own windows...

2000-07-19 Thread Geoff Canyon

Kevin Miller <[EMAIL PROTECTED]> said, on 7/19/00 12:42 PM:

>On 19/7/00 7:29 pm, David Bovill <[EMAIL PROTECTED]> wrote:
>
>> One file many windows? Just spent 20 minutes or so trying different syntax
>> for opening cards (presently stored in a single stack), in their own
>> windows. Looks like this should be possible, but maybe not?
>> 
>> Can someone help?
>> 
>> go to card 4 in a new window
>> go to stack "Test Stack"  in a new window
>
>You can only specify another stack to go to inside the current window, you
>can't view one stack in multiple windows at this time.


You could simulate this, though, if it were important enough to do so. It 
would involve cloning the stack, then going to the appropriate card in 
the clone in a new window. You'd then have to figure out how to handle 
synchronization between the two stacks, unless the split were a one-way 
trip.


I wouldn't recommend it unless it were integral to your design...

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Screen artifacts with player

2000-07-06 Thread Geoff Canyon

Scott Raney <[EMAIL PROTECTED]> said, on 7/4/00 4:59 PM:

>QT gets penalized for two reasons: 1) it bypasses the OS whenever it
>can (which may explain why forcing it to use GDI calls makes it work
>better on NT because this ties it closer to the OS) and 2) it starts
>its own thread that does stuff like polling the main event queue
>instead of doing it the nice way by just waiting for an event.  To
>some extent both of these practices are justified for a time-critical
>library like QT.  But Apple's got some tuning to do to make it work
>better on NT (and probably on UNIX, at least in its Mac OS X guise)
>where the rules are different than on single-user systems like MacOS
>and Windows 95/98.

One of the Apple guys gave a talk about the merging of NeXTStep and MacOS 
to create OS X. An article about the talk, at: 

http://www.32bitsonline.com/article.php3?file=issues/26/mac_usenix2k&pa
ge=5

says that, "The QuickTime guys at Apple weren¹t very happy when they lost 
the ability to claim nearly all of the CPU. :>"

:-)

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Another MetaCard Moment--stack available

2000-07-05 Thread Geoff Canyon

I've uploaded a copy of the stack I'm using to break up AIFF files. It's 
primitive, undocumented, and not too pretty. But it works. Download and 
use it at your own risk. Feel free to ask questions. If you use it, 
change it, or improve it, I'd like a copy of the results. The stack may 
change significantly over the next few weeks. I'll post updates as they 
become significant.

It's at:

http://www.inspiredlogic.com/stacks/aiffer.mc

Enjoy,

Geoff

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Screen artifacts with player

2000-07-04 Thread Geoff Canyon

Scott Raney <[EMAIL PROTECTED]> said, on 7/4/00 4:59 PM:

>It's not so smart as that, it just does something simple like measure
>the percentage of its allotted CPU time a process uses between calls
>it makes to the OS (at which point the process does the equivalent of
>the Roberts Rules "I yield the balance of my time to whoever's next").
>If it always uses up its full quota, the OS will compensate by giving
>it smaller time slices or giving it slices less often to ensure that
>other programs running on the system remain responsive.

Just to make sure I understand correctly: The OS gives Word 100,000 
cycles. If Word yields after only 20,000 cycles because it's just sitting 
there waiting for the next keypress, the OS continues to give Word 
100,000 cycles each time around, rather than try to accurately predict 
what Word will need based on past data. If, on the other hand, QuickTime 
uses every one of those 100,000 cycles productively making a movie look 
good, then the OS considers it greedy and the next time around gives it 
only 50,000? How does that make sense? 

One thing that always impresses me about demos of the BeOS is the way the 
multitasking is handled. I don't know the underlying methodology, but the 
result seems to be a good balance between all the programs that are 
running, right up until the user does something. For example, if the 
system is really weighed down with a bunch of different applications all 
working to update their displays (movies, 3D plots, etc.) and I start 
dragging a window around, everything else slows down noticeably (but 
doesn't stop) because the system immediately focuses on drawing the 
window I am dragging well. The window I am dragging will be updated far 
more frequently than any other process, because that's what I'm focusing 
on. No matter how overburdened the system is, it is always ready to pay 
full attention to the user. It's really stunning, certainly in comparison 
to the Mac, and even to NT, which despite pre-emptive multitasking 
doesn't even come close in responsiveness. I don't know how Unix systems 
are, but I'm curious to see how Apple does with OS X.

>
>QT gets penalized for two reasons: 1) it bypasses the OS whenever it
>can (which may explain why forcing it to use GDI calls makes it work
>better on NT because this ties it closer to the OS) and 2) it starts
>its own thread that does stuff like polling the main event queue
>instead of doing it the nice way by just waiting for an event.  To
>some extent both of these practices are justified for a time-critical
>library like QT.  But Apple's got some tuning to do to make it work
>better on NT (and probably on UNIX, at least in its Mac OS X guise)
>where the rules are different than on single-user systems like MacOS
>and Windows 95/98.

I remember hearing an Apple engineer discussing QuickTime 3 I think, 
awhile back. He was talking about how it could something (full screen 
movies? can't remember) that Windows Media Player couldn't at the time. 
He said, "Microsoft claims you can't do this with current hardware. What 
we found was that you don't need to upgrade the hardware, you just need 
to upgrade the software." Maybe the two points you make above are related 
to this statement.

Geoff

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Another MetaCard Moment

2000-07-04 Thread Geoff Canyon

Scott, the answer sort of turned into a status report, so I thought it 
might be useful to the list as well--I hope you don't mind:

Scott Rossi <[EMAIL PROTECTED]> said, on 7/4/00 12:52 PM:

>I was wondering if your work with AIFF files would allow for something like
>a script-based audio level meter, which could determine (even vaguely)
>levels of audio in a sound file.  Would be neat to build a sort of poor
>man's level meter in MC.  Curious what you've found...

I'm not sure; I've used two methods so far in analyzing the sound. In 
both cases I grab the sound a thousand samples at a time. It's 16 bits, 
22khz, so each batch I grab is about a twentieth of a second. The first 
method was to see how many of the samples differed from a base of -500 by 
more than x, either positive or negative. I experimented with x from 100 
to 300, looking for between 200 and 300 samples that were different by 
more than that to indicate that there was noise (that I wanted). Now I'm 
comparing each sample to the one previous, and summing the total 
differential. If it comes out to more than about 30,000 over 1000 
samples, that's noise (that I want). The second method seems to be much 
clearer: sounds that I want, even when quiet, total to at least 70-80 
thousand, and up to a million when the sound is loud. the background hiss 
of the recording never gets above about 20,000.

That said, I don't know why baseline noise seems to hover around -500; is 
it my recording setup, and it would be different on another computer? 
That's why I switched to the second method, figuring that it was 
baseline-independent. The clearer indication of sound was a byproduct.

I also don't know what values would indicate louder versus softer. I 
_think_ the method I'm using now, differentials, would give a measure of 
that. The only way to find out is to try it.

I'll put up the stack later today so people can try it out. It's very 
rough, though... an interface only a hurried programmer could love. :-)

Okay, it's five minutes later, and the answer is yes, sort of. (Ain't it 
great?) I now have a scrollbar set as a progress bar, and it sets its 
value based on the log of the differential. It seems to work very well, 
and hardly slows down the process at all. The sort of comes from the fact 
that it's showing the differential on the samples as it reads them in, 
which is not the same as the actual sound I'm hearing. I have it going 
through a large sound file, cutting out the useful bits, and saving them 
each to separate files. It plays each one right after it saves it, but 
obviously, the samples it's measuring and displaying can't be the same 
ones that are playing at the moment. Still, it's quite impressive.

Again, I'll post it a little later today, and mail the list when it's up.

Thanks for the feedback!

Geoff

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Screen artifacts with player

2000-07-04 Thread Geoff Canyon

Scott Raney <[EMAIL PROTECTED]> said, on 7/4/00 10:11 AM:

>like any good OS, NT
>punishes processes when they seem to be sucking up CPU time for no
>good reason, something QT does a lot

I'm just curious, how does QT suck up CPU time for no good reason, and 
how can the OS tell the difference between real work and makework? I'm 
not being sarcastic, I'm just curious--presumably QT isn't issuing 
endless strings of NOPs, so how could NT, or any OS, watch what QT, or 
any program, was doing and say, "that program isn't doing anything 
useful--it's just shuffling those same chunks of data back and forth 
repeatedly. And that sort algorithm could have been written much more 
efficiently; I'll punish it!"

Geoff "striving to learn more than his due about modern OSes" Canyon

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Another MetaCard Moment

2000-07-03 Thread Geoff Canyon

I had a really good day today, and I can't resist sharing:

I write educational software for kids (still coding for the switch from 
SuperCard to MetaCard--I never should have committed to monthly releases, 
but that's another story...) and a large part of the monthly task 
involves recording a bunch of words that will be part of that month's 
release. Each month we record about a thousand words. At first we did 
them individually. Then I switched to having them recorded in batches of 
forty or so, and cutting the words out of the larger recordings and 
saving them individually at that point. It's slow, mostly manual work. 

So today, I decided I'd had enough. For the time being I'm using AIFF, so 
I looked it up on the Internet. It took about ten minutes with google to 
find a web site detailing the file spec. A half hour reading. Then two 
hours pulling apart actual sound files with MetaCard. (Surpisingly,  my 
very first attempt at building a legal AIFF sound file seems to work) 
Then another two hours completing the code that handles naming the files 
appropriately and allows reviews of what the sounds came out as. Now I'm 
in the tweaking phase, because there's no such thing as silence when 
you're recording, so it's not like I can look for a string of zeroes 
between sounds. 

What I have now is a stack that allows me to select a text file with the 
words, reads it in, then allows me to select the sound file, then reads 
in the sound file data, looking for strings of relative silence and 
relative noise. It cuts them apart, creates individual files in the AIFF 
format, saves them with the word names in order, and all at the rate of 
about a word a second (it's examining the data byte by byte, so this is 
faster than I expected).

Not bad for a few hours' effort--Thanks, Scott!

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Database access through PHP?

2000-06-28 Thread Geoff Canyon

I'm just curious if anyone has experimented with using web-database 
access tools, such as PHP, Lasso, ColdFusion, ASP, etc., in order to set 
up database access for a MetaCard client? It seems like it would be a 
pretty painless way to get at corporate data with MetaCard.

Thanks,

Geoff

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Food for thought...

2000-06-25 Thread Geoff Canyon

>From the Ask Apple MacHack:

>One hacker received a flat "no" when he asked if Apple would release 
>Hypercard into the open-source arena. Apple cited the time and effort it 
>would take to tidy everything up in Hypercard and manage the project. 
>Apple would prefer to allocate such resources to new projects, 
>particularly Mac OS X. 
>This opened up a larger open-source debate, prompting Glass to state that, 
>"Open source will not be a dumping ground for dead products." 

This sounds like an invitation.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Re: Mac registry...?

2000-06-24 Thread Geoff Canyon

Leston Drake <[EMAIL PROTECTED]> said, on 6/23/00 7:48 AM:

>The application *is* using relative paths to launch the lessons. 
>The question I posed is how the INSTALLER program for a lesson can know 
>where to copy the files to. They can install the launcher anywhere they want.

Then the installation could be a two-part process. First the installer 
puts the files in a known place, then the user runs the application and 
completes the process; the application knows where it is (and hence where 
the lessons go), and can move the lessons to their final location.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MetaCard as database

2000-06-19 Thread Geoff Canyon

Phil Davis <[EMAIL PROTECTED]> said, on 6/18/00 8:40 PM:

>> Why is this? Is it just that it isn't as efficient as a "true" database
>> program. If that is all it is, I would live with the inefficiency as I am
>> doing with HyperCard. I only want to learn one program and try to know it
>> really well.
>
>The main difference between MC and HC when it comes to large
>stacks is: when you open a stack in MC, the whole stack is loaded
>into memory; when you open a stack in HC, only the part of the
>stack currently needed (I believe) is loaded into memory. (At
>least, the whole stack is not loaded at once). This is why MC is
>so fast - it's always working with something that's in memory.
>That's also why MC isn't as great for super-large stacks.

On the other hand, if your data will fit in memory, then MetaCard is a 
great way to store it, database or not. I don't have experience of stacks 
larger than about 1000 cards, but I have used MetaCard on blocks of data 
as large as a few megabytes (30,000 lines in a text block, at about 100 
bytes per line) and a judiciously applied filter command can slice that 
like butter. Specifically, I broke it down into thousand-line chunks 
ahead of time, and ran the filter on each of them. It's actually very 
fast, and allows for good results. But it's not 30,000 cards, or even 
2000. Just a few, with data displayed dynamically in the fields.

Just my 2 cents

Geoff Canyon
[EMAIL PROTECTED]

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: File selector-MacOS

2000-06-14 Thread Geoff Canyon

Richard Gaskin <[EMAIL PROTECTED]> said, on 6/14/00 8:57 AM:

>My only complains with Nav Services are the lack of live scrolling (geez,
>what year are they designing in?) and the really flakey response to the
>Enter key (it now differs from the Return key, in violation of their own
>guidelines on how default buttons work).

Disclaimer: I agree that we can't go back. I dislike that there is no 
"Desktop" button in the new dialog, that there is no place to click to go 
up one folder level (used to be able to click the drive icon), that there 
is no keyboard command to switch drives (used to be able to command-right 
arrow and command left-arrow), and finally, that hard drives don't sort 
to the top of the list in the desktop.


While we're at it, what sense does it make to give the desktop special 
status in a file dialog? On network volumes, the desktop folder is 
depicted as it really is: a folder at the root level of the drive. 
Wouldn't it make (some) sense to to do the same for local drives as well? 
It would tend to remove some of the confusion about what drive holds the 
desktop, and make it so that the top level would just display all the 
available volumes, something that makes a lot of sense to me since they 
don't sort the drives to the top of the list anymore. Why, in my day, 
computers were steam powered! If you wanted a printout, you had to go out 
and chop the wood to make the paper! You kids don't know how easy you 
have it!


gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MetaCard for Mac OS X--developers ask

2000-06-09 Thread Geoff Canyon

andu <[EMAIL PROTECTED]> said, on 6/8/00 7:21 PM:

>What I don't figure out (and this has nothing to do with the original 
>post) is the number of companies advertising software for a version of the 
>OS which officially, as far as the consumers are concerned, doesn't exist 
>yet.

Many of them are/were developers for NeXTStep/OpenStep. Since OS X is 
based on OpenStep, it's easy for them to jump the gun.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




MetaCard for Mac OS X--developers ask for it by name

2000-06-08 Thread Geoff Canyon

I'm curious how interested everyone would be in a developer preview 
release of MetaCard for OS X DP 4. Apple CEO Steve Jobs said at the 
keynote address of Apple's WWDC (Worldwide Developers Conference):

"For those developers that have been porting their Mac OS X apps already, 
we thank you. It hasn't been the easiest thing living with our earlier 
releases with more bugs, less completeness, and all of you developers who 
are just starting now might think, 'Oh, I'm glad I didn't start then.' 
But remember one thing: they are ahead of you. It is now time to start. 
There are no more reasons not to be developing on X. You should take your 
development on 9 and move it instantly over to X as of now because the 
train is leaving the station. The time is now -- the time is now."

And

"You are our partners in this, and it is now time to move your apps over 
to it, so that we can all leave the station together this fall and 
towards the end of this year when we are going to put everything we have 
behind marketing Mac OS X. Those truly great apps that are ready for Mac 
OS X, we are going to make poster children for Mac OS X. We're going to 
throw a lot of co-marketing dollars behind them. It would be nice if 
yours was one of them."

The opportunity I see here, is that HyperCard is synonymous with Apple. 
They may have let it languish, but they've repeatedly denied that they're 
discontinuing it. The release of Mac OS X will be the death of HyperCard. 
It's time for a passing of the torch:

  HyperCard is dead! Long live MetaCard!

Think about what Steve Jobs is saying above. They want carbon apps for OS 
X when it comes out. They _need_ carbon apps. And _nothing_ creates 
applications faster than MetaCard. With a concerted effort, a significant 
percentage of of the applications available for OS X at launch could be 
MetaCard applications. I'm reminded of the switch to PowerPC eight years 
ago. It was the change in processor that allowed Metrowerks to step in, 
clean Symantec's clock, and since then they've _owned_ the Mac 
development market. MetaCard has a somewhat similar opportunity now, but 
the window is only open so long.

Revolution will provide the interface Mac/HyperCard users look for in 
time for OS X, but not in time to develop applications for its release. 
We need MetaCard for OS X now. REALsoftware is already making available a 
version of REALbasic for OS X--so how about MetaCard, everyone? 

Would you be interested? Would you develop for it?

Geoff

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MetaCard Plugin?

2000-06-01 Thread Geoff Canyon

Craig Spooner <[EMAIL PROTECTED]> said, on 5/31/00 10:09 PM:

>Well, Blair has certainly echoed my feelings. And because everything 
>is on the Web these days, wouldn't it make more sense to tie into the 
>browser rather than simulate a browser in MC? The MC plugin would 
>seem to provide the richer experience for the user and a broader set 
>of options for the developer. No?  Mind you, I'm not advocating 
>moving everything to the Web.  But that is the locus for so much of 
>today's content that the absence of a direct method of integrating 
>MetaCard with it would seem to be a serious shortcoming of the 
>product.


On the subject of web-enabled apps versus apps-as-plugins; check out

http://www.asktog.com/readerMail/1999-08ReaderMail.html

for some good information and commentary. The gist of it is, if you need 
control over the user environment, if you need to do more than a very 
simple application, then don't do it in a browser.

Obviously this depends on the strength of MC's implementation within a 
browser. But my vote goes for improvements to MC, not trying to make it 
run inside a browser.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




MetaCard+Many Small Images=Memory Hog?

2000-05-15 Thread Geoff Canyon

Hi, 

there's a board game I play that I decided I liked so much, I wanted an 
online version. MetaCard + four hours = prototype --is MetaCard great or 
what?

But now I have a slight problem. The board is simple, but with patterned 
squares, much like a chessboard with marble and ebony squares, for 
example. So I created one tile as a gif, created an image, and imported 
the image as a file reference. The standard board contains over 250 
squares. So I blithely wrote two repeats to get me an arrangement of 
16x16 of these images, each using a file reference to pull in the same 
gif file. BOOM! goes MetaCard on the Mac. So I up the default partition 
to 20mb, and all is well. Then I decide I want different sizes of board. 
I choose 20x20 as a nice maximum size, and run the board construction 
routine. No crash, but by the time MC is done, the Mac is reporting that 
MC is using over 30mb. Good for MC that it was able to grab what it 
needs, but still--30?

The board construction routine does check and delete previous 
incarnations of the board, so I'm not piling up extra images. So what is 
causing the enormous appetite?

I'd like to be able to support irregular board shapes, so I need to be 
able to construct just about any shape. I'm thinking one way to reduce 
memory usage would be to have an image that was as big as I want to ever 
get--say 25x25 squares, but all in one image instead of in 625 small 
ones, and then use a polygon, setting the points appropriately, to mask 
out the squares I don't want to use. This would be a fair bit of code, so 
I figured I'd ask before undertaking it--is one large image going to use 
a lot less memory than a bunch of small ones that add up to the same 
area? And if so, why in particular?

Thanks to any who have insight.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Limit Visual Effect?

2000-05-09 Thread Geoff Canyon

On 5/8/00 9:47 PM, Scott Rossi <[EMAIL PROTECTED]> wrote:

>A good point -- the problem effects are those that involve movement.  I used
>dissolve in an example to illustrate the syntax, but the fact remains it
>would be useful to limit the results of an effect between card transitions,
>not just on a single card.

A transition limited to a particular rectangle would be nice; another 
option would be a transition limited to objects not common to the two 
cards. I.E., assuming the cards share all the same backgrounds, the 
transition would affect only card objects. This again would only affect 
the "moving" transitions, but it would be different from limiting the 
transition to a rectangle, because, for a push, for example, some objects 
that made the transition might move over/under objects that didn't move 
because they were common to the two cards.

I don't think what I just said was very clear...

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Limit Visual Effect?

2000-05-08 Thread Geoff Canyon

On 5/8/00 4:53 PM, Scott Rossi <[EMAIL PROTECTED]> wrote:

>>> For example: I have a series of cards in a stack that use the same header
>>> imagery at the top of each card (in a shared group).  I'd like to use a
>>> localized visual effect on the lower portion of the cards, to update the
>>> content that appears in that region, without affecting the header images.
>>> Currently there's no way to do this except by placing all the images/data 
on
>>> a single card and hiding/showing the desired content.  Why limit this 
effect
>>> to a single card?  Why not allow the use of MC's card structure to organize
>>> content for transitions (visual effects)?
>
>> I guess I can see how this would be useful.  Unfortunately what
>> command syntax would be required to do this isn't so obvious.
>> Modifying the "visual" or "go" commands could be very hairy...
>
>The word "using" seems intuitive here:
>
>  visual dissolve using the rect of grc "myMask"
>  go cd 2
>
>Or:
>
>  unlock screen with visual dissolve using the rect of grc "myMask"

I almost responded to this earlier, but then I thought of effects like 
Push Right, where this would be useful. But now that we're talking about 
Dissolve, what doesn't it do right?

If you have (per the example above) a background that is on cards 1 and 
2, and you're on card 1, and you use

visual effect dissolve
go cd 2

then the result seems right to me: the background items don't change at 
all as the items from cd 1 fade out, replaced by the items from cd 2 
fading in. Is that what you want?

As far as I can tell, these effects correctly handle objects that are 
constant from one card to the next:

barn door
checkerboard
dissolve
iris
plain
venetian blinds
wipe
zoom

While these move the unchanging objects (movement is the key problem):

push
reveal
scroll
shrink
stretch


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Urgent Solution Needed: Position in File

2000-05-02 Thread Geoff Canyon

Peter Reid <[EMAIL PROTECTED]> said, on 5/2/00 3:56 AM:

>   write newRec to file dataFile at end
>
>HOWEVER, I can't then find out where in the file this new record is 
>relative to the start of file and so I can't add an index entry into 
>the associated index file.  Given that I know the length of every 
>record...

Wouldn't it be possible to store the number of records in the database in 
a global, and increment the global each time you add a record? Given the 
fixed record length, it would then be easy to calculate where you are. 
Obviously, you'd have to maintain that value carefully, decrementing if 
you delete a record, etc.

But that begs the question: why not use a commercial database?

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: pasting

2000-04-30 Thread Geoff Canyon

andu <[EMAIL PROTECTED]> said, on 4/30/00 4:40 PM:

>>Here's a rather strange request...
>>When someone pastes text into a field, is there any way to get the beginning
>>char and ending char of the text they pasted?  I've played around with
>>pasteKey, but can't seem to get anything to work.  In other words, if I
>>paste "Just a test" into an empty field 1, I'd like MetaCard to somehow
>>return to me "chars 1 to 11 of field 1".  If this is possible, I'd love to
>>know how.  If not, oh well.
>
>Tough job. 
>I think your best bet is to use a hidden field where you can paste the 
>same text, find fld 2 in the main field and get the "foundChunk". 
>Trouble is that at least on MacOS the pasteKey message is generated 
>on command + c also, probably a bug to be reported.


Agreed on the pasteKey message--it doesn't seem like it should be sent on 
command c. But it is sent when a paste happens, and doesn't this make 
this very simple? Something like:

on pasteKey
  --get the selectedChunk and the length of the field
  send finishUpPaste to me in 1 millisecond
  pass pasteKey
end pasteKey

on finishUpPaste
  --use the values from before and the current values
  --to figure out what the pasted text selection
end finishUpPaste

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Sprite Libraries

2000-04-30 Thread Geoff Canyon

In addition to MetaCard, I work with REALbasic. REALbasic has a sprite 
library built in. It's a third party software package, but bolted in for 
ease of use. 

Are there any cross-platform (obviously all three platforms would be 
best, but I'd still be interested in just about anything that got the job 
done on even one platform) animation toolkits that could be bolted into 
MetaCard.

The level of access provided in RB is fairly simple: you have the ability 
to create and destroy sprites, give them a direction to travel in, and 
tell them to drop you a message when they collide with something. I don't 
think you have the ability to give them a sequence of images to cycle 
through automatically as they move, but obviously that would be a great 
feature.

On the other hand, how far away is the move command from being able to a 
reasonable number (from an arcade standpoint--maybe ten to thirty) of 
objects moving around at the same time? Would it take a 1000 mhz 
processor, or a 100, mhz processor?  :-)  I'm curious if anyone has 
given it a try.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




MetaCard math question--floating point math

2000-04-28 Thread Geoff Canyon

This is raging on the 4D (a database application) discussion list right 
now, so I thought I'd ask it here:

2.3 + 2.3 + 2.4 is 7.0, but in binary representation, 2.3 and 2.4 are 
repeating decimals, and hence to a computer, the result is actually 
something like 6.98 or 7.1.

In 4D, this can bite you in the butt if you're not careful to round the 
results of a calculation like this. I just tried it with MetaCard, and 
got 7.0. Is MetaCard "safe" under all circumstances? Or does anyone know 
of a situation where it pays to do the final rounding yourself?

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: General MetaCard question

2000-04-28 Thread Geoff Canyon

On 4/28/00 7:48 AM, [EMAIL PROTECTED] 
<[EMAIL PROTECTED]> wrote:

>This is a good point, and one I've never seen quantified very well:
>when is it appropriate to consider libraries when calculating the
>productivity of a language?  And if you decide to do this, how do you
>take into account the difficulty in finding and learning how to use a
>non-bundled library?  

The other thing about libraries is the aspect of how well the library 
fits (or doesn't) your needs. In comparing C or Pascal to Ada, there is 
the assumption that (almost) anything that can be built in one can be 
built the others as well. This makes the difference in ratios:

Ada   1 to 4.5
C 1 to 2.5
Pascal1 to 3.5

significant--pretty much no matter what task lays ahead, if you can 
implement it in one of these, you can probably implement it in any of 
them, and therefore, based on coding efficiency, it would seem to be the 
best choice to go with Ada; you'll write just over half the code you 
would if you chose C.

This isn't true with MetaCard, or Perl or Python, etc. With environments 
like these, there's no guarantee that you can implement the task. There 
are many things you could do in C that you couldn't do in MetaCard, just 
to pick one. Photoshop. Toast. FileMaker. Word. Excel. (I'll get back to 
plugins in a minute)

But for the things that you _can_ do in MetaCard, the ratio is probably, 
as discussed, far higher than simply 1 to 5. For something like the demo 
stack, it's probably 1 to 1000, and that could be conservative by an 
order of magnitude or two. As you move along the continuum from things 
that are a snap to do in MetaCard to things that are much harder to 
implement in MetaCard, the ratio drops and drops, probably until you get 
to some sort of breakeven point, where it's roughly the same effort to 
implement in MetaCard or C. I'm thinking a good candidate for an 
application that might sit near that breakeven point would be an email 
client. To implement a full-featured email client, something like Eudora, 
I'm betting would be in the same ballpark to do in MetaCard as C. If you 
disagree on Eudora, certainly you can think up your own example. Then you 
get to apps that just can't be done right in MetaCard as it stands. 
Photoshop is a good example.

So the choice, it seems to me, becomes much more digital than it has been 
in the past: deciding between Pascal and C, for example, is open to 
discussion: which is better supported on the target platform, what do the 
programmers know better, which has a brighter future, etc.? Deciding 
between MetaCard and C, it's pretty much: can this reasonably be done in 
MetaCard? If so, you'd have to be a fool to look elsewhere. If it can't 
be done in MetaCard, just as obviously, you'd be a foold to try. 

MetaCard isn't alone on its side of the scale. Lots of things get 
implemented in Perl, Python, AppleScript, and of course HyperCard and 
SuperCard, and all of those sit on the side of, If you can do it here, 
don't even think about doing it in C. Deciding which of these is the 
better option is left as an exercise for the reader.

But there is one other possibility. What if you wanted to write a 
program, say Photoshop, that obviously is beyond the capability of 
MetaCard _as it stands_. What if you decided to implement all the hard 
stuff in C, but do the interface in MetaCard? I'm thinking of something 
slightly different than a situation where MetaCard can do the bulk of 
what you want, but needs some small extra, so you write a plugin for that 
one (or few) feature. I'm thinking of a situation where the C component 
is more like a partner and less like a servant dedicated to a single 
task. Has anyone ever used MetaCard as the interface shell to a C (or 
other lower-level environment) program engine? One example I just though 
of is MetaCard itself, in a sense. But are there any others?


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: CSV

2000-04-27 Thread Geoff Canyon

On 4/27/00 4:09 PM, Richard Gaskin <[EMAIL PROTECTED]> wrote:

>I'm working with some legacy data in (ugh!) CSV format (comma-separated
>values).
>
>Anyone have a quick-n-dirty method if turning that into the more sane
>tab-delimited format?

Seems like a good candidate for matchtext, as long as you have a fixed 
number of columns. Maybe even if you don't, I haven't experimented with 
the regular expressions enough to answer that. But something like:

  local var1,var2,var3 --etc.
  put quote & "," & quote into theDelim
  put "^" & quote & "(.*)" & theDelim & "(.*)" & \
  theDelim & "(.*)" & quote & "$" into theRegEx
  put "" into theOutputVar
  repeat for each line L in sourceText
if matchtext(L,theRegEx,var1,var2,var3) then
  put var1 & tab & var2 & tab & var3 & return after theOutputVar
else
  --do something to handle errors here
end if
  end repeat


would get you started.


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




General MetaCard question

2000-04-27 Thread Geoff Canyon

This is probably a question just for Scott, but I thought the answer 
might be of interest to the list, so:

I'm reading Code Complete, by Steve McConnell. He discusses choice of 
programming language, and says that, "Programmers working with high-level 
languages achieve beter productivity and quality than those working with 
lower-level languages." (p. 46) He lists the following ratios of source 
statements in high-level languages to the equivalent assembly code:

Language  Ratio
Assembler 1 to 1
Ada   1 to 4.5
Quick/Turbo Basic 1 to 5
C 1 to 2.5
Fortran   1 to 3
Pascal1 to 3.5

I'm wondering if you (Scott) have any idea where MetaCard falls on this 
list. Obviously, I could throw a QuickTime movie into a stack, set it to 
autorun, build a standalone, and claim that my ratio is 1 to infinity--no 
lines of MetaTalk required to produce an application that actually does 
something. But I think that trivializes the question. QuickTime can be 
built into a C program as well, and I'm confident the use of libraries 
didn't enter into the list above. So what I'm thinking of is something 
more like, how many lines of Assembler does this translate to:

on mouseUp
  put 3 into y
  repeat with x = 1 to 10
add x to y
  end repeat
  put y
end mouseUp

or this:

on mouseUp
  put empty into theResult
  put "This is a test sentence" into theSentence
  repeat for each word w in theSentence
put w & " " before theResult
  end repeat
  put theResult
end mouseUp

The second example treads on the edge of using libraries again, but I 
don't think it crosses it. Comparisons involving visual effects, move 
commands, audio, might be over the line. Sockets--beats me. A comparison 
based on 

put url "http://www.whatever.com/whatever" into url ("binfile:"&tFilePath)

would give a ratio far beyond those listed above, I'm sure, but is it a 
valid comparison?

In any case, I'm curious if you've thought about this, and if so, what 
you think a defensible number is. (Has anyone done this kind of research 
on Java? Perl? Python?

Regards,

Geoff "I'm up too late, so I'm asking crazy questions" Canyon

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: phrasing a repeat conditional

2000-04-24 Thread Geoff Canyon

On 4/24/00 12:41 PM, Phil Davis <[EMAIL PROTECTED]> wrote:

>How about something simple like:
>
>replace (cr & cr) with cr in gList
>
>Phil

But that wouldn't guarantee that it only replaces returns at the end of 
the global, and it wouldn't get rid of all of them. Using the regular 
expression, with the "*" after the return, finds all of them and replaces 
with nothing. The "This is the end" string is just to make it find them 
at the end

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: phrasing a repeat conditional

2000-04-24 Thread Geoff Canyon

On 4/23/00 10:27 PM, Nicolas Cueto <[EMAIL PROTECTED]> wrote:

>Hello.
>
>Appended to the end of a global variable there'll  be 1 or more blank,
>cr-delimited lines. I want to remove those blank lines, and thought phrasing
>a repeat-loop thus would work but am worried about actually testing it out
>in case I get an infinite loop:
>
>  repeat until (the last line of gList is not empty)
>
>   delete the last line of gList
>
>  end repeat
>
> Is the phrasing of the conditional allowed? OK? Will it generate an
>infinite loop?
>
>Thanks
>
>

Another way to do this would be with replaceText, as long as you can come 
up with a string that is guaranteed not to be in the global. Assuming 
that "This is the end" is such a string, this code would strip trailing 
returns:

  put return & "*This is the end" into theRegex
  put replaceText((theGlobalVar & "This is the end"),theRegex,"") into 
theGlobalVar

I assume this would be faster as well, but given MC's execution speed, 
it's probably not much of an issue. I just love regular expressions...


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Access Violation on the PC

2000-04-11 Thread Geoff Canyon

On 4/11/00 11:00 AM, Scott Raney <[EMAIL PROTECTED]> wrote:

>You could also set the passkey, then set the password to empty, clone,
>rename, and then set new passwords on the new and old stacks.  This
>one has already been fixed for 2.3.1.

Sounds good, thanks!

>
>> And while we're on the subject, is the encryption MC uses when you 
>> password a stack keylength-dependent? In other words, is the encryption 
>> iteself more secure with a longer password (aside from the password being 
>> harder to guess)?
>
>In theory, yes.  But you get diminishing returns with strings longer
>than about 6 characters, so I there's no reason to go overboard here.

I had a feeling. Thanks for the info.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Access Violation on the PC

2000-04-11 Thread Geoff Canyon

My standalone consists of several stacks. Some of the stacks change, so I 
save them out as external stacks from the standalone, using this script:

hide stack "dirTemplate"
clone stack "dirTemplate"
set the name of it to "iDirectory"
set the loc of stack "iDirectory" to 308,463
save stack "iDirectory" as theStackFile
close stack "dirTemplate"
hide stack "prefsTemplate2"
clone stack "prefsTemplate2"
set the name of it to "prefsTemplate"
set the mainstack of stack "prefsTemplate" to "iDirectory"
close stack "prefsTemplate2"
hide stack "iDirectory Menu Bar Template2"
clone stack "iDirectory Menu Bar Template2"
set the name of it to "iDirectory Menu Bar Template"
set the mainstack of stack "iDirectory Menu Bar Template" to "iDirectory"
close stack "iDirectory Menu Bar Template2"
go stack theStackFile
show stack "iDirectory"
save stack "iDirectory"

Since I'm distributing the standalone, I've put passwords on all the 
stacks involved. This works fine on the Mac, but under Windows NT 4, I'm 
getting an error in the execution of this script that causes Windows to 
shut down my standalone. The standalone works fine without the password. 

Is it not possible (under Windows) to clone, set the location of, name, 
etc. a password-protected stack?

If so, do I password the stack, and set the passkey before executing the 
above, then re-password everything after?

And while we're on the subject, is the encryption MC uses when you 
password a stack keylength-dependent? In other words, is the encryption 
iteself more secure with a longer password (aside from the password being 
harder to guess)?

Thanks

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Cross-platform development discussion on Slashdot

2000-04-04 Thread Geoff Canyon

On Slashdot  there is currently a discussion that might 
be of interest. Someone calling themselves Amphigory (no email) said they 
had to do some development for Linux and PC, preferably under Linux, and 
wanted to know what the best tool was. A great deal of discussion 
followed, focusing mainly on: C++, Java, Script Languages (Perl, Python, 
etc.). No mention was made of MetaCard. I don't seem to be able to load 
the page in order to reply, but if you can get through, the url for the 
discussion is:



enjoy!

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




.ico file not the right size

2000-04-02 Thread Geoff Canyon

I'm trying to build a standalone for the PC, and therefore I need to 
create a .ico file.

I have a utility (iconographer for doing this, but the resulting .ico 
file is far larger than MetaCard expects. My .ico is 5200 bytes, MetaCard 
wants 744. I searched my PC for other examples of .ico files, and the 
only one I found wasn't 744 bytes either--it was 1056. Is there some 
secret to making a .ico file the right size?

Thanks

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC Internet "Suite" Guidance

2000-03-25 Thread Geoff Canyon

Sivakatirswami <[EMAIL PROTECTED]> said, on 3/25/00 9:43 AM:

>But how to use all the internet commands, compress files etc? I don't find
>any user's guidance. . .so how to get a grip on this? The scenario is pretty
>obvious:

I would start with the "URLs as Containers" entry in the help index. It 
opens the "Container" card in the concepts and techniques stack, but 
don't be fooled--the URL stuff is there, at the bottom. It's very easy to 
grab files off a web server this way. The more complex stuff, obviously, 
is more complex.  :-)

>I tried to look at the scripts of the little help stack
>that has three URL download buttons for the FAQ, the Survey etc but for some
>reason I could not get those objects to be selected by the select tool to
>examine the scripts.

Use the toplevel command to open them: toplevel "StackName"

You can do this even if they're already open. Then, if their cantModify 
property is set to true, set it to false and you should be able to access 
the scripts. Be careful to work on a copy, or don't save. One of the 
great things about MetaCard is the fact that you can pry open everything 
in the development environment. Sometimes the best documentation is the 
script the experts wrote to get the job done! :-)

>And for CD internet enabling, how to create a button that will launch an
>HTML file in the users' browser. . .( I am assuming that MC can't actually
>interpret and display HTML files like Netscape or Explorer can. . .)

It can, in a limited fashion. Use "set the htmlText of field "FieldName" 
to whatever"

Mostly it handles character formatting: font, size, color, style, etc. 
Things like tables, embedding images, etc., are not supported.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




[ANN] iDirectory Ships

2000-03-20 Thread Geoff Canyon

Hi, everyone, this just a product announcement, so hit "next" if you're 
not interested.

My first commercial MetaCard project is shipping. It's called iDirectory. 
It is a portable directory application for companies with too many people 
to use a simple paper or html directory. It grabs its data file from a 
web server, and abuses the filter command to no end in order to provide 
lightning-fast searches of thousands of entries. (Note to people who say 
MetaCard isn't/shouldn't be a database--it works pretty well, imho) Aside 
from that oddity, it comes in the form of an installer/creator 
application, which the user uses to customize their copy of iDirectory 
and then generate the actual application. It was quite interesting 
building an application in MetaCard that built separate MetaCard 
applications.

If you are curious, go have a look at:

http://www.inspiredlogic.com/idirectory/index.html

and let me know what you think.

Great thanks go to Scott Raney of MetaCard and Kevin Miller of Cross 
Worlds. MetaCard is a great product, and their support has been nothing 
short of fantastic as I put this thing together.

Geoff Canyon
Inspired Logic

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: openStack handler

2000-03-17 Thread Geoff Canyon

On 3/17/00 12:21 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 
wrote:

>I am converting a SuperCard application to MetaCard.  The SC project script
>had an openProject handler that would execute when the project was opened.
>I am trying to come up with a similar handler in MetaCard.  If I change the
>openProject handler to an openStack handler for my mainStack then the
>handler is called every time a substack is opened.  Is there a handler that
>will execute only when the mainStack is opened?

put the handler into an openStack handler, _in the script of the first 
card_ of the mainStack. That way it only gets called when the mainStack 
opens.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: ODBC?

2000-03-16 Thread Geoff Canyon

On 3/15/00 8:32 PM, Scott Raney <[EMAIL PROTECTED]> wrote:

>Umm, you could probably do it this way, but that's a pretty hairy
>reverse engineering problem.  It's probably best to reserve this
>technique for the occasional tough debugging problem.  Finding an ODBC
>wire-protocol spec has got to be the more efficient route to building
>an ODBC client...


Agreed--I just happened to have access to the dump, so I took a look. You 
never know, you might get lucky. Besides, I was curious. 

Boy, I'm not curious any more! Hopefully we'll find specs somewhere. They 
have to exist--people do write drivers for this stuff.

gc


Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: ODBC?

2000-03-15 Thread Geoff Canyon

I am now in the possession of a log dump from SQL*net for a small 
session, and it's now clear to me that I was meant to be a basket 
weaver...

In other words, it's 300k of:

nsrdr: recving a packet
nsprecv: entry
nsprecv: reading from transport...
nttrd: entry
nttrd: socket 180 had bytes read=64
nttrd: exit
nsprecv: 64 bytes from transport
nsprecv: tlen=64, plen=64, type=6
nsprecv:packet dump
nsprecv:00 40 00 00 06 00 00 00  |.@..|
nsprecv:00 00 06 02 01 00 01 01  ||
nsprecv:00 07 09 44 44 2D 4D 4F  |...DD-MO|
nsprecv:4E 2D 59 59 08 01 02 04  |N-YY|
nsprecv:22 A9 0D A0 00 04 01 01  |"...|
nsprecv:00 00 00 01 02 01 1A 03  ||
nsprecv:00 00 00 00 00 00 00 00  ||
nsprecv:00 00 00 00 0B 00 01 01  ||
nsprecv: normal exit
nsrdr: got NSPTDA packet
nsrdr: NSPTDA flags: 0x0
nsrdr: normal exit
nsdo: *what=1, *bl=2038
nsdo: normal exit
osnqrc: exit
osnqsn: entry
osnqsn: exit
osnqrc: entry
nsdo: entry
nsdo: cid=0, opcode=84, *bl=0, *what=1, uflgs=0x20, cflgs=0x3
nsdo: nsctx: state=8, flg=0x420d, mvd=0
nsdo: gtn=127, gtc=127, ptn=10, ptc=2048
nsdofls: entry
nsdofls: DATA flags: 0x0
nsdofls: sending NSPTDA packet
nspsend: entry
nspsend: plen=15, type=6
nttwr: entry
nttwr: socket 180 had bytes written=15
nttwr: exit
nspsend: 15 bytes to transport
nspsend:packet dump
nspsend:00 0F 00 00 06 00 00 00  ||
nspsend:00 00 03 08 0C 01 02 00  ||
nspsend: normal exit


Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: ODBC?

2000-03-15 Thread Geoff Canyon

On 3/15/00 1:58 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

>Has anyone had any more luck than me?


Success! Well, not really. I gleaned from

http://www.sch.bme.hu/misc/oracle8/network/a58230/ch10.htm#423022

that Oracle databases _may_ be accessed on port 1575.

I feel this is a moral victory.  :-)

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: ODBC?

2000-03-15 Thread Geoff Canyon

On 3/15/00 1:58 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

>Recently it was pondered whether Metacard could connect to ODBC databases 
>via 
>sockets, which would be a killer thing to have.
>I've done some hunting but I can't seem to find any worthwhile docs on ODBC 
>that would give me some insight on this. Has anyone had any more luck than 
>me? I'd kill to work on this if it was doable.

I haven't found anything yet, but I'm still looking.


Why the heck should it be so difficult to find this? You would think 
they'd want everyone to know...


Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: Dumb download question...

2000-03-15 Thread Geoff Canyon

On Wed, 15 Mar 2000, David Bovill wrote:

> Thanks Kevin...
> 
>   so what do you think, is it technically possible for a PC or Unix system
>   to save this invisible Mac-specific information, so that it magically
>   appears on the Mac without having to do or use anything else? Still can't
>   see the technical problem with Metacard building this cross-platform
>   support feature in.
> 
> Scott?

On 3/15/00 9:36 AM, Scott Raney <[EMAIL PROTECTED]> wrote:

>There are no other ways.  The MacOS file system has three places where
>it can store information in a file, and DOS and UNIX only have one.
>And there's no way to make one thing do the work of three.

I know it doesn't help now, but MacOS X will end this. Its foundation is 
UNIX, and as such, it supports only one place, as do DOS and other UNIX 
OSes. Instead, MacOS X will use the concept I think they call a package, 
which is really a folder pretending to be a file. The folder can contain 
multiple files, but not appear to be anything other than a single 
document/application to an ordinary user. That way it can store any 
number of different pieces and formats of information, without being 
incompatible.

Scott, will it be a big deal for MetaCard to support packages? I don't 
know if any other UNIX (besides NeXTStep/OpenStep) uses this concept.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: Batteries on iBook

2000-03-14 Thread Geoff Canyon

On 3/14/00 5:47 AM, Isotalo <[EMAIL PROTECTED]> wrote:

>When I work "on batteries" (or rather the iBook) I noticed some strange 
>behavior.
>For example: I have a button moving around using send. But when on 
>batteries, if no other action is
>taking place (like mouse move, key pressed, etc) the button slows down and 
>finally stops.
>Anyone else noticed similar?

I think what you're seeing is the Mac slowing the processor in order to 
conserve the batteries. I don't have a battery powered mac in front of 
me, but check the control panels regarding power conservation, and see if 
there isn't something along the lines of "Processor Cycling" and disable 
it, and see if that fixes the problem.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Oracle/other databases access

2000-03-13 Thread Geoff Canyon

To those who know far more than I about database access: is there 
anything about connecting to [Oracle|Sybase|MySQL|etc.] that can't be 
handled with the new socket support?

In other words, is there any need for an XCMD/DLL for database access at 
this point, or is it just a matter of writing the appropriate MetaTalk?

Thanks

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: Dumb download question...

2000-03-10 Thread Geoff Canyon

On 3/10/00 9:43 AM, Scott Raney <[EMAIL PROTECTED]> wrote:

>What would be
>nice would be if there was some optional way for MacOS to map file
>extensions to file types/creator codes when it's reading a PC floppy
>or an ISO 9660 format CD.

Control Panels-File Exchange. Add a new entry, type mc, select MetaCard, 
and you're done. Works off floppies, at least--haven't tried a cd, but it 
should work. I don't know why I didn't think of this before--I, too, have 
a file typer just for converting MetaCard files.

gc

Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: export audio

2000-03-10 Thread Geoff Canyon

On 3/10/00 6:00 AM, Mark Mitchell <[EMAIL PROTECTED]> wrote:

>>
>> I haven't tried this, but there is at least one program (SndSampler for
>> the Mac) that has an option to try to import just such headerless sound
>> data. They don't promise success, but do point out that sound data is
>> relatively simple, and can only be represented so many ways. In any case,
>> if it's important, that might be worth a shot.
>>
>> gc
>>
>
>The "extract" function of SndSampler is a wonderful thing, and works great 
>on most
>file types.  But it doesn't work on metacard stacks (claims "sorry, this file
>contains no SND resources").  Is this the function you were referring to?  
>Or is
>there another one?
>
>mark mitchell


No, I was referring to the Import Raw Audio function (although I didn't 
remember the name). 

On 3/8/00 3:36 PM, Scott Raney <[EMAIL PROTECTED]> wrote:

>Bad news: the export command actually only supports exporting images
>(a fact documented in the Reference).  You actually can export
>videoClips and some image formats by getting the "text" property and
>writing that to a file, but even this doesn't work for audio data
>because because the engine strips off the header and other important
>stuff to save space and processing overhead.  So there is no way
>recover the original data in an audio clip once it's been imported...
>  Regards,
>Scott

This seems to imply that it _is_ possible to export audio by getting the 
text property, but that Scott thinks it won't be usable because of a lack 
of header (and other?) information. 

But SndSampler's Import Raw Audio function apparently doesn't care. I had 
to go look it up in the manual, but here is what the manual says:



Importing Raw Audio
Any file of any type can be imported as raw audio. One of the neat things 
about importing a file as raw audio is that you can sometimes recover the 
sound data from a corrupted file. When importing raw audio, SndSampler 
assumes that all the data in the file is made up of pure sound samples, 
without any header information. This means that files with corrupted 
headers can still be opened. You are required to tell SndSampler what 
format the sound data is in. SndSampler presents the data format options 
intelligently, so that choices which don't matter or are illegal under 
certain conditions are dimmed. For example, if you are loading 8-bit 
uncompressed samples, it doesn't matter if the file came from a Motorola 
or an Intel machine, so the little-endian and big-endian options are 
disabled. If you're not sure what format the data is in, try different 
combinations until you get something that sounds right. You'll have to 
guess at the sample rate of the sound data, but that shouldn't be too 
hard. Also, there will probably be a little blip at the beginning of the 
sound data, which corresponds to the header information. Just move the 
start pointer past the blippy stuff.
Of special interest will be the byte offset choice. This is provided for 
16-bit data. Usually you will want to choose 0 here. However, with 16-bit 
data it might happen that the file has been corrupted in such a way that 
there is an odd number of bytes before the sound data begins. In this 
case, if you choose a 0-byte offset, the 16-bit sound data will be wrong: 
8 bits of it will come from the first sample, and 8 bits will come from 
the next sample. So if you can't seem to import a 16-bit raw audio file 
correctly, try changing this to 1.

Guide to sound formats:
8-bit System 7 sound file: 8 bits, unsigned.
16-bit System 7 sound file: 16 bits, signed, little endian.
8-bit AIFF: 8 bits, signed.
16-bit AIFF: 16 bits, signed, little endian.
8-bit WAVE: 8 bits, unsigned.
16-bit WAVE: 16 bits, signed, big endian.
8-bit Sun/NeXT: 8 bits, signed.
16-bit Sun/NeXT: 16 bits, signed, little endian.




Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: Load url reprise--An alternative?

2000-03-09 Thread Geoff Canyon

On 3/9/00 9:48 AM, Jacqueline Landman Gay <[EMAIL PROTECTED]> 
wrote:

>There is a stack we want to run off the web. The client wants to charge
>for usage by the hour. Users will be provided with a small MC
>application that simply opens the web stack. They will log into the web
>site when they start, and log out when done. The application needs to
>check regularly to see if there is an online connection, and if the user
>goes offline without logging out of the site, then the application on
>disk needs to quit so that they cannot continue to use the stack without
>incurring charges.
>
>So that's why I need to know. No real data will be transferred after the
>initial stack download, unless it is true that I need to read a known
>file online in order to see if the user is still connected. That's why I
>can't just "ask the user", as was suggested here, and that's why I need
>to use the "load" command so that I can do the checking in the
>background without interrupting stack usage. If there is a better way to
>accomplish any of this, I'm open to suggestion.


Depending on how serious you are about enforcing the limits, wouldn't it 
make more sense to simply have the MC app time itself and report in 
occasionally? This solves the problem of logging in and logging out--you 
don't have to anymore. It solves the problem of accurate times--MC knows 
what time it is. It solves the problem of determining whether there is a 
connection--you don't need a connection most of the time, and when you 
do, you actually have something you need to communicate (the time spent 
using the program) rather than just detecting connectivity. The only 
thing you need to guarantee is that the MC application is able to log in 
periodically to upload the time spent--and with that, you just make it so 
the program will only go so long without logging in. After it builds up 
too much time, or goes too long without being able to check in (your 
choice, obviously) it stops functioning and complains. A final advantage 
is that there are some places where an internet connection is still very 
expensive. Forcing users to stay online all the time just to time their 
usage wouldn't work well for those people.

This is exactly the model followed by the DIVX people (don't let their 
marketing shortcomings detract from the utility of the solution :-)  With 
DIVX, you were allowed to play a movie without the machine having to dial 
in every time. But sooner or later, the thing had to be able to dial in 
to report usage for billing purposes, or else it would stop working.

gc


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: exporting audio

2000-03-09 Thread Geoff Canyon

Scott Raney <[EMAIL PROTECTED]> said, on 3/8/00 3:36 PM:

>Bad news: the export command actually only supports exporting images
>(a fact documented in the Reference).  You actually can export
>videoClips and some image formats by getting the "text" property and
>writing that to a file, but even this doesn't work for audio data
>because because the engine strips off the header and other important
>stuff to save space and processing overhead.  So there is no way
>recover the original data in an audio clip once it's been imported...
>  Regards,
>Scott

I haven't tried this, but there is at least one program (SndSampler for 
the Mac) that has an option to try to import just such headerless sound 
data. They don't promise success, but do point out that sound data is 
relatively simple, and can only be represented so many ways. In any case, 
if it's important, that might be worth a shot.

gc

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.



Re: Params & PendingMessages

2000-03-03 Thread Geoff Canyon

On 3/3/00 10:15 AM, Leston Drake <[EMAIL PROTECTED]> wrote:

>How can I find the parameters passed as part of a message sent with the 
>"send" command?

It has the potential to be really ugly, but you could store a record of 
the command yourself, in an array perhaps. Hmmm... In an associative 
array, with the results from the send commands as the keys. That makes it 
easy to keep track. Housekeeping would have to be accounted for, but it 
seems do-able.

gc


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: Portable Mouse Movement?

2000-03-03 Thread Geoff Canyon

On 3/3/00 10:11 AM, Scott Raney <[EMAIL PROTECTED]> wrote:

>PS: I don't really understand the engine code that does this, but do
>know that it's one of the things that isn't Carbon compliant and so
>will have to be changed...


Someone with more Mac Toolbox experience than I will no doubt correct 
this, but if I remember correctly, Apple recommends strongly against 
setting the location of the pointer. They consider it a violation of the 
Apple User Interface Code of Conduct(tm)  :-)  In any case, Scott, aren't 
you simply setting some bytes at a very low level to do this? I don't 
think there are any OS calls to do it. Apple has threatened repeatedly 
that the location of those crucial bytes will change over the course of 
time; maybe the location changed on the PowerBooks.

For what it's worth, it works on a B+W G3 400.

gc


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: Controlling Audio Clips?

2000-03-02 Thread Geoff Canyon

On 3/1/00 10:11 PM, [EMAIL PROTECTED] 
<[EMAIL PROTECTED]> wrote:

>I'm developing a series of CBT packages that'll use animated cartoons 
>(GIFs with voice-overs) for illustration rather than video clips to 
>keep the file sizes down for use across corporate networks.  However, 


If your only objection to using player objects and QuickTime movies is 
size, then the answer is to import your GIF files into QuickTime. The 
player will open them, and save them as GIF movies. You pay a very slight 
price in terms of file size (less than 5% in my experience) and gain 
pause, resume, jump to a particular frame, etc.

HTH

gc


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: matchText

2000-02-14 Thread Geoff Canyon

>But I'm wondering if this is the easiest way to do what you want. For 
>example, if the two word lists are both return delimited lists, would 
>this do what you need?
>
>repeat for each line tWord in tList1
>   if tWord is not among the lines of tList2 then
> -- store tWord somewhere
>   end if
>end repeat

I'm not sure I understand the problem correctly, but if you want the 
words that are in either list, but not both, and if the lists are 
guaranteed to contain no duplicates within themselves (put another way, 
neither list has two entries in _itself_ that are the same), then the 
above should test both lists, by following with:

repeat for each line tWord in tList2
   if tWord is not among the lines of tList1 then
 -- store tWord somewhere
   end if
end repeat

The above is very good for short lists, up about a hundred words. For 
larger lists, the following would quickly become much faster, as the 
lists grew longer:


  put tList1 & return & tList2 into tList --join them into one list
  sort lines of tList  --sort the combined list
--this assumes no duplicates within either list.
--if duplicates are possble, you would first have to
--filter the lists individually, removing duplicates.
  put false into newValue  --the test boolean
  put "" into oldLine  --the stored previous word
  put "" into uniqueList  --the result
  repeat for each line L in tList
if L is not oldLine then  --we've hit a different word
  if newValue then  --if the last line was also different from
 --the one before it
put oldLine & return after uniqueList  --add it to the result
  else
put true into newValue  --don't add it, but note that this is
   --a new line
  end if
  put L into oldLine  --in any case, change the old line value
else  --same as last line
  put false into newValue  --note that this is a duplicate,
  --which will not be put into the result
end if
  end repeat
  if newValue then  --don't forget the last line!
put  L  after uniqueList  --if it's unique, add it to the result
  else
delete the last character of uniqueList
 --otherwise, just pull out the final return
  end if

Hope this helps,

gc

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: Searching for non-English characters

2000-02-11 Thread Geoff Canyon

On 2/11/00 3:18 PM, Mary Bull <[EMAIL PROTECTED]> wrote:

>Good day! I have quite a few user-searchable texts that contain
>non-English characters. Is there a convenient way to convince MC that
>when I type "debris" into the Find box, I want it to return an instance
>of "débris"? I have spoken with my collaborator, and we agree that we
>could anglicize all such occurrences (a lot of them, I might add);
>however, we'd really like to provide this type of search without users
>having to remember all the key commands to generate the characters.
>Thanks in advance!
>
>Mary Bull
>[EMAIL PROTECTED]
>
>This is the MetaCard mailing list.
>Archives: http://www.mail-archive.com/metacard%40lists.best.com/
>Info: http://www.xworlds.com/metacard/mailinglist.htm
>

If you are searching in a particular field, the matchChunk function would 
do the trick. First you have to create a search string that will do what 
you want. To do that, you could use replaceText:

replace "e" with "[eé]" in theSearchString  --do this for each of the 
special characters


--then wrap the search string:
put ".*(" & theSearchString & ").*" into theSearchString
--the parenthesis turn it into a substring match, and the .*'s make it 
fit in anywhere

--Then use matchChunk to see whether you have a match:

put matchChunk(theSourceString,theSearchString,hitStart,hitEnd) into 
foundIt

--then foundIt is true if we got a match, and if we got a match,
--hitStart and hitEnd are the char offsets of the match

gc

Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: And Now for Another MetaCard Moment

2000-02-10 Thread Geoff Canyon

It appears that on 2/11/00 3:12 AM, Raymond E. Griffith [EMAIL PROTECTED] 
said:

>I checked my code time and again, only to come up more and more frustrated.
>Then I realized I was trying to "send" to a handler in a disabled button.
>Not only does disabling a button keep it from receiving a mouseup message,
>it prevents it from receiving ANY messages!

What version of MetaCard are you using? I don't see that here, either 
with 2.2.5, or one of the 2.3 betas (on the Mac). 

I wrote two buttons. The first, "bob", had this script:

on mouseUp
disable me
end mouseUp

on doIt
beep
end doIt

The second button's script was:

on mouseUp
send "doIt" to btn "bob"
end mouseUp

Both before and after clicking "bob" clicking the second button caused 
"bob" to beep.

gc

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm




Re: Behavior Clarification

2000-02-09 Thread Geoff Canyon

On 2/8/00 4:34 PM, Scott Rossi <[EMAIL PROTECTED]> wrote:

>I'm trying to figure out some stack behavior through trial and error and was
>hoping someone might be able to save me some time...
>
>The goal I'm shooting for is to hide a stack when it is not in the
>foreground and show it when it is made active again.  I've run into several
>recursion problems which appear to be caused by combining suspendStack and
>resumeStack messages with hide and show commands.  Apparently "show"-ing a
>hidden stack or setting the stack's vis to true sends a resumeStack message
>to that stack?  I'm simply trying to change visibility but am having a hard
>time getting around this.
>
>I may not be explaining this clearly but any insights are appreciated.
>
>Scott

If you have only one stack, then I'm stumped. This works (without 
recursion problems):


on suspendStack
  if the vis of this stack then hide this stack
end suspendStack

But this doesn't--the stack never receives the resumeStack message, since 
it's invisible and doesn't receive the focus:

on resumeStack
  if not the vis of this stack then show this stack
end resumeStack

If you just want to hide some palettes when in the background while 
another main stack stays visible, then the above resumeStack script could 
be adapted to work. Otherwise, we have to cast about for solutions.

gc


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: .AVI files & other questions

2000-02-07 Thread Geoff Canyon

>1) Is there a command which will allow you show/hide the menubar? (In 
>Hypercard was Command + spacebar)

hide menubar --hides it.
show menubar --shows it.

I don't know if there is a keyboard equivalent.

>2) Is there a command which will allow you show/hide the message box? (In 
>Hypercard was Command + M)

Try command M  :-)

>3) Is there a command which will allow you show/hide the home stack (if you 
>start Metacard by double clicking directly a stack)

If you just double-click a stack, you won't get the home stack, or the 
development tools. You can use:

show stack "home"
hide stack "home"

if you like.

>4) Are .avi files the only movie files supported by Metacard? Is there any 
>way for me to use Quicktime movies (.mov)

I don't know what the currently shipping version's (2.2.5) capabilities 
are, but the imminent release of 2.3 (Gamma release available from MC's 

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: change name of a customproperty

2000-02-07 Thread Geoff Canyon

>function changePropertyName object oldPropName newPropName
>  get the customKeys of object -- are now in it,but ONLY THE NAMES
>  put newPropName & return before it -- creates the NAME of the new prop
>  put the oldPropName of object into oldPropCont -- saves the content
>  delete line lineOffset(oldPropName,it) of it -- delete the oldProp (in it)
>  
>  set the customKeys of object to it -- makes the changes
>  set the newPropName of object to oldPropCont -- moves the content
>end changePropertyName

shouldn't you set the wholeMatches to true before using the lineOffset 
command here? Otherwise, if you had a custom property myWidthAndHeight, 
and were trying to delete a property myWidth, you might get the wrong one.

gc

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: playStopped

2000-02-04 Thread Geoff Canyon

On 2/4/00 11:30 AM, Nicolas R Cueto <[EMAIL PROTECTED]> wrote:

>I answered my own question (about why playStopped wasn't working) by
>re-consulting MC's reference on playStopped: "the playStopped message is
>sent to the current _card_".
>
>My script, now appropriately housed, is working perfectly.
>
>Sorry.

No, it was my fault. The "ghost in [my] imaginative loop" was acting up 
when I ignored the fact that you would have to put the on playStopped 
into the card script, and rearrange the local variables or the code to 
match.

gc

Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: playStopped

2000-02-02 Thread Geoff Canyon

On 2/2/00 3:47 AM, Nicolas R Cueto <[EMAIL PROTECTED]> wrote:

>Hi again,
>
>How do you phrase the playStopped message? From its description in the
>reference, I'm guessing playStopped is what I need to use in order to
>prevent a sound file from starting to play before another sound file has
>finished playing.
>
>FWiW, the reason I need something like playStopped is that I want to play a
>series of consecutively numbered sound files, via something like:
>
>  repeat with i = 1 to (the number of sound files)
>  wait until playStopped (???)
>  play (sound file i)
>  end repeat
>

It's much simpler (and better) than this. PlayStopped is sent when the 
sound stops, so you don't have to use the wait command, MetaCard does it 
for you. The following should play a series of sound files, from 1.au to 
lastSound.au:

local whichSound, lastSound

on mouseUp
put 1 into whichSound
put 30 into lastSound  --here you would put whatever the last sound is
play (whichSound & ".au")
end mouseUp

on playStopped
add 1 to whichSound
if whichSound > lastSound then exit playStopped
play (whichSound & ".au")
end playStopped


On the other hand, if you _want_ to lock out user interaction during 
playback, you'd have to do something different.

Hope this helps,

gc

Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: Referencing a Windows CD

2000-02-01 Thread Geoff Canyon

I saw this note on the Squeak (a SmallTalk-based development environment) 
mailing list, and thought it might be of interest to this group as well:

 The Department of Energy has awarded a grant of US $860,000
 to spend over the next two years on development of
 easier-to-use software engineering tools for computational
 scientists and engineers. All of the work will be Open
 Source, in Python, and have a strong emphasis on design,
 testing, and documentation. For details, see:
 http://www.software-carpentry.com

Gee, do we know of any "...easier-to-use software engineering tools..."?  
:-)

They're looking for some things that don't currently exist in MetaCard 
(source code management, bug tracking, etc.) and they want open source 
(although the Python requirement is actually just that it be scriptable 
with Python), but I still think these people need to check out MetaTalk's 
simplicity to power ratio.

gc

Geoff Canyon [EMAIL PROTECTED]
"C.D. Caterpillar teaches kids how to read, not how to watch cartoons."


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: line delimiter?

2000-02-01 Thread Geoff Canyon

It appears that on 2/1/00 12:07 PM, Nicolas R Cueto [EMAIL PROTECTED] 
wrote:

>The text is already delimited, with a "/".


You could pre-process the text to apply the group style, creating an 
associative array along the way to make it easy to extract the 
appropriate values. Assuming that the "/" comes after the space between 
sentences, this button handler would do the pre-processing, assuming that 
the text you want to process is in field "one" and the target (clickable) 
field is "two":

on mouseUp
  global soundList
  put fld "one" into fld "two"
  put 1 into startChar
  put 1 into theSound
  repeat
put offset("/",fld "two") into theSlash
if theSlash is 0 then exit repeat
set the textStyle of char startChar to theSlash-2 of fld "two" to 
"Group"
put char startChar to theSlash-2 of fld "two" into theKey
put theSound & ".au" into soundList[theKey]
add 1 to theSound
delete char theSlash of fld "two"
put theSlash into startChar
  end repeat
end mouseUp

This results in a global array, soundList. This script in field "two" 
will result in the appropriate sentence number ("1.au" "2.au" etc.) being 
placed in the message box:

on mouseUp
  global soundList
  put soundList[the clickText]
end mouseUp

Obviously, you might not want to use the _whole_ sentence as the key, and 
this doesn't account for identical sentences, but that's doable.

gc

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: Screen Capture ?

2000-02-01 Thread Geoff Canyon

It appears that on 1/31/00 10:45 AM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

>>What you really need is a Mac version of the irregular window in Tuv
>>Snyder's external (that feature only works on Windows now).
>>Unfortunately providing this is apparently going to require some minor
>>additions to the engine.  This is currently planned for 2.3.1.
>Right, I have a design and code in place for Mac irregular windows. It's
>just a matter of getting existing Metacard to use my WDEF will which
>create irregular windows on the fly. Of course the first thing I'll do is
>remove that 1 pixel border, if you need one you can easily simulate it on
>a card(showborder,ect).

Tuv, if you already have the WDEF done, then this won't help much, but 
there is already an existing WDEF that does exactly this. It is called 
Odo, after the shape-shifting character on Deep Space 9. It takes its 
window shape from whatever PICT is stored in the same file with the same 
name as it. I don't have the home page for it (I've looked several times) 
and it is about four years old, but it still seems to work, and people 
using REALbasic are using it to create floating custom-shape windows.

Odo is available in the infomac archives, or if someone has a hard time 
finding it, ask me. It should be (among other infomac repositories) at:

http://macinsearch.com/infomac2/development/odo-wdef-10.html

gc

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: xTalk: HyperCard JAVA XCMD

2000-01-29 Thread Geoff Canyon

It appears that on 1/29/00 5:09 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote:

>Yeah but the bean is interpreted itself and requires Java Runtime
>installed on the users system. Has anyone tested to see whether this
>HyperCard external is compatible with MetaCard?


I'll try it out, but on a negative note, I got an email back from the 
creator of the XCMD, and he thinks it would be difficult to port to other 
platforms, because it is dependant on the specifics of MRJ on the Mac. 
I'll follow up with him anyway, though.

gc

Geoff Canyon [EMAIL PROTECTED]
"C.D. Caterpillar teaches kids how to read, not how to watch cartoons."


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



  1   2   >