Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
dunbarx wrote:... I am amazed at how attractive they are to new users. So many start right in with them embedded in their projects, oftentimes the central control...
Craig
It just shows the need for a feature-rich table widget that is not as complex as the Datagrid, but more usable than the primitive table object that comes with LC.
It is a major deficiency that needs to be corrected.
this code is in stack 8 and goes in to table called "table" in stack 8
i just want to know how i can move the button different stack e.g stack 1 and it input the data into stack 8
Sorry, still have no idea what exactly you are trying to do!?
Please also post the script of your "additem" handler!
dispatch "additem" "Chicken Steak","",5 to "table" of card "8" of stack "Restraunt Template"
1. You need to supply the TYPE of object that you are addressing:
... to FIELD "table"...
or:
... to GROUP "table"...
2. NEVER EVER name your objects/cards/stacks as NUMBERS! NEVER!
That is asking for trouble, since the engine does not differ between the STRING 8 and the NUMBER 8,
so it looks for a card NUMBER 8 and will throw an error if there are less cards in the target stack!
dispatch "additem" "Chicken Steak","",5 to "table" of card "8" of stack "Restraunt Template"
1. You need to supply the TYPE of object that you are addressing:
... to FIELD "table"...
or:
... to GROUP "table"...
2. NEVER EVER name your objects/cards/stacks as NUMBERS! NEVER!
That is asking for trouble, since the engine does not differ between the STRING 8 and the NUMBER 8,
so it looks for a card NUMBER 8 and will throw an error if there are less cards in the target stack!
i didnt name the card as a number but they all called "Restraunt Template" then next to it has (1), (2) etc.
what im trying is to move information from the 1st stack by clicking button to stack 8 into my basic table field
I would recommend to use the correct syntax as Sturgis suggested:
...
dispatch "additem" to field "table" of card 8 of stack "Restraunt Template" WITH "Chicken Steak","",5
...
And if that does not work I will not ask a 6th time for the script of your handler "additem"
Klaus wrote:I would recommend to use the correct syntax as Sturgis suggested:
...
dispatch "additem" to field "table" of card 8 of stack "Restraunt Template" WITH "Chicken Steak","",5
...
And if that does not work I will not ask a 6th time for the script of your handler "additem"
okay i did that and it worked but then script of the handler "add item" showed up
command addItem pMenuItem,pDrinkItem,pCost
lock screen
if field "table" is not empty then put cr after field "table"
put pMenuItem & tab & pDrinkItem & tab & "£" & pCost & tab & 1 & tab & "£" & pCost after field "table"
if (the number of lines in field "table" mod 2) is 0 and field "table" is not empty then
else
set the backgroundcolor of line -1 of field "table" to empty
end if
unlock screen
end addItem
and sorry was confused what u were asking but here it is