language localization

2001-07-17 Thread Richard Herz

 Richard Gaskin wrote:

 More importantly, this may be a healthy wake-up call for all of us:
 
  There are other cultures out there,
  and not all of them speak English.

 How many of you are getting requests for localized versions of your
 MC/Rev-based software?  How do you approach localization with a tool like
 MetaCard where we commonly embed user feedback directly in the code (the ask
 and answer commands for example)?

I got my wakeup call recently.  I created a large educational project
without ever having the faintest thought about anyone in another country or
speaking another language using it.  After I posted my software for
download, it was very entertaining to count how many different countries
there were in the download record.  Then a prof in Brazil asked if I would
incorporate his translation of all the text in my project into Portuguese.
It was easy to say sure.  I was astounded to go to the web and find that
there are 50 universities in Brazil with chemical engineering departments. I
started hoping someone would volunteer to do a Spanish translation.

Then I got the Portuguese translation in a big Word document.   Turns out
translation is the easy part (ignoring the effort of learning a second
language).  The hard part is that now I am committed to - and am in the
middle of - replacing many hundreds of strings in hundreds of objects.

So I learned:  Whenever I start any new project, I am going to design the
project to make translation and language localization easy.

Jacqueline suggested putting text in the custom properties of each object,
answer text in the custom props of a button, for example.  Adding a new
language then would mean accessing all the individual objects.  Maybe put
the text strings at the stack (or higher level), e.g., in a custom property
set of the stack whose keys are formed from the name of the object using the
string plus a string number (or other identifier) for objects using multiple
strings...

Rich Herz [EMAIL PROTECTED]


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




Re: libURL

2001-07-17 Thread H. Chaudet

-- MESSAGE metacard.v004.n394.10 ---

From: Scott Rossi [EMAIL PROTECTED]
Subject: Re: libURL
Date: Mon, 16 Jul 2001 12:19:36 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
In-Reply-To: [EMAIL PROTECTED]

I'm just now trying to get up to speed with the new URL implementation in
2.4B3 and can't seem to get the POST method to work (this works fine in
2.3.2).  My form looks likes this:

   set httpheaders to specialHeaderInforeturn
   put http://www.myURL.com/special.cfm?method=postaction=action; into HREF
   put data=  fld data into tData
   start using stack libURL
   post tData to url HREF
   answer it

Problem = I'm not getting any data back in it; in fact, I'm not getting the
answer dialog at all.

I've tried removing the libURL line (I assume you need to use this with a
POST command) with the same results.  The simple loading of a URL via the
libURL stack works fine, and the server that is handling the CFM action
responds as expected using MC 2.3.2.  Am I missing something about POST in
MC 2.4?

On a related note, is it the case that you need to include the libURL stack
as a substack in your own stack if you distribute your stack as a
standalone?  If this is the case, why isn't the libURL stack included as an
option in the resource mover?

FWIW, I've tried cloning the libURL stack on MacOS 9.1 three times, each
time resulting in a frozen crash.

Regards,

Scott


The problem is that http headers are controled by the liburl stack 
properties. Your changes are not taken in account, unless you 
customize the liburl stack.
My impression is that liburl is experimental (and promising).


H. Chaudet



-- 
-
Herve Chaudet  e-mail : [EMAIL PROTECTED]
   mobile : 33-(0)-608-05-98-09
  Unité UPRES EA 2672
   Faculte de Medecine - 27, Bd Jean Moulin - 13385 Marseille cedex 5 - France
   Tel 33-(0)-491-79-19-10 ; Fax 33-(0)-491-79-40-13
  Service de l'Information Medicale
   Hopital Nord - Chemin des Bourrelly - 13326 Marseille cedex 15 - France
   Tel 33-(0)-491-96-80-20
-

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




Re: Multi-column list workarounds

2001-07-17 Thread Craig Spooner

Richard,

In my last project I opted to readjust the width of each column as 
needed.  The downside is the calculation time this requires for a 
list with many columns, but otherwise it works quite well.  Perhaps 
you can improve on my code to gain some speed (please let me know if 
you can!).  Here's what I've been doing:

on reformatTabStops
   set the itemDel to tab
   set the numberFormat to 000.##
   put the margins of fld text into tMargins
   put the number of lines of fld text into tNum
   put the number of items of line 1 of fld text into tItems

   repeat with i = 1 to tItems
 set cursor to busy
 repeat with x = 1 to tNum
   put (the formattedWidth of item i of line x of fld text)  
comma after tLengths
 end repeat
 if last char of tLengths is comma then delete last char of tLengths
 put max(tLengths) after aColWidths[item i of fld column labels]
 put max(aColWidths[item i of fld column labels])  comma after 
tColumnWidths
 put empty into tLengths -- prep for next column
   end repeat
   delete last char of tColumnWidths -- remove final comma
   set the itemDel to comma
   put 0 into tTabStop

   repeat for each item y in tColumnWidths -- calc tabstops
 add (y + tMargins) + 2 to tTabStop
 -- 2 seems to work best, esp. for smaller sizes
 -- each tabstop = current width + prev value
 put tTabStop  comma after tTabList
   end repeat

   delete last char of tTabList -- remove final comma
   set the tabStops of fld text to tTabList
   set the scroll of fld text to 0
end reformatTabStops




The other alternative I've played with is to use a single MC field, but to
algorithmically truncate each line of the displated text if it exceeds the
column width.  I found this solution to have its own issues:

- Performance of the truncation bites.

- Requires a monospaced font in order to calculate where to truncate,
   or an even slower algorithm which queries the formattedwidth.

- You need to maintain two sets of data, the complete set and then
   a copy in the displayed field with some lines truncated.   Sometimes
   this is a RAM issue, and you have to remember as you're coding that
   everytime you touch the data you need to refresh the display version.


So for displaying database columns, how do you folks handle that?

--
  Richard Gaskin
  Fourth World Media Corporation
  Multimedia Design and Development for Mac, Windows, UNIX, and the Web

-- 

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Craig Spooner
Instructional Technology Training and Development
WebCT Administrator
Office of Instructional Services
Colorado State University
(970) 491-2516

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




Re: language localization

2001-07-17 Thread Scott Raney

On Mon, 16 Jul 2001 Richard Herz [EMAIL PROTECTED] wrote:

(snip)

 So I learned:  Whenever I start any new project, I am going to design the
 project to make translation and language localization easy.
 
 Jacqueline suggested putting text in the custom properties of each object,
 answer text in the custom props of a button, for example.  Adding a new
 language then would mean accessing all the individual objects.  Maybe put
 the text strings at the stack (or higher level), e.g., in a custom property
 set of the stack whose keys are formed from the name of the object using the
 string plus a string number (or other identifier) for objects using multiple
 strings...

Unfortunately another common requirement for large multilanguage
products like this is that the actual translation must be done by
people who only use word processors.  The above architecture is
efficient and will work fine if you're willing to reimport all of the
text each time any of it changes.  I've also seen projects that store
the text for each object in a separate file in a language-specific
directory that's opened and read in as a card is opened.  That way you
just hand the whole directory structure over to the translator and
they just go through the files one at a time.  This architecture is
also pretty much a requirement if your product relies on a lot of text
in images (importing lots of images is something you have to be
careful about even in single-language products, and with multiple
languages it pretty much becomes a necessity).

Of course you could combine the two approaches and instead of loading
the text at run time you write a script that goes through the whole
stack and loads all of the text at once.  Then you just have to push a
button when you get a new translation.
  Regards,
Scott

 Rich Herz [EMAIL PROTECTED]


Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...


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




Groups again

2001-07-17 Thread jbv

Today I've been playing with groups in MC and found
it quite frustrating, for 2 main reasons (if I missed
anything please MC gurus enlighten me) :

- the only way to group controls is to select them first,
which makes grouping/ungrouping on the fly via script
quite cumbersome : you need to set the selected of each
control to true, then group, then set the selected of all
controls back to false. And if you don't wznt your controls
to be selected on screen during the process, you have to
perform a lock screen / unlock screen...
Frankly, I miss the groups in OMO where you could group
any number of objects by simply listing them in a variable
(the same kind of list that you get with the selectedobjects)...
The good side of it was that the same object could be part
of different groups at the same time...

- it looks like grouping controls changes the numbering of
those controls : for instance I have 50 images on screen and
the user can select any of them (like image 12 to 25 and 37
to 42) and they're supposed to get automatically grouped.
What happens is that all images being in a group are
re-numbered ! Therefore I had no choice but to change
my scripts and use the id instead...
Is there any *good* reason for that kind of behavior ?

Thanks. JB




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




Re: how do I turn off the focusColor?

2001-07-17 Thread Scott Raney

On Sat, 14 Jul 2001 Richard Gaskin [EMAIL PROTECTED] wrote:

 Karl Becker wrote:
 
  Actually, if we're really adhering to the HIG, shouldn't the
  focusColor not be able to be chosen by MC developers, and only by the
  user?  ;-)

Maybe so, but at least this is the way it works by default unless you
specifically override the focus color by setting it.

 That's the beauty of MC: It's not just HIG-compliant, it's better than
 HIG-compliant, in that it often lets us decide when the HIG applies.
 
 Please, Scott, allow another option for the focusColor which turns it off.
 In the big picture, this is the most HIG-compliant option.

I guess I've overestimated the number of people developing for (or
even testing for) UNIX systems.  This has been the way the Motif look
and feel has worked for almost 10 years now and we've yet to get a
single complaint about it or request for a way to turn it off.  The
only other thing I can come up with is just conservatism (it *changed*
on the Mac, and many people just don't like change, even if it's for
the better).

As for ways to implement this, a new field-only property is
unfortunately not an option because it would require reworking the
file format.  So that leaves us with the following options:
1) Tie drawing the focus border to the showBorder property.  This
   means you'd have to put another object (e.g. a group) around a
   field you want to have a border but no focus border.  More work,
   but then, breaking the rules should require more work.
2) Make it apply to all objects (i.e., buttons and players also get a
   focus border in the Motif look and feel, and it might be nice to be
   able to turn this off).
3) Make it global or an inheritable stack property.
4) Hack the focusColor property to have some non-existing color be a
   cue to not draw the focus border at all.

Preferences?
  Scott

 -- 
  Richard Gaskin 
  Fourth World Media Corporation
  Multimedia Design and Development for Mac, Windows, UNIX, and the Web
  _
  [EMAIL PROTECTED] http://www.FourthWorld.com
  Tel: 323-225-3717   ICQ#60248349Fax: 323-225-0716


Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...


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




Re: language localization

2001-07-17 Thread Geoff Canyon

At 9:08 AM -0600 7/17/01, Scott Raney wrote:
Of course you could combine the two approaches and instead of loading
the text at run time you write a script that goes through the whole
stack and loads all of the text at once.  Then you just have to push a
button when you get a new translation.

That's the solution I was thinking about.It seems like it would be fairly 
straightforward to write two scripts:

1. Go through a project and pull out all displayed text and build a list of it.
2. Take a returned list with the original text and the translated text, and go through 
the project and replace each piece of text with the translated version.

gc
-- 


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




Re: language localization

2001-07-17 Thread Geoff Canyon

At 9:08 AM -0600 7/17/01, Scott Raney wrote:
Of course you could combine the two approaches and instead of loading
the text at run time you write a script that goes through the whole
stack and loads all of the text at once.  Then you just have to push a
button when you get a new translation.

That's the solution I was thinking about.It seems like it would be fairly 
straightforward to write two scripts:

1. Go through a project and pull out all displayed text and build a list of it.
2. Take a returned list with the original text and the translated text, and go through 
the project and replace each piece of text with the translated version.

gc
-- 


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




Re: how do I turn off the focusColor?

2001-07-17 Thread andu

Scott Raney wrote:
 
 On Sat, 14 Jul 2001 Richard Gaskin [EMAIL PROTECTED] wrote:
 
  Karl Becker wrote:
 
   Actually, if we're really adhering to the HIG, shouldn't the
   focusColor not be able to be chosen by MC developers, and only by the
   user?  ;-)
 
 Maybe so, but at least this is the way it works by default unless you
 specifically override the focus color by setting it.
 
  That's the beauty of MC: It's not just HIG-compliant, it's better than
  HIG-compliant, in that it often lets us decide when the HIG applies.
 
  Please, Scott, allow another option for the focusColor which turns it off.
  In the big picture, this is the most HIG-compliant option.
 
 I guess I've overestimated the number of people developing for (or
 even testing for) UNIX systems.  This has been the way the Motif look
 and feel has worked for almost 10 years now and we've yet to get a
 single complaint about it or request for a way to turn it off.  The
 only other thing I can come up with is just conservatism (it *changed*
 on the Mac, and many people just don't like change, even if it's for
 the better).
 
 As for ways to implement this, a new field-only property is
 unfortunately not an option because it would require reworking the
 file format.  So that leaves us with the following options:
 1) Tie drawing the focus border to the showBorder property.  This
means you'd have to put another object (e.g. a group) around a
field you want to have a border but no focus border.  More work,
but then, breaking the rules should require more work.
 2) Make it apply to all objects (i.e., buttons and players also get a
focus border in the Motif look and feel, and it might be nice to be
able to turn this off).
 3) Make it global or an inheritable stack property.
 4) Hack the focusColor property to have some non-existing color be a
cue to not draw the focus border at all.

I'd go for either 2 or 4, most likely 4 if there is something like
transparent color.

 
 Preferences?
   Scott
 

-- 
Regards, Andu
___
[EMAIL PROTECTED]

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




Re: how do I turn off the focusColor?

2001-07-17 Thread Kevin Miller

On 17/7/01 6:34 pm, Scott Raney [EMAIL PROTECTED] wrote:

 2) Make it apply to all objects (i.e., buttons and players also get a
 focus border in the Motif look and feel, and it might be nice to be
 able to turn this off).
 3) Make it global or an inheritable stack property.
 4) Hack the focusColor property to have some non-existing color be a
 cue to not draw the focus border at all.

It does need to apply object by object - as you do generally want this on.
Turning it off happens on a case-by-case basis where you're doing something
cool that the field object probably wasn't originally designed for (such as
a multi-column list).  In such a case, no way do you want to have an extra
object there to draw the border with.  As such it has to be 2 or 4, and I
would go for 4, as 2 is going to be a real hassle from the cross-platform
point of view (you have to turn this property off on Mac for buttons, but
then turn it on again on UNIX).

Regards,

Kevin

Kevin Miller [EMAIL PROTECTED] http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!
Tel: +44 (0)131 718 4333.  Fax: +44 (0)1639 830 707.


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




Re: how do I turn off the focusColor?

2001-07-17 Thread Tereza Snyder

on 07.17.01 12:34 PM, Scott Raney wrote:

 2) Make it apply to all objects (i.e., buttons and players also get a
 focus border in the Motif look and feel, and it might be nice to be
 able to turn this off).
 3) Make it global or an inheritable stack property.

In my projects, either I want focus borders everywhere (a conventional
text-entry app) or I don't want them anywhere (an educational quasi-game).

So I guess I'd back method 2 and/or 3.

t



+  Tereza Snyder
+Software Developer
+  Attainment Company, Inc.
+ www.attainmentcompany.com
+   608.845.7880


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




AppleScript

2001-07-17 Thread Scott Rossi

Has anyone created scripts for retrieving data from an application via
AppleScript?  Specifically, I'm trying to use MC to pull addresses/content
from email addresses in Outlook Express.  Using MC, I can send AppleEvents
to OE, but I'm having a hard time figuring out how to get anything back from
OE, via request or the appleEvent message.

Thanks for any suggestions.

Regards,

Scott

_
Scott Rossi   Tactile Media - Multimedia  Design
Creative Director Email: [EMAIL PROTECTED]
  Web: www.tactilemedia.com


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




Re: AppleScript

2001-07-17 Thread Richard Gaskin

Scott Rossi wrote:

 Has anyone created scripts for retrieving data from an application via
 AppleScript?  Specifically, I'm trying to use MC to pull addresses/content
 from email addresses in Outlook Express.  Using MC, I can send AppleEvents
 to OE, but I'm having a hard time figuring out how to get anything back from
 OE, via request or the appleEvent message.

Check the data types returned from OE.  If they're anything other than type
'TEXT' (such as lists), forget it, as MC, like most xTalks, only understands
TEXT data.

You're using the request command to obtain the data portion from the
incoming message, yes?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _
 [EMAIL PROTECTED] http://www.FourthWorld.com
 Tel: 323-225-3717   ICQ#60248349Fax: 323-225-0716



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




Re: Groups again

2001-07-17 Thread Richard Gaskin

jbv wrote:

 - it looks like grouping controls changes the numbering of
 those controls : for instance I have 50 images on screen and
 the user can select any of them (like image 12 to 25 and 37
 to 42) and they're supposed to get automatically grouped.
 What happens is that all images being in a group are
 re-numbered ! Therefore I had no choice but to change
 my scripts and use the id instead...
 Is there any *good* reason for that kind of behavior ?

In my experience, grouped objects maintain their relative order, but their
positions relative to objects outside the group will change, since the group
is placed on top of other objects by default when it is created.

If you address objects relative to the group things should be fine, using
something like:

get the long id of image 1 of grp MyGroup

One of the amazing niceties about MC is that when you ungroup objects to
work on them and then regroup them again, most of the time the original
group name is retained -- one less step to worry about.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _
 [EMAIL PROTECTED] http://www.FourthWorld.com
 Tel: 323-225-3717   ICQ#60248349Fax: 323-225-0716



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




Re: how do I turn off the focusColor?

2001-07-17 Thread Richard Gaskin

Kevin Miller wrote:

 On 17/7/01 6:34 pm, Scott Raney [EMAIL PROTECTED] wrote:
 
 2) Make it apply to all objects (i.e., buttons and players also get a
 focus border in the Motif look and feel, and it might be nice to be
 able to turn this off).
 3) Make it global or an inheritable stack property.
 4) Hack the focusColor property to have some non-existing color be a
 cue to not draw the focus border at all.
 
 It does need to apply object by object - as you do generally want this on.
 Turning it off happens on a case-by-case basis where you're doing something
 cool that the field object probably wasn't originally designed for (such as
 a multi-column list).  In such a case, no way do you want to have an extra
 object there to draw the border with.  As such it has to be 2 or 4, and I
 would go for 4, as 2 is going to be a real hassle from the cross-platform
 point of view (you have to turn this property off on Mac for buttons, but
 then turn it on again on UNIX).

My vote:  I agree with Kevin's comments.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _
 [EMAIL PROTECTED] http://www.FourthWorld.com
 Tel: 323-225-3717   ICQ#60248349Fax: 323-225-0716



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




Re: Groups again

2001-07-17 Thread Geoff Canyon

At 8:23 PM + 7/17/01, jbv wrote:
- the only way to group controls is to select them first,
which makes grouping/ungrouping on the fly via script
quite cumbersome : you need to set the selected of each
control to true, then group, then set the selected of all
controls back to false. And if you don't wznt your controls
to be selected on screen during the process, you have to
perform a lock screen / unlock screen...

Depending on how much flexibility you need, relayerGroupedControls can help with this. 
You probably want pre-existing groups to make it work well, and if I understand 
correctly, each pre-existing group needs at least one object in it (but the object 
could be a point, or invisible). Then to add an existing object to a group, you simply 
set the layer of the object to the layer of the object in the group.


- it looks like grouping controls changes the numbering of
those controls : for instance I have 50 images on screen and
the user can select any of them (like image 12 to 25 and 37
to 42) and they're supposed to get automatically grouped.
What happens is that all images being in a group are
re-numbered ! Therefore I had no choice but to change
my scripts and use the id instead...
Is there any *good* reason for that kind of behavior ?

Groups are inherently part of the layering scheme of the objects on a card; take a 
look at the control browser for a card with several objects and groups on it to get a 
very clear picture of this. The control browser is like an outline, and hence you 
can't have objects that aren't on consecutive layers be in the same group. When you 
select items and group them, if necessary they are automatically relayered so that 
they are next to each other.

gc
-- 


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




Re: Groups again

2001-07-17 Thread Geoff Canyon

At 8:23 PM + 7/17/01, jbv wrote:
- the only way to group controls is to select them first,
which makes grouping/ungrouping on the fly via script
quite cumbersome : you need to set the selected of each
control to true, then group, then set the selected of all
controls back to false. And if you don't wznt your controls
to be selected on screen during the process, you have to
perform a lock screen / unlock screen...

Depending on how much flexibility you need, relayerGroupedControls can help with this. 
You probably want pre-existing groups to make it work well, and if I understand 
correctly, each pre-existing group needs at least one object in it (but the object 
could be a point, or invisible). Then to add an existing object to a group, you simply 
set the layer of the object to the layer of the object in the group.


- it looks like grouping controls changes the numbering of
those controls : for instance I have 50 images on screen and
the user can select any of them (like image 12 to 25 and 37
to 42) and they're supposed to get automatically grouped.
What happens is that all images being in a group are
re-numbered ! Therefore I had no choice but to change
my scripts and use the id instead...
Is there any *good* reason for that kind of behavior ?

Groups are inherently part of the layering scheme of the objects on a card; take a 
look at the control browser for a card with several objects and groups on it to get a 
very clear picture of this. The control browser is like an outline, and hence you 
can't have objects that aren't on consecutive layers be in the same group. When you 
select items and group them, if necessary they are automatically relayered so that 
they are next to each other.

gc
-- 


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




Re: how do I turn off the focusColor?

2001-07-17 Thread Scott Raney

On Tue, 17 Jul 2001 Kevin Miller [EMAIL PROTECTED] wrote:

 On 17/7/01 6:34 pm, Scott Raney [EMAIL PROTECTED] wrote:
 
  2) Make it apply to all objects (i.e., buttons and players also get a
  focus border in the Motif look and feel, and it might be nice to be
  able to turn this off).
  3) Make it global or an inheritable stack property.
  4) Hack the focusColor property to have some non-existing color be a
  cue to not draw the focus border at all.
 
 It does need to apply object by object - as you do generally want this on.
 Turning it off happens on a case-by-case basis where you're doing something
 cool that the field object probably wasn't originally designed for (such as
 a multi-column list).  In such a case, no way do you want to have an extra
 object there to draw the border with.  As such it has to be 2 or 4, and I
 would go for 4, as 2 is going to be a real hassle from the cross-platform
 point of view (you have to turn this property off on Mac for buttons, but
 then turn it on again on UNIX).

Actually I hadn't even considered this tangent: Focus borders for
fields on Windows anyone?  I was only considering it as a negative
option, where setting it to false prevented it from being drawn on
Motif and Macintosh look and feel settings, but setting it to true
wouldn't cause a focus border to always be drawn for all object types
on all platforms.  And now that I consider it, I think it's probably
not worth considering ;-)

So, by your criteria I think option 2 would work too.  And I can't say
that I'm thrilled with the idea of having a color named transparent
which seems confusing to me.  Next thing you know, people will be
setting the backColor to transparent and complaining when their
fields are still opaque...
  Regards,
Scott

 Regards,
 
 Kevin
 
 Kevin Miller [EMAIL PROTECTED] http://www.runrev.com/
 Runtime Revolution Limited - Power to the Developer!
 Tel: +44 (0)131 718 4333.  Fax: +44 (0)1639 830 707.


Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...


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




Re: Groups again

2001-07-17 Thread Scott Raney

On Tue, 17 Jul 2001 jbv [EMAIL PROTECTED] wrote:

 Today I've been playing with groups in MC and found
 it quite frustrating, for 2 main reasons (if I missed
 anything please MC gurus enlighten me) :
 
 - the only way to group controls is to select them first,
 which makes grouping/ungrouping on the fly via script
 quite cumbersome : you need to set the selected of each
 control to true, then group, then set the selected of all
 controls back to false. And if you don't wznt your controls
 to be selected on screen during the process, you have to
 perform a lock screen / unlock screen...
 Frankly, I miss the groups in OMO where you could group
 any number of objects by simply listing them in a variable
 (the same kind of list that you get with the selectedobjects)...
 The good side of it was that the same object could be part
 of different groups at the same time...

Frankly I'm a little mystified that it's possible to consider the
concept of a group in OMO to be anything other than an ugly hack.  You
get none of the benefits of groups in MetaCard (e.g., clipping,
scrolling, nesting, handler and attribute inheritance, and the ability
to place them on different cards like backgrounds), they're also
purely extent-based both for selection and manupulation, and not even
really objects at all, just (as you've pointed out) some sort of
disembodied list of objects that should be moved together.

Nevertheless, being able to specify a list of controls to group (as in
group button 1 and field 2) is a useful feature, which is why it was
implemented in MetaCard years ago.  Why it wasn't documented at that
time I'm not as sure about, but I'll bug report this so it will be for
the 2.4 doc.

 - it looks like grouping controls changes the numbering of
 those controls : for instance I have 50 images on screen and
 the user can select any of them (like image 12 to 25 and 37
 to 42) and they're supposed to get automatically grouped.
 What happens is that all images being in a group are
 re-numbered ! Therefore I had no choice but to change
 my scripts and use the id instead...

Probably not a bad idea in general: referring to objects by number is
exceedingly brittle and can result in maintenance nightmares if you
ever have to change the application by adding or deleting a control.

 Is there any *good* reason for that kind of behavior ?

Yes: groups are real objects in MetaCard, so the controls have to be
children of the group, which of course means they also have to be
contiguous.  This also helps with setting up keyboard navigation so
you don't have to worry about creating a situation where you tab into
a group and then back out when navigating a set of radio buttons.
  Regards,
Scott

 Thanks. JB


Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...



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




Re: set the name of the last image bug?

2001-07-17 Thread Mark

The following works in new stacks created under MC and RR, but ONLY 
works under RR if you have the IDENTICAL script in a stack that was 
originally a HyperCard stack.

ie., it fails under MC 2.4b1, 2, and 3 under these circumstances.

SCRIPT:

on mouseUp
   answer file Select image:
   if ((it is empty) or (the result is Cancel)) then exit mouseUp
   put it into myFileName
   import paint from file myFileName
   set the name of last image to My Chosen Name
end mouseUp


The point of failure is the set the name of line.


So... is there a way to turn off the flag metacard uses to tell a 
stack originally came from hypercard to see if this clears that 
problem?

Cheers,
Mark

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