scrolling field list

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

scrolling field list

Post by smash » Sat Mar 14, 2009 2:25 am

i am trying to work out how to use a scrolling field list
i have 2 types of questions (as usual)
1)
i have 2 scrolling lists one has a list of things, and i want to press a button that (what ever is highligted) will transfer to the othe scroll list field

2)
i have 4 scroll list fields, and i want to press a button, and what ever is highlighted in all 4 scroll lists is transfered to another field.

i have tried many many scripts, but just cant seem to find the right combination to do number 1 question.

cheers

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sat Mar 14, 2009 7:27 am

For your first question, this should get you started.

Code: Select all

on mouseUp
  -- fetch the linenumber of the hilited lines of the source field
  put the hilitedLines of field "Source" into tHilitedLines
  repeat for each item tHilitedine in tHilitedLines
    -- append it to our result list
    put line tHilitedLine of field "Source" & return after tResult
  end repeat
  -- get rid o the trailing 'return' character before updating the target field
  delete char -1 of tResult
  put tResult into field "Target"
end mouseUp
Which should give you a pretty clear idea of what to do when you have 4 source fields :-)

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Sat Mar 14, 2009 7:36 am

wow janschenkel

once again i was no where near, even remotely close :oops:

thank you, i am going to try it out now

thank you

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Sat Mar 14, 2009 7:49 am

hi jan,
it is saying char 1 is wrong with this line
put line tHilitedLine of field "ScrollingBreed" & return after tResult
??? it looks good to me ???

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Sat Mar 14, 2009 7:55 am

its ok jan, i found the problem
repeat for each item tHilitedine in tHilitedLines
i added a L to tHilitedine = tHilitedLines
AND IT WORKED FINE

thank you

Post Reply