RE: 31142 lines/cards/records

2002-11-21 Thread Rob Cozens
<<
constant left = 1
constant mid = 2
constant right = 3

put leftValue into myArray_c left]
put midValue into myArray_c[mid]
put rightValue into myArray_c[right]

get myArray_c[alignBy] -- assumes alignBy is "left", "mid", or "right"
<<

Sorry Doug: I let you astray here.

In the above example alibnBy would have to be "1", "2", or "3".

Since I'm not sure of your objective, I'm not sure show to steer you 
straight; so here are some general thoughts:

The value of a constant never changes.  Where ever the MC engine 
finds a reference to a constant in a handler, it replaces the 
reference with the value of the constant.

In general, I have two uses for constants:

One is to reference an object indirectly so the object can be changed 
without have to rewrite every handler that uses it.  For example, 
suppose I have three icon images representing a barrel holding red, 
rose, or white wine.  I can script every button on every card or 
group with something like:

   switch wineColor
  case "red"
 set the icon of me to 123456676
 break
  case "rose"
 set the icon of me to 123456677
 break
  case "white"
 set the icon of me to 123456678
 break
   end switch

If I do so, and later need to change icons for any reason, I must go 
back to every handler where this logic is used and change the 
appropriate icon id(s) everywhere they appear.

If instead I script:

   constant redBarrel = 123456676
   constant roseBarrel = 123456677
   constant whiteBVarrel = 123456678

   switch wineColor
  case "red"
 set the icon of me to redBarrel
 break
  case "rose"
 set the icon of me to roseBarrel
 break
  case "white"
 set the icon of me to whiteBarrel
 break
   end switch

I can now change the constant declarations and leave the rest of the 
scripts unchanged.  One limitation: constants are not globals; so 
they must be declared in every script (not handler) that uses them.

Reason 2: If you look at the above examples, I think you will agree 
that "set the icon of me to redBarrel" gives a scriptor revisiting 
the handler a clearer picture than "set the icon of me to 123456676". 
So the other general use I have for constants is to make my handlers 
more descriptive.

Another example: there are currently 190 individual messages (lines) 
in a Serendipity Library message file.  Every time I need a message I 
could simply "answer sdbMessage(123)" or "put sdbMessage(55) into 
field "Message Field"; but reading the handler later gives one (who 
has not memorized the message order) no clue as to content:

  answer file with sdbMessage(123)
  if it is empty then exit thisHandlerName
  open file it
  if the result is not empty then
  beep
  answer sdbMessage(137) with sdbMessage(148)
  end if

So I use something like:

  constant sdbFilePrompt = 123
  constant sdbFileOpenError = 137
  constant sdbQuitTranslated = 148

  answer file with sdbMessage(sdbFilePrompt)
  if it is empty then exit thisHandlerName
  open file it
  if the result is not empty then
  beep
  answer sdbMessage(sdbFileOpenError) with sdbMessage(sdbQuitTranslated)
  end if

Two closing note:

1.  If you look closely at the second example, note the logic also 
facilitates maintaining multiple translations of the same stack (as 
Serendipity Library does).

2.  The second example is very close to use with an array.  If one 
were to "split sdbMessages by return", then the sdbMessage function 
could "return sdbMessages[lineNumber]" instead of "return line 
linerNumber of sdbMessages".

Hope this helps.  If I'm still off target, post more details.
--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: 31142 lines/cards/records

2002-11-20 Thread Rob Cozens
--- "Ivers, Doug E" <[EMAIL PROTECTED]> wrote:

 How do I define a constant array and insert values
 outside of all handlers at the top of a script?  Is
 it possible?

 I tried this:

 constant myArray_c[1] = "left"
 constant myArray_c[2] = "mid"
 constant myArray_c[3] = "right"



 -- D



Hi Doug,

In the Transcript dictionary it is explained that the
'constant' command only works for numbers, characters,
logical values and strings.
So I'd say it isn't possible.


I think Jan is correct, Doug; but here is a workaround

constant left = 1
constant mid = 2
constant right = 3

put leftValue into myArray_c left]
put midValue into myArray_c[mid]
put rightValue into myArray_c[right]

get myArray[alignBy] -- assumes alignBy is "left", "mid", or "right"

Since I don't know the the details of what you are trying to 
accomplish, you may need to tweek it a bit.
--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: 31142 lines/cards/records

2002-11-20 Thread Jan Schenkel
--- "Ivers, Doug E" <[EMAIL PROTECTED]> wrote:
> How do I define a constant array and insert values
> outside of all handlers at the top of a script?  Is
> it possible?
> 
> I tried this:
> 
> constant myArray_c[1] = "left"
> constant myArray_c[2] = "mid"
> constant myArray_c[3] = "right"
> 
> 
> 
> -- D
> 

Hi Doug,

In the Transcript dictionary it is explained that the
'constant' command only works for numbers, characters,
logical values and strings.
So I'd say it isn't possible.

Best regards,

Jan Schenkel.

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



RE: 31142 lines/cards/records

2002-11-20 Thread Ivers, Doug E
How do I define a constant array and insert values outside of all handlers at the top 
of a script?  Is it possible?

I tried this:

constant myArray_c[1] = "left"
constant myArray_c[2] = "mid"
constant myArray_c[3] = "right"



-- D


> -Original Message-
> From: Geoff Canyon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 22, 2002 12:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: 31142 lines/cards/records
> 
> 
> At 10:05 AM -0600 10/22/02, Dar Scott wrote:
> >On Tuesday, October 22, 2002, at 09:18 AM, Terry Vogelaar wrote:
> >
> >> I could make a comma delimited
> >> field with 31142 lines, a stack with 31142 cards or a 
> database with 31142
> >> records.
> >
> >Is there a particular reason why arrays are not on your 
> list?  Does this mean you have no field (combination) that is 
> unique?  Are there operations you need that arrays can't do well?
> >
> >I'm not really advocating arrays.  I'm too green to do that. 
>  It's just I wouldn't have thrown out arrays as candidates.
> 
> It's borderline, but I'd go with text/arrays. A stack with 
> 30,000 cards will be painfully slow to open. A database is 
> also an option, but as long as a restriction to new-ish 
> hardware isn't an issue, I'd probably stick with text/arrays.
> -- 
> 
> regards,
> 
> Geoff Canyon
> [EMAIL PROTECTED]
> 
> ___
> use-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Terry Vogelaar
>> I have 31142 items to keep track of and I wonder what the best approach
>> would be to store them. Each item should have an equal number of fields,
>> just a few, with not much text data in each. I could make a comma delimited
>> field with 31142 lines, a stack with 31142 cards or a database with 31142
>> records. I need to sort them in several ways and I wonder what the fastest
>> way is to store and access the data. Any suggestions? What are the benefits
>> of each solution?
> 
> Your question is a little confusing. First you say you have 31142 items,
> then you say each item should have an equal number of fields.
> 
> This implies you have several separate text "items" for each item.

Sorry about the confustion. I didn't mean text items, but I had to give it a
name. Maybe 'units' would have been better, because that doesn't mean
anything in transcript (as far as I know). I meaned if for those units lines
would be the right solution (which seems to be according to the good
responce several of you gave; thank you all), those 'fields' would be text
items. Otherwise it would have become a stack with cards and fields or a
database with records and fields.

> Both _search criteria_ (what 'ways' will you want to sort on) and _content_
> must be known before you can decide on preferences for setting up any
> system.
> 
> If you don't need to categorize, a single field (scrolling I assume)
> might be the fastest way to find and sort, but the mechanics of scrolling
> through a field with that many lines will likely be painfully slow. Also,
> will you be adding lines? If so, where? In other words, you may need to take
> editing features into account.

The users will not see the data as a whole, but the script presents the
units one by one, alters some data and changes that line of data.

Thanks for the help you all.

Terry


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread David Vaughan

On Wednesday, Oct 23, 2002, at 09:13 Australia/Sydney, Troy Rollins 
wrote:

On 10/22/02 7:15 PM, "Ken Norris (dialup)" <[EMAIL PROTECTED]>
wrote:


I'm having a bit of trouble visualizing this. How does it work? How 
do you
efficiently search and edit object properties?

Why make it hard? Move the content of the custom property into your
container of choice for searching and editing... then move it back 
before
saving.

This thread has been an interesting discussion. It is a similar problem 
to that I raised recently, for about one tenth the records but more 
fields each, and the outcome confirms both the direction I was taking 
from that earlier thread and also the ease with which I will ultimately 
be able to do what at first looked a daunting conversion. In fact, even 
though it will be done in a list/stack paradigm, the data set will be 
much closer to a Normal Form than was ever the case in HC, and most of 
my old data management and integrity routines can disappear 
accordingly. Thanks everyone, for the list and for the product.

regards
David

--
Troy
RPSystems, Ltd.
www.rpsystems.net

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Ken Norris (dialup)
on 10/22/02 4:13 PM, Troy Rollins at [EMAIL PROTECTED] wrote:

> On 10/22/02 7:15 PM, "Ken Norris (dialup)" <[EMAIL PROTECTED]>
> wrote:
> 
>> I'm having a bit of trouble visualizing this. How does it work? How do you
>> efficiently search and edit object properties?
> 
> Why make it hard? Move the content of the custom property into your
> container of choice for searching and editing... then move it back before
> saving.
--
Indeed. That's the way I would do it, but how fast would such a move happen?
Would it be worth the wait, or should the data just be kept in a field?

If all you want to do is search, sort, and edit, i.e., no complicted
manipulation, calculations, or special uses made of the data, then a field
would surely suffice, as Yves says, because it's just a list.

However, if Terry wants to categorize or otherwise index the data, or if a
UI is needed to operate on the data, then the picture changes.

All the best,
Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Troy Rollins
On 10/22/02 7:15 PM, "Ken Norris (dialup)" <[EMAIL PROTECTED]>
wrote:

> I'm having a bit of trouble visualizing this. How does it work? How do you
> efficiently search and edit object properties?

Why make it hard? Move the content of the custom property into your
container of choice for searching and editing... then move it back before
saving.

-- 
Troy
RPSystems, Ltd.
www.rpsystems.net

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Ken Norris (dialup)
on 10/22/02 12:02 PM, Richard Gaskin at [EMAIL PROTECTED] wrote:

> Ken Norris (dialup) wrote:
> 
>> on 10/22/02 9:05 AM, Dar Scott at [EMAIL PROTECTED] wrote:
>> 
>>> 
>>> On Tuesday, October 22, 2002, at 09:18 AM, Terry Vogelaar wrote:
>>> 
 I could make a comma delimited
 field with 31142 lines, a stack with 31142 cards or a database with 31142
 records.
>>> 
>>> Is there a particular reason why arrays are not on your list?  Does this
>>> mean you have no field (combination) that is unique?  Are there operations
>>> you need that arrays can't do well?
>>> 
>>> I'm not really advocating arrays.  I'm too green to do that.  It's just I
>>> wouldn't have thrown out arrays as candidates.
>> --
>> Arrays would work for indexing or searching, but not for storage. When you
>> close, variable contents are not saved.
> 
> You can save them as properties in an object.
> One more reason I love using stack files for data storage.
--
Now there's something I didn't expect. I like it. Yea Rev!

Now I'm interested too. I'm also a fan of using data stacks, but they do
have some drawbacks.

I'm having a bit of trouble visualizing this. How does it work? How do you
efficiently search and edit object properties?

I haven't tried a 'find' in Rev, but in HC it's very fast in fields across a
stack. If you have some kind of idea where you're going, you can use it with
indexes. I've never seen an array search that even comes close.

TIA,
Ken N.





___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Richard Gaskin
Ken Norris (dialup) wrote:

> on 10/22/02 9:05 AM, Dar Scott at [EMAIL PROTECTED] wrote:
> 
>> 
>> On Tuesday, October 22, 2002, at 09:18 AM, Terry Vogelaar wrote:
>> 
>>> I could make a comma delimited
>>> field with 31142 lines, a stack with 31142 cards or a database with 31142
>>> records.
>> 
>> Is there a particular reason why arrays are not on your list?  Does this
>> mean you have no field (combination) that is unique?  Are there operations
>> you need that arrays can't do well?
>> 
>> I'm not really advocating arrays.  I'm too green to do that.  It's just I
>> wouldn't have thrown out arrays as candidates.
> --
> Arrays would work for indexing or searching, but not for storage. When you
> close, variable contents are not saved.

You can save them as properties in an object.
One more reason I love using stack files for data storage.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Ken Norris (dialup)
on 10/22/02 9:05 AM, Dar Scott at [EMAIL PROTECTED] wrote:

> 
> On Tuesday, October 22, 2002, at 09:18 AM, Terry Vogelaar wrote:
> 
>> I could make a comma delimited
>> field with 31142 lines, a stack with 31142 cards or a database with 31142
>> records.
> 
> Is there a particular reason why arrays are not on your list?  Does this
> mean you have no field (combination) that is unique?  Are there operations
> you need that arrays can't do well?
> 
> I'm not really advocating arrays.  I'm too green to do that.  It's just I
> wouldn't have thrown out arrays as candidates.
--
Arrays would work for indexing or searching, but not for storage. When you
close, variable contents are not saved.

All the best,
Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Ken Norris (dialup)
on 10/22/02 8:18 AM, Terry Vogelaar at [EMAIL PROTECTED] wrote:

> I have 31142 items to keep track of and I wonder what the best approach
> would be to store them. Each item should have an equal number of fields,
> just a few, with not much text data in each. I could make a comma delimited
> field with 31142 lines, a stack with 31142 cards or a database with 31142
> records. I need to sort them in several ways and I wonder what the fastest
> way is to store and access the data. Any suggestions? What are the benefits
> of each solution?
--
Terry,

Your question is a little confusing. First you say you have 31142 items,
then you say each item should have an equal number of fields.

This implies you have several separate text "items" for each item.

Both _search criteria_ (what 'ways' will you want to sort on) and _content_
must be known before you can decide on preferences for setting up any
system.

1) If you don't need to categorize, a single field (scrolling I assume)
might be the fastest way to find and sort, but the mechanics of scrolling
through a field with that many lines will likely be painfully slow. Also,
will you be adding lines? If so, where? In other words, you may need to take
editing features into account.

2) If there is any chance you will want to add other data, you should
consider the stack of cards. You will have more space to work with, and all
the data is still searchable.

3) If you will want to categorize, you should consider a main stack with
substacks. This way you can set up a table of contents and/or index, and/or
several different search methods, and set it up to sort or edit each
substack separately, which, in this case, would be faster than searching and
sorting the whole list.

4) Develop a stack with a search-sort-edit engine that can modify results
and can, itself, be modified, as a front-end UI, to access external data
stacks or files. This way, you can bring in the data and sort, search,
and/or edit however you like without affecting the original data until you
save it back. This may be the slowest, but it allows for easy backup, more
security, and an ability to modify the operating stack features without
affecting the data.

HTH,
Ken N. 



___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Rob Cozens
I have 31142 items to keep track of and I wonder what the best approach
would be to store them. Each item should have an equal number of fields,
just a few, with not much text data in each. I could make a comma delimited
field with 31142 lines, a stack with 31142 cards or a database with 31142
records. I need to sort them in several ways and I wonder what the fastest
way is to store and access the data. Any suggestions? What are the benefits
of each solution?

Terry




A field 


Hi Terry,

If you need to sort the items, Yves is right: it's the only solution 
of the three that treats the items as a group.

However there is also the alternative of creating multiple indexes to 
the cards or db records, which points one to the specific item 
instead of all 31 thousand.

If I were making the choice I would consider:

* How many sorts or indexes are required?

* How dynamic is the data once captured?

* Does the user spend more time dealing with a few individual items 
or dealing with the entire 31 thou?
--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: 31142 lines/cards/records

2002-10-22 Thread Geoff Canyon
At 10:05 AM -0600 10/22/02, Dar Scott wrote:
>On Tuesday, October 22, 2002, at 09:18 AM, Terry Vogelaar wrote:
>
>> I could make a comma delimited
>> field with 31142 lines, a stack with 31142 cards or a database with 31142
>> records.
>
>Is there a particular reason why arrays are not on your list?  Does this mean you 
>have no field (combination) that is unique?  Are there operations you need that 
>arrays can't do well?
>
>I'm not really advocating arrays.  I'm too green to do that.  It's just I wouldn't 
>have thrown out arrays as candidates.

It's borderline, but I'd go with text/arrays. A stack with 30,000 cards will be 
painfully slow to open. A database is also an option, but as long as a restriction to 
new-ish hardware isn't an issue, I'd probably stick with text/arrays.
-- 

regards,

Geoff Canyon
[EMAIL PROTECTED]

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Richard Gaskin
> I have 31142 items to keep track of and I wonder what the best approach
> would be to store them. Each item should have an equal number of fields,
> just a few, with not much text data in each. I could make a comma delimited
> field with 31142 lines, a stack with 31142 cards or a database with 31142
> records. I need to sort them in several ways and I wonder what the fastest
> way is to store and access the data. Any suggestions? What are the benefits
> of each solution?

Sorting is fastest in one contiguous chunk, but locating, adding, and
deleting specific lines is much faster in an array.

Fortunately you can use both interchangeably, thanks to the split and
combine commands.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread yves COPPE
I have 31142 items to keep track of and I wonder what the best approach
would be to store them. Each item should have an equal number of fields,
just a few, with not much text data in each. I could make a comma delimited
field with 31142 lines, a stack with 31142 cards or a database with 31142
records. I need to sort them in several ways and I wonder what the fastest
way is to store and access the data. Any suggestions? What are the benefits
of each solution?

Terry




A field 
--
Greetings.

Yves COPPE

Email : [EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: 31142 lines/cards/records

2002-10-22 Thread Dar Scott

On Tuesday, October 22, 2002, at 09:18 AM, Terry Vogelaar wrote:


I could make a comma delimited
field with 31142 lines, a stack with 31142 cards or a database with 31142
records.


Is there a particular reason why arrays are not on your list?  Does this 
mean you have no field (combination) that is unique?  Are there operations 
you need that arrays can't do well?

I'm not really advocating arrays.  I'm too green to do that.  It's just I 
wouldn't have thrown out arrays as candidates.

Dar

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


31142 lines/cards/records

2002-10-22 Thread Terry Vogelaar
I have 31142 items to keep track of and I wonder what the best approach
would be to store them. Each item should have an equal number of fields,
just a few, with not much text data in each. I could make a comma delimited
field with 31142 lines, a stack with 31142 cards or a database with 31142
records. I need to sort them in several ways and I wonder what the fastest
way is to store and access the data. Any suggestions? What are the benefits
of each solution?

Terry

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution