Fun With ImageData, MaskData and AlphaData
Just wanted to let you all know that I've been working with these cool image-manipulation features of MetaCard and wrapped my head around them enough to write up a treatise on how to use them along with some examples. Here's the relevant links to the Tips section of the MetaCard page of my site to those who are interested : http://www.sonsothunder.com/devres/metacard/metacard.htm Click on the following links: imag003 - Understanding ImageData, MaskData and AlphaData imag004 - Making a Single Color Transparent Using MaskData imag005 - Making an Image Translucent Using AlphaData Enjoy! Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
MetaCard limits
Mac OS 9.1. MC v 2.4.2 It seems that MC functions average () stdDev () min () Max () Are limited to number of items they can process. Not sure about exact number (uint2 = 65,535 bytes?) but it breaks somewhere after 65000 items Below is the example to illustrate on mouseup repeat 10 put random (21) &"," after tCKfunction end repeat delete char -1 of tCKfunction answer "sum = "& sum (tCKfunction)&cr&"StdDev = "& stdDev (tCKfunction)&cr&"ave = " & average (tCKfunction) put number of items of tCKfunction into N put 0 into countSumOFSqrs put 0 into tcount repeat for each item i in tCKfunction add i^2 to countSumOFSqrs add i to tcount end repeat put sqrt ((countSumOFSqrs-(((sum (tCKfunction))^2)/N))/(n-1)) into tDev answer "sum = "&tcount&cr&"stdDev = "&tDev&cr&"ave = "& tcount / N end mouseup Also, it seems that maximum allowable value for the tabstops in field is 32767 and there are anomalies in field behavior if the height/width of the field is greater then 32767 pixels (I once tried to use such field inside the group control with vertical scrollbar) Anyway this limitations are not mentioned in MetaTalk reference stack under "limits" and I thought this observations will be in some use for someone who deals with large amounts of data in their scripts. Unfortunately, MC is not returning error messages like "limit exceeded" in such cases, just the wrong number - and I had a hard time debugging it in relatively complex handler. Best regards Tariel Gogoberidze P.S. On the positive site ;-) sum () function seems to be working with any number of items (I tested for up to 500 000 items) ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Keystroke equivalents in MetaCard
On Tuesday, July 2, 2002, at 11:48 AM, John Kiltinen wrote: > Since the command+w worked as desired of the tour was allowed to run, I > thought that this ought to solve the problem. It did not. If I opt > out of > the tour, which is done by holding down the shift key at startup, then > the > focus is reported to be the first card of my stack, just as it is if the > tour runs to its end. Now here is the strange part. In spite of my > stack > giving every appearance of being the top stack, when I press command+w, > THE > METACARD TOOL PALETTE CLOSES. I do it again, and the MetaCard > navigation > palette closes. Sounds like you are having this problem in the development environment. What happens when you run your stack now out of that mode. Just double-click on your stack. It will run as if it was a standalone. Does the problem still exist? I have found times when MC menus fight my menus when developing. But I do not do my actual menu testing in the development mode. -Mark Talluto ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Keystroke equivalents in MetaCard
In response to my question about a command+w not being handled as I wanted, Mark Talluto wrote: >This tells me that you have another stack (maybe invisible) that has >focus. Its menus are not set up properly to handled the command - w. >Clicking on the stack that you think is causing the problem brings focus >to that stack and you have set its menus up properly. My suggestion >would be to go through all stacks and make sure that the command -w is >handled the way it should be. Thanks, Mark. This was helpful in pointing me in the right direction. I've got the problem solved now, but I am still not sure exactly what it was. I will give a desciption of what I have done for the benefit of any other non-programmers like me who might be reading this and who like to get themselves in over their heads with MetaCard scripting. Perhaps it will be of help. Your raising the question, "What has the focus?" prompted me to add a few diagnostic "Put the focusedObject" statements into my openStack script. I discovered that I had quite a few objects on the card in question that had their traversalOn property set to true, these being objects that did not need to ever receive the keyboard focus. As I set some of these traversalOn's to false, other objects were left with the focus at the time that the keystroke command was not getting properly handled. I got this matter cleaned up so that now the focused object was reported to be the card itself immediately after startup. This is exactly what was reported to be the focus when my little introductory tour was allowed to run its course and return to the first card. Since the command+w worked as desired of the tour was allowed to run, I thought that this ought to solve the problem. It did not. If I opt out of the tour, which is done by holding down the shift key at startup, then the focus is reported to be the first card of my stack, just as it is if the tour runs to its end. Now here is the strange part. In spite of my stack giving every appearance of being the top stack, when I press command+w, THE METACARD TOOL PALETTE CLOSES. I do it again, and the MetaCard navigation palette closes. I still do not understand this behavior, but I found a way to get what I want. I added the following commandkeyDown handler to the script for the card: on commandkeyDown x if x = "w" then send "closestackRequest" to stack "Oval Track Puzzles" end commandkeyDown This seems to deal with the problem head on. Getting a solution like this, however, still does not tell me why this stack is giving me the problems on routing the command+w when the other ones are not. John Kiltinen John Kiltinen ([EMAIL PROTECTED])Home Office Professor, Dept. of Math. & CS Tel.(906) 228-8035 or (906) 227-1600 Northern Michigan University Fax (906) 228-4667 or (906) 2272010 Marquette, MI 49855 USA ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: libURL rocks
On Tuesday, July 2, 2002, at 10:46 AM, Scott Raney wrote: > On Tue, 02 Jul 2002 andu <[EMAIL PROTECTED]> wrote: > >> --On Tuesday, July 2, 2002 8:11 AM +0100 Dave Cragg >> <[EMAIL PROTECTED]> wrote: >> >>> At 10:31 pm -0700 1/7/02, Richard Gaskin wrote: >>> Dave Cragg: thank you for putting in the time for the error-checking in libURL, and the handy MakeDir feature that makes uploading to as-yet-non-existent directories a snap. >>> >>> I love the plaudits, Richard, but it would be wrong to leave the >>> impression that this is some kind of selfless endeavor. Work on >>> libUrl is >>> sponsored by Runtime Revolution, which means they should get the >>> thanks. >>> (When it doesn't work, abuse, etc. should probably come in my >>> direction. >>> :)) >>> >>> Cheers >>> Dave >> >> If you guys came this far, go that extra step and pay respects to >> Raney who >> was the initiator and original sponsor of libURL (and the original >> libURL;-). > > And as long as we're passing out kudos, a good helping goes to Andu > himself, who wrote the original version of libURL. This was before RR > volunteered to take it over, and was no mean feat given the unfinished > state the engine socket support was in at the time. > Regards, > Scott Thanks to all of you for doing it. I know it was a big job to start and is a big job to maintain and update. The raw power that we have available to us in MC is just awesome! -Mark Talluto ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: libURL rocks
On Tue, 02 Jul 2002 andu <[EMAIL PROTECTED]> wrote: > --On Tuesday, July 2, 2002 8:11 AM +0100 Dave Cragg > <[EMAIL PROTECTED]> wrote: > > > At 10:31 pm -0700 1/7/02, Richard Gaskin wrote: > > > >> Dave Cragg: thank you for putting in the time for the error-checking in > >> libURL, and the handy MakeDir feature that makes uploading to > >> as-yet-non-existent directories a snap. > > > > I love the plaudits, Richard, but it would be wrong to leave the > > impression that this is some kind of selfless endeavor. Work on libUrl is > > sponsored by Runtime Revolution, which means they should get the thanks. > > (When it doesn't work, abuse, etc. should probably come in my direction. > > :)) > > > > Cheers > > Dave > > If you guys came this far, go that extra step and pay respects to Raney who > was the initiator and original sponsor of libURL (and the original > libURL;-). And as long as we're passing out kudos, a good helping goes to Andu himself, who wrote the original version of libURL. This was before RR volunteered to take it over, and was no mean feat given the unfinished state the engine socket support was in at the time. Regards, Scott Scott Raney [EMAIL PROTECTED] http://www.metacard.com MetaCard: You know, there's an easier way to do that... ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
243b2 OS X
Hi there, Scott posted a new version and it works. Thanks to Scott :-) Regards Klaus Major [EMAIL PROTECTED] ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: libURL getting .RDF files
>It works here. Nothing special required. Dave. Your confirmation that it works really helped. I started looking elsewhere & found that "my problem" was really stupid: 2 fields called "R", one exactly on top of the other. Thanks, Eric ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: libURL getting .RDF files
At 9:52 am -0400 2/7/02, thinkertoys wrote: >I'm trying to get .RDF files using libURL w/ no luck. > >For example - I can view http://www.macnn.com/macnn.rdf from my browser, >but the following script does not work: > >on mouseUp > put "http://www.macnn.com/macnn.rdf"; into aURL > get URL aURL > put it into fld R >end mouseUp > >I believe it's probably a trivial thing, maybe just modifying the HTTP >Header? I'm not sure - anyone? It works here. Nothing special required. Is field R correct? How about field "R"? It might be useful to check the result: get URL aURL if the result is not empty then answer the result put it into field "R" Cheers Dave Cragg ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
libURL getting .RDF files
I'm trying to get .RDF files using libURL w/ no luck. For example - I can view http://www.macnn.com/macnn.rdf from my browser, but the following script does not work: on mouseUp put "http://www.macnn.com/macnn.rdf"; into aURL get URL aURL put it into fld R end mouseUp I believe it's probably a trivial thing, maybe just modifying the HTTP Header? I'm not sure - anyone? Thanks in advance, Eric ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: irregular windows
Hi Richmond, > How can I make irregular shaped windows / stacks/ cards in > Metacard / RR ? > > Mathewson see "windowshape" in the index. I am afraid this is still MC only. Regards Klaus Major [EMAIL PROTECTED] ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
irregular windows
How can I make irregular shaped windows / stacks/ cards in Metacard / RR ? Mathewson --- Using a Macintosh? Get FREE e-mail and more at MacLaunch! http://www.maclaunch.com --- ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: MetaCard 2.4.3 beta 2
Hi there, > Dave Cragg wrote: > >> I was unable to unstuff the MacOSX archive. Anyone else having the >> same problem, or it just at my end? > > Yep, me too. :( > > -- > Richard Gaskin same here in germany... Scott, please post another version, please... Regards Klaus Major [EMAIL PROTECTED] ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: libURL rocks
--On Tuesday, July 2, 2002 8:11 AM +0100 Dave Cragg <[EMAIL PROTECTED]> wrote: > At 10:31 pm -0700 1/7/02, Richard Gaskin wrote: > >> Dave Cragg: thank you for putting in the time for the error-checking in >> libURL, and the handy MakeDir feature that makes uploading to >> as-yet-non-existent directories a snap. > > I love the plaudits, Richard, but it would be wrong to leave the > impression that this is some kind of selfless endeavor. Work on libUrl is > sponsored by Runtime Revolution, which means they should get the thanks. > (When it doesn't work, abuse, etc. should probably come in my direction. > :)) > > Cheers > Dave If you guys came this far, go that extra step and pay respects to Raney who was the initiator and original sponsor of libURL (and the original libURL;-). > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard > Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard