Re: mcEncrypt

2000-09-22 Thread Peter Reid

Also, I'm assuming that there isn't an mcDecrypt (common practice 
with password systems is that they are one-way process only).  If 
there is a decryption function, what is it called and what are its 
parameters?

Oops, I asked this question some time ago and was told no decryption 
then - sorry to repeat myself!

Still interested in the characters generated by mcEncrypt() though!

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




MC Version Testing

2000-09-19 Thread Peter Reid
Title: MC Version Testing


Hi

I don't know if this will be of any help to anyone, but I find
it helps me when running stacks upgraded to use features from new
versions of MetaCard. In order to avoid problems whilst running a
stack I always include a call to a handler to check that the current
MetaCard engine is late enough to support necessary features.
Typically I call:

 if
MCearlierThan(2.3.1,true) then quit

With the following handler to test the current MC version
including beta and gamma releases:

function MCearlierThan minVersion, showMsg
 set the itemDelimiter to .
 put the version into currVers
 put item 1 of currVers into mcVers
 put toLower(item 2 to -1 of currVers) into
theVers
 repeat with i = number of chars in theVers down to
1
 put offset(char i of theVers,
.abcdefghijklmnopqrstuvwxyz) into posn
 if posn  0 then delete char i
of theVers
 end repeat
 put (mcVers  .  theVers) + 0
into mcVers
 put item 1 of minVersion into
minMCvers
 put toLower(item 2 to -1 of minVersion) into
theVers
 repeat with i = number of chars in theVers down to
1
 put offset(char i of theVers,
.abcdefghijklmnopqrstuvwxyz) into posn
 if posn  0 then delete char i
of theVers
 end repeat
 put (minMCvers  .  theVers)
+ 0 into minMCvers
 if mcVers  minMCvers then
 if showMsg then
 answer
Oops, this stack needs version MetaCard   minVersion
 return  \

 or later (you're using version   currVers 
)! with Quit
 end
if 
 return true
 else
 return false
 end if
end MCearlierThan

The above avoids problems when trying to use recent features not
supported in earlier versions of MC. IF you find it useful,
then help yourself!

Cheers

Peter

-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



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



Controlling QuickTime tracks

2000-09-18 Thread Peter Reid

I've developed a CBT that uses a number of QuickTime movies that 
contain a Flash track for animation and a sound track for voice-over. 
I'm now being asked to add a text track for captions for those users 
who don't have sound or don't want to use sound (in a shared office 
for example).  QuickTime supports the addition of a text track, so I 
could have a single movie file containing all three tracks (video - 
Flash, sound - voice-over, text - captions).  Is there any way I can 
enable/disable QuickTime tracks in a movie under control of my 
MetaCard stack?  QuickTime Player supports this, so it's clearly a 
feature within QuickTime movies, it's just than I can't see how to 
get at this control from within MetaCard.

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Controlling QuickTime tracks

2000-09-18 Thread Peter Reid

Is there any way I can
   enable/disable QuickTime tracks in a movie under control of my
  MetaCard stack?  QuickTime Player supports this, so it's clearly a
  feature within QuickTime movies, it's just than I can't see how to
  get at this control from within MetaCard.

Check out the beta of 2.3.2, currently on the MetaCard ftp site
ftp://ftp.metacard.com/MetaCard/2.3.2/

The read me lists loads of new QT properties, including the ability to
control QTVR, and yes, to turn on and off specific tracks in a movie.

Regards,

Kevin

Thanks Kevin.  I've tried it out and it does just what I want!

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




A few short questions

2000-09-11 Thread Peter Reid

Here are some questions that have occurred to me during my 
development work using MetaCard.  I'm not sure whether I'm simply 
missing a few tricks (not unheard of!), or whether these are genuine 
feature holes.

Some 'constant' questions:
1) Is it possible to declare global constants or are all constant 
declarations limited in scope to the script in which they are 
contained?

2) Is it possible to declare a non-printing (special) character as a 
constant, e.g. something like "constant CRLF = $013$010" to declare a 
end of line constant?

3) Is it possible for a constant declaration to include expressions, 
e.g. something like 'constant padding = tab  "|"  tab'?

Some script debugging questions:
5) Is it possible to insert some special breakpoint or trap command 
that let's you run scripts at near normal speed (without having the 
script debugger open), but that will suspend the execution and allow 
you to look at variable values etc. single step etc.  - i.e that will 
throw you into the script debugger ONLY when you reach a breakpoint?

6) Is it possible to 'watch' a variable, i.e. set up a monitor that 
only kicks in when a named variable's value changes?

Cheers

Peter
-- 
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: A few short questions

2000-09-11 Thread Peter Reid

On Mon, 11 Sep 2000, Peter Reid wrote:

  Here are some questions that have occurred to me during my
  development work using MetaCard.  I'm not sure whether I'm simply
  missing a few tricks (not unheard of!), or whether these are genuine
  feature holes.

  Some 'constant' questions:
  1) Is it possible to declare global constants or are all constant
  declarations limited in scope to the script in which they are
  contained?

They're limited to one script.  Suggestions about how to do it
globally (like a #include in C) are welcome, but the discussion about
this on the xtalk mailing list awhile back broke down before any
suitable method was proposed (the big problems are establishing *when*
the definition is to be done and what to do if the #included script
isn't found).

  2) Is it possible to declare a non-printing (special) character as a
  constant, e.g. something like "constant CRLF = $013$010" to declare a
  end of line constant?

No, but "crlf" already is a pre-defined constant ;-)

  3) Is it possible for a constant declaration to include expressions,
  e.g. something like 'constant padding = tab  "|"  tab'?

No, they must be either strings or numbers.  Allowing escapes (like C
strings) is something we considered but rejected.

  Some script debugging questions:
  5) Is it possible to insert some special breakpoint or trap command
  that let's you run scripts at near normal speed (without having the
  script debugger open), but that will suspend the execution and allow
  you to look at variable values etc. single step etc.  - i.e that will
  throw you into the script debugger ONLY when you reach a breakpoint?

No, but this is on the feature-request list.

  6) Is it possible to 'watch' a variable, i.e. set up a monitor that
  only kicks in when a named variable's value changes?

Theoretically, yes.  But there is no UI that supports this now so
you'd have to hack up the debugger scripts, which is not an endeavor
to be taken lightly.
   Regards,
 Scott

Thanks for the answers Scott - now I know (I'm not missing any tricks 
this time!).

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Reversing Buttons?

2000-09-02 Thread Peter Reid

I develop my MC stacks using MetaCard 2.3.1 on a Mac and distribute 
them on both Mac and Windows (with tweaking under Windows as and when 
necessary).

I've noticed that the order of the buttons displayed in an answer 
dialog box are reversed between the Mac and Win versions!  For 
example, if I do the following:

answer "Do you want to continue" with "Yes" or "No"

I get Yes followed by No on the Mac with No being the default button. 
However, I get No followed by Yes under Windows, but with No still 
being the default button?!

Any suggestions as to whether this is a "bug" or a "feature" and how 
I can make it consistent across both platforms.

Thanks.

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Reversing Buttons?

2000-09-02 Thread Peter Reid

On 2/9/00 12:39 pm, Peter Reid [EMAIL PROTECTED] wrote:

  I develop my MC stacks using MetaCard 2.3.1 on a Mac and distribute
  them on both Mac and Windows (with tweaking under Windows as and when
  necessary).

  I've noticed that the order of the buttons displayed in an answer
  dialog box are reversed between the Mac and Win versions!  For
  example, if I do the following:

  answer "Do you want to continue" with "Yes" or "No"

  I get Yes followed by No on the Mac with No being the default button.
  However, I get No followed by Yes under Windows, but with No still
  being the default button?!

  Any suggestions as to whether this is a "bug" or a "feature" and how
  I can make it consistent across both platforms.

This is definately a feature - the default order between these two platforms
*is* reversed, so you only need to pass the same instructions to the answer
command to make it work correctly on all platforms.  You could check the
platform then reverse the order you call the buttons in, but this would then
break the UI guidelines on one or other platform...

Thanks for the response Kevin - it just means I can't use screen 
shots from one source for user guides etc!

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Sluggish QuickTime Response?

2000-08-11 Thread Peter Reid

On 9/8/00 11:16 am, Peter Reid [EMAIL PROTECTED] wrote:

  I'm using player objects to show QuickTime movies in MC 2.3.1 for
  both Mac and Win.  The movies are about 1Mb in size and include voice
  as well as animated cartoons. The movies last about 30-50 secs. I
  have QuickTime 4.1 on both Mac and Win.

  When I play a QT movie on the Mac and click on the pause button on
  the QT controller, it responds practically immediately.  However,
  when I do the same on the Win machine, there can be a long delay
  before it responds.  This can be as long as the remainder of the
  movie (up to 30 secs)!  Also, on the Mac I can single click on other
  objects and get an immediate respond.  On the Win machine, I have to
  click twice?!

  The Win machine I'm using is a current P-III 700 laptop with 128Mb
  RAM, 18Gb disk running Win 98SE.  By comparison, the Mac I'm using is
  a G3/300, 128Mb RAM, 16Gb disk running MacOS 8.6.  So if anything,
  the Win machine should be at least twice as fast as the Mac (and is
  for many processor-intensive tasks - comparing the same stacks
  running on both platforms).

  This sluggishness under Windows is a real problem as users have to
  wait an unknown amount of time for a response to the 'pause' and
  click twice to move off the player object, where they'd naturally
  want to click once.

  Any ideas what the problem is and how I can get round it??

This could be a problem with your machine or specifict setup, script, other
software running, or suchlike.  Of course, it could be a bug somewhere.  If
you like, you can email me a copy of the stack/movie off-list with an exact
recipy for me to try and I can tell you if it happens here.  Might help
track it down...

Regards,

Kevin

The sluggishness seems to be consistent across 2-3 PCs and seems to 
get worse after I've run a few movies, so memory/virtual memory 
problems look favourite!

The need to click twice (once to change focus from the QT player and 
then to send mouseUp to target object) seems pretty consistent under 
Windows and different to the Mac where a single click is always 
enough.

I'll try to send you a small sample and recipe for you to investigate.

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Sluggish QuickTime Response?

2000-08-09 Thread Peter Reid

I'm using player objects to show QuickTime movies in MC 2.3.1 for 
both Mac and Win.  The movies are about 1Mb in size and include voice 
as well as animated cartoons. The movies last about 30-50 secs. I 
have QuickTime 4.1 on both Mac and Win.

When I play a QT movie on the Mac and click on the pause button on 
the QT controller, it responds practically immediately.  However, 
when I do the same on the Win machine, there can be a long delay 
before it responds.  This can be as long as the remainder of the 
movie (up to 30 secs)!  Also, on the Mac I can single click on other 
objects and get an immediate respond.  On the Win machine, I have to 
click twice?!

The Win machine I'm using is a current P-III 700 laptop with 128Mb 
RAM, 18Gb disk running Win 98SE.  By comparison, the Mac I'm using is 
a G3/300, 128Mb RAM, 16Gb disk running MacOS 8.6.  So if anything, 
the Win machine should be at least twice as fast as the Mac (and is 
for many processor-intensive tasks - comparing the same stacks 
running on both platforms).

This sluggishness under Windows is a real problem as users have to 
wait an unknown amount of time for a response to the 'pause' and 
click twice to move off the player object, where they'd naturally 
want to click once.

Any ideas what the problem is and how I can get round it??

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Resend: Truncated Columnised Text?

2000-08-08 Thread Peter Reid

On 7/8/00 11:45 pm, Peter Reid [EMAIL PROTECTED] wrote:

  I didn't get any response to this one, so I'm trying again in case it
  was overlooked!

Check out the various table examples on our web site, including the latest
"spreadsheet" style object created by Tuviah!

Regards,

Kevin

Thanks Kevin, I'll take a look.

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Purging Open Stacks?

2000-08-08 Thread Peter Reid

  
  Can anyone suggest a reliable way of opening supporting mainstacks
  repeatedly without getting this error message?

Two useful things to know about destroyStack: before it will work you must
close all stacks in a particular file; if you send a message to a stack or
have an open socket or other action that is going to cause it to be needed,
it won't get removed.  You can manually remove stacks by deleting them - be
careful how you use this command though because if you save changes to any
stack in a file it will remove the deleted stack forever (unless the stack
is a mainStack).


Thanks Kevin. Can I just check what you mean by the above.  The 
support stacks I'm using are all in their own separate *.mc files and 
designated as 'mainstacks', and they all have destroy stack  window 
set.

How should I close them such that they fully disappear, but can be 
reopened at any time with either 'modeless path/stack.mc' type 
command - or any other sensible way of opening them?  I don't want to 
save anything in these support stacks - they are used for printing 
and displaying on-screen help.  They are outside the main stacks I'm 
developing so they can be shared between them rather than repeat them 
within each main CBT stack.

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Resend: Truncated Columnised Text?

2000-08-08 Thread Peter Reid

A script can't use the textheight to determine the width of a string.
Even with monspaced fonts, there is no relationship between the width of
the character letters and the textsize, and even worse, the textsize
will vary from font to font, and from platform to platform. Luckily
MetaCard has a "formattedwidth" property that lets the script determine
the actual width of a string in pixels.

This seems to work:

on insertItem theText, theField, theCol
   put "1,"  the tabstops of fld theField  comma  the width of fld
theField into theTabStops
   put (item theCol+1 of theTabStops) - (item theCol of theTabStops) 
into thePixelWidth
   set itemdelimiter to tab
   repeat for each char i in theText
 put i after temp
 put temp into item theCol of fld theField
 select item theCol of fld theField
 if the formattedwidth of the selectedchunk = thePixelWidth-10 then
-- 10 pixels for a margin; adjust
   delete last char of item theCol of fld theField
   exit repeat
 end if
   end repeat
end insertItem

This script assumes that the field has no tab stops that extend past its
right edge. If it does, you'll have to change the way the last column's
width is calculated. You'll also probably want to lock the screen while
this runs.

--
Jacqueline Landman Gay| [EMAIL PROTECTED]

Thanks Jacqueline, I'll give it a try.

Cheers
Peter
-- 
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Purging Open Stacks?

2000-08-08 Thread Peter Reid

On 8/8/00 4:01 pm, Peter Reid [EMAIL PROTECTED] wrote:

  Thanks Kevin. Can I just check what you mean by the above.  The
  support stacks I'm using are all in their own separate *.mc files and
  designated as 'mainstacks', and they all have destroy stack  window
  set.

If they are mainStacks and don't have any open substacks, then just closing
(or of course deleting!) them should do the trick.

With the 'close' command? If the user closes a stack by clicking into 
the window box, it leaves the stack in the state that leads to the 
purge dialog??

   How should I close them such that they fully disappear, but can be
  reopened at any time with either 'modeless path/stack.mc' type
  command - or any other sensible way of opening them?  I don't want to
  save anything in these support stacks - they are used for printing
  and displaying on-screen help.  They are outside the main stacks I'm
  developing so they can be shared between them rather than repeat them
  within each main CBT stack.

You should ask yourself if you really need to remove these stacks from
memory at all.  If you have enough and/or your needs are not that great, its
often best to leave stacks in memory after closing so they load faster next
time.

If I just let them stay in memory and then try opening them with 
'modeless', I get the purge message I was having trouble with.  How 
do I open a stack that may be in memory already or may not have been 
opened yet in a way such that I don't get the 'purge' dialog 
appearing?  Is the trick to close them in some special way, i.e. not 
by the user simply clicking on the close window box?

Cheers

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Purging Open Stacks?

2000-08-08 Thread Peter Reid

   With the 'close' command? If the user closes a stack by clicking into
  the window box, it leaves the stack in the state that leads to the
  purge dialog??

It shouldn't, at least if it's a main stack with no substacks and
you've set its destroyStack property to true.

Don't know how, but it happens!

  How should I close them such that they fully disappear, but can be
reopened at any time with either 'modeless path/stack.mc' type
command - or any other sensible way of opening them?  I don't want to
save anything in these support stacks - they are used for printing
and displaying on-screen help.  They are outside the main stacks I'm
developing so they can be shared between them rather than repeat them
within each main CBT stack.
  
  You should ask yourself if you really need to remove these stacks from
  memory at all.  If you have enough and/or your needs are not that 
great, its
  often best to leave stacks in memory after closing so they load faster next
  time.

  If I just let them stay in memory and then try opening them with
  'modeless', I get the purge message I was having trouble with.  How
  do I open a stack that may be in memory already or may not have been
  opened yet in a way such that I don't get the 'purge' dialog
  appearing?  Is the trick to close them in some special way, i.e. not
  by the user simply clicking on the close window box?

There's something else going on here: you should never get that dialog
if you just reopen the same stack, regardless of whether it is
retained in memory or not.  When you *do* get it is when you try to
open a stack that has the same name but a different file name.  The
most likely cause of this is using two different paths to get to the
stack (are you changing the directory property at any point?), but
setting the fileName property of the stack can also cause it, as can
downloading a stack via HTTP and then using "save as" to save it to
disk.

I have two CBT stacks in folders 'SafetyScreen' (containing cbt1)  
'SafetyAdmin' (containing cbt2).  At the same level in the file 
structure, I have an additional folder called 'SafetySupport' which 
contains support stacks - cbtHelp.mc, formprint.mc and certprint.mc. 
Both cbt stacks have the same addresses to the support stacks?!

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Purging Open Stacks? - GOT IT!

2000-08-08 Thread Peter Reid

   If I just let them stay in memory and then try opening them with
  'modeless', I get the purge message I was having trouble with.  How
  do I open a stack that may be in memory already or may not have been
  opened yet in a way such that I don't get the 'purge' dialog
  appearing?  Is the trick to close them in some special way, i.e. not
  by the user simply clicking on the close window box?

There's something else going on here: you should never get that dialog
if you just reopen the same stack, regardless of whether it is
retained in memory or not.  When you *do* get it is when you try to
open a stack that has the same name but a different file name.  The
most likely cause of this is using two different paths to get to the
stack (are you changing the directory property at any point?), but
setting the fileName property of the stack can also cause it, as can
downloading a stack via HTTP and then using "save as" to save it to
disk.
   Regards,
 Scott

Found the problem - in one case I was using a relative path and the 
other I was using an absolute path.  Even though both boiled down to 
the same thing, using them with the modeless command triggered the 
purge dialog.  Once I made sure that all references were converted 
into absolute paths (by converting any relative to absolute at 
run-time), the problem went away.

Once again, you were right Scott!

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Purging Open Stacks?

2000-08-07 Thread Peter Reid

I'm developing a CBT stack which shares a number of supporting stacks 
with other CBT stacks.  These supporting stacks are for things such 
as on-line help, print previews, etc.  They are independent main 
stacks opened using either "modeless" or "toplevel" (if they're 
already open but hidden from view).

Typically, I open such a support stack and then send and "init" 
message to it to cause it to configure itself for its current use 
(using global variables to pass initialisation values).

Each supporting stack has "destroy stack on close" and "destroy 
window on close" enabled so that they fully disappear (in theory) 
when closed.  However, despite this, whenever I attempt to reopen any 
of these supporting stacks I get an error message saying that I'm 
attempting to "Reload Stack" and do I want to "Save", "Purge" or 
"Cancel"!

In fact I can get this message 6 or more times in succession, 
irrespective of how I tell it to go away??

Can anyone suggest a reliable way of opening supporting mainstacks 
repeatedly without getting this error message?

Thanks for any help.

Peter
-- 

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Resend: Truncated Columnised Text?

2000-08-07 Thread Peter Reid

I didn't get any response to this one, so I'm trying again in case it 
was overlooked!

---

I'm trying to display information as pseudo tables in text field 
using MC2.3.1 on both Mac and Win.

I have created field with a set of tabStops and the horizontal and 
vertical grid liens are displayed.  The text in the field is in Arial 
12pt, plain, say.  What I'm trying to do is write a function that 
will truncate a chunk of text such that it is guaranteed to fit 
inside the available pixel width in any given column.

I need such a function as I want to be sure that any arbitrary text 
placed in a column will not overflow and cause content in the columns 
to the right to overflow.

The function I have developed so far is as follows:

function colTrimmed theText, theField, theCol
   put the tabStops of field theField into theTabs
   replace comma with tab in theTabs
   set itemDelimiter to tab
   put number of items in line 1 of field theField into maxCol
   if theCol = maxCol then
 put width of field theField - last item of theTabs into colWidthPixels
   else
 if theCol = 1 then
   put item theCol of theTabs - 1 into colWidthPixels
 else
   put item theCol of theTabs - item (theCol-1) of theTabs into 
colWidthPixels
 end if
   end if
   put colWidthPixels div (the effective textSize of field theField) 
into maxChar
   return char 1 to maxChar of theText
end colTrimmed

However, it always seems to be too conservative!  For example if the 
column can accommodate 20 chars (all "0"), it will produce a maximum 
width of 12 characters.

Any suggestions please?

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Truncated Columnised Text?

2000-08-04 Thread Peter Reid

I'm trying to display information as pseudo tables in text field 
using MC2.3.1 on both Mac and Win.

I have created field with a set of tabStops and the horizontal and 
vertical grid liens are displayed.  The text in the field is in Arial 
12pt, plain, say.  What I'm trying to do is write a function that 
will truncate a chunk of text such that it is guaranteed to fit 
inside the available pixel width in any given column.

I need such a function as I want to be sure that any arbitrary text 
placed in a colunm will not overflow and cause content in the columns 
to the right to overflow.

The function I have developed so far is as follows:

function colTrimmed theText, theField, theCol
   put the tabStops of field theField into theTabs
   replace comma with tab in theTabs
   set itemDelimiter to tab
   put number of items in line 1 of field theField into maxCol
   if theCol = maxCol then
 put width of field theField - last item of theTabs into colWidthPixels
   else
 if theCol = 1 then
   put item theCol of theTabs - 1 into colWidthPixels
 else
   put item theCol of theTabs - item (theCol-1) of theTabs into 
colWidthPixels
 end if
   end if
   put colWidthPixels div (the effective textSize of field theField) 
into maxChar
   return char 1 to maxChar of theText
end colTrimmed

However, it always seems to be too conservative!  For example if the 
column can accommodate 20 chars (all "0"), it will produce a maximum 
width of 12 characters.

Any suggestions please?

Cheers

Peter
-- 
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Metacard vs Flash

2000-08-02 Thread Peter Reid

If someone started debating the concept of using MC with "Why don't you just
do that in Flash" i.e. pushing Flash as a primary development environment
over MetaCard, what would be ten reasons you would give in response? I tried
Flash once (before Flash 4.0 came out) and it felt like someone had "hog
tied me" compared to the ease of working in XTalk and we decided not to
bother learning it. It seemed to me to be a useful animation program, if you
wanted to spend all that time and money to make people dizzy when they
opened their web page (just joking, I'm sure it has mature uses), but beyond
that too constrained an environment to build anything robust with any ease.
But I would like some points from the sages on this list to take to the
table. Thanks.

I'm sure others are doing the same, but I'm using Flash 4 to generate 
a series of 30 sec animated cartoons for the training points of a CBT 
package I'm developing in MetaCard.  Each animated sequence starts 
with a blue matt, fades into the sequence and then fades back to a 
blue matt with summary points in yellow text.  Also, every sequence 
has an accompanying voice-over.

I use "Sound Studio" on a Mac to record voice-overs in AIFF format 
(8bit, 22k, mono). I use QuickTime Player Pro to convert the Flash 
SWF file into a QT movie and add the voice-over (converted from AIFF 
to QT).  Producing QT movies this way gives the smallest file size 
for very good quality.  A typical 30 sec animated sequence at 8fps is 
about 750Kb in the form of a QuickTime movie file.  This compares 
extremely well with any form of real video.

A professional cartoonist provides me with graphical components in 
the form of Flash libraries.  I then produce animated sequences 
within Flash using these components.  I found it better to produce 
the voice-over outside Flash and use QuickTime Player to put the 
animation and voice-over together.  Also, QuickTime Player does a 
better job of generating QT movies than exporting from Flash 4.

I use MetaCard's player objects to deliver the animated sequences 
which the user chooses from a list of subjects.  The list of subjects 
and associated video clips are read from a text file at start-up, 
giving me the flexibility to change the subjects and animations by 
simply editing these text files.

I'm sure the above is a classic "grandma sucking eggs" thing, but I 
thought I'd throw in my own experience of combining Flash with 
MetaCard.

Cheers

Peter
-- 
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




MC Encryption?

2000-06-20 Thread Peter Reid

I've been looking at the Ask Dialog with a view of using a clone of 
it in my application.  However, I'd like to be able to present a 
traditional "change/set password" dialog where the user is asked to 
enter their current password and then type in their new password 
twice.  This means I'll need direct access to MC's encryption 
function.

I've checked the on-line help and can't find any reference to 
encryption in MC apart from stack the protection mechanism.  However, 
when I looked at the scripts of the Ask Dialog, I found the use of an 
undocumented function "mcencrypt()".  Does anyone know the details of 
this function, what it produces and how secure it is?  Also, is there 
an mcdecrypt() function or is the mechanism one-way only (a very 
common approach!)?

Cheers

Peter
-- 
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: MC Encryption?

2000-06-20 Thread Peter Reid

   I've checked the on-line help and can't find any reference to
  encryption in MC apart from stack the protection mechanism.  However,
  when I looked at the scripts of the Ask Dialog, I found the use of an
   undocumented function "mcencrypt()".  Does anyone know the details of
  this function, what it produces and how secure it is?  Also, is there
  an mcdecrypt() function or is the mechanism one-way only (a very
  common approach!)?

It should be fairly secure, but it is only one-way.

Regards,

Kevin

Thanks Kevin.  Is there anything else to know about the function 
"mcencrypt()" (as it's not documented) or just call it with a string 
and get a string returned?!

Cheers
Peter


-- 
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Horizontal scrolling of Tables

2000-05-31 Thread Peter Reid

I'm using a number of paired fields as tables with a thin field 
acting as the table headings and a body field holding the main 
content of a given table.  Most of the tables only need vertical 
scrolling.  However, some of these have content that is too wide for 
the available window space.  Therefor I'm grouping such a pair of 
fields and making the "titles" field scroll sideways whenever the 
main field is horizontally scrolled by the user.

The body field ("Table" say) uses the following key handler:

on scrollbarDrag
   set the hScroll of field (short name of me  "Title") to the hScroll of me
end scrollbarDrag

The titles field ("TableTitle" say) uses the following key handler:

on mouseUp
   lock screen
   set the hScroll of field replaceText(short name of me,"Title","") \
 to the hScroll of me
   unlock screen
end mouseUp

Both fields have identical tab stop settings and set to use 
horizontal scrollbars.  The body field overlays the scrollbar of the 
title field so it looks like a traditional table.

The problem I'm having is that if I have "columns" off to the right 
(outside the current visible area) and scroll the body field, it 
doesn't always scroll the title field which behaves as if it doesn't 
have entries for the missing columns.  It only seem to work fully 
when the currently visible columns exactly align with the right hand 
edge of the field.

I'm using MC2.3 (the released version not the beta) on the Mac  Win 
by the way.

Any ideas or suggestions please?!

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Urgent Solution Needed: Position in File

2000-05-03 Thread Peter Reid

What if the first data item in each record were a number whose
value is either:
- the offset of that record?
 (this doesn't support record deletions unless the file is
never compressed)
- the number of that record?
 (same limitation as above)

If you can live with the stated limitation, this would make it
easy enough to calculate your position in the file, as long as you
have a way of finding the start of the current (or a nearby)
record. Compression and renumbering could be done with index
rebuilding as part of scheduled file maintenance, I suppose.

Hope this helps. (Hope I didn't miss something obvious!)
Phil

Hi Phil,

I've started to try something similar, using the position recorded in 
an index file which contains the unique key field and locating the 
last entry.

A better partial solution has been provided by Tuviah Snyder, author 
of CrossWorld's excellent Externals Collection, which I've licensed. 
Tuviah has released to me a quick update to the Windows Externals to 
include a couple of functions that return file size and time  date 
of creation and last update.

On the Mac front, I have an old HyperCard/SuperCard XCMD collection 
which includes a single function that gives all the relevant details 
of a file with separate sizes for data and resource forks.  Tuviah is 
intending to add to the Mac collection the same functions he's popped 
into the Windows collection, so using the old XFCN is a temporary 
measure for my prototype development.

By the way, the old XCMD collection is called HyperExternals Pro and 
contains a very good set of XCMDs and XFCNs. It's a pity that it's 
Mac only as far as I can tell.  If you're interested, it seems to be 
available still through Royal Software (previously known as Heizer 
Software) on http://www.royalsoftware.com/.

Cheers
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Urgent Solution Needed: Position in File

2000-05-02 Thread Peter Reid

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

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

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

I'd have to keep track across sessions across time.  As this CBT is 
intended to be used by several hundred people sending results back to 
several dozen assessors, it would mean keeping such a counter in 
another file (with more lock control!).  What is frustrating is that 
it's likely that MetaCard probably has the information anyway 
(through stdio calls such as fstat etc.) as well as current position 
information?!

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

The problem I have is that I can't dictate the databases to be used 
in a corporate environment.  Also, unfortunately MetaCard doesn't 
integrate into standard cross platform multi-user databases and the 
Valentina development (mentioned on this list some time ago) isn't 
ready for Mac  Win use as yet.  This is why I want to keep it 
"in-house" by using MetaCard, which is being used for the main CBT 
anyway.  Ideally I'd use an XCMD/DLL solution which provided all the 
multi-user database facilities I needed - this is what Valentina is 
developing into, but not in my timescales!

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Urgent Solution Needed: Position in File

2000-05-02 Thread Peter Reid

  PLEASE does anyone have a solution or some externals that work Mac 
  Win that give basic file statistics (file size in bytes as a minimum,
  but other basic stats would be nice, e.g. time  date updated).  The
  lack of any obvious solution is a real potential SHOW STOPPER!


I think there are a lot of MetaCard compatible Mac externals which will
do this inluding AppleScript via the external collection. In Windows I
think shell() is the best way to go.

My worry is that I'd be dependent on correctly functioning 
AppleScript on Mac and  shell on Win, which adds more fragility to 
the situation!

Cheers
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Urgent Solution Needed: Position in File

2000-05-02 Thread Peter Reid

I'm a long way into the development of a database to support a CBT 
package.  The database consists of over 20 tables each with a number 
of indices.  These are implemented using a collection of text files, 
each of which has fixed length records (really variable length, but 
padded to be fixed length to facilitate in situ record updates). 
I've sorted out most aspects of how to get this to work, even using 
locking files to control multi-user access.

BUT, my big remaining problem is how to tell where I am in a file, 
especially if I've just added a record to the end of it.  I'm storing 
character offsets in separate index files so I can do rapid look-up. 
Thus, I need to record in an index the exact character offset from 
start of file of any new record.  As I add records to the end of 
files, this means that I'm writing using something like:

write newRec to file dataFile at end

HOWEVER, I can't then find out where in the file this new record is 
relative to the start of file and so I can't add an index entry into 
the associated index file.  Given that I know the length of every 
record, just knowing the full character length of the file would 
allow me to calculate the offset of the last record.  Ideally, I 
would like to ask "where am I now" after any read/write from/to a 
text file.

My data files could grow to up to 200Mb over the 5 year period I'm 
building for.  So I don't want to "read from start" simply to count 
the number of records in a file!!

PLEASE does anyone have a solution or some externals that work Mac  
Win that give basic file statistics (file size in bytes as a minimum, 
but other basic stats would be nice, e.g. time  date updated).  The 
lack of any obvious solution is a real potential SHOW STOPPER!

Thanks in advance for any help provided.

Cheers
Peter
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Urgent Solution Needed: Position in File

2000-05-02 Thread Peter Reid

On 2/5/00 3:12 pm, Peter Reid [EMAIL PROTECTED] wrote:

   I think there are a lot of MetaCard compatible Mac externals which will
   do this inluding AppleScript via the external collection. In Windows I
   think shell() is the best way to go.
  
   My worry is that I'd be dependent on correctly functioning
   AppleScript on Mac and  shell on Win, which adds more fragility to
   the situation!

AFAIK, shell() should work reliably without fragility on Windows.  On the
Mac, there *must* be any number of HC compatible XCMDs out there that return
this information.

Thanks for the advice.  I'll look amongst my stock of old HC/SC XCMDs 
for something for the Mac.  However, I'm struggling with Windows (how 
unusual??).

Under Windows 98, I've just tried a command such as:

put shell("dir c:\test.txt") into field "Info"

but I get no details!  If I do the following:

put shell("dir c:\test.txt  info.txt") into theResult

then I get the DIR output in the text file "info.txt".

Any idea how I can get file information directly into a field or 
variable without having to send it to another file first?!  Also, do 
you know if this works reliably with NT (there's some comment about 
changing to cmd.exe in NT in the MetaCard on-line help)?

Cheers
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Replacing with EOL Character

2000-04-27 Thread Peter Reid

Hi

I'm processing a large number of lines from a text file that are 
padded at the end of each line with a tab followed by a variable 
number of 'x', e.g.

data(tab)xx
data2(tab)x
data3(tab)xx

Whilst I can use a repeat loop to cycle through deleting the last 
item (using tab as the itemDelimiter), this is very slow.  If there 
were a fixed number of 'x' at the end then I'd simply use a replace 
command, e.g.

replace tab  "xxx" with "" in readBuffer

I thought about using the replaceText function which support regular 
expressions, but I can't see how I can show the tab and end-of-line 
(EOL) in the regex?  I would have tried:

put replaceText(readBuffer, "\txx*\n", "\n") into newBuffer

Any ideas how I might do this or perhaps another approach completely?

Cheers
Peter
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re: Replacing with EOL Character

2000-04-27 Thread Peter Reid

   Thanks Kevin - good idea.  I used the following code:
  
   -- with file data already in newInfo:
   set itemDelimiter to tab
   put empty into modInfo
   repeat for each line i in newInfo
   get i
   put item 1 to -2 of it  return after modInfo
   end repeat

You've an extra line in there:

repeat for each line i in newInfo
   put item 1 to -2 of i  return after modInfo
end if

I did that deliberately as I thought it might be quicker getting a 
line 1st and then extracting the items rather than doing it in-line. 
However, my testing seems to show no advantage for the extra line, so 
"KISS" wins (Keep It Simple Stupid!) and the extra line goes.

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Re:

2000-04-27 Thread Peter Reid

I am a Macintosh HyperCard/SuperCard developer who is considering 
MetaCard because of its cross-platform capabilities.

Suppose I produce a Macintosh standalone application with a 
Macintosh version of MetaCard. How do I convert that product to a 
Windows standalone? Do I need a Windows version of MetaCard? Do I 
have to use a WinTel computer?

It is possible to produce the Windows standalone without actually 
having Windows, but it is best to at least check it out afterwards. 
Your choice is either use a Windows PC or something like Virtual PC 
with Windows as required.  Mac-based MetaCard developers seem to use 
a mixture of these approaches.

As an ex HyperCard/SuperCard developer, I've found the move to 
MetaCard very worthwhile for a whole number of reasons, not the least 
of which is this superb list which never seems to fail to come up 
with solutions in record time!

The plus points for MetaCard are:

- excellent product, very stable
- very extensive range of capabilities
- very high level of cross-platform compatibility (I can vouch for Mac/Win)
- very rapid execution of stacks (using a Player) and standalones
- very responsive developer (MetaCard Corp)
- product actively being developed, not rotting on the shelf
- very flexible licensing - a single user needs a single licence that 
can be used across platforms by that single user - 1x cost for all 
platforms (unlike Director say which costs twice for both Mac and in)
- extremely helpful and responsive e-mail list

On the downside:

- development environment rather intimidating (new one under 
development through Xworlds should be a lot better)
- incomplete documentation, often making it hard to even guess what 
should be done (again, being addressed by MetaCard Corp and Xworlds)
- lack of "street credibility and knowledge" - too few people know 
what a great tool it is and so you end up having to sell it to your 
customers as a "good thing"

I had to gulp at the entry fee ($995 + $300 pa thereafter to keep up 
to date - half these costs if you're academic) as a single developer, 
but I must say it is good "value for money".  It took me sometime to 
justify in my mind the cost of a full licence, but having done so I 
don't regret it, I only wish I'd done so earlier!

Of course the above are just my humble opinions, I'm sure others on 
this list will chip in with more of even refute some of my criticisms!

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Position in File?

2000-04-27 Thread Peter Reid

Hi

I'm using a buffer to provide access to a large text file of up to 
200Mb in total.  The user can jump around the text file using buttons 
for next/prev group of records and start/end of file.  The problem I 
have is that I don't see how I can tell where I am in the file at any 
given point. There doesn't seem to be any command for determining the 
current read or write point in an open file.  Any suggestions please?

Cheers
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




UK Academic MC Developers/Users?

2000-04-19 Thread Peter Reid

Whilst I'm now a MetaCard convert, actively developing product for 
Win/Mac, my query now is related to my wife's work.  She is a 
Chemistry lecturer at the local university and is trying to move into 
"distance learning".  Her university are looking at implementing a 
range of computer-based/aided learning facilities as part of this. 
To date, they have done what little development so far using 
AuthorWare and this is the current "standard".  However, I'm keen to 
introduce them to MetaCard.  So, what I'm looking for from the list 
is the following:

1) good arguments regarding MetaCard vs AuthorWare

2) any UK academics who actively use MetaCard who'd be prepared to 
"speak up" for MetaCard's suitability in the UK academic arena

Please bear in mind the the university is currently trying to force 
Mac users to move to Windows NT (but meeting stiff rearguard 
action!), they use a mixture of HPUX and NT servers and have a 
variety of Unix workstations (Sun, CGI) in various pockets.  The 
computer service is trying to standardise on Windows NT for all 
undergraduate teaching to make support easier!  So a Windows-only 
solution wouldn't bother them.  However, as Mac users (with other 
friends and colleagues also being Mac and Unix workstation users), my 
wife and I would like to encourage a more cross-platform approach.

One potential "blinkered view" is the old chestnut of "browser 
plug-in vs player" argument.  This is a view I'm meeting in a number 
of quarters, not just at the local university - "can it run through a 
browser?".  Are we likely to see a MetaCard browser plug-in in the 
reasonably near future?

Cheers
Peter
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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




Multiple Access to Files?

2000-03-20 Thread Peter Reid

I'm developing a CBT package which needs to store user progress 
details on a central file server.  Various people might wish to look 
at such details whilst the master "database" is being updated.  I 
want to have a database consisting of several related files which are 
open for multiple-readers and a single-writer at the same time.  This 
is being developed for use under Win 95/98/NT and MacOS.

Can anyone tell me what the behaviour is of MC's file handling in 
such a situation?  In particular:

- does MC "lock" a file when opened so other programs cannot access it?
- can reader programs see a consistent view of a file that is being 
updated or will they see garbage?

I'm trying to implement a database using a collection of files linked 
through "key fields" such as EmployeeNumber, LocationCode, etc. 
Ideally, I would do random access lookup of keyed items.  Is there 
any simple way of doing this with MC's file handling, only it looks 
"sequential only" to me.  Even the "seek" seems to be "rapid 
sequential" and dependent on using fixed length "records" for the 
purposes I have in mind.

Any thoughts or suggestions gratefully received!

Cheers
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Sending E-mail from MC?

2000-03-14 Thread Peter Reid

Sorry if this is obvious, but is there a simple way of sending e-mail 
from MC2.3g under Windows (preferably Mac as well, but less vital). 
I'm writing a CBT where the end results are to be e-mailed to a 
central coordinator if possible.  Given that this could be on any Win 
95/98/NT (2000?) system, do I need to know the details of actual 
e-mail/browser packages or can I send a general mail protocol message 
that ill use whatever e-mail system is supported?

Cheers
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Portable Mouse Movement?

2000-03-05 Thread Peter Reid

On Sat, 4 Mar 2000 10:36:51 +, [EMAIL PROTECTED] wrote:

In the case of the CBTs I'm currently developing, I'm using the mouse
movement to show the user what they would do with the mouse when
using a particular feature of a software system.  Such "simulations",
if they are to be realistic, must appear to use the same controls as
in the live system.  In this case, I think it is legitimate to move
the mouse despite Apple's thoughts on the matter!

Peter,

I've done this kind of simulation in my CBTs, but instead of moving the
actual cursor, I hide the cursor and move an image that looks like the
cursor. I would think that this strategy would work equally well in all
environments.

Regards,
Marni

Marni,

I think you're right, I was beginning to think of moving to the same 
approach. The main thing that stops me is inertia and effort 
retrofitting the approach to the developments so far!

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Portable Mouse Movement?

2000-03-03 Thread Peter Reid

I'm moving the mouse under script control as part of several CBT 
developments suing MC 2.2.5 and MC 2.3 for Mac and Win 98/NT. (I'm 
using two different versions because the earlier one is installed 
across a customer's corporate network and I can't get them to upgrade 
this for the time being!  I'm using the latest version for new 
developments for other customers). The idea is that the mouse is used 
to draw the user's attention to different parts of the screen.

So far, this mouse movement has worked fine on various Macs and PCs. 
However, I now find that it doesn't work on my PowerBook G3/333 
"Bronze" - the mouse just sits in one location!  My desktop Mac (a 
G3/300 uprated clone) and my PowerBook both run MacOS 8.6, have the 
same amount of RAM (128Mb), and identical copies of the MetaCard 
"Player" (I've copied from one system to the other to be sure).  I've 
tried both MC 2.2.5 and MC 2.3 gamma.  Both versions work fine with 
my desktop Mac (and with my laptop Win 98 PC), but not my PowerBook???

The following is the code I'm using for scripted mouse movement:

on moveMouse fromLoc,toLoc,inSteps,moveDelayTicks
   put absLoc(fromLoc) into absFrom
   put absLoc(toLoc) into absTo
   put (item 1 of absTo - item 1 of absFrom) div inSteps into xInc
   put (item 2 of absTo - item 2 of absFrom) div inSteps into yInc
   put item 1 of absFrom into x
   put item 2 of absFrom into y
   set the screenMouseLoc to absFrom
   repeat with i = 1 to inSteps
 add xInc to x
 add yInc to y
 set the screenMouseLoc to x,y
 wait moveDelayTicks ticks
   end repeat
   set the screenMouseLoc to absTo
end moveMouse

function absLoc relLoc
   get the topLeft of this stack
   put item 1 of it into stackX
   put item 2 of it into stackY
   put item 1 of relLoc + stackX into absX
   put item 2 of relLoc + stackY into absY
   return absX  comma  absY into theLoc
end absLoc

Any ideas why this doesn't work on a PowerBook when it does on a 
variety of other systems?

Cheers
Peter
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Portable Mouse Movement?

2000-03-03 Thread Peter Reid


Well, here on my G3 333 minitower (last of the beiges!) , it doesn't 
work.  I remember trying it awhile ago, and it worked fine.  That 
was when I was running 8.1.
I now have Mac OS 9 (believe me, if you're running pre 8.5, get 
it... it's great!) , and it doesn't work worth beans.  I am using a 
third party (macally) ADB mouse, but I highly doubt that's it.  The 
problem is mac os 9 specific, I'm sure.
I believe there's something about Mac OS 9 taking away quite a few 
functions of QuickDraw, one including the ability to delay the 
updating of a window.  However, apps that do that will just crash 
instantly in 9... maybe you wanna check if that's anywhere in there 
scott, eh?  :)

   Regards,
 Scott

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

You're probably thinking the same as me... you guys would know the 
actual code problems, I suppose... if not, talk to the apple.


Not sure it's a MacOS 9 thing, my experience is:

- desktop G3/300 running MacOS 8.6 - OK
- PowerBook G3/333 running MacOS 8.6 - FAIL
- iMac 350 running MacOS 9 - OK
- PC running Win 98 - OK

So, not necessarily MacOS 9?!

Cheers
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Controlling Audio Clips?

2000-03-01 Thread Peter Reid

In a similar vein to my query regarding GIF control, any thoughts on 
controlling the playback of an audio clip without using a "player"?

I can see how I can start  stop an audio clip, but not how to pause 
and resume it.  Also, I can't see how I can get the length of an 
audio clip or set it's position to some arbitrary point in the clip. 
Are there any audio commands equivalent to the video commands 
currentFrame, frameCount, palindromeFrames, repeatCount which Scott 
Rossi mentioned?

Does the "player" object ALWAYS use QuickTime even when it is playing 
a sound clip or an animated GIF.  Is there no way to use a "player" 
object without QuickTime?

As ever, thanks for your patience and any help.

Best regards
Peter
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Controlling GIF Animations?

2000-03-01 Thread Peter Reid

Recently, Peter Reid wrote:

   Can anyone tell me ho it might be possible to run an animated GIF
   file in MC with some measure of control WITHOUT using a player object
   (which relies on having QuickTime available I believe).

Just import it (via the file menu), or set the fileName of a new image
object to the directory path of your animation file.


   I'd like to be able to start and stop GIF animations, know how far
   through a sequence one is, how many frames etc.

See the MetaTalk Reference index under:

currentFrame
frameCount
palindromeFrames
repeatCount

Regards,

Scott

Thanks Scott, I thought I was missing something obvious (again)!

I have discovered an added problem.  I have a large animated GIF of 
2.5Mb which plays fine as long as I keep it external (a good idea 
anyway!).  However, when I try to run an optimised version of the 
same thing MC crashes freezing my Mac!  The original animated GIF was 
built using GIFBuilder, which was also used to produce the optimised 
version (only 750k).  The optimisation involves the use of 
"betweened" frames instead of whole frames, i.e. each successive 
frame is sized to include an overlay sufficient to update the 
previous frame.

The problem is that GIFbuilder adds some frames that are 1x1 pixels 
in size located at (0,0) and it is the presence of these tiny frames 
that cause MC to freeze! Removing these frames removes the problem. 
Another tip is to avoid using the "P" (restore to previous) frame 
disposal method as it doesn't really work with MC, stick to "N" (do 
not dispose) which works fine.

Cheers
Peter

PS this is all using MC 2.3 gamma on a Mac running MacOS 8.6

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Controlling Audio Clips?

2000-03-01 Thread Peter Reid

   In a similar vein to my query regarding GIF control, any thoughts on
   controlling the playback of an audio clip without using a "player"?
  
   I can see how I can start  stop an audio clip, but not how to pause
   and resume it.  Also, I can't see how I can get the length of an
   audio clip or set it's position to some arbitrary point in the clip.
   Are there any audio commands equivalent to the video commands
   currentFrame, frameCount, palindromeFrames, repeatCount which Scott
   Rossi mentioned?

Nope, nor is there even any way to pause and resume.

OK, looks like it'll have to be player objects then!

   Does the "player" object ALWAYS use QuickTime even when it is playing
   a sound clip or an animated GIF.  Is there no way to use a "player"
   object without QuickTime?

The player object will use VfW if QT is not available, but there is no
way to force it to do this if QT *is* available (yet).

The main problem is having to provide more detailed coding for those 
poor souls who won't/can't use QuickTime on their PCs.

I'm developing a series of CBT packages that'll use animated cartoons 
(GIFs with voice-overs) for illustration rather than video clips to 
keep the file sizes down for use across corporate networks.  However, 
to cater for those users who can't use sound, I have to provide pop 
up caption boxes to give a textual equivalent to the voice-overs. 
Coordinating animation with sound and pop-up cations calls for quite 
fine control over the pause/resume etc!  This is why I need as much 
control as possible from player objects, even if they are using VfW 
instead of QuickTime.

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Controlling GIF Animations?

2000-03-01 Thread Peter Reid

   I have discovered an added problem.  I have a large animated GIF of
   2.5Mb which plays fine as long as I keep it external (a good idea
   anyway!).  However, when I try to run an optimised version of the
   same thing MC crashes freezing my Mac!  The original animated GIF was
   built using GIFBuilder, which was also used to produce the optimised
   version (only 750k).  The optimisation involves the use of
   "betweened" frames instead of whole frames, i.e. each successive
   frame is sized to include an overlay sufficient to update the
   previous frame.

Please send me one of those images.  Can't guarantee that we can make
it look right, but at least it shouldn't crash!

I'm sending an example off list (it's a bit big at 750k!).

   The problem is that GIFbuilder adds some frames that are 1x1 pixels
   in size located at (0,0) and it is the presence of these tiny frames
   that cause MC to freeze! Removing these frames removes the problem.
   Another tip is to avoid using the "P" (restore to previous) frame
   disposal method as it doesn't really work with MC, stick to "N" (do
   not dispose) which works fine.

You might try the constantMask property, which disables the mask
feature of GIFs.  There are lots of hacks that some of those GIF
exporting programs use in order to produce small files, most of which
result in images that don't work right except in browser windows (no
backgrounds, no buffering, no moving, no overlaying on or under other
objects, etc.).  constantMask gets around one of these hacks, although
it does mean you give up the ability to do any of the above.

I'll experiment with the constantMask property as you suggest.

Thanks.

Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Controlling GIF Animations?

2000-02-29 Thread Peter Reid

Can anyone tell me ho it might be possible to run an animated GIF 
file in MC with some measure of control WITHOUT using a player object 
(which relies on having QuickTime available I believe).

I'd like to be able to start and stop GIF animations, know how far 
through a sequence one is, how many frames etc.  From what I can 
tell, this seems to be possible only when using QuickTime enabled 
player objects.

As ever, I know the benefits of QT, but I can't guarantee my 
customers will agree!

Thanks for any help.

Best regards
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



RE: Tables/ fields

2000-02-17 Thread Peter Reid

For sortable colum/table widget, here is a solution:
1. Create a field
2. In the field's properties dialog box:
   Set the hGrid and vGrid to true
   Enter tab stops in the Tabstops field
 (50,90,130,170 as example)
3. Enter information in the field one row at a time, by hitting tab key
   for each colum in a row.  Hit return key when you come to the end of
   row.  Cursor takes you to the next row in the field
4. Put a button above or below each column
5. Script for sorting the field by colum in each button will be:

   sort lines of field "myField" by word 1 of each
 (sort each line/row by first colum)


or

   sort lines of field "myFidle" by word 3 of each
 (sort each line/row by 3rd colum)

You can also set the itemDelimiter to "tab" and sort by items if your
items must be able to have spaces in them.

Blair Moxon

I've used the sorting and it works well - as you say you can use tab 
delimited material as well.

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Associative Arrays?

2000-02-17 Thread Peter Reid

There's an example similar to what you need to do in the Examples
stack (card 6).

The best way to do this depends mostly on how often you need to search
that data.  If only occasionally, you're probably better off just
keeping the data in a custom property and using offset() or
lineOffset() to do the lookups.  Using associative arrays is mostly
useful if you have to do a lot of lookups quickly, or if the data is
compressed in the process of indexing (as in the word-count example).
Arrays, like fields, are relatively inefficient at storing large
amounts of textual data because it expands some when stored this way.
   Regards,
 Scott

There is also an example of importing a file and splitting it into an array
on our web site, the article "Text Management" - go down to the heading
"Splitting up large amounts of data to perform text matching operations".

Regards,

Kevin

Thanks Scott  Kevin - I'll look at both to see what I can do with 
associative arrays.

Cheers
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Tables/ fields

2000-02-17 Thread Peter Reid

At the moment, this kind of thing can just about be done, but it requires
complex and painful scripting.  I believe there are one or two example
stacks where people have tried varying different ways to produce a table
like this, check out the contributors section to see if anything does what
you need.  Improving field features is certainly under consideration for
2.4.

Regards,

Kevin

I've managed to do within-column wrapping by using a hidden 
additional field ('temp' say).  I size this to the pixel width of a 
column and lay the text into this temp field.  Then I get the 
'formattedText' of this field which has hard line returns in it and 
place this into the target field.

The following handler returns hard wrapped lines of text (Note: it 
assumes the target field uses same font metrics as the temp field, 
otherwise you'd have to pass and set textFont, textSize, textStyle, 
etc. within the handler):

   function wrappedText theText, pixelWidth
 put theText into field "Temp"
 set the width of field "Temp" to pixelWidth
 return the formattedText of field "Temp"
   end wrappedText

You can calculate the 'pixelWidth' of a column as follows (I make it 
slightly smaller than it really is to make the text wrap avoid going 
too close to the column margin):

   put the tabStops of field tableField into theTabs
   set the itemDelimiter to comma
   put item 2 of theTabs - item 1 of theTabs - 10 into col1Width
   put item 3 of theTabs - item 2 of theTabs - 10 into col2Width
   # etc.

Placing variable length wrapped text in a 'table' together with other 
material can be a bit challenging, but the following script snippet 
shows how I did it (I assume that I have a sourceText variable that 
contains table 'rows' as lines, with each 'column' value separated 
from the next by a tab):

   set itemDelimiter to tab
   put 1 into tableLine
   repeat for each line i in sourceText
 # put non-wrapping stuff in first:
 put item 1 of i into item 1 of line tableLine of field tableField
 put item 4 of i into item 4 of line tableLine of field tableField
 # generate wrapped text:
 put wrappedText(item 2 of i,col2Width) into col2
 put wrappedText(item 3 of i,col3Width) into col3
 # work out max depth of wrapping columns:
 put max(number of lines in col2,number of lines in col3) into maxLine
 # now place wrapped fragments into the columns:
 repeat with k = 1 to maxLine
   put line k of col2 into col2Fragment
   if col2Fragment is not empty then \
  put col2Fragment into item 2 of line tableLine of field tableField
   put line k of col3 into col3Fragment
   if col3Fragment is not empty then \
  put col3Fragment into item 3 of line tableLine of field tableField
   add 1 to tableLine
 end repeat
   end repeat

By way of a 'bonus', the following handler returns the number of the 
column of a 'table' clicked by the user - quite useful for using 
'switch' within the table's mouseUp handler:

   function clickColumn clickPixel, theTabs
 set itemDelimiter to comma
 put 1 into theColumn
 repeat with t = (number of items in theTabs - 1) down to 1
   if clickPixel = (item t of theTabs) then
 put t + 1 into theColumn
 exit repeat
   end if
 end repeat
 return theColumn
 set itemDelimiter to tab
   end clickColumn

You can determine the 'clickPixel' of a field and then convert this 
into the clicked column as follows:

   put clickH() - left of me into theClickPixel
   put clickColumn(theClickPixel, the tabStops of me) into theClickedColumn

I wouldn't like to claim the above is the most elegant or efficient 
way of producing wrapping tables, but it does work!

Cheers
Peter

PS Sorry if this is contribution is a bit long!

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Blank Images from Disk (Mac MC2.3g)

2000-02-15 Thread Peter Reid

   From: Peter Reid [EMAIL PROTECTED]
   Subject: Blank Images from Disk (Mac MC2.3g)?
   Date: Mon, 14 Feb 2000 11:58:16 +
   MIME-Version: 1.0
   Content-Type: text/plain; charset="us-ascii" ; format="flowed"
  
   I'm trying to load various images that make up the screen design of
   my stack directly from disk files rather than have them embedded.
   However, if I use something like the following:
  
   set the fileName of image "MainTitle" to "/MacHD/Images/title.gif"
  
   I just get blank filled rectangles instead of the images themselves.
   If I select the same file from within the MetaCard development
   environment, it displays correctly.  I've even looked at the source
   code in this part of the development environment and can't see where
   it's doing anything different to me, but my code simply doesn't work?!
  
   Any suggestions please, this is driving me nuts!

Just call me stoopid!!

I was using relative file locations and a control file to set up 
various folder offsets.  However, I'd forgotten to declare one of the 
sub paths as a global and so it had an empty value at the point where 
it was being used to access the images!

Sorry to have bothered the list with my stupidity!!

Cheers
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Blank Images from Disk (Mac MC2.3g)?

2000-02-14 Thread Peter Reid

I'm trying to load various images that make up the screen design of 
my stack directly from disk files rather than have them embedded. 
However, if I use something like the following:

set the fileName of image "MainTitle" to "/MacHD/Images/title.gif"

I just get blank filled rectangles instead of the images themselves. 
If I select the same file from within the MetaCard development 
environment, it displays correctly.  I've even looked at the source 
code in this part of the development environment and can't see where 
it's doing anything different to me, but my code simply doesn't work?!

Any suggestions please, this is driving me nuts!

Cheers
Peter
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Blank Images from Disk (Mac MC2.3g)?

2000-02-14 Thread Peter Reid

At 11:58 AM + 14/2/2000, Peter Reid wrote:
I'm trying to load various images that make up the screen design of
my stack directly from disk files rather than have them embedded.
However, if I use something like the following:

  set the fileName of image "MainTitle" to "/MacHD/Images/title.gif"

I just get blank filled rectangles instead of the images themselves.
If I select the same file from within the MetaCard development
environment, it displays correctly.  I've even looked at the source
code in this part of the development environment and can't see where
it's doing anything different to me, but my code simply doesn't work?!

Hi Peter

Try the file path without the leading forward slash:

   set the fileName of image "MainTitle" to "MacHD/Images/title.gif"

Cheers
Dave Cragg

Tried it, no difference!

By the way, if I use the development environment to select the file, 
it specifies the filename with a leading "/".  So, I'm fairly sure 
that the path should start with a leading "/" anyway!

Thanks anyway.
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Blank Images from Disk (Mac MC2.3g)?

2000-02-14 Thread Peter Reid

Tried it, no difference!

By the way, if I use the development environment to select the file,
it specifies the filename with a leading "/".  So, I'm fairly sure
that the path should start with a leading "/" anyway!

Thanks anyway.
Peter

Sorry about that useless piece of help. :)

If it's of any use, your script works fine on my Mac (MC 2.3g). I 
bet that makes you feel good. :)

Cheers
Dave Cragg

Thanks for the feedback - always welcome even if it doesn't provide a 
solution ;)

I wonder what's causing things to go wrong on my system???

Cheers
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



MetaCard for MachTen Unix?

2000-02-09 Thread Peter Reid

Currently I don't develop for Unix delivery, only Mac  Win. 
However, I'd be keen to experiment and develop the facility, but only 
have MachTen Unix on my Mac.  MachTen comes from the same origins as 
MacOS X and will likely disappear once MacOS X is widely available. 
In the meantime, MachTen is the only Unix I have and I'd wondered 
whether anyone has tried running MetaCard under it?

(MachTen is based on Berkely's Mach development and comes with the 
usual Unix collection of facilities and includes the X11 window 
system as well).

Cheers
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Synchronising Animated GIF with Voice?

2000-02-07 Thread Peter Reid

I'm thinking of using some animated GIF's in a CBT (actually animated 
cartoons to illustrate various things).  I'd like to be able to play 
a voice-over that synchronises with the GIF.  In addition, I'd like 
to be able to tell how far through an animated GIF I am at any time 
so I can pop up captions as and when needed.  The GIF's would only 
cycle once, i.e. play from start to end with no repetition.

Any thoughts, suggestions, warnings please?!

Cheers
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: VfW Playback using MCISendString?

2000-02-07 Thread Peter Reid

On Wed, 2 Feb 2000, Peter Reid wrote:

   Since I don't seem to be able to playback AVI files under VfW using
   MC 2.3Gamma, can anyone tell me how I might be able to control AVI
   playing using the MCISendString function?

Anyone else have this problem?  Playback of AVI files using the
built-in VfW features works fine here.  Of course you don't get the
same capabilities you get with QT (e.g., no controller, no selections,
and no alwaysBuffer)
   Regards,
 Scott

I've discovered that the problem seems to be if I set the 
"lockLocation" of the player to true:

- when the player lockLocation is true, the sound plays, but no video,

- when the player lockLocation is false, the sound and video play.

I checked this behaviour with the latest MC2.3 Gamma (downloaded over 
the weekend).

Cheers
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Sound-only Playing VfW using MC2.3Gamma?

2000-02-01 Thread Peter Reid

I've been using QuickTime to play back video clips on a Win 98 system 
using MetaCard 2.3Gamma. This has worked fine.  However, when I 
uninstalled QT and tried the same stack using VfW I've hit a problem. 
When I try playing a video clip I hear the sound track but don't see 
the video track at all, not even an empty frame.  Also, I can't 
control the playLoudness of the sound playing. If I use the Win Media 
Player, then the video clips play back fine with control over the 
sound playback volume.  So I know it's not that the Win system 
doesn't have the CODECs for the video clips.

Given my need to support "vanilla" Win users (whatever my preference 
for QT), this is a show-stopper!

Anyone got any suggestions please!

Cheers
Peter
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 75876
UK Mobile: 0378 632533
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.demon.co.uk

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



Re: Win 98 QT Freeze?

2000-01-24 Thread Peter Reid

When looking for bugs related to display on a Windows 98 system, the
place to start is in the screen drivers, most of which are obscenely
buggy.  The fact that you get a total system lockup is even better
evidence because neither QT nor MetaCard should be able to cause this,
whereas it's a hallmark characteristic of a driver bug.

So, make sure you've got the latest drivers for that graphics card,
try turning off acceleration in the "Display" and/or "System" control
panels, and if all else fails, try swapping the graphics card with
another brand or model.
   Regards,
 Scott

Thanks for the rapid response - I'll start with trying to turn off 
acceleration.  Unfortunately, with laptops, changing the display card 
is rarely an option.  At best, you might get newer drivers - with a 
fresh batch of bugs!

Cheers
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



PlayLoudness of Video Clips?

2000-01-20 Thread Peter Reid

I'm using a player object under MC2.3b3/gamma to show videoClips and 
I've set up a scrollBar to control the playLoudness of the videoClip. 
This works fine on the Mac, but has not effect under Win 98?

The PC has QT4.02 installed as well as VfW.  The videoClips are AVI 
with sound that is either muLaw2:1 or 16bit Little Endian.  Both 
types of video clip play sound ok using either QT or Media Player on 
the PC and both play ok under MC2.3, it's just that I can't control 
the playback volume in MC2.3 using playLoundess. If I show the 
controller for the player instead of using my own controls, its 
volume control works fine.  So it seems that the audio track of a 
video clip is treated as an audio clip on the Mac (playLoudess works 
ok), but not on the PC (playLoudness has no effect).

Whilst the current test PC has QT, some of my client's machine will 
only have VfW, which is why I'm not using the video controller (not 
supported by VfW, only QT), but implementing my own controls instead.

Any ideas?  Any workarounds?

A quick response would be appreciated as I'm right up against a 
deadline and suddenly found a feature that works on my development 
system (Mac), but not on my deployment system (PC)!

Thanks
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
UK Mobile: 0378 632533
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.demon.co.uk

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



Scale Style Vertical vs Horizontal

2000-01-11 Thread Peter Reid

I'm trying to create a vertical scale button in MC 2.3B3 on a Mac. If 
I size it so that it displays horizontally, then I get a thin 
horizontal rectangle with a downward pointing arrowhead symbol across 
the rectangle.  However, if I resize the scale button so that it 
displays vertically, I end up with a vertical rectangle box that 
contains a slider rectangle instead?!  I'd like to have a vertical 
scale that looks like a horizontal scale on its side - how do I do 
this?

Thanks for any help.
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Scale Style Vertical vs Horizontal

2000-01-11 Thread Peter Reid

   I'm trying to create a vertical scale button in MC 2.3B3 on a Mac. If
   I size it so that it displays horizontally, then I get a thin
   horizontal rectangle with a downward pointing arrowhead symbol across
   the rectangle.  However, if I resize the scale button so that it
   displays vertically, I end up with a vertical rectangle box that
   contains a slider rectangle instead?!  I'd like to have a vertical
   scale that looks like a horizontal scale on its side - how do I do
   this?

Unfortunately this is not supported.  Your choices are horizontal or
Motif look and feel.  But this limitation should be documented in the
README, which I'll bug report.  And, yes, this is already on the
feature-request list for the 2.4 release...
   Regards,
 Scott

OK, at least I know I haven't been stupid (on this occasion!) and 
missed something obvious!

Cheers
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



Re: Support for Windows Video in MC 2.3?

2000-01-10 Thread Peter Reid

   If 'timescale' isn't supported, what units is 'duration' in?

Looks like milliseconds...

OK, thanks

   So I can create my own controller with pause, stop and start and use
   the 'formattedWidth' and 'formattedHeight' together with 'scale' to
   control the size of the playback frame.  Can I set the 'currentTime'
   to effect a forward/reverse effect?

Yes.

Fine.

Thanks again,
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

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



QuickTime 4 Messages

2000-01-09 Thread Peter Reid

Can someone give details of the messages that a player object (for 
QT4 movies) will receive and which functions return sensible results 
for MC 2.3B3.

I'm experimenting with the level of control possible with QuickTime 4 
movies. If possible, I'd like to know that the user has paused a 
movie and clicked on it at a particular location.  This would allow 
me to show some form of highlight graphic, superimposed over the top 
of the player object.

I'm trying to develop some training material where the user is 
expected to watch a QT4 movie and stop it when they see something of 
significance.  Once stopped, I'd like to ask them to click on 
something within the stopped frame and sense whether they clicked on 
the right thing or not.

Also, does a player object receive the mouseUp event when clicked 
anywhere other than the control bar.  This would allow me to get the 
user to stop the playback by simply clicking anywhere in the playback 
frame rather than on the pause button in the control bar.

Thanks for any help.
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

PLEASE NOTE NEW FAX NUMBER FROM 12/12/1999

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



Win NT Network MC Issues?

1999-12-21 Thread Peter Reid

Hi

I'm considering developing some educational material for deployment 
on networks such as those based on NT Server and NT Workstations. 
Are there any issues related to installing either a standalone exe 
built with MC or with a server mounted copy of the Player and a 
series of MC stacks?  Can multiple workstations run the Player from a 
Server and similarly can multiple workstations run a standalone on a 
Server?

Thanks for any input.

Cheers
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

PLEASE NOTE NEW FAX NUMBER FROM 12/12/1999

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



Re: Scrollable Window/Stack?

1999-12-10 Thread Peter Reid

If you use the "built-in" scrollbars for  the group, you won't have 
to worry about setting any scrollbar properties. You can set 
horizontal and vertical scrollbars for groups in the group 
properties palette.

Thanks I discovered this after I sent my last plea for help - it 
certainly makes life easier!

Here's a suggestion (it still requires some struggling).

First create a graphic rectangle and set its width and height to the 
likely maximum width and height of the group. These are the overall 
dimensions, not the visible height and width. (You can adjust this 
later after editing.)

Make a group from the rectangle. Set the scrollbar properties.

Set the width and height properties for the group. These will be the 
visible dimensions of the group. Position the group where you want 
it. Set the lockLocation property to true. (If you don't do this, 
the group will resize to its full size (formattedHeight and 
formattedWidth) whenever you edit it. Not pleasant!

When you edit a group, its scrollbars won't be visible while in 
editing mode. So first you need to scroll to the position you want 
to edit, then go into editing mode. When you need to edit in a non 
visible location, you need to come out of editing mode, adjust the 
scroll, and go back in again.

When you've finished the editing, hide the rectangle. This will 
force the group to shrink to the overall dimensions of the objects 
in the group.

Let me know if you find an easier way to do this. :)

In general, I prefer to get all the objects I need into a group 
first, and then set the various sizes and locations afterwards by 
script.

Cheers
Dave Cragg

I like the idea of the big rectangle to establish the right sized 
group.  I did something similar (but less elegant) by having a large 
text field that I moved down the group to make space as I added more 
element to the 'page'.  Once I'd arranged all the elements as I 
wanted them I threw away the text field.

I couldn't find a better way than your or my method, so unless one of 
the real MC experts tells us differently, it looks like this approach 
might be the only way.

I was surprised that MC stacks/windows can't have scrollbars and the 
vScroll property.  I've used this feature in SuperCard, HyperCard and 
ToolBook developments.  This is why I tried to use a 'sub-window' 
approach initially.

Thanks again for the help.
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Scrollable Window/Stack?

1999-12-10 Thread Peter Reid

On Fri, 10 Dec 1999, Peter Reid wrote:

(big snip)

   I was surprised that MC stacks/windows can't have scrollbars and the
   vScroll property.  I've used this feature in SuperCard, HyperCard and
   ToolBook developments.  This is why I tried to use a 'sub-window'
   approach initially.

This has been discussed (ad nauseum) on this list in the past, but you
really already discovered the key issue in the diagram you posted to
the list: if you want to have a menubar and toolbar and status bar in
the window along with the scrollable area, the
HyperCard/SuperCard/ToolBook design of making the whole window scroll
is essentially useless.  Only the MetaCard way of having independent
scrolling groups does what you need, even though it's a little more
difficult to set up.
   Regards,
 Scott

As a relatively new user of MC I wasn't aware of the previous 
discussions on this subject, otherwise I'd have saved myself some 
scrambling around in the dark!

You're absolutely right that the HyperCard/SuperCard/ToolBook 
approach provides its own level of pain.

What would make life easier would be the option to scroll the window 
whilst editing a background/group so you don't need to keep switching 
between edit and run mode just to move up or down a bit.

Cheers
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Scrollable Window/Stack?

1999-12-10 Thread Peter Reid

  What would make life easier would be the option to scroll the window
  whilst editing a background/group so you don't need to keep switching
  between edit and run mode just to move up or down a bit.

It might help you to know that you can edit a group without ungrouping first.
Choose Preferences submenu and in Layout select Grouped Controls - you have
access to edit all objects in a group, though you must be in edit mode.

Regrds, Andu

Thanks Andu.

I did realise you could do that and have been using the facility you 
mention.  The problem comes when you have an 'oversize' group that 
scrolls in browse mode.  This requires you to flip between edit  
browse mode to work on the different parts of the oversized group - 
using edit mode to make changes and browse mode to scroll to a 
different part of the group.

Cheers
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Scrollable Window/Stack?

1999-12-09 Thread Peter Reid

I'm trying to simulate Netscape in a CBT package.  What I'd like to 
do is have a 'frame' stack which contains the Netscape button bars 
and edges with an inner stack that contains the Netscape page.  I've 
worked out how to keep the page stack above the frame stack and how 
to size it to fit precisely within the frame stack.  However, I 
haven't figured out how I can have a scrollable window/stack?

I want the 'page' to be a pseudo Netscape form with labels, buttons, 
fields etc. that is larger than the frame and so it'll require a 
scrollbar.  IS there some simple obvious way of doing this by turning 
on a "scrollable" property for the stack/card, or do I have to add a 
scrollbar object and script it to scroll the stack/card?

Thanks
Peter
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Shared Text and Shared Scripts

1999-12-09 Thread Peter Reid

I've had a play around with this, but could do with some assistance. 
I think the answer is quite simple.

I've got a 12 card stack with a  background. The background contains 
a field with the 'Shared Text' property unchecked. This means that 
when I run my script (which repeats from 1 to 12 and sets the 
contents of the relevant field to that number) it works fine.

I've got another script which is meant to set the script of each 
field. I read in a separate field which contains the script and 
replace a known variable with the number of the card.

This is then meant to set the script of each field to something like

on mouseup
   go cd 3 of wd "Day"
end mouseup

where the number is replaced by the number of the card.

The problem is that unlike the "Shared Text" property the script for 
each field reads

on mouseup
   go cd 12 of wd "Day"
end mouseup

ie its setting the script of each field to the last script in the loop.

This is a simplified explanation of a larger project. I guess I 
could create 'foreground' fields for each card but when I do that 
(due to the large number of fields on a card) the 'set up script' 
loop takes an age.

So, is there anyway to define different scripts to background fields 
? Or is the whole point that you can't or shouldn't ?

TIA

Gary Rathbone
Hooknet


I'd be tempted to have a single generic script for all the fields. If 
each card contains a field which has a unique card number in it 
(assuming I understand you correctly), then simply use this value 
within the field scripts:

on mouseUp
   go cd (field "CardNo") of wd "Day"
end mouseUp

Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Scrollable Window/Stack?

1999-12-09 Thread Peter Reid

I seem to be having some problems using MC 2.2.5 with a Mac (running 
MacOS 8.6) and getting a group to scroll.

Firstly, I don't seem to be able to set the thumbSize for a 
scrollBar, it looks to be its default size whatever its actual size 
it is set to?

However, I'm also struggling to get the behaviour I'm after.  My 
window layout is as follows:

  
  | pseudo Netscape buttons bars |
  |  |   - fixed button bar area
  |  |
  
  ||^|
  ||-|
  || |
  || |
  || |
  | scrollable Netscape page area  | |   - scrollable pseudo page
  | (trying to use a group for this)   | |
  || |   - scrollbar is not 
part of group
  || |
  || |
  ||_|
  ||v|
  
  | pseudo Netscape status bar   |   - fixed status area
  

The scrollable area is actually about 3-4 times larger than the 
viewable area. The pseudo Netscape button and status bars are all 
part of a group which sits in front of the scrollable page group, 
providing a 'frame' for the page.

Whenever I try editing the page group all I can see is a fixed area 
which is hard to manipulate so I can extend its length and include 
additional elements such as fields, buttons, etc.

I can scroll to the top of my 'page', but whenever I try scrolling to 
the bottom, I always end up with some of the group missing (and not 
just the bit obscured by the bottom status bar).

Anyone able to suggest the scripting necessary to get the group to 
scroll within a zone like this and how I can easily edit an oversize 
group?

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Detecting ClickChar?

1999-11-29 Thread Peter Reid

I'm trying to implement a simulation of a system that displays HTML 
information with hot links.  However, the tricky 'extra' is the fact 
that each single word/phrase hot link is actually treated as two 
halves with a click on the first half of a hot word taking you 
backwards and a click on the second half taking you forwards!

The problem I'm having is that I can't easily work out which half of 
a hot word the user has clicked into.  I can get the ClickText() for 
the whole word and the ClickChunk() tells me the chars of the whole 
word. The ClickLoc() gives me a coordinate pair, but I can't see how 
to relate this to the characters in the hot word.  What makes life 
difficult is the fact that the HTML has variable size text as well as 
some mixed plain and bold text.

I tried splitting a single word into two separate words and making 
them individual hot words, but came up with the problem of having to 
make them look like a single word whilst behaving as if there's some 
character separating them.

Anyone got any good ideas for this?

Also, once I've detected a hot word, I need to jump to another line 
within the field.  How do I reliably reposition a field with variable 
height lines on a line boundary?  I tried adding the textHeight of 
all lines from top to required line, multiplying the total by 4/3 and 
then setting the vScroll accordingly.  Unfortunately, this isn't 
reliable, especially if there is a blank line as this returns an 
empty textHeight.

Any ideas for this?

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Detecting ClickChar?

1999-11-29 Thread Peter Reid

Hi Peter,
Try the mouseCharChunk - in theory there's room for it to not work every
time, but in practical terms it'll probably do the job consistently and
well. The mouseCharChunk will tell you what char of a word has the mouse
hovering over it at a given moment. With execution speeds being what
they are, it'll probably work fine.

Hi Phil

Thanks for the tip - that's sorted out my problem of detecting the 
actual character clicked on.

Any ideas for the scrolling/positioning problem?

 Also, once I've detected a hot word, I need to jump to another line
 within the field.  How do I reliably reposition a field with variable
 height lines on a line boundary?  I tried adding the textHeight of
 all lines from top to required line, multiplying the total by 4/3 and
 then setting the vScroll accordingly.  Unfortunately, this isn't
 reliable, especially if there is a blank line as this returns an
 empty textHeight.

Thanks again,

Best regards
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Detecting ClickChar?

1999-11-29 Thread Peter Reid

Use the formattedHeight function to determine how far down you need to go.
You can ask for the formattedHeight of a chunk of text, e.g.:

the formattedHeight of line 1 to 60 of fld 1

Note that selecting the text by script will also scroll the field.  (If you
have any trouble putting together a script that scrolls exactly as you want
with formattedHeight, please let me know: we've got one "somewhere".)

Regards,

Kevin

I managed to get the effect I anted using the very inelegant approach 
of cloning the field, throwing away the bottom part and measuring the 
height of the remaining lines!  The script is as follows:

   on gotoLine theLine,theField
 lock screen
 if there is a field "Scratch" then delete field "Scratch"
 clone field theField
 set the name of field id (word 3 of it) to "Scratch"
 delete line theLine-2 to -1 of field "Scratch"
 put the formattedHeight of field "Scratch" into thePosn
 hide field "Scratch"
 set the vScroll of field theField to thePosn
 choose browse tool
 unlock screen
   end gotoLine

Not very clever, but it works!  Any suggestions for something more 
elegant would be greatly appreciated.

Best regards
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Detecting ClickChar?

1999-11-29 Thread Peter Reid

On 29/11/99 4:08 pm, Peter Reid at [EMAIL PROTECTED] wrote:

  This fails (I'm using MC 2.2.5 on a Mac) with an error message saying
  "bad text attributes, can't get object attributes" which implies that
  the function doesn't work with a text chunk!  I tried this with:
 
  put the formattedHeight of line 1 to 31 of field doctext1

- this works in MC 2.3B2!

 
  Note that selecting the text by script will also scroll the 
field.  (If you
  have any trouble putting together a script that scrolls exactly 
as you want
  with formattedHeight, please let me know: we've got one "somewhere".)
 
  I tried  "select line theLine of field theField"  and it selected it
  ok but didn't cause any scrolling or realignment?!

- this realigns the field but with the selected line at the bottom of 
the viewable field, whereas the method above would allow the 
realignment to leave the wanted line at the top of the field

Can you try all of this in MC 2.3B2 (I can't even remember how 2.2.5 worked
now)?

Unfortunately, this work is for the client who has 2.2.5 only and 
won't upgrade to 2.3B2!

Best regards
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



False Licence Limit Error Message?

1999-11-23 Thread Peter Reid

Hi

I'm developing a CBT package in MetaCard 2.2.5 using both MacOS 8.6  
Win 98 for the development.  When I run my stack from the development 
environment, it starts up without any problem.  However, when I run 
the stack by double-clicking I get a "licence limit exceeded" error 
message.  I have a licence which I use on the Mac or Win 98 as 
necessary and I haven't had this problem before.

What is probably significant is what I'm trying to do at start up. 
Within the preOpenStack handler I read a text file containing various 
parameters and then build an initialisation script that sets up 
various global values from the information read from the control 
file.  The licence limit warning appears when my stack attempts to 
"do" the set up script it has constructed.

I've tried moving my initialisation code from the preOpenStack 
handler into the openStack handler.  I've also tried making the stack 
start up and open the message box for me to type in the name of the 
init handler.  In all cases, the licence limit message appears as 
soon as my stack tries "do"ing the setup script.  It seems that the 
"do" command only allows long scripts (over 10 lines) when running in 
the development environment?!

Anyone help here?!!

Best regards
Peter
----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: False Licence Limit Error Message?

1999-11-23 Thread Peter Reid

I've found a solution, I build the script and then execute it a line 
at a time using the following handler:

on doScript theScript
  repeat with i = 1 to number of lines in theScript
do line i of theScript
  end repeat
end doScript

In case anyone is interested the following is the script I use to set 
up the stack parameters:

on getParams
  global gProgPath, gProgName, gProgVersion
  if word 2 of the environment is "Development" then
# developer mode uploads control params from control file into 
custom property:
put gProgPath  "control.txt" into controlFile  # gProgPath is 
path of this stack
if there is a file controlFile then
  open file controlFile
  read from file controlFile until eof
  close file controlFile
  set the ControlParams of this stack to it
end if
  end if
  # always actually get params from custom property:
  put the ControlParams of this stack into ctrlParams
  put empty into makeParamsScript
  set itemDelimiter to "="
  repeat with i = 1 to number of lines in ctrlParams
put line i of ctrlParams into paramLine
if first char of paramLine  ";"  and paramLine is not empty then
  put item 1 of paramLine into theParam
  put item 2 of paramLine into theValue
  put "global "  theParam  ";" after makeParamScript
  put "put "  quote  theValue  quote  " into " \
theParam  return after makeParamScript
end if
  end repeat
  set itemDelimiter to comma
  if makeParamScript is not empty then
doScript makeParamScript
  end if
  if word 2 of the environment is "Development" then
set the title of this stack to gProgName  gProgVersion
  end if
end getParams

This allows me to use a control file ('control.txt') in the 
development environment that loads its details into a custom stack 
property called "ControlParams".  Whenever the stack is run outside 
of the development environment, it reads the control params from this 
custom property instead of the control file itself.  The control file 
reading element of the script ignores blank lines and lines beginning 
with ";".  An example control file contents is as follows:

; Control Params for CBT
    gProgName=On-line Training Package
gProgVersion=v0.1
gProgDate=23 Nov 1999
gProgAuthor=Peter Reid

; Upload directories (all relative to stack directory):
gGenUploadsDir=Uploads

; File names (files found in Uploads directory):
gDescripFile=description.txt
gFaqFile=faq.txt

; Password for access to admin features:
gAdminPwd=LetMeIn

gToolTipDelayMilliSec=750

Sorry to have bothered people, I hope the above proves of interest.

Best regards
Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Auto-Configuring Netscape for MetaCard Helper?

1999-11-16 Thread Peter Reid

Kevin Miller wrote:
 
---snip---
 
  My other suggestion is that you consider building a standalone 
with a single
  stack that itself loads some stack in a URL somewhere instead.  Users can
  download that and run it, and it will then open the door to any content you
  wish to provide (the stack it loads from the URL can itself load 
anything it
  likes, present a MC based "home page" or whatever).  No configuration
  required.

That's how I transfer stacks to my current client group - I sent each
interested party (in a
couple of different states) a small .sit file that contained a stack
downloader. When they open
it, it refreshes its "available files" list by retrieving a directory
list from a specific
directory in my web space (and then removing references to any other
directories prior to
displaying). Works like a charm; some of my people are quite
"technologically challenged" and
don't know how to manage email attachments, and certainly don't know
what a MIME type is or
does. So the little downloader stack enables them to bypass all the
"complexities" and simply
get what they want.

If anyone is interested, I'll make it available as a simple example
(after I alter it slightly
to "protect the innocent").

Phil

Sounds a neat approach which I'd be very interested in for other 
projects.  However, I definitely couldn't use it with the current 
project!

Best regards
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Custom Cursor Problems

1999-11-16 Thread Peter Reid

  I tried MC 2.3B1 and whilst this does support painting, it also
  disrupts my current project.  For example, I simulate the use of
  Netscape on an intranet and in one example a pseudo Netscape frame
  border displays nicely in MC 2.2.5 but is transparent in MC 2.3B1!

Sounds like a bug, or at least an incompatibility.  You should send in
a bug report to [EMAIL PROTECTED], including your stack (or a
subset of it) that shows the problem if possible.

Tricky, the screens involved contain very sensitive information which 
I can't show anyone.  Unfortunately I'm on a very tight deadline and 
so don't have time at present to make a 'neutral' version that I can 
distribute and that will demonstrate the bug.  I'll try to find time 
to do so once the dust has settled on this project.

  To be honest, trying to paint over a tiny cursor design using the
  paint tools (in MC 2.3B1) without any form of zoom is rather
  torturous to say the least!

That's why it has one: control-click (command-click on MacOS) opens a
magnifier window.

Ah - I couldn't find a reference to that in the help index - I tried 
searching for 'zoom' an 'magnify' but got no hits and so assumed the 
feature was missing!

  Is there no way of preparing an external image prior to importing
  that would ensure the right use of black  white?  I have a fairly
  comprehensive set of graphics tools for Mac  PC, surely something
  can be done without having to 'paint' over the cursor designs??

It's possible, just not easy.  Most graphics packages fill the entire
256 color colormap in a GIF image with bogus colors.  You can tell if
yours does this with "put the colors of image 1" after importing an
image.  If the result is three lines long (0,0,0 and 255,255,255 and
some other color that's transparent), you've got a image that will
work as a cursor.  Otherwise, you'll have to paint on the image to
enable MetaCard's built-in color counting system to digest the
colormap down to what is actually required.

OK, thanks for the tip, I'll take a look.  GraphicConverter on the 
Mac is pretty good with colour maps and I have several other tools I 
could try, so I'll do some experimenting.

  Regards,
Scott

Best regards
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Custom Cursor Problems

1999-11-15 Thread Peter Reid

Hi

I'm trying to use custom cursors and I'm struggling with how to set 
these up correctly.  For example, when I mouseDown over a particular 
object I'd like to cursor to change to a different design and stay 
that way until the user does a mouseUp.  I have designed black  
white cursors and I might use a script such as the following

   on mouseDown
 lock cursor
 set the cursor to the id of image "NewCursor"
   end mouseDown

   on mouseUp
 unlock cursor
   end mouseUp

This works fine except I can't get the cursor to look correct unless 
I invert the colours, i.e. black to white and vice versa. Is this 
because the mouse is Down and MC or the OS is causing an inversion?

What are the rules for designing and applying custom cursors, in particular:
- what sizes can they be? (for Mac  Win cross-platform)
- what colours should be used? (black, white, transparent?)
- what file format should be used? (e.g. GIF with transparent colour 
for edges?)

Thanks for any help

Peter
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Custom Cursor Problems

1999-11-15 Thread Peter Reid

  What are the rules for designing and applying custom cursors, in 
particular:
  - what sizes can they be? (for Mac  Win cross-platform)

To be cross-platform, use 16x16.

  - what colours should be used? (black, white, transparent?)
  - what file format should be used? (e.g. GIF with transparent colour
  for edges?)

Black and white, with a single transparent color, GIF is OK.  See the recent
posts on this subject (they cover painting into the image in MetaCard after
its been imported to get it into MC's internal file format).

Regards,

Kevin

Thanks for the reply.

I'm still using MC 2.2.5 for my current development work and this 
doesn't support painting on Mac or Win (which are what I have 
available).  I tend to develop as much as possible on the Mac  then 
tweak things on the Win system.

I tried MC 2.3B1 and whilst this does support painting, it also 
disrupts my current project.  For example, I simulate the use of 
Netscape on an intranet and in one example a pseudo Netscape frame 
border displays nicely in MC 2.2.5 but is transparent in MC 2.3B1!

Also, I'm not keen on using a Beta version of a product to deliver my 
current project to my customers, which is why I'd rather stick with 
MC 2.2.5 until I know MC 2.3 is solid and I have the time to deal 
with odd effects like the one above.

To be honest, trying to paint over a tiny cursor design using the 
paint tools (in MC 2.3B1) without any form of zoom is rather 
torturous to say the least!

Is there no way of preparing an external image prior to importing 
that would ensure the right use of black  white?  I have a fairly 
comprehensive set of graphics tools for Mac  PC, surely something 
can be done without having to 'paint' over the cursor designs??

Best regards

Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Auto-Configuring Netscape for MetaCard Helper?

1999-11-11 Thread Peter Reid

Hi

I'm trying to write an installer script that will

- install the MetaCard Player on a Win NT 4 system

- set up the Win NT Registry for *.mc files

- configure Netscape Communicator 4.5 to see mc.exe as the helper app

- configure Netscape to "open" *.mc downloads without prompting the 
user each time as whether they want to 'save' or 'open' such files

Does anyone know how I can achieve the Netscape bits from an 
installer script written in MC?

Also, can I check which Registry settings I'll need to set up so that 
Windows will know what an *.mc file is, it's icon and the default app 
(mc.exe) to launch with.

Thanks for any help.

Best regards

Peter
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: What No 'Copy File'?

1999-11-03 Thread Peter Reid

Don't know why put url didn't work, perhaps you need both read and write
privileges with it. The old way of reading and writing does work however:

  put "c:/metacard/mc.exe" into source
  put "c:/metacard/newmc.exe" into dest
  open file source for binary read
  open file dest for binary write
  read from file source until eof
  write it to file dest
  close file source
  close file dest


regards,
Tuviah Snyder


It would seem more efficient to make a copy of mc.exe (called, say, mc.bup)
as a separate file, and then use:
  put url "binfile:mc.bup" into url "binfile:c:/metacard player/mc.exe"
in the installer.  As the file mc.exe is needed to run the installer, this
adds no overhead.

That way,
--
Regarding Micro$loth: "Neither shall the Evil Empire dwell with thee" (Job)

John R. Vokey

Hi Tuviah  John

Thanks for the additional suggestions - it looks like yet more "ways 
to skin a cat"!

In the end I settled on the inclusion of a compressed copy of mc.exe 
as a property of my installer stack (as suggested by Dave Cragg).

The steps I've taken to producing a self-installing app based on 
distributing the MC player + a stack are as follows:

1) load compressed versions of "mc.exe", "mctools.mc" and "myapp.mc" 
into user-defined properties of my "installer.mc"

2) use WinZip to build a Zip file (myapp.zip) containing:
- "installer.mc"
- "mc.exe"
- "mctools.mc"

3) use WinZip add-on utility to make an EXE that:
- converts "myapp.zip" into "myapp.exe"
- specifies the executable command: "mc installer.mc" within "myapp.exe"

To install my application, the user simply double-clicks "myapp.exe" 
and this does the following:

a) "installer.mc", "mc.exe" and "mctools.mc" are unzipped into a temp 
folder inside the current Windows Temp folder (the last two are used 
simple to run the installer itself)

b) "mc installer.mc" is executed, which does the following:
- creates folder "C:\MetaCard Player" (if it doesn't already exist)
- creates folder "C:\MyApp"
- decompresses a copy of "mc.exe" into "C:\MetaCard Player"
- decompresses a copy of "mctools.mc" into "C:\MetaCard Player"
- decompresses a copy of "myapp.mc" into "C:\MyApp"
- sets up Win Registry entry for "*.mc" files

c) all temp files are removed from Windows Temp folder

I'll have a think about generalising my approach and then offer it to 
this list for anyone who's interested.

Thanks again for all the input on this one!

Best regards

Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Scripting the Mouse

1999-11-02 Thread Peter Reid

Hi

I'm trying to build a CBT package for a target program.  In the CBT 
package I move the mouse over a simulated screen of the target 
program as if the user were actually controlling the real program. 
I've got the mouse moving OK and I get the mouse to pause over screen 
objects (using 'wait x secs').  However, during the wait pause, the 
tooltip doesn't appear even though the mouse is over an object.  It 
seems that the object under the mouse doesn't receive the mouseEnter 
during the wait.  If I move the mouse and leave it over an object the 
tooltip appears and the object can respond to the mouseEnter 
(changing it's image for example as the mouse hovers over it).

Obviously I can send mouseEnter and mouseLeave messages, but I 
wondered whether there was any message I could send to MetaCard (a 
bit like 'exit to System' in SuperCard?) that would allow objects 
user the mouse to respond as if the mouse were under user control. 
This would make it a lot easier to script pseudo-user control.

Thanks for any ideas.

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Scripting the Mouse

1999-11-02 Thread Peter Reid

  I'm trying to build a CBT package for a target program.  In the CBT
  package I move the mouse over a simulated screen of the target
  program as if the user were actually controlling the real program.
  I've got the mouse moving OK and I get the mouse to pause over screen
  objects (using 'wait x secs').  However, during the wait pause, the
  tooltip doesn't appear even though the mouse is over an object.  It
Hi Peter,

Use the send command. Here is an example:

Create two buttons side by side. In the right hand button put a mouseEnter
handler that does something e.g beeps. Also, set a toolTip on this button.
In the left hand button put the following script. Note that the script does
pause the mouse over the right hand button to allow the toolTip to show.
However, this is the same when the mouse is under user control.

local lCounter, lMessageId

on mouseUp
  put empty into lCounter
  moveMouse
end mouseUp

on moveMouse
  if lCounter  400 then
set the screenMouseLoc to item 1 of the screenMouseLoc + 1, item 2 of\
 the screenMouseLoc
send moveMouse to me in 5 milliseconds
put the result into lMessageId
add 1 to lCounter
  else
cancel lMessageId
send "doNextStage" to me in 2 seconds
  end if
end moveMouse

on doNextStage
  mouseUp -- don't actually do this or you'll go on forever!
end doNextStage

Of course, to stop the mouse moving you will have to run the following in
the message box:

repeat for each line l in the pendingmessages
cancel item 1 of l
end repeat

For more information on the send command, check out the "Using the Send
Command" article on our website:

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

HTH,

Cheers,

Alan


Thanks for the advice - it looks like something similar I did in 
SuperCard in the past!

Regards
Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



What No 'Copy File'?

1999-11-02 Thread Peter Reid

I'm trying to write a small installer stack for Windows deployment. 
The aim is to build a self-expander using the WinZip utility.  This 
allows you to include a command that will be executed once files have 
been copied to the default temp directory.  Such self-expanders do 
the following:

1) unpack all contained files into the temp directory (as defined by $TEMP)
2) execute specified setup command line (e.g. "mc installer.mc")
3) delete all the unpacked files from the temp directory

For a variety of reasons, I want to distribute the MC player and *.mc 
files rather than standalone *.exe files.  What I hope to achieve is 
an installer stack that does the following:

1) copy my app files to a new directory "C:\MyApp" say
2) copy MC player files to a new directory "C:\MetaCard Player" say
3) set up the Windows Registry keys to recognise *.mc files as MetaCard stacks

Given that I need to run the temp directory copy of MC to execute my 
installer stack, I can't use the 'rename' command' to "move" the 
player from the temp directory to its intended location (as the file 
is in use at the time).  I had hoped to 'copy' the MC player and 
mctools.mc from the temp directory into a "C:\MetaCard Player" 
directory.  However, I can't find a 'copy file' command?!  It seems I 
can create files, delete them, move/rename them, but I can't copy 
them.

Any bright ideas, or am I missing the obvious!?

Thanks

Peter
--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Some Button Questions

1999-10-15 Thread Peter Reid

Hi

I'm developing an app for Mac  Win that will be used on laptops 
where users want the option to use keyboard control as well as mouse 
control. I have some questions about button options:

1) On Win when a button is the focus object it is highlighted with a 
rectangle so you can see which button will activate as you tab across 
a set of buttons.  On the Mac there's no visible indication of 
current button - can this be made consistent with the Win version?

2) Can a shortcut character be set as part of the label of a button 
so the user can ALT-x (Win) or CMD-x (Mac) instead of mouse clicking?

Thanks for any help.

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Non-appearing Graphics (sometimes!)

1999-10-15 Thread Peter Reid

Hi

I'm developing a Mac  Win app and I've put a backdrop graphic into a 
common background (a bit like a background graphic in a Web browser). 
Initially, I id this using MC under Win 98.  The graphic showed fine 
on my Win 98 laptop, but not on another Win 98 laptop or another Win 
95 laptop.  Furthermore, it wouldn't display on my Mac either!

Then I moved to MC under MacOS, removed the graphic and re-imported 
it. Now it shows fine under MacOS and on my Win 98 laptop. 
Unfortunately, I don't have access to the other laptops, but need to 
send their owners my latest version without knowing whether the 
backdrop graphic will now display OK??

The backdrop file was prepared using PaintShop Pro 6 under Win 98 as 
a GIF file limited to the Web-safe colours (216).

Anyone got any ideas why I'm having this problem?

Thanks.

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Non-appearing Graphics (sometimes!)

1999-10-15 Thread Peter Reid

   I discovered the "File" "Import" "Take Snapshot" to be the easiest
way to get images into MetaCard. Basically keep the paint app open and just
"snap  paste" into MetaCard...I guess I just have an aversion to saving,
naming and managing numerous image files. I have built projects originating
on the Mac, further developed on the PC and finally demonstrated on a Unix
box with no graphics problems whatsoever. In fact, I carelessly didn't even
pay attention to my monitor setting - I was running in 16 bit color...and
luckily it still looked the same at 256.

   As an asidethe only hitch was converting Arial-Helvetica fonts
to the Unix based equivalent. Its easy to globally change the font, but if
you have grouped or nested groups it gets a little tedious. It would be nice
if there was a script that would check the platform you are running on and
use the appropriate font mapping. Regards,
   Blair

Thanks for the feedback - some useful tips!

I found the problem in the end - I had a file link to an external 
file instead of an embedded image!

Regards,

Peter

----
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Showing Imported Styled Text in a Field?

1999-10-10 Thread Peter Reid

I think it does have a simple HTML parser! In addition to getting the
htmltext of a field you may also set the htmltext of a field.

regards,
Tuviah Snyder
Diskotek
Custom Application Development  SuperCard/HyperCard Conversion at a low
price

Thanks for the tip.  It does work after a fashion but is a bit too 
crude for my purposes.  I get additional blank lines where I don't 
want them.  Also, I was hoping to write some on-line help using HTML 
with internal hypertext links to different sections.  However, such 
links aren't preserved (converted into MC equivalent).  If I could 
have used an external HTML file, then it would be easy for me to 
issue updated help files etc. that could be imported into MC fields.

Thanks anyway.

Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Graphic/Icon Problems with MC Win

1999-10-10 Thread Peter Reid

Hi

I'm developing an app using both Mac and Win 98 MetaCard.  In order 
to try to avoid any colour or graphic problems, I'm sticking with the 
Web-safe palette of 216 colours for all my graphics (for images and 
icons).  In addition, I regularly check the stack on both a G3 
PowerMac running MacOS 8.6 and a P-266 MMX laptop running Win 98. 
Occasionally, I try the stack under Win 95C running under Virtual PC 
2.1.3 on my PowerMac.

Despite the above approach I've now tried delivering my MC stack to 
two different users (1st using P-III 350 desktop with Win 98, 2nd 
using P-II 350 laptop with Win 98) and both are having problems with 
button icons.  The first can't see anything of the button icons (such 
buttons are invisible) and the second has buttons whose icons are 
just grey boxes.

I cannot reproduce the problem as all my testing under the three 
different environments available to me work fine!

Any suggestions as to how I can solve this problem and avoid similar 
problems in future?

Thanks

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Graphic/Icon Problems with MC Win

1999-10-10 Thread Peter Reid

Is it possible that the copied images have different IDs than the
originals? If so, the button icon IDs may be set to the IDs of the
originals, so they still wouldn't be displayed as icons outside the dev
environment.

Food for thought.

Phil

Phil,

Thanks for the thought.  What's puzzling is that when I test my stack 
I'm careful to do it through a player, i.e. with a copy the MetaCard 
program and mctools.mc only, no other supporting files.  I then send 
the same files together with my stack to my users and it doesn't work 
for them!?

It has a certain familiar ring to previous problems I've had with 
both an earlier version of Visual Basic (v3) and various versions of 
HyperStudio.  These turned out to be related to the large variety and 
variability of Windows display drivers.  The solution that has worked 
in the case of HyperStudio was to install DirectX (the free MS games 
 multimedia support for Windows).  This seems to make the display 
system better behaved (more standard).  I've suggested this same 
course of action to my MetaCard stack users but haven't had a 
response from them yet as whether it solved the problem.

Regards,

Peter


Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Showing Imported Styled Text in a Field?

1999-10-08 Thread Peter Reid

Hi

Is there some simple way to import styled text into a MetaCard field? 
I'd like to have external help files etc. constructed in HTML or RTF 
which can be imported and displayed through MetaCard windows.  I see 
that MC can generate HTML from fields, but I can't see how it could 
work the other way round (short of writing an HTML parser!).

Any ideas or suggestions?

Thanks,

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Script Control of Tabs

1999-10-06 Thread Peter Reid

Hi MetaCarders

I'm new to MetaCard (but not to Super/HyperCard  ToolBook), so the 
following question might be obvious!

I'd like to be able to select the tab of a tabbed button under script 
control.  For example, I might like to ensure that a particular tab 
is seen when the user opens the card with the tabbed button on it. 
Also, I might want to prevent access to certain tabs depending on the 
state or access permissions.  I can't find any way to set the active 
tab within a script.  Any ideas please?

Cheers

Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Re: Script Control of Tabs

1999-10-06 Thread Peter Reid

On Wednesday, Oct 6 1999, Peter Reid wrote:

  Hi MetaCarders
 
  I'm new to MetaCard (but not to Super/HyperCard  ToolBook), so the
  following question might be obvious!
 
  I'd like to be able to select the tab of a tabbed button under script
  control.  For example, I might like to ensure that a particular tab
  is seen when the user opens the card with the tabbed button on it.
  Also, I might want to prevent access to certain tabs depending on the
  state or access permissions.  I can't find any way to set the active
  tab within a script.  Any ideas please?

set the menuHistory of btn "tabbed button" to 1

That will even send the appropriate menuPick message.

Regards,

Kevin

Just the job!  Thanks for the help.

Regards,

Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



MC 2.3 stacks unreadable by MC 2.2.5?

1999-01-17 Thread Peter Reid

I see in the ReadMe for MC 2.3B2 that once a stack has been saved 
from MC 2.3, it can't be opened and used within MC 2.2.5.

I am having to use MC Player 2.2.5 (Win NT) with a customer - they've 
only just installed it across their network ready for delivery of a 
series of CBT courses as MC stacks.  However, I need to create cursor 
designs and (as recent emails on the list testify) I really need to 
use MC 2.3 to do it as only this version supports the necessary 
painting features.

For the purposes of this particular client, all I really need from MC 
2.3 is the painting features.  Is it possible to use MC 2.3 to create 
a dummy cursor design stack from which I can then copy and paste 
properly formed cursor graphics into an MC 2.2.5 stack?

Best regards
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



RE: Aborting Animations

1999-01-17 Thread Peter Reid

Peter,

I have been developing CBT that does all of the same stuff, with the
exception of the voice-overs. At first, each animation ran without stopping,
but then (with Scott  Kevin's patient help) I learned how to break the
animations up into small chunks using the "send" command, which allowed me
to catch a user keypress (I use the Esc key) to stop the demo. This also
requires keeping track of the messages that are being sent, so you can
cancel the pending messages when the user presses Esc.

I was tempted to post some of the code, but when I looked at it, it seemed
awfully spaghetti-like, with a lot of interconnecting handlers, and I
thought you might be better off trying to implement these strategies within
the context of your own existing code rather than trying to ape mine. But if
you find yourself stuck, I will be happy to post some samples to help get
you on the right track.

Regards,
Marni

Hi Marni

Thanks for the feedback and suggestion.

I've used a very similar approach with SuperCard in the past and was 
considering the same idea with MetaCard.  However, the playback of 
sound is a particular problem as I do want the user to be able to 
interrupt this if possible and here your suggested technique wouldn't 
help.  This is why I went the route that I did.

Best regards
Peter

--------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk



Video Format Support in MC 2.3?

1999-01-16 Thread Peter Reid

I was very pleased to see that MC 2.3 supports QuickTime on Win and 
Mac platforms, but wondered whether this is in addition to any native 
format such as AVI for video and WAV for sound?

Whilst I'd like to use QuickTime across platforms, some customers 
(such as the ones I'm working with at the moment) don't and won't 
have QuickTime, only pure Microsoft stuff, hence my interest in both 
AVI and WA formats.

So, does MC 2.3 give me both QT and AVI/WAV?

Best regards
Peter

Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk