name options
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
name options
Hey im trying to build some sort of sports app, but i have one big issue... how to create an function to sort all the players and how to select each one for example goal, foul and so on.
does any one have any suggestion?
does any one have any suggestion?
Re: name options
Hi.
Look up the "sort" and "sort container" commands in the dictionary. Make a list, and then play with the "sortKey"
Play with that a lot.
As for picking one line out of many, We must know more about what you need and intend. And you may well need to clarify that for yourself as well. The good news is that we will get you going very quickly.
Cfraig Newman
Look up the "sort" and "sort container" commands in the dictionary. Make a list, and then play with the "sortKey"
Play with that a lot.
As for picking one line out of many, We must know more about what you need and intend. And you may well need to clarify that for yourself as well. The good news is that we will get you going very quickly.
Cfraig Newman
Re: name options
thank you i will look at that.
so for example, if i make a soccer app it have to have 15 players in each team, So i need somewhere to add those players like a "bin" or "base", so if example 14 scores a goal i want to be able to choose him from a list. does this explains anything?
so for example, if i make a soccer app it have to have 15 players in each team, So i need somewhere to add those players like a "bin" or "base", so if example 14 scores a goal i want to be able to choose him from a list. does this explains anything?
Re: name options
Hi.
I think you should start with a scrolling list field. Pull one from the tools palette. Resize it so it has at leas 15 lines. Make a button. Put this into its script:
Now in the scrolling field script itself:
Play around for a minute, and see what you might see. What might be the value of the "selectedLine", when it is alway the same as the clickLine?
Craig
I think you should start with a scrolling list field. Pull one from the tools palette. Resize it so it has at leas 15 lines. Make a button. Put this into its script:
Code: Select all
on mouseUp
repeat with y = 1 to 15
put "Player" & y into line y of fld 1
end repeat
end mouseUp
Code: Select all
on mouseUp
answer the clickText & return & the clickLine & return & the selectedLine
end mouseUp
Craig
Re: name options
Yes Craig! this is a good start. how can i make a function to add players name and so on`? right now the buttom makes 15 players but what if i write all those in a field and then load them into the scrolling field? what do you think?
Re: name options
is it possible to make a script for a socket example ( when i press F10 I add a score)??
Re: name options
Hi.
It is possible to do anything you can think of. Simply and quickly, and enjoyably.
Where are you with learning LC? Have you written a handler? Created objects on a card? This has to come first, before either of us starts to answer any of the questions you have. Write back...
Craig
It is possible to do anything you can think of. Simply and quickly, and enjoyably.
Where are you with learning LC? Have you written a handler? Created objects on a card? This has to come first, before either of us starts to answer any of the questions you have. Write back...
Craig
Re: name options
im makeing a caspar cg client and I have the whole client ready im just trying to adjust and improve some functions. Im working as a proffesional tv-graphics, and now im trying to build my own client that have all my needs. so far i have everything but im trying to buid this player function and see if its possile to use function buttuns as functions. (we use stuff like that on tv, F2 to add screbugg, F10 to remove all GFX)


Re: name options
You have constructed a nice display. My latest question was more along the lines of "have much have you worked with the LC language"?
Try this. I hope the field with the player list is named "Tranare Borta" (in the card script)
Please let me know if you can read and understand this handler. It will help me know how to help you. Do you see the checks to determine valid data?
Craig
Try this. I hope the field with the player list is named "Tranare Borta" (in the card script)
Code: Select all
on functionKey tkey
switch tKey
case"6"
ask "Select Player"
if it is among the lines of fld "tranare borta" then put it into tPlayer else exit to top
ask "Enter score"
if it is an integer then put it into newScore else exit to top
put lineOffset(tPlayer, fld "tranare borta") into tLine
put newScore into item 2 of line tLine of fld "tranare borta"
break
case "10"
answer "Delete all players?" with "Delete" or "Cancel"
if it is "delete" then put "" into fld "tranare borta"
break
end switch
end functionKey
Craig
Re: name options
Hi all,
I did some tests recently and found that the system is "eating" most FunctionKeys on the Mac!
I could only make F5, F6 and F13 make work/respond in LC!
(Factory) system settings on Mac:
F1 to F2 = monitor brightness
F3 = exposee
F4 = dashboard
F7 to F12 = iTunes controls and system loudness
F14 to F15 = no idea, but do not work in LC.
Best
Klaus
I did some tests recently and found that the system is "eating" most FunctionKeys on the Mac!
I could only make F5, F6 and F13 make work/respond in LC!
(Factory) system settings on Mac:
F1 to F2 = monitor brightness
F3 = exposee
F4 = dashboard
F7 to F12 = iTunes controls and system loudness
F14 to F15 = no idea, but do not work in LC.
Best
Klaus
Re: name options
Klaus.
These can be turned of on a Mac in the System preferences, "Use all F1,F2..." checkBox.
Though the explanation right below the checkBox seems to be backwards,
Craig
EDIT.
Your are right about F14 and F15. But 1-13 work OK.
These can be turned of on a Mac in the System preferences, "Use all F1,F2..." checkBox.
Though the explanation right below the checkBox seems to be backwards,
Craig
EDIT.
Your are right about F14 and F15. But 1-13 work OK.
Re: name options
Hi Craig,
We cannot assume that every potential user of our software has done this!
Best
Klaus
yes, sure, that's why I wrote "(Factory) system settings...".dunbarx wrote:These can be turned of on a Mac in the System preferences, "Use all F1,F2..." checkBox.
We cannot assume that every potential user of our software has done this!

Best
Klaus
Re: name options
Wow craig this script Helped me a lot! i can do everything with it! It made the app so work friendly now.
Re: name options
Good.
But are you sure you want to use function keys to invoke those actions? I rarely do, reserving them for things that are more universal.
Buttons are nice, or menus.
Craig
But are you sure you want to use function keys to invoke those actions? I rarely do, reserving them for things that are more universal.
Buttons are nice, or menus.
Craig
Re: name options
im not going to use them like you writed, im going to use it to show Scorebug and remoove all grapgics.