Re: Sorting a List Field with Many Columns

2000-08-17 Thread Gregory Lypny

Thanks to all who responded to my question.  I'll play around with the 
itemdel property.  It's one that I believe HyperCard doesn't have, and I 
suspect will be very handy.

 Regards,

  Greg


_
Gregory Lypny
Associate Professor of Finance
Concordia University

_
"Take chances, make mistakes!"
   - Ms Frizzle, The Magic School Bus



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: Sorting a List Field with Many Columns

2000-08-16 Thread Blair Moxon

An easy way to do it is to create a row of buttons above a tabbed field. In
each button put the script as follows:
--first button:
on mouseUp
  sort lines of field "myField" by word 1 of each
end mouseUp

--second button:
on mouseUp
  sort lines of field "myField" by word 2 of each
end mouseUp

etc.

as for spaces between column text, there is probably an elegant way of
scripting it.. however for my purposes I just put an underscore character
"_" between words.
rgds,
Blair Moxon
[EMAIL PROTECTED]

> -Original Message-
> From: Gregory Lypny [SMTP:[EMAIL PROTECTED]]
> Subject:  Sorting a List Field with Many Columns
> 
>  I've got a list field with tab-separated strings on each line, 
> which, in effect, creates the illusion of columns.  When the field is 
> shown, I'd like users to be able to sort it using any column "title" as 
> the sort key (e.g., sort by column 1, column 2, and so on).  What's the 
> best way to handle this given that the string in each column is not one 
> word?
> 
> 

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: Sorting a List Field with Many Columns

2000-08-16 Thread Richard Gaskin

Gregory Lypny wrote:

> I've got a list field with tab-separated strings on each line,
> which, in effect, creates the illusion of columns.  When the field is
> shown, I'd like users to be able to sort it using any column "title" as
> the sort key (e.g., sort by column 1, column 2, and so on).  What's the
> best way to handle this given that the string in each column is not one
> word?

Assuming you make a user property for each of the heading buttons which
corresponds to its column number, you could do this:

  put the uColumnNumber of the target into tColNum
  set the itemdel to tab
  sort by lines of fld "Whatever" by item tColNum of each


-- 
 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%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Sorting a List Field with Many Columns

2000-08-16 Thread diskot123

>I've got a list field with tab-separated strings on each line, 
>which, in effect, creates the illusion of columns.  When the field is 
>shown, I'd like users to be able to sort it using any column "title" as 
>the sort key (e.g., sort by column 1, column 2, and so on).  What's the 
>best way to handle this given that the string in each column is not one 
>word?

try something like:
set the itemdelimiter to tab
sort field 1 by item 2 of each

regardsm
Tuviah


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: sorting

2000-02-22 Thread Scott Raney

On Tue, 22 Feb 2000, Leston Drake wrote:

> Okay, I answered my own question.
> 
> sort items of dValues descending
> 
> is the right syntax. I forgot "items".

You also forgot "numeric", at least if you want to do a numeric sort,
which from the looks of it you do.
  Regards,
Scott

PS: And you also forgot to send in a bug report about the MetaCard
crash, although at least with 2.3 I can't reproduce it ;-)

> ===
> To:   [EMAIL PROTECTED]
> From: Leston Drake
> Subject:  sorting
> 
> Can anyone help me with sorting a list of numbers from largest to smallest?
> 
> For example:
> if dValues = "0.8,1.1,1.6,0.6,2.1" then I want the result of the sort to be
> dValues ="2.1,1.6,1.1,0.8,0.6"
> 
> I've tried using the sort command, but without success.
> I've only succeeded in crashing MC (EG: "sort dValues descending by amount" will 
>kill MC)
> 
> Is there a way to do this with the sort command? MC Help seems to indicate so, but I 
>can't get figure out the syntax.
> I could obviously sort the list manually but I'm looking for something more 
>efficient.
> 
> TIA
> 
> --
> Leston Drake
> LetterPress Software, Inc.
> http://www.lpsoftware.com
> --
> 
> 
> 
> This is the MetaCard mailing list.
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> 


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


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: sorting

2000-02-22 Thread Leston Drake

Okay, I answered my own question.

sort items of dValues descending

is the right syntax. I forgot "items".

===
To: [EMAIL PROTECTED]
From:   Leston Drake
Subject:sorting

Can anyone help me with sorting a list of numbers from largest to smallest?

For example:
if dValues = "0.8,1.1,1.6,0.6,2.1" then I want the result of the sort to be
dValues ="2.1,1.6,1.1,0.8,0.6"

I've tried using the sort command, but without success.
I've only succeeded in crashing MC (EG: "sort dValues descending by amount" will kill 
MC)

Is there a way to do this with the sort command? MC Help seems to indicate so, but I 
can't get figure out the syntax.
I could obviously sort the list manually but I'm looking for something more efficient.

TIA

--
Leston Drake
LetterPress Software, Inc.
http://www.lpsoftware.com
--



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: Sorting cards?

2000-01-07 Thread Mark Talluto

KIDware Technologies
Education Software Developers
www.kidwaretech.com
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit



> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> Date: Fri, 7 Jan 2000 05:10:29 -0800 (PST)
> To: [EMAIL PROTECTED]
> Subject: Digest metacard.v003.n195
> 
> One of the more frequent questions that I get from people to whom I
> introduce Metacard is: how do you sort cards in a stack?  The feature of
> Powerpoint to show you a birds-eye view of your file, and be able to
> arrange the slides by dragging and dropping would be a nice feature to have
> in Metacard.  It seems that Metacard does not have feature, so can anyone
> help me out with a relatively easy way to sort cards?
> 
> Thanks!
> 
> Dennie


Hi Dennie.  You can go to the edit menu - Stack Properties - Click the
Properties Tab - Select the Components button.  From there you can move
cards around in order.  Hope this helps.

-Mark Talluto


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: Sorting cards?

2000-01-07 Thread Scott Raney

On Thu, 6 Jan 2000, Phil Davis wrote:

> Hi Dennie,
> 
> Dennie Hoopingarner wrote:
> > 
> > One of the more frequent questions that I get from people to whom I
> > introduce Metacard is: how do you sort cards in a stack?  The feature of
> > Powerpoint to show you a birds-eye view of your file, and be able to
> > arrange the slides by dragging and dropping would be a nice feature to have
> > in Metacard.  It seems that Metacard does not have feature, so can anyone
> > help me out with a relatively easy way to sort cards?
> > 
> 
> There's no GUI of the kind you describe, but there's a script interface
> to almost any kind of functionality you can imagine, including sorting
> cards.

There *is* sort of a GUI for this.  The "Stack Components" dialog
allows you to rearrange cards by selecting their names from a list and
moving them up or down in the stack.  It does this by setting the
layer property of the cards.  What's missing are "thumbnail" views of
the cards in a stack.  You could create these with "import snapshot"
and sizing the images down, but this might be slow for a large
presentation and you'd have to simulate the drag and drop part with
scripting.  But you should also consider that it can also be hard to
use these graphical "slide sorters" because the slides all start to
look the same when reduced to thumbnail size.
  Regards,
Scott

> -- 
> Phil Davis
> --
> [EMAIL PROTECTED]
> 
> This is the MetaCard mailing list.
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> 


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


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: Sorting cards?

2000-01-06 Thread Phil Davis

Hi Dennie,

Dennie Hoopingarner wrote:
> 
> One of the more frequent questions that I get from people to whom I
> introduce Metacard is: how do you sort cards in a stack?  The feature of
> Powerpoint to show you a birds-eye view of your file, and be able to
> arrange the slides by dragging and dropping would be a nice feature to have
> in Metacard.  It seems that Metacard does not have feature, so can anyone
> help me out with a relatively easy way to sort cards?
> 

There's no GUI of the kind you describe, but there's a script interface
to almost any kind of functionality you can imagine, including sorting
cards. The "sort" command card in the MetaTalk Reference stack (MC
2.2.5) says this about it:
 start 
sort [ [ [ marked ] cards of ]  [  ] [  ] [ by  ]

The sort command sorts either the cards in a stack or the lines or items
in a container.   is either "ascending" or "descending" with
"ascending" being the default.   is either "datetime", "text" or
"numeric" with "text" being the default.   can be any expression
which differentiates the cards or chunks in a container.  For example,
to sort the cards of a stack by a particular field treating the contents
of each field as a number, you would use something like:
sort cards numeric by field "amount"
 end --
There's a lot more there about sorting, but this is the part that talks
about sorting cards.

If you just want to move an occasional card from, say, the 14th spot in
the stack to the 3rd spot, you can do this:
set the number of card 14 to 3

With these tidbits (and a few others), you can probably create the
interface you want!
HTH,
Phil


> Thanks!
> 
> Dennie
> 
> Dennie Hoopingarner
> Assistant Director for Technology Implementation
> Center for Language Education And Research
> Michigan State University
> [EMAIL PROTECTED]
> http://clear.msu.edu/dennie
> 
> This is the MetaCard mailing list.
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm

-- 
Phil Davis
--
[EMAIL PROTECTED]

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