Re: SEX contributions anyone
on 4/9/03 6:18 pm, MisterX wrote > function FilterLines olist,str > local thisline,nulist > put 1 into thisline > put "" into nulist > repeat while thisline > 0 > set cursor to busy > > put LineOffset(str,olist) into thisline > put line thisline of olist & return after nulist > delete line 1 to thisline of olist > if olist is empty then exit repeat > > end repeat > return nulist > end FilterLines > wouldn't it be even faster as function FilterLines olist,str filter olist with ("*" & str & "*") return olist end FilterLines ?! Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: SEX contributions anyone
on 4/9/03 5:17 pm, MisterX wrote > Has anyone got a "Fast" remove duplicate lines script? > Best I get is 12ms per line... Any line being a word. If split worked the way I think it should (and still could, quite compatibly - perhaps I'll make in bugzilla a suggestion I made long ago) then doing split/combine would probably do this almost instantaneously. Even without that, I've found Rev/MC's hashed arrays fantastically efficient. Have you tried simply: put empty into aTemp repeat for each line t in tManyLines put true into aTemp[t] end repeat put the keys of aTemp into tFewerLines Of course that will lose the order, but I'd expect it to be very fast. If you want to keep sequence (first appearance) then put empty into tFewerLines put empty into aTemp repeat for each line t in tManyLines if aTemp[t] = empty then put t & return after tFewerLines put true into aTemp[t] end if end repeat should work, albeit a bit more slowly. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: RunRev 2.1
There are three functions in Rev (first two also in MetaCard) version() -- currently returns "2.5.1B3" for my latest copy buildNumber() -- currently returns "3" revAppVersion() -- currently returns "2.1B3" (BTW, something weird here; when I first wrote this, I found that version() returned "2.5.1B3", while revAppVersion() returned "2.1B3" - in other words the build number was automatatically appended. I thought this was odd, and confirmed that on Rev 2.0.3 this didn't happen. A reboot later, I've rechecked and found it isn't happening on Rev 2.1 either. Weird.) (BTW2: note that you can say "the version" or "the buildNumber" as they are built into the engine; but can only say "revAppVersion()" because it isn't, at least for now.) Note that revAppVersion covers both the IDE and all the other elements that have (until now) being Rev-only features; so it's relevant even to standalones, as you are looking at version 2.1 of the Database functions, the XML library, etc as well as the IDE. I think it would be helpful for Rev to clarify (which probably means decide!) what their policy will be going forward. There's no reason now to expect engine releases independent of "Revolution" releases. Maybe revAppVersion() should be retired, and the next major update magically jump to 2.6, allowing the engine and Rev to have the same version number. Thoughts from Rev would be received with interest. on 27/8/03 10:19 am, Robert Brenstein wrote > Thanks, Ken. I'd guess that it is logical to assume that Rev 2.1 has > most of its changes done in IDE code and the engine underwent only > minor improvements. Since some of the IDE features may need (in the > future) to be tied into specific engine version, we would need a > clear statement from RunRev that they keep version() and revVersion() > as they are, and we add mcVersion() to compliment these. > > Robert > > > >> Robert, >> >> The "version" returns "2.5.1", and the "buildNumber" returns "1". >> >> >> Ken Ray >> Sons of Thunder Software >> Email: [EMAIL PROTECTED] >> Web Site: http://www.sonsothunder.com/ >> >> >>> From: Robert Brenstein <[EMAIL PROTECTED]> >>> Reply-To: [EMAIL PROTECTED] >>> Date: Wed, 27 Aug 2003 01:45:07 +0200 >>> To: [EMAIL PROTECTED] >>> Subject: Re: RunRev 2.1 >>> >>>> Robert Brenstein wrote: >>>> >>>>> I think you misread my email. I did not mean the low-level >>>>> interaction between the engine and the IDE but keeping track of >>>>> different versions. MC IDE is now becoming a "product" on its own. I >>>>> presume that we continue its version numbering regardless of versions >>>>> of the engine. >>>> >>>> I see. I believe the IDE has a version property; if not it would >>>> be easy to >>>> add one, and the project leader could be responsible for updating it >>>> whenever a release is posted. >>> >>> Hmm, has anyone checked what version() returns for engine of Rev 2.1? >>> Rev's IDE version is returned by revVersion() if I am not mistaken. >>> We can add mcVersion() or implement it as a global property, although >>> the former would be more consistent if RunRev keeps version() and >>> revVersion(). >>> >>> Robert >>> ___ >>> metacard mailing list >>> [EMAIL PROTECTED] >>> http://lists.runrev.com/mailman/listinfo/metacard >> >> ___ >> metacard mailing list >> [EMAIL PROTECTED] >> http://lists.runrev.com/mailman/listinfo/metacard > > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: MC IDE
on 22/8/03 8:27 pm, Richard Gaskin wrote >> As the products converge, it would seem useful if the first two items >> weren't split across different lists, and indeed we already see a certain >> amount of cross-posting. The metacard list might be best kept for the last, >> or at least the last two, of these categories. > > Agreed. There seems to be a natural migration of general language questions > to the use-rev list anyway, [...snip...] > For those of you who haven't signed on to the use-rev list I can honest;y > say you're missing some great discussion. A good many very smart folks with > extensive experience across each of the supported platforms hang out there. And on the improve-rev list, for example, there is currently a discussion about namespaces which would certainly benefit from the experience of the developers on this list; while the recent discussion of the 'do' etc script limits was split across both lists - I'm sure it would have been more helpful to have the discussion unified in one place. Heather - can you confirm what the policy on access to the improve-rev list will be, going forward? Thanks, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Hefty new fees?
on 22/8/03 3:21 pm, Shari wrote > According to the licensing info on the RunRev website, to purchase a > license that allows you to develop on multiple platforms would cost > $1200, with renewals of $400 per year. But what happens if you do > not renew every year? Is it $1200 again? That's how it appears. [... snip ...] > I have Metacard installed on three platforms, ONLY because I've > discovered that the anomalies from platform to platform, are nearly > impossible to deal with unless you can fix them on the offending > platform directly. Shari, I don't know the answer to your specific question (how soon after the expiry of a license do you have to renew in order to get 'renewal price' rather than 'new price'?) and I agree it would be helpful if RunRev could clarify their policy on this. However, one observation that might be useful to you: for any given platform, the difference between "Express" and "Enterprise" is in-depth tech support, and access to Oracle. If you primarily develop on one platform, but need to be able to fix problems interactively on the others, with the pricing currently in force each additional platform costs $75. That's a special offer, but even with the list prices, if you're not bothered about support or Oracle, you could buy Studio for one platform, and Express for two others, for $399+$199+$199 = $800. Renewals of these (at current prices) would be $49+$20+$20 = $90. Of course on this basis, the only point of Studio is convenience, to build for all three platforms simultaneously rather than having to do it on each. If you were willing to forego this, you could even go with Express on each platform, so purchase from new would be $600 for three platforms, renewal at current rates $60. Those prices seem a lot more attractive. If I were you, I'd definitely consider going down something like this route. Especially noting that often a version other than the latest might be perfectly acceptable for your use (fixing a bug) on secondary platforms; if you always built on your primary platform, you might not need to always keep the secondary ones up up to date, only when the bug you were fixing was affected by the difference between versions. The RunRev people are very charming; I'd be surprised if they weren't willing to let you renew from one version of Enterprise to a newer version of Studio, if that made sense for you (ie if you get a Enterprise upgrade for a decent cost as cross-grade from MetaCard, then when that expires prefer to switch down to Studio, you could probably choose to do so at the Studio upgrade rate). [Also note that the current special offer expires at the end of the month; and the offer price to buy 2.0, plus listed upgrade price to 2.1, is less than the price to buy after that date.] HTH, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: MC IDE
on 22/8/03 1:06 am, Richard Gaskin wrote > As things evolved earlier, it seemed most folks preferred to use this list > for the IDE discussion. Personally I prefer it, as it seems a lot of > general language discussion is already taking place on the Rev list anyway > and most of the active list members here appear to also be on that list. I > don't think that necessarily precludes general language discussion here, > however. > > So if you're NOT in favor of having the discussion of the MC IDE evolution > take place on this list, this is the time to speak up. I'm very happy for this list to be the venue for evolution of the MC IDE; but I'd suggest that it be made an explicit change of the charter of this list. There are currently four relevant lists as far as I am aware: metacard - formerly the all-issues list for MetaCard users revuse - mainly a 'how-to' list for all Rev users revimprove - when launched, a venue for discussions of improvements and bugs in Rev, and of betas; access limited to Professional license holders (to whom betas, or at least alphas, also used to be limited). xtalks - in principle, venue for discussions of extensions to xtalk syntax etc for users and developers of Rev, MetaCard, SuperCard etc I'm not sure what the access policy is for revimprove under the new license scheme - Heather, care to comment? I would find it helpful if it could in some way continue to be limited to a restricted, generally more 'advanced' group. In theory the traffic might reduce somewhat as more people discover the advantages of bugzilla for straight bug reports. Currently, metacard is the venue for at least the following categories: - basic how-to questions (overlap with revuse) - bugs, possibly bugs, feature suggestions (overlap with revimprove) - whinging about how awful the MC/Rev convergence is - discussion of MC IDE As the products converge, it would seem useful if the first two items weren't split across different lists, and indeed we already see a certain amount of cross-posting. The metacard list might be best kept for the last, or at least the last two, of these categories. To me the only advantage of setting up a new list for the MC-IDE discussion would be to make a clear transition, so that basic how-to questions could go to revuse, bugs to bugzilla, suggestions to bugzilla and revimprove. In fact, it might be even better to set up two new lists: metacard-ide metacard-whinge (tongue slightly in cheek here) and close down this one altogether. [On a related topic, I think the community might want to consider the status of the xtalk list - there doesn't seem (I might be wrong) to be much non Rev/MC traffic on it. ] Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Can Metacard copy files?
on 19/8/03 6:41 pm, [EMAIL PROTECTED] wrote > Is there a Metacard script that will copy an existing non-stack (e.g., JPG) > file to a specified directory and give the copy a specified new file name? Rev has a command revCopyFiles. (This uses shell and AppleScript on the various platforms, so unlike simply reading data in and writing it out again, it preserves all the file attributes (and on MacOS, resource forks).) I'd guess if your app isn't for distribution there's nothing to stop you downloading a demo copy of Rev and inspecting/copying the code. (I'd also imagine that this is the kind of 'simply missing' command that we can expect to see merge into MetaTalk/Transcript as part of the new process.) HTH, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Launching a local file in the default browser
on 9/8/03 7:13 am, Richard Gaskin wrote > Yep, the same ol' question: how do I launch a local file in the default > browser on Mac OS X? > > And for future reference: Where is the definitive answer archived? Richard, Probably too late because I've just been catching up with a bunch of mailing list mail; but my answer to this is "it's a real pain". The standard way as others have noted is to use AppleScript to ask the Finder to open the URL. This works for "http://"; URLs, but for "file://" URLs it tends to start looking at type and creator, and sending them to that app instead. You may be able to get by setting the filetype to ""; I dabbled with this, adding a preference to my app to do this, but although it seemed to work in my first casual test on X, my first X user said it didn't help him - in any case my app really wants to create files assigned to BBEdit, but preview them in the browser, so I looked further. As others have noted, the standard way to ask a browser to look at a URL (local or remote) on MacOS has always been through the GURL ("openurl") AppleEvent. This was never mandated, nor has it been removed: it was only ever a convention, but it was widely observed. IE or Netscape (I think the latter) introduced it, and all other browsers implemented it - except !?£$& Safari, which of course is rapidly becoming the default browser on an awful lot of MacOS X desktops. This was the first bug I reported to Safari. Safari instead introduces its own suite of AppleEvents - typically arrogant Apple behaviour. As if this wasn't bad enough, there is considerable disagreement about the exact format of a file URL, because MacOS X paths start with a "/". So should it be "file:/Users/fred/blah.html" Or "file:///Users/fred/blah.html" or "file://Users/fred/blah.html" The answer is it depends who you ask. MetaTalk/Transcript like the first form. Safari (v51) and IE 5.2 want the second. Opera and iCab want the third. So... essentially you need a routine which knows which browser it's going to use. For my app I've currently given the MacOS X users a special preference in which they choose the browser, overriding their system-wide preference. I haven't tried retrieving that system-wide preference as some have indicated - it might work. So my URL launching routine (for X) knows the browser to talk to; and depending on the browser, adjusts the number of slashes following "file:"; and then depending on the browser, either uses the openurl event to get that file viewed, or a more complicated script if the app is Safari. Of course, all of this is fragile; if the browser isn't one of the four I know about, I make a guess about how many slashes, and trust it implements the openurl event. And if you've chosen to name your copy of iCab "Safari", the results will be disappointing. If you don't care about the file type/creator, you may be able to get away with nullifying those, and asking the Finder to open the URL - but you'll still have to decide how many slashes to use. Hope this helps (?!?) Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving the MC IDE forward
on 7/21/03 3:10 PM, Simon lord wrote > Maybe Kevin will add a pref dialog that allows us to decide what > palettes and menus we want to see in our work environment. That would > help considerably and I don't see it as being that difficult to provide. [...snip...] > On Monday, July 21, 2003, at 09:10 AM, Robert Brenstein wrote: [...snip...] >> Well, I for one have just renewed MC licence, so I am "stuck" so do >> speak with MC for another year. Not that I despair. I am happy with >> MC, and I see no need for fork out a few hundred bucks to switch to >> Rev any time soon. I am among those for whom Rev's interface is too >> rich and gets in my way. Not that I'm here to speak for RunRev or anything (and for all I know those folks may know of a reason why this suggestion is a very bad idea); but if you're interested in things like the database support, but find the interface too rcih/in your face, have you tried the "Suspend Development Tools" option under the "Development" menu? I'd have thought this might mean you get all the advantages of Rev in terms of extended libraries - but effectively get rid of all their UI (except for one tiny pallete with a "Restore" button on, which you minimise). I'd guess you could then just open the MetaCard UI instead (but of course I could be wrong). Maybe that is the way forward for those who will want to continue to upgrade to new engines etc, benefit from the additional libraries, but use their own or the "classic" MetaCard UI. It might even be possible to formalise this in a future version of Rev - eg have preferences to switch off the Rev UI at startup, and to open some other UI at the same time. (Actually the latter may hardly be needed; I have a little toolbar which supplements the Rev UI, which is implemented as a Rev "plugin", and set to open at startup and glue itself to the end of the Rev menubar. When the Rev UI is suspended, my bit stays in place.) I'd be interested to hear from anyone who gives this a go. Or RunRev's opinions if in fact they think it's a Very Bad Idea. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: MySQL Support
on 7/19/03 12:14 AM, Simon lord wrote > Hi all, I need to write an app that will allow me to read/write data to > MySQL. I'd like to tinker with this on the weekend and I've seen it > mentioned here a few times but was not in the market to use such a > combination. > > That said, can some kind sole provide me with the following: > > 1) Information about what I need in order read/write to MySQL > 2) A sample stack (I can change the MySQL table calls) just so get a > frame of reference > > This would be much appreciated, I look forward to playing with it. If it's not too off-list-topic - it must be worth mentioning that support for this is "built in" to Revolution (that is, Rev is supplied with a library which 'just works', and which you can then have built into your standalones). There's a straightforward set of routines which allow you to connect to the database, make queries, execute SQL etc. In Rev 2 there's also a point and click interface layered on top of this, which doesn't do everything you want, but makes it straightforward to for example with a few clicks add to a card a table field which is automatically updated (eg each time the card is opened - configurable) with the columns you select from a SQL query to a MySQL or various other databases. (The full list is that it supports MySQL, Oracle, PostgreSQL and Valentina natively; plus many others via ODBC.) AFAIK, you can do this is in the free edition - there are some extra limitations (beyond the standard script-length one) about number of non-ODBC databases you can have open unless you go for the full "Professional" license. I might be wrong about that - in fact I just took a look at the runrev site, and I get the impression that they're just about to shake up their license options. By the looks of it, the changes will be more favourable if you just want MySQL. Anyway, I'd definitely suggest it was worth a try with the free edition. I'd be pretty sure it was the simplest way to achieve what you want: of course you need to set the extra effort involved in other ways to achieve it with vanilla MC against what it might cost to cross-grade to Rev. Hope this helps, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: open source (Richard Gaskin)
on 7/18/03 2:34 PM, Ben Rubinstein (me) wrote [... snip...] > bug reporting database, which IIRC is now > open to all comers. Go to www.runrev.com, click "Developers", scroll down > to "Feedback". They use bugzilla - it's hairy but basically great. Warning > - doesn't seem to play well with Safari - try iCab or IE if you're on Mac. Since I'm really a Rev user (with an expired MC license) who lurks on this list and has been lurking heavily through the recent doom-laden discussions, I think it would be worth saying - go take a look at the bug database. I think it should be very reassuring to anyone concerned about responsiveness, commitment etc under the new regime. It's completely open to view, and anyone can register to add bugs, or comment on existing bugs. Rather than just reporting something to the list, where it might or might not be lost in the noise, might or might not get a response, and you have no idea what's happening to it; you can report it in the database, track it and see what comments have been added, get automatic email notification any time it is changed, and so on. Take a look at <http://www.runrev.com/revolution/developers/bugdatabase/reports.cgi> and click "Continue". You can see all the current bugs (btw in our own similar system, we prefer the term 'snag' - slightly less negative overtones!), see who they're assigned to, what their status is. Best of all, you can add comments at any time to your own report, or someone elses. You can add attachments - sample stacks, crash logs, etc. Chime in with your related repro case, or the fix you've come up with. Comment on the resolution. Even re-open the bug if you think it shouldn't have been resolved. EG take a look at <http://www.runrev.com/revolution/developers/bugdatabase/show_bug.cgi?id=83> for an example where two users are able to have a correspondence directly with the engineer addressing the issue: trackable, controlled, unable to just run dry and be forgotten. I think this is a fantastic way to manage development especially of a product which has dedicated developer users. The fact that RunRev have opened it to all comers (in its first incarnation it was open only to users with a 'professional' license) is in my opinion a great sign of maturity and confidence in their product, and of commitment to their users. _And_ a great reason for us to be cheerful about the continuing development of the product. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: open source (Richard Gaskin)
on 7/18/03 6:49 AM, Geoff Canyon wrote > On Thursday, July 17, 2003, at 07:20 PM, Richard Gaskin wrote: > >> Geoff Canyon wrote: >> >>> Both IDEs are more or less open source, inasmuch as the source is >>> largely exposed in each, available for modification if you wish. >> >> How does one submit bug fixes in the Rev IDE? > > There is (as yet) no defined policy for submitting bug fixes either > IDE. In the case of Rev, emailing them to one of the various @runrev > addresses would do the trick, if anything would. Not wanting to speak for the Rev team - but I'd have thought the correct answer for the Rev IDE is their bug reporting database, which IIRC is now open to all comers. Go to www.runrev.com, click "Developers", scroll down to "Feedback". They use bugzilla - it's hairy but basically great. Warning - doesn't seem to play well with Safari - try iCab or IE if you're on Mac. Presumably in the case of the MC IDE, that's for the group who assemble round the mailing list (when it is set up) to decide. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Controlling/comunicating w/ USB devices
on 7/17/03 4:41 PM, Dar Scott wrote > If you are interested in opening a serial port on a usb device, I can > tell you more. Thanks Dar, I should probably have referred to this explicitly. I know that there's been lots of correspondence from people using Keyspan and similar devices to provide a serial port on a machine with only USB; but I think that these devices come with software that makes the 'shim' so that applications (including MetaCard) see a conventional serial port, and never have to deal with it as a USB device. In terms of explicitly talking to a USB device, everyone who asks is told to use the "open driver" command; but followup questions about what to pass to it - ie the driverName - appear to have gone unanswered. People seem to have tried the name appearing in Apple System Profiler, and the name of the driver in the extensions folder, without success. Has anyone managed this - and if so what's their recipe? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Controlling/comunicating w/ USB devices
on 4/5/03 10:16 AM, Thomas McCarthy wrote (on the Metacard list) > Possible? > > Tom McCarthy but there were no replies. Similarly on 7/4/03 2:36 pm, [EMAIL PROTECTED] wrote (on the use-rev list): > Is it possible to get/send commands from/to a USB > device? How do I accomplish this? as with others who've asked similar questions over the last eight months on the use-rev list, he was pointed to the "open driver" command; but in all cases, in followups asking for more info, examples, or a specific question about the parameters to "open driver", answers have come there none - at least on the list. It would be unfair to quote one KM who wrote in January this year > At present support for this isn't perfect (lack of documentation and support > on OS X) but we're working on it and it shouldn't be long... but oops I just did. More generally, has anyone yet managed to communicate with a USB device in MetaCard or Rev - and if so, could they share their experience? TIA Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: HyperCard Porting
on 6/4/03 6:40 PM, [EMAIL PROTECTED] wrote > ARE YOU COMPACTING YOUR STACKS BEFORE PORTING THEM? > > Almost certainly the cause of errors. > > otherwise: > > Check for XCMD calls. > > Make sure your syntax conforms to metacard. > Use parantheses instead of "of" > Be careful with the use of "the" > Make sure ask uses with... or... or... > > My hypercard ports never crash the PC or MC > IF i first compact them. FWIW, I've never knowingly compacted a stack before importing it - and never seen a problem caused by this - but it can't hurt! The various syntax issues, which can take a little while to track down, are a pain but have not in my experience led to crashing. All the crashes I've had have been to do with XCMDs. MetaCard supports the original HyperCard XCMD protocol; many many XCMDs were built to the later ("HyperCard 2") era protocal, and assume the use of callbacks that aren't supported by MetaCard. It is possible in principle for an XCMD to be written in a way that tests for the existence of the callbacks it attempts to use - very few, I suspect, were written in such a way. Certainly none of the ones I wrote! I would look for XCMDs as the cause of the crash before I'd look for anything else. You might for example make a copy of the stack with all resources stripped, and try running that; my expectation if the XCMD was the problem was that you'd get an error message about an undefined function, at approximately the same point (or possibly before) as you previously crashed. If you do find the problem is a crashing XCMD, you have two choices: recode the functionality in MetaTalk, or fix the problem with the XCMD. If at all possible, even if you have access to the source code of the XCMD, I recommend you do the former. You gain portability, flexibility, and frequently speed (especially if the XCMD is a 68K one). Good luck, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
tiny feature request: 'macseconds' format for 'convert'
Tiny both in cost and value... 'seconds' as a time format uses the unix standard, seconds since 1/1/1970, rather than the (old) mac standard, seconds since 1/1/1904. Perfectly reasonable; but some of us have to deal with quantities of binary data encoding timestamps in the latter format. Especially now that there's the excellent "convert from to " option, it would be handy to have "macSeconds" as one of the available format types. Yes, I know it's just a matter of adding or subtracting 2082844800. But it would be a handy convenience all the same. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
testing 'strings' of binary data for equality
I had to write a utility that would take two parallel trees of files, and check portions of data from the corresponding files in each to locate corrupt blocks. The total amount of data to be compared was around 300MB. I opened the files for binary reading, read various header records using the 'read ... for as ' variant in order to locate the blocks, and the read the actual contents of the blocks using the direct 'read ... for '. Then I simply compared the results of the two reads using the '=' operator. My first attempt ran pretty quick, but failed to locate any corrupt (ie different between the two) blocks; although I knew there were differences. I blushed, slapped myself, and set the 'caseSensitive' property to true (although thinking that it was surprising if all the differences amounted to bytes in the range 65 to 92 being shifted by 32 or vice versa - this was binary data). This made no difference. So then I changed to reading the actual data with the 'read .. for uint1' (so that every byte would be rendered as an integer, with commas in between. This worked fine, but not surprisingly was many times slower. So my question is, why should '=' have returned true when given two strings which were actually different? I know I've run into problems in the past with strings which just happened to consist of all digits except for a single character 'e', which were treated as numbers in scientific notation. But in this case the strings were typically 2-300K long, of binary data, so they almost certainly contained every value from 0 to 255. Is this a bug or a feature? If the latter... why? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Using maskData/alphaData
What is the relationship between the maskData and alphaData properties of an image (and come to that, the 'opaque' property?). All three of these properties affect the opacity of an image; but I can't find any reference (either in MetaCard docs or in Revolution) to how they interact. Does the opaque property override the alphadata/maskdata? Or is it ignored? If the maskData, say, makes the top half of the image transparent and the bottom half opaque; and the alphaData makes the left side translucent and the right side opaque; what would be the specifed/expected behaviour? Does one take precedence over the other, or are they supposed to be combined in some way? Is it the last one set that should take effect? I ask these questions, rather than just doing the tests to find out for myself, because I've been trying for many many hours now and am getting very inconsistent behaviour. I've found Ken Ray's tip on always resetting the imageData after setting mask or alpha, and I'm doing that consistently; but still code that works one moment, stops working shortly afterwards. The only consistency I get is if I throw away my image and import a new one. (It's not enought to reset the imageData from a backup, I actually have to throw away the control altogether). But for the app that I'm trying to work towards, I need to be able to work and re-work with a single iamge, so I need to have some understanding of what properties are affecting the control. Any help gratefully received, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: XCMD Limitations
on 25/10/02 5:56 pm, Scott Raney wrote > here's the list directly out of the engine source: > xreqSendCardMessage > xreqEvalExpr > xreqStringLength > xreqStringMatch > xreqSendHCMessage > xreqZeroBytes > xreqPasToZero > xreqZeroToPas > xreqStrToLong > xreqStrToNum: > xreqStrToBool > xreqStrToExt > xreqLongToStr > xreqNumToStr > xreqNumToHex > xreqBoolToStr > xreqExtToStr > xreqGetGlobal > xreqSetGlobal > xreqGetFieldByName > xreqGetFieldByNum > xreqGetFieldByID > xreqSetFieldByName > xreqSetFieldByNum > xreqSetFieldByID > xreqStringEqual > xreqReturnToPas > xreqScanToReturn > xreqScanToZero > > You can also find this list in the file "HyperXCmd.h" if you can find > that file for HC 1.2 or earlier. Thanks - diligent Googling eventually turned it an old version of HyperXCmd.h, but it's even better to have the list direct from the source's mouth (so to speak) >> b) if the engine handled an unsupported callback more gracefully. > > It does what the API spec specifies, which is to return xresNotImp for > unsupported functions. Of course you probably won't find too many > externals that handle this correctly given that so few of them were > ever tested with anything other than HC. Mea culpa - I confess I've never ever checked for this, in a decade of writing HC externals... > Debugging externals is a nightmare in the best of cases. Debugging > where you're intimate with the details of neither the host nor the > external borders on hopeless. About the only recommendation I have > for working through this is to do your development on OS X where at > least you can answer your email while you're waiting for your classic > box to reboot ;-) Thanks! At least in this case I was intimate with the external. And next time I'll know where to go looking. Cheers, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 PS - apologies to the list if a mail my mouse finger slipped on, which simply repeats the whole of Scott's message, gets through the moderator. ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: XCMD Limitations
Thanks to Richard and Brian (and Jim off-list) for replying. In the meantime Kevin Miller confirmed that the supported list of callbacks is defined as the 1.2 spec, and the magic of google (after I'd searched a huge box with 10 years of Apple Developer CDs - apparently I didn't keep them going back far enough!) located an old copy of the glue. I've now implemented some headers to switch out the newer calls, recoded the ones that were needed, the external is working fine. But I'm still confused as to which of the HC callbacks are supported. The 1.2 spec that I found lists 27. Of these, only 11 are in the MetaCard "XCmdGlue.h" - but I know that my external is using at least some of the others, eg ZeroToPas. Perhaps Scott wishes to deprecate the others in externals written specifically for MC/Rev - fair enough. But that still leaves anyone with an existing external to modify (possibly to make cross-compatible with MC and HC) somewhat in the dark. So I still think it would be nice to a) get a definitive list of the HC compatible callbacks that are supported, in addition to the MC-specific ones b) if the engine handled an unsupported callback more gracefully. Just as background, since a number of people suggested this shouldn't be necessary. The situation is that we've got a project doing an upgrade to a system we created some years ago. One part that needs modification is a HyperCard stack that does a huge data munge every month or so, taking some 4-6 hours in total. I proposed moving this stack into MC (actually Rev) first, and the upgrade on that version; on the basis of speed, better ongoing support, etc. The problem is that there is of course a limited budget and some outcomes in terms of new functionaliy that have to be achieved; and the transition obviously has risk factors. I therefore negotiated a strictly capped budget to attempt the transition; if I can't prove that all problems have been solved by the time I've spent that, we're just going to stick to making changes to the existing system. Unfortunately because of the lack of information (= my lack of knowledge) about exactly what should work in the XFCN, and the fact that when an unsupported call was made the entire machine froze, so that the process of investigation was incredibly drawn out, I've blown a lot of the budget just getting past this particular hurdle. thanks again to all who helped, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: XCMD Limitations
on 23/10/02 11:46 pm, Richard Gaskin wrote > Perhaps it could be rewritten in native MetaTalk I wasn't clear enough, sorry. The stack uses about 25 XFCN/XCMDs. I'm sure that I can recode all of them in native MetaTalk except this one. This one has to be in C. It uses proprietary libraries and custom code which has to be shared with some other apps to guarantee accuracy. Recoding in another language is not an option, even if time was not a factor. I've negotiated an allocation of a limited time to demonstrate that the system can succesfully be transitioned to MC/Rev; otherwise it's going to go elsewhere. I can recode the other externals in native MetaTalk, and if we get to continue down this path I will, for speed and cleanliness; but if I can't get the whole thing working quite quickly, that path will be capped. But in any case this function is core to the whole project, so I have to get it reliably working. I have the source code, so if I know what the problem areas are I expect I can code round them (it doesn't need to interact with the host in any very interesting ways). I've already fixed one crash by re-implementing StrToRect. The problem is I need to know the full set of unsupported calls - I can't afford to just fix the ones that I find which crash, and not know if there are some others that I just haven't come across in testing yet. Obviously Scott knows which callbacks he implemented. Is there a published list anywhere? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
XCMD Limitations
Is there a reference anywhere to the limitations on XCMD/XFCNs? I've got a limited time budget to try to convert a big complicated stack to Rev; and I'm crashing in an XFCN. It's not an option to recode this XFCN; it uses custom libraries of proprietary code. It's going to be a big pain in the bottom to work through to find out where it's crashing (the entire machine locks up each time) so I could use some hints. I know that the callbacks to do with windows don't work. Are there others? Would it be correct to assume that MC implements all the HyperCard 1.0 callbacks, but none of those introduced in HC 2.0 (or whenever it was)? Is there a list somewhere of the supported or unsupported callbacks? Are there any other guidelines? Is there any handy debugging mode built into the engine to help? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Interrupting in dialog boxes
Maybe I'm just a bad programmer... I have several times got into a situation in which a program loop is throwing up a lot of 'answer' dialogs. Maybe I put in an alert for a condition which I didn't think would happen very often; or I put an alert in a loop, and understimated how fast Rev/MC would execute the rest of the loop. In either case, if alerts are thrown up in very quick succession, there's no way to interrupt it. Command-period/control-C doesn't get read before another dialog appears - and the dialog eats it. It doesn't have to be an infinite loop (though I've done those too, of course) - if it's going to be another 1000 or so alerts, then I'm faced with trying to remember how long it was since I last saved, and weighing up forced-quit versus a lot of hitting enter. Maybe I'm just a bad programmer, but I don't think a high-level programming IDE should leave even a bad programmer resorting to a forced quit because of a simple error. Normally, you can simply interrupt - but only if you can do so outside the context of a dialog box. In my ideal world, 'exit to top' would similarly cancel everything if executed inside the context of a 'modal' statement; but at least we can each code round this ourselves. The modest proposal for now is that an interrupt processed during an alert, ask or answer statement should cancel the dialog and take effect in the context of the statement. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: script limits
on 16/5/02 8:35 AM, Geoff Canyon at [EMAIL PROTECTED] wrote: > It's in the docs someplace. Everything that has a limit of 4 gigabytes has to > live in the same 4 gigabytes. So all your scripts combined with all your > fields, etc., has to total less than 4 gigabytes. When someone bumps into > _that_ limit, I'd like to see the project. ;-) well... we've produced quite a few projects (not in MC) over 4GB - images, text, buttons, etc - (these are mostly touchscreen interactive 'kiosk' publications, though we're currently working on a DVD-ROM) I think the largest one is currently about 19GB, and expanding. But admittedly all the data isn't loaded into RAM simultaneously, so it doesn't really count. But it does make the point that humans can assemble very large quantities of quality content (and we're not wasteful with space, honest). Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Comparing big lists
on 27/4/02 9:10 PM, Gregory Lypny at [EMAIL PROTECTED] wrote: > Thanks for the suggestion, Scott. I'll give it a shot. I've also tried > looping over the lines of bigList (i.e., a nested repeat), simply using > the 'in' operator: if x is in y, then... It takes about 6 minutes on a > modest (300 mHz) iBook running OS X, but I'm hoping for an improvement, > I wrote a general version of exactly this recently (take two tab and return files; from each select one column to match on; from each select columns to output; then choose to output the merged file, and/or the discards from one or other file). My first version used a 'clever' function based on lineoffset to locate all the matching lines. With inputs of 50,000 and 10,000 lines, it took about 3 minutes on a 400Mhz TiBook (OS9). Then I rewrote it to put one file into an array indexed on the requested column, eg set the itemdelimiter to tab put empty into srcDataBarray repeat for each line r in srcDataB put r into srcDataBarray[(item LinkColB of r)] end repeat and loop through the other file (using repeat for each, of course, not repeat with a line number) testing against the array. It went down to a few seconds. Then I took out the progress feedback - now it is consistently 1 second or less. It's so fast that the difference between indexing the 'small' and 'large' files is undetectable; and it does all the extra stuff (of making up all three lists, the merged and the two discard sets) every time, only checking at the end which of the three I actually asked it to save. The combination of 'repeat for each' and MC/Rev's hashed arrays is just blinding. A fantastic illustration of why a fourth generation language can not only give fast development, but also fast execution. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Mystery with arrays (lost key)
on 15/4/02 1:45 PM, Robert Brenstein at [EMAIL PROTECTED] wrote: > (Ben wrote) >> I totally agree (with both you and Scott). But note that currently in >> MetaTalk there is one place where you _can't_ use a quoted literal, namely >> in custom properties. .. ... > > Ben, I am not sure why you want to use quotes here for custom > property names. Those names become part of the xTalk syntax once > defined, so there is no need to quote them. You do not use quotes > when calling your handlers or functions, do you? > >> doesn't; and nor does this: >> >> on mouseUp >> put 23 into sourcefile >> answer the sourcefile of me >> end mouseUp >> >> I think this is a bug in the parser, or a hole in the syntax. > > Here you define a local variable called "sourcefile" creating a > namespace conflict so do speak. I believe that local var name simply > takes priority so you are effectively asking for "answer the 23 of > me" in the second like and such a property (23) does not exist. Robert, I understand what is happening here. I just think it's wrong. As you say, in the line >> answer the sourcefile of me 'sourcefile' is being interpreted as a variable, and the value of the variable is being used as the property name. My point is that in that situation, one should be able instead to use a quoted literal, to ensure that the correct property name is accessed. By contrast, try this in a button on mouseUp put 23 into script put the script of me end mouseUp In this case, 'script' is parsed as a literal, so the text that appears is the script of the button. Indeed, if you do this: on mouseUp put 23 into script put script && the script of me end mouseUp The message is 23, followed by the script. So there is an inconsistency here; script is working fine as a variable, but the parser is taking it as a literal when used in the context of a property. The question is, in the expression: the of what is ? Is it a literal a variable a container a source of value It's not any source of value: you can't compile a script that uses a function to define the required property name, eg put the someProp() of me It's not any container: you can compile this script put the fld 1 of me and it 'works' - it accesses some property, and you can also assign values to that property - but the text of fld 1 happens to be "script", you won't get the script of the object from the above expression. (It's actually very odd - you can even assign values to this property, and retrieve them, but the property doesn't turn up in the customProperties of the object). And it's not even any variable, because as we note certain variable names, which appear to be legal - at least they're not reserved words - are parsed as literals - an example being "script". So I think this expression the of has a very anomalous syntax. One way of dealing with this would be to make it entirely literal; so that put the myscript of me has the same status as put the script of me In each cases, the reference would be to a property named "myscript" or "script", regardless of any use of that property name as a variable elsewhere. The disadvantage of this would be that one would lose the facility to decide at run-time what property is being accessed, eg put "highbid" into whichBid get the whichBid of me would no longer work. But there are several ways round this, either using "do", or using the properties or customProperties of the object. An alternative approach would be to allow the name of the property to be any expression, so that eg get the whichbid of me get the chooseBid() of me get the (hilitedText of btn "propchoice") of me get the "highbid" of me would all be legal. This would leave us still with the original problem, of unquoted literals being a potential source of errors for the unwary; but at least there is now a way for the more wary to be cautious, by carefully quoting all their property names just as they do other literals. This is where we came in; you quoted Scott Raney >>> and Scott strongly recommends to always quote literals. It is >>> definitely a cleaner way to code and eliminates any ambiguities. and I agreed, and pointed out that there was a situation here in which it was not possible to code so as to avoid ambiguities. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Mystery with arrays (lost key)
on 10/4/02 9:18 AM, Robert Brenstein at [EMAIL PROTECTED] wrote: > As far as I know, the use of non-quoted literals comes from HyperTalk > and Scott strongly recommends to always quote literals. It is > definitely a cleaner way to code and eliminates any ambiguities. I totally agree (with both you and Scott). But note that currently in MetaTalk there is one place where you _can't_ use a quoted literal, namely in custom properties. Eg if a button has the custom property "sourcefile" then this code: on mouseUp answer the sourcefile of me end mouseUp works; but this code: on mouseUp answer the "sourcefile" of me end mouseUp doesn't; and nor does this: on mouseUp put 23 into sourcefile answer the sourcefile of me end mouseUp I think this is a bug in the parser, or a hole in the syntax. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: metacard.com hosting service fiasco redux
on 4/4/02 5:32 AM, Scott Raney at [EMAIL PROTECTED] wrote: > ... have taken several precautions to make sure we don't get caught > out like this again. The most significant of these is to move DNS > hosting back to our local servers. We had done this for most of the > time since we first registered the domain, but transfered the domain > records to Jumpline when we became the target of various DNS-based > attacks on our local servers and decided that we couldn't be trusted > to keep up with the patches required to maintain a secure network. For those who aren't in a position to do this, I strong recommend EasyDNS (there are some other similar services - these happen to be the ones we started using - because the person researching liked the soothing colours of the web site! - and they've proven an excellent choice). You might think of it as "pobox for web sites". They don't do anything except DNS, so they're pretty good at it and there's no reason they should go bust. They're exceptionally strong on customer service - but mostly you shouldn't need it. You get an easy to use, but complete, web control panel to set DNS parameters on your domain (and up to 100 sub-domains), and options like URL forwarding and mail spool. There is documentation to help explain all the options. In most cases they can initialise it with the current settings from your ISP, so switching over is usually painless. The service is cheap and works great. Most of our sites are hosted by third party ISPs, and since in seven years we've never found one that was competent, I started sleeping a lot easier when I finally got DNS on all our domains moved over to EasyDNS. If the ISP goes down or suffers an outage for more than a few hours, I can quickly repoint the site to a temporary or backup site on one of our own servers. When our mail server ran out of disk space last weekend, EasyDNS took up the strain (you can set their spool server as a secondary, and it will keep mail for up to five days). And when I have a fight with an ISP, I know that the most I can lose is the cost of my current contract - I don't rely on their cooperation, or competence, to move the site. Enough promotion: suffice it to say that if you have at least one domain that you care about, and don't run your own DNS (or do, but would like a backup) then unless you love and respect your ISP, I really recommend an extra $20/year to keep the DNS out of their hands. (No connection with the company except as a very happy customer.) Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Launching a URL in OSX is Cake?
on 25/1/02 7:11 AM, Scott Rossi at [EMAIL PROTECTED] wrote: >>> I like using the ascii for "delete" as a placeholder, because it works >>> fine and there's no way a user has typed it. > >> You know, that's a good point about not being able to type "delete". > > "formFeed" is another useful option. But watch out a bit, because the fact that a user can't type it doesn't mean it can't - at least in principle - be a character in a legitimate and genuine path. This isn't completely hairsplitting; all my file info xfcns return line format lists (ie ascii CR, 13, is the delimiter). My many useful old file manipulation stacks which recurse over folders now choke on the files that Apple introduced to hold custom icons for folders, named - so to speak - "icon%0D" (ie the file name ends with a return character - so my lists of files include two names of non-existent files, "icon" and ). Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Print dialogs on the Mac
on 30/12/01 8:06 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > On Saturday, December 29, 2001, at 09:12 PM, David Epstein wrote: >> But is there any way to know what the user has chosen in these dialogs? For >> example, can my script take account of whether the user has chosen landscape >> or portrait, or reduce or enlarge? > > While I do not think you can read what they select from the driver > dialogs, they will function as the user uses the different features. An old whinge, but one I think worth repeating. Not only does MetaCard/Rev not allow a program to access this information, it also does not allow a program to set it.Other environments (eg RealBasic) do, at least to the extent of allowing apps to save a setup. As a result I have some RealBasic apps which I've not been able to move over to MC/Rev. I do wish that better printing support could be added. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Memory Problems
on 13/12/01 12:22 PM, Jack Rarick at [EMAIL PROTECTED] wrote: > Using several different Mac's - all running Sys 9.1. Using put > URL("Binfile .." etc to copy large files (20 to 70 meg is size). Using a > repeat loop to copy sets of up to 20 of these files. Works fine (1 or 2 > file copies) and then hangs - throwing the error "Low memory." All of > these Mac's have at least 128 meg of RAM and the memory on Metacard has > been set all the way from 20 meg to 65 meg -> Same results. Using the 'put URL "binfile:..." into URL "binfile:..."' technique to copy files actually means that MC is reading the entire contents of the file into memory, and then writing it out again (unless Scott's introduced a damn clever optimisation). Hence it's not surprising that using very large files might fall foul of this, regardless of any actual bugs. The pure metacard alternative is to write a file copy routine that uses the open file/read from file/close file commands to make copies a bit at a time - choose some buffer size (eg 250K) and use 'read from file srcfile for 25'/'write it to file dstfile' in a loop until it = empty. If you really only care about Macs, it would probably be a lot easier (and I'd guess quicker) to use AppleScript to get the Finder to do it for you. Ditto on Windows to use the shell. Or of course you could define a 'copyfile' routine that used AppleScript on MacOS, shell on Windows, and fell back on reading data into MetaCard and writing it out again on any other platform. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Desktop Drag&Drop files
on 29/11/01 2:40 AM, Alex Shaw at [EMAIL PROTECTED] wrote: > For windows.. it is easy .. compile your exe > > Dropped files are accessed via the global variables $0 - app name/path; $1 > - dropped file 1; etc > (see Help - Concepts & Techniques - The Outside World) > > So to access the full path to the first file dropped onto the app: > put $1 into it > > On windows it didn't matter what sort of file was dropped.. it accepted > everything .. files & folders. It then becomes a simple task of processing > each variable $1 -> $n (n - the last file). Thanks Alex! I'll look forward to trying this out. Do you get any kind of message about this happening when your app is already running? ie how do you know, apart from at startup, when to examine the environment variables? PS - Jeanne, are you reading this? I couldn't find any docs in Rev about how to read environment variables - and I guess also that this (how to make an app respond to files dropped or launched; on all platforms; including how to set file affiliations on the Mac) would make a useful encyclopedia topic. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: [Metacard] OS X: 'icns' resources?
on 28/11/01 9:28 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > > On Wednesday, November 28, 2001, at 04:44 AM, Ben Rubinstein wrote: > >> on 27/11/01 7:51 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: >> >>> Graphic Converter has one nice touch as it will allow >>> you to save the file as an .ico file for Windows. >> >> I've not been able to set the mask on the .ico file for Windows using >> Graphic Converter. Does anyone have a Mac solution for that (or is >> there >> something in Graphic Converter that I've missed)? > > You can use the Add Alpha/Mask Channel under the effects menu in Graphic > Con. to add that chanel. What every you paint as black on that channel > will be transparent. Then save the file as a .tiff for the Mac. Right, but then I still don't have a .ico with a mask? Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: [Metacard] Desktop Drag&Drop files
on 27/11/01 6:09 AM, Alex Shaw at [EMAIL PROTECTED] wrote: > -Simple executable app (or its alias/shortcut) which sits on the desktop. > -User can drag & drop random files onto the app. > -App processes files. > > I can easily access the list thru the environment variable names $0 $1 $2 > etc on the pc but the same app on the mac returns empty variables & will > only allow me to drop metacard files onto it. > > Someone mentioned appleevents.. but how? Alex, I'll swap you Mac for Windows. To do this on the Mac, your stack needs to handle the "appleEvent" message. Put the following handler in your stack script: on appleEvent eClass, eID, eSender if eClass = "odoc" then request appleEvent data if the result = empty then answer "OpenDoc AppleEvent!" & return \ & "id =" && eID \ & "sender =" && eSender \ & "data =" && it else pass appleEvent end if else pass appleEvent end if end appleEvent Build a standalone, and try it. You should see that when you drag and drop a file, this handler fires, and the data for the apple event is the path of the file(s). The issue about which files you can drag-and-drop onto your app is determined by the resources in the app. When the standalone is built, it is given the same resources as MetaCard itself - so it accepts stacks. You need to change these resources to identify the kind of files your app should accept. The resources in question are the file reference ('FREF'), icon list ('ICN#') and bundle ('BNDL') resources. You should be able to get information about these on the apple site (developer.apple.com) (I'm on the road at the moment, with email access only - can't give you exact referencess.) You'll need a resource editor - ResEdit or Resorceror. Note that you can only filter by Mac type codes, not by file extensions. Now: can you tell me how I do this on Windows?!? I can't even find out how to access the environment variables. Hope this helps & thanks in advance, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: [Metacard] OS X: 'icns' resources?
on 27/11/01 7:51 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > Graphic Converter has one nice touch as it will allow > you to save the file as an .ico file for Windows. I've not been able to set the mask on the .ico file for Windows using Graphic Converter. Does anyone have a Mac solution for that (or is there something in Graphic Converter that I've missed)? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: RFC: Optimizing stripDup()
on 1/11/01 6:11 AM, LiangTyan Fui at [EMAIL PROTECTED] wrote: > > The browser constructs the the following string and pass onto the server: > http://localhost/cgi-bin/echo.mt?option=1&option=2&option=3 > > Suppose you are using a split command to parse the query string in the > echo.mt script: > > put $QUERY_STRING into x > split x by "&" and "=" > put keys(x) into xKeys > > you'll get only "option" in xKeys, and x["option"] gives you "3". > > Hmm. should I bug report this? It's not a bug - split is behaving correctly according to the spec - it's just that this spec makes it tantalisingly close to a handy parser for URL strings, but not quite right. But the thing to do is use this as a cue to define the spec you do want for that purpose, and implement it - eg: function splitQueryString qs --> array set the itemdelimiter to "&" repeat for each item p in qs put space into char offset("=", p) of p -- or use split in 2.4 put urlDecode(word 1 of p) into k put urlDecode(word 2 to -1 of p) into v -- -- may or may not want this, depending on what you're doing if v = empty then put true into v -- get formdata[k] if it <> empty then put it & "," before v put v into formdata[k] end repeat return queryparms end splitQueryString This will handle the multi-option case, and is also neater because it's specialised for handling query strings - so it can do the URLdecoding. If you had a parallel function that parsed data 'POST'ed instead of sent in the query string, then you could isolate the encoding issue - call one or other function, and then either way have an array of parameters and values. (Note that this implementation has chosen to force every key to have a value. That's because it relies on empty to indicate that a key hasn't been defined yet. If there was an atomic test for 'is-a-key' (is there?) one could use that - or if you really want it, go the extra mile and keep a second array to show whether a key has been encountered already.) Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Mac-text
on 31/10/01 11:47 PM, Scott Raney at [EMAIL PROTECTED] wrote: > true compability didn't ever seem to be an issue because HyperCard can't deal > with binary data anyway (nor can any HC user, at least if they're still using > HC ;-) can't deal with binary data directly, no, because it uses zero terminated strings - but that doesn't stop HC/users manipulating lots of files to be exchanged with other apps that use CR. I've got a lot of stacks like that. >> defining a new constant "CR", with the wrong value, is just rubbing salt in >> the wound. Was this inherited from some other xTalk? > Yup, SuperCard. I never liked it :-( > CRLF is already built in and generates the correct sequence. Oops - why didn't I check that? Sorry. > And real programmers don't use "line 1" & return & "line 2", they use > format("line 1\nline 2"). If they need real returns, they can use > format("line 1\rline 2"). numToChar(13) also works. Real programmers!??! Why call a function at run time to define a constant? Format might be a sensible option in the case you note above (seems like a sledgehammer to crack a nut, but you'd be the one to know whether it was more efficient or not) but if the parts are in variables, I'd certainly rather use 'var1 & return & var2'. By this argument there'd be no call for tab, LF, CR, or indeed return. Of course we can use numToChar(13) - my small repertoire of MC (actually Rev) stacks already contains many cases of assigning numToChar(13) to variables (and a good few of numToChar(13) & numToChar(10), come to that - have to change those now). I'm not saying that this is a problem that stops one from doing anything in MC/Rev, but it's still nice to have alternatives. That's what I like about the xTalks - having many ways to skin a cat. To coin a phrase "there's an easier way to do that" Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Mac-text
on 31/10/01 3:54 PM, Ken Ray at [EMAIL PROTECTED] wrote: > This has to do with the fact that the Mac uses a carriage return/line-feed > combination (CRLF) at the end of each line, and Windows generally uses just > LFs (or is just CRs? I can't remember right now). CRs are ASCII 13, LFs are > ASCII 10, BTW. > >on 31/10/01 10:18 AM, Signe Marie Sanne at [EMAIL PROTECTED] wrote: >> Could someone please enlighten me as to why ordinary text (no formatting) >> uploaded via ftp to a server behaves perfectly when uploading it from >> Windows, whereas on Mac all returns have disappeared and been replaced by >> lots of boxes? This is with MC2.4. T'other way, actually. Mac standard to represent a line break is CR; Unix standard is LF; DOS/Windows standard is CRLF. Things like this that make me despair of ever achieving standards... This is essentially (correct me if I'm wrong) the difference between 'open file for text' and 'open file for binary', or 'URL "file:/...' and 'URL "binfile:/...' - in each case, the first formulation instructs MetaCard to automatically scan the data, and convert all instances of CR or CRLF to LF. Virtually any FTP application will have the same facility, and have a setting that allows you to choose whether to transfer files in Text or Binary mode (often also some sort of 'automatic' mode in which it guesses whether a file is binary or text). So the real question is, using the FTP facilities in MC 2.4, is there a way to specify a similar switch? Or does the FTP library always transfer in Binary mode? Meanwhile, slightly off the original poster's question: > CRs are ASCII 13, LFs are ASCII 10, BTW. Correct - but bizarrely, MetaCard defines constants named "CR" and "return" to have the value 10, instead of 13. A subtle gotcha for HC users who deal with binary data, and a wind-up (IMHO). You have to define your own 'constant' if you really want to deal with CR. I can (grudgingly) accept the definition of 'return' as linefeed; but defining a new constant "CR", with the wrong value, is just rubbing salt in the wound. Was this inherited from some other xTalk? I suppose it's too late to appeal for a change in the value of "CR"; but how about at adding a couple of new constants, "asciiCR" with value 13, and "CRLF" with the value being a two-character string, codes 13 and 10? Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Access Mac File metadata/comments
on 4/10/01 10:35 PM, Sivakatirswami at [EMAIL PROTECTED] wrote: > Is there a way, or an external. (I didn't see it in the "Externals" > Collection") that will allow Metacard to read ALL of the metadata for a file > on the MacOS? We want certain team members to use the comments box... I would try AppleScript. tell application "Finder" set the comment of file "Macintosh HD:Picture 1" to "This is a test" end tell (In Rev 1/MetaCard you can use the external from xworlds; in Rev 1.1 AppleScript is 'built in' - but you knew that! :-) Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: 'delete' deletes right away... trash?
on 6/9/01 3:08 PM, Sjoerd Op 't Land at [EMAIL PROTECTED] wrote: > andu wrote/ schreef: > >>>> It'd be nice when MetaCard put the files in the trash when using the >>>> 'delete' command, because then there still was a way to recover the >>>> files. >>>> >>>> Is this a useful idea or am I the only one? >> Even if you were, it's easy to come up with a function to do just that, >> either create a backup file or move them somewhere. Having something >> like that built in is overkill, I think. > Sure, I thought about writing my own function for this already, but because > the script would differ for each platform(), I think it's nice if this was > built-in. Of course if I'd really need it, I'd write a function myself, > but... you know a little step closer to perfection of MC. Even if something is added to built-in functionality, please don't change the meaning of delete. In the current situation we have the ability to either delete a file or move it to the trash. If delete is changed, we only have the ability to move it to the trash. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: File transfer [off topic]
Kevin, FWIW, I've had to do something like this several times, in different setups (invariably Mac-Mac, but the principles should be the same on a mixed environment). My suggestions: - if you've got a small number of files changing, and the files are small, then something like you're proposing will work; or as others have said there are plenty of existing solutions. The job is made easier if you can make the central machine into a server, and simply mount the share on client machines. - if you've got a very large number of files (we've worked with 5,000 - 15,000 files) and some of them reasonably large (our setups involve a fair number >1MB, a small number in the 20-30MB range, and usually one or two >100MB) then I've yet to find any of these solutions that work (especially if the clients are likely to all check in around the same time). We've had to patch around using AppleScript solutions to stagger the launches, and partition the updates. However, we did finally find an excellent solution for the most recent such installation we've done. It's not free, but in time saved and reliability it quickly pays for itself over custom development or any of the free or shareware options we've tried in the past. This was to use Retrospect - generally a backup software, but it has mirror options. You put Retrospect on your central machine, install the client s/w on each of the clients; then you can set up Retro scripts to 'mirror' folders on the central machine to folders on the clients. You can make one big script or little ones; schedule them automatically, or run them manually, or if you need more unusual control, and if the Retrospect server is on a Mac, then you can AppleScript that. You don't have to maintain catalogues, because the Retro s/w takes care of working out what's new and changed. This is the solution we've used for our most recent installation, which is at the upper end of the scale in terms of number and size of files, and it works much faster than any other solution we've tried, and it has proven completely reliable (so far :-). Hope this helps, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: clickText Default Delimiters?
on 13/8/01 2:17 am, Sivakatirswami at [EMAIL PROTECTED] wrote: > If you back space over a endline where the line above > is group text, or back space up to group text so that no space is there.. > suddenly the group style "extends" to adjacent characters to which is was > not originally applied ..and my link breaks My suggestion would be to use a visible style, such as underline (or a colour - or both - blue underline carries a certain message...) You will still find exactly the same behaviour with respect to editing the text, but you'll be able to see very clearly what's happening. > The other, and no less significant, issue is "forwarding" text to the > "future--as soon as you pass group style text through a variable you lose the > style. This is where using a colour or standard text style has an advantage: you can request the "htmlText" of the field, which will preserve the style information. If you really don't want the links to be visible, you could make a button that locks and unlocks the field; and as it unlocks the field, converts all the group style to some visible style, for easier editing; as it locks the field, it would reverse the process. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
feature request: clipboard
Both programatic and user access to the clipboard is a bit limited at present. In terms of user access, it is a problem that copying or pasting styled text to and from fields loses the style information. Programatically, the copy command is useful in some situations, but bizarre in others. It is also (at least on Mac) not always updated to the system scrap. For example "copy fld 1" produces an empty clipboard if you look in any other application (or strictly, a clipboard containing an empty piece of text). In MC/Rev's private scrap, it has made a faithful copy of the field - but you can't access it outside. I have yet to understand how to get some text into the clipboard, without putting it into a field, and selecting it. ('Copy "hello"' is a bug, "hello" is interpreted as a (bad) object reference; 'Copy ' has the same problem - which seems strange to me, it's as if the expression is being evaluated twice.) Looking at how other environments handle the clipboard: in Hypercard 'the clipboard' is a normal container, you can retrieve text from it or store text to it. That works great for unstyled text. However for anything else (ie styled text) one is reduced to selecting text of a field and using 'domenu "copy"', or going the other way pasting styled text from the clipboard into a field and then processing it. In RealBasic the 'clipboard' is an object of the 'Clipboard' class. There are properties and methods to access it. For the simple cases, you can set and get the "Text" or "Picture" (and test with "PictureAvailable" and "TextAvailable"); for more complex stuff, you can test, set or get binary data of arbitrary type (but Mac only, at least in version 2 - dunno if they've improved this in v3). (In fact, for a recent project in Revolution, I had to supply the client with an extra app built in RealBasic, which replaced the style information for text in the clipboard with inline markup, that could then be read by Revolution after pasting into a field. Yeuch.) A big difference would be if copy and paste, applied to fields, transferred style information as appropriate. A modest impovement would be made if the private scrap was reliably copied to the global scrap - eg if I copy a field containing some styled text, then the styled text must at least be recorded somewhere in the clipboard, even if an unpublished format. (In HC, the text and style information for a field are saved in the clipboard separately from the rest of the field properties - hence in many cases you can copy a field, and paste directly into some other app, which will disregard the field info it doesn't understand, but correctly interpret the styled text. Dunno if the same is true in MC, but at least if the destination app was a custom one, one could presumably decode the data anyway.) A modest improvement would be made if the paste command supported arbitrary containers as source or destination, eg 'copy "fred"' or 'copy from x', "paste into x". A more substantial improvement would be (since 'the clipboard' is already defined in MC) some new properties, all three readable and writeable: the clipboardText the clipboardImage the clipboardHtmlTxt Comments? Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: cookie info & libURL
Could libURL be extended to allow users of it to customise the headers of outgoing HTTP requests, and read the headers of incoming HTTP responses, without losing the benefits of having the library (ie, without requiring each developer to customise the library themselves). A crude (but effective) solution would be to declare a couple of global variables or properties; eg "gHTTPrequestExtraHeaders" and "gHTTPresponse". Each call to "get URL xxx" would consult the first global, and set the second. It might be up to the user to empty the gHTTPrequestExtraHeaders after use, or libURL could empty it after each call. No doubt more expert MC users could propose a more sophisticated syntax (eg is it possible to make the URL support a syntax such as "get URL xx with headers yy"?) Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Printing double
Risking a flame attack I do think that printing is one of the weak points of MetaCard/Revolution (and HyperCard before that, but then I gave up using HyperCard's printing many years ago, in favour of an XFCN which provides a model like that outlined below). This is one area where I believe RealBasic substantially scores over MC/Rev. In RealBasic, one can obtain a 'Canvas' object from a variety of sources: for example any object that can appear in a window (buttons, fields, controls etc), as well as windows themselves, but also a printer object. In the case of the printer object, the size and depth of the canvas depends on the way the printer object was created (and for example whether the user has been given the opportunity to do Page Setup) - so it depends on the selected size and orientation of paper, the selected scaling, whether the printer is bw/greyscale/colour etc. Given a canvas, you can then draw on it by using the kind of commands that we all know and love - commands to move around, draw lines, shapes and text with different sizes and colours, and blat images. If the canvas belongs to a printer object, then when you're done you tell it to print the page. (A neat thing is that you can also create an abstract canvas to draw on offscreen - you can then blit that canvas to anywhere else, eg blit a portion of it to a window to scroll over the image you've created.) For some subset of tasks that users of MC/Rev/RB etc might want to accomplish, I think this model is more flexible, easier to use, and less susceptible to stange and complicated gotchas. Whether that subset is more or less than 50%... who can say. (I did raise this point before in the Revolution list, and was somewhat shot down, and told that I could achieve any effect I needed by creating objects on cards, and then printing cards to rectangles within a page. That's true up to a point; but (a) it got me into doing some contrived and awkward things and (b) I ran into all sorts of nasty issues of the kind that have recently been raised in this forum: images with grey backgrounds - partially solved that, but was left with a gray shadow; having to use a separate substack with a huge image on it, so that when it was scaled down to print it was a reasonable resolution - which then produces flashes on screen when it comes to print. So although the 'into rectangle' option certainly adds a lot to what you can what you can achieve with printing in MC/Rev, I still feel that supporting the more direct model would add a lot.) (And that's without getting into the other way that I think RB would score over MC/Rev - yet let me say now I still prefer the latter - the true OOPiness, with subclassing and inheritance. The printing support within RB just arises naturally out of the way that everything else works. But that's a whole other invitation to get flamed...) Yours in swift retreat to the bunker, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
libURL and Revolution 1.0?
I'd like to get some experience with libURL; but I'm one of those newbie types who's using Revolution. If I can work out where to download it from, should it in principle be possible to use libURL from Revolution 1.0 (which of course is based on the 2.3.2 MetaCard engine)? Are there any special things I should do or watch out for? If that's not going to work, can I ask a couple of questions about http headers - both for the request and response. Q1: As I understand it, in MC 2.3.2 you can customise the header of a request to some extent, by specifying additional text in the httpHeaders property. But I've read a message from andu (17/7/01) in which he said: > No need for httpHeaders (obsolete for now) since the library > implements a full header on its own. Surely there needs to be some way to specify additional headers - you can't predict what developers are going to use this for. (For example, they may need to pass authorisation through; some servers may need a "host" header; an app might want to specify a referrer, or a user-agent identity, etc) Is there a way to customise the request header for an http request in libURL? If not could there be, please? Q2: AFAIK, there is no way in MC 2.3.2 (ie in current Rev) to access the header of an http response. At least, I asked a couple of times on the Rev list, and nobody ever replied. I find this really restrictive - does libURL give a better solution to this? If not, could it, please? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Multi-column lists: interim solution?
on 24/7/01 5:57 PM, Richard Gaskin at [EMAIL PROTECTED] wrote: > I did an about-face on this yesterday, setting aside the multi-field > solution to play with some column-truncation algorithms for display in a > single field. I've managed to get the speed down to about half of what it > took to parse columns out. It works great with monospaced fonts, and most > of the time it's "close enough" with non-monospaced fonts. Still a tad > wonky, thought, hence my desire to have such a function built in, so it can > use font-metric calculations more accurately and more quickly. > > > Of course, there's always new things to learn with MC, so if I've missed the > Ultimate Way To Emulate A Multi-Column List, by all means let me know. By no means the ultimate way, but a small wrinkle on the other ways (both truncating the text to fit tab stops, or using multiple fields), which can work better in some contexts. I've used it either where the number of rows in the data is very large relative to the number of rows to be displayed at a time, and/or where the data can change frequently. In such contexts, I've detached the scrollbar from the field(s) altogether. Have one field with tab stops, or multiple fields; but either way, make them non-scrolling; with a separate scrollbar control aligned at the right edge of the last one. If the fields can display say 10 rows, give the scrollbar a range from 1 to (n-9), where n is the number fows in the source data. When the user changes the scrollbar, select the new range of 10 rows from the source data (in a global, or a property of eg the scrollbar, or in a hidden field etc), and do the conversion display on the fly (truncating text between tab stops, splitting into multiple fields, etc) - just for those ten rows. This doesn't solve issues like drag selection, and it completely rules out drag scrolling etc. But it does change your performance concerns. Now you have a very fixed performance penalty, which you pay every time the user scrolls the display or the data is changed; but it's probably quite small; and you've avoided taking a huge hit the first time you try to display the data, or each time the data changes. In my experience, if the number of rows is small, on reasonable machines you get excellent performance - and you know the performance won't change when the size of the data increases. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: AppleScript
on 17/7/01 9:12 PM, Scott Rossi at [EMAIL PROTECTED] wrote: > Has anyone created scripts for retrieving data from an application via > AppleScript? Specifically, I'm trying to use MC to pull addresses/content > from email addresses in Outlook Express. Using MC, I can send AppleEvents > to OE, but I'm having a hard time figuring out how to get anything back from > OE, via request or the appleEvent message. Sorry for the delayed reply... I've just been catching up with my reading. I've not done this in MC, but I have written AppleScripts in HC to get data from Outlook Express, simply as the replies to the request. I would imagine that this would work. Mail me offline if you want more info. FWIW, the AppleScript implementation in Outlook Express is patchy, however. Getting content of the email messages is fine; and within limits creating messages and modifying existing ones also (eg I have a script that I regularly run over messages on this list, to strip formatting which certain people apply to their messages) Reading contacts isn't to bad; modify contacts by AppleScript there are somethings that just don't work, though they clearly should. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
htmlText - what entities, what charset?
Is it possible to get a list of the character entities supported by htmlText (or a link to the reference used)? Also, I have the impression that when non-ascii characters are found in the text which do not have a corresponding character entity name, they are mapped in some way to a particular character set, and then expressed as codes, eg "”". Is this in ISO-8859-1? Eg if on the Mac you set the text of a field to "numtochar(165)", which is bullet, you'll find that the "htmlText" of the field is "•". Can Scott (or someone) confirm that this is what is happening, and what happens when there is no mapping for the character in the 'local' character set to the destination one (ISO-8859-1, if it is that)? TIA, Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
null fun
I came across a couple of interesting behaviours last night. My stack started behaving strangely, in an area of functionality where I hadn't been working. A backup was fine, but I couldn't see the difference. So I downloaded Geoff Canyon's mcRipper, with the intention of ripping old and new stacks into xml, and then comparing these two text files (using BBEdit). This turned into a huge rocker cover issue. I won't bore you with the trail I wended, but at the end of it I found two behaviours which could at least be described as interesting - one down to MetaCard, one to Revolution. The Revolution part is that many objects have a custom property "scriptChecksum", which consists of 16 characters - or rather, 16 bytes. Evidently, it is possible for these bytes to be zero. The MetaCard part is that it is possible for strings to contain the character whose code is zero; and such strings can be stored in fields; and fields containing such a character can be happily scrolled over from top to bottom and back again. However, when scripts attempt to access the contents of a field, which contains such a character, almost - but not quite - everything behaves as though the contents end immediately before the null. If you ask for the length of the text, or the number of lines, it will be reported for the portion before the null. You can select a range of text including the null character, and do copy - only the part of the selection before the text will be in the clipboard. On the other hand, you can also select a portion of the text after the null, such that the selection does not itself contain a null - you will then get the text you selected in the clipboard. Actually these behaviours are not quite consistent; at least in Revolution, I've sometimes been able to copy the text containing the null - but doing "Select All" stops before it. I'm not certain whether this is differences between MC and Rev, or between the data I got from using the Ripper, and data I synthesised using numtochar(0). It's also worth noting that if you muck around with these interesting things long enough, you may destabilise the environment, crash, and possibly freeze altogether (at least in Rev, at least on Mac). So for MC: since nulls are mostly supported in strings and fields, perhaps the remaining strange behaviours should be fixed. For Rev: as long as nulls aren't fully supported, perhaps it would be better if the checksums didn't contain them - eg render them out as a string of hex digits. And lastly to Geoff - until either or both those things change, perhaps mcRipper could be enhanced to save strings containing nulls in some escaped format! Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: two monitors
I think the point is that multiple monitors are handled differently on Mac and Windows. On the Mac, the first model that wasn't a single unit with a built-in fixed size screen (ie the first model which allowed for the possibility of a different size screen) also allowed for the possibility of multiple screens. Hence as soon as there was a way to ask what the size of the monitor was, there was actually a way to ask how many monitors there were, and for each one what its rectangle is. The rectangles are not just the dimensions, but also the relative positions: because multiple monitors can be of multiple sizes, and arranged in any layout as long as every monitor touches at least one other monitor on at least one edge, and no monitor overlaps another. On Windows, support for different screens (and hence a way for programs to ask how big the screen was) has been there from the beginning; but support for multiple monitors was added relatively recently. The frig to allow existing programs to make use of them was therefore that when you asked how big 'the screen' was, the answer is a single rectangle, which is the bounding rectangle of all the screens (which might, if the screens are of different sizes, effectively have 'holes' in it). This is why when using multiple screens on Windows, you'll often find dialogs are carefully presented split halfway between the two screens. On the Mac, the nearest equivalent call has always been to get the size of the 'main' screen (the one with the menubar). So there's never been a function to return the bounding rect of all screens (if you needed it, you could get the rects of each screen and calculate it yourself, but it would be considered a misleading and rarely useful concept, since it could have holes in it). So it makes perfect sense that if you ask for "the rect of the screen" on a Windows machine, the answer is likely to be the bounding rectangle of all monitors; and that if you ask the same question on a Mac, the answer is likely to be the rect (starting at 0,0) of the main monitor. I know nothing about *nix - but I'd guess that X-windows resembles the Mac situation more closely? It would be trivial to write an XFCN to return this information for the Mac - in fact I'd be stunned if there isn't one already out there (check the Dartmouth or Rinaldi collections) (you can use XFCNs on MetaCard, right? - or is that a Revolution-only feature?). But ideally there would be a built-in, cross-platform solution. The simplest would be if "the screenrect" was, when appropriate, a list of one or more rectangles (one per line). That's obviously a small potential compatibility break - OK for anyone that parsed it by items, but liable to cause an error (when used on a multi-monitor system) if a script assigns it directly to be the rect of some other object. (But why would anyone do that?) So second option would be second function ("the screenrects()"?) that would return such a list. I note from the Revolution documentation, and I assume this is also true for MC, that the screenrect returns the value noted at startup, not reflecting any changes made while the app was running. Perhaps this limitation too could be lifted if a new function was provided. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: New Image Features
on 22/5/01 7:38 PM, Dominique at [EMAIL PROTECTED] wrote: > Geoff Canyon ecrivait / wrote: > >> I think of Bic pens. What the heck _does_ it stand for? > > Black Is Changed > Following summary adapted from Apple's QuickDraw documentation: Action on destination pixel If source pixel If source pixel Source mode is blackis white --- --- --- srcCopy Force black Force white notSrcCopy Force white Force black srcOr Force black Leave alone notSrcOrLeave alone Force black srcXor Invert Leave alone notSrcXor Leave alone Invert srcBic Force white Leave alone notSrcBic Leave alone Force white The COPY operation (srcCopy) completely replaces the pixels in the destination bitmap with the pixels in the source bitmap. The inverse COPY operation (notSrcCopy) completely replaces the pixels in the destination bitmap with a "photographic negative" of the source bitmap. The OR operation (srcOr) adds the black pixels from the source bitmap to the destination bitmap. The inverse OR operation (notSrcOr) takes a "photographic negative" of the source bitmap, and then adds the black pixels from this negative to the destination bitmap. The XOR operation (srcXor) inverts the pixels in the destination bitmap that correspond to black pixels in the source bitmap. The inverse XOR operation (notSrcXor) inverts the pixels in the destination bitmap that correspond to white pixels in the source bitmap. The BIC operations (srcBic modes) turns pixels in the destination bitmap white when they correspond to black pixels in the source bitmap. The inverse BIC operation (notSrcBic) turns pixels in the destination bitmap white when they correspond to white pixels in the source bitmap. NB: these are the modes as they apply to black-and-white source and destination. For colour, things are a little more complex - and the interpration less consistent between platforms. See Apple's documentation at http://developer.apple.com/techpubs/mac/QuickDraw/QuickDraw-199.html#HEADING 199-76 and for the 'arithmetic transfer modes' (including "blend" and "transparent") http://developer.apple.com/techpubs/mac/QuickDraw/QuickDraw-199.html#MARKER- 9-141 I have to say that I agree with Andu: for some things you have to learn about the domain and the concepts, and there are names that go with those concepts. I know nothing about music; if I want MetaCard to play some notes (can it? let say HyperCard), I imagine I'm going to have learn about some new concepts, and the names associated with them. Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: SystemVersion of W2K
on 20/5/01 9:10 PM, Kevin Miller at [EMAIL PROTECTED] wrote: > Does anyone know the systemVersion and the platform return on Windows 2000? "NT 5.0", on Windows 2000 Advanced Server > Also, the default backcolor on that system (its different on ME for > example). 192,192,92 (that's "the effective backColor of this cd", on a new mainstack in a fresh launch of Rev - hope that's what you mean, I'm too much of an MC/Rev novice to be sure.) This does not appear to be changed by using the standard Windows 'Display' control panel - should it be?? Ben Rubinstein | Email: [EMAIL PROTECTED] Cognitive Applications Ltd | Phone: +44 (0)1273-821600 http://www.cogapp.com| Fax : +44 (0)1273-728866 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.