• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange Bottleneck
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Bottleneck


  • Subject: Re: Strange Bottleneck
  • From: Nigel Garvey <email@hidden>
  • Date: Sat, 7 Jun 2003 17:38:40 +0100

Steve Cunningham wrote on Fri, 6 Jun 2003 08:00:22 -0400:

> on insert_listitem(this_list, this_item, list_position)
[dot dot dot]

> -- insert the item
> if the list_position is 1 then
> set the beginning of this_list to this_item
> else if the list_position is (the list_count + 1) then
> set the end of this_list to this_item
> else
> set this_list to (items 1 thru (list_position - 1) of this_list) & ,
> {this_item} & (items list_position thru -1 of this_list)
> end if
> return this_list
> end insert_listitem

Steve, it occurs to me that when you're initialising the rows of the
matrix, 'this_item' is always the same list - 'valueList', alias
'dummyRow'. If you later change an item in one row, it will appear
changed in all of them. (You may not intend always to initialise the rows
this way, but it's what your demo script does.) An easy way round this
would be to substitute a duplicate 'this_item' at the top of the handler:

on insert_listitem(this_list, this_item, list_position)
copy this_item to this_item
-- etc.

NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Remove extra spaces from a string
  • Next by Date: Re: classic disables eppc?
  • Previous by thread: Re: Strange Bottleneck
  • Next by thread: Re: Strange Bottleneck
  • Index(es):
    • Date
    • Thread