Can LC Copy a group into Scroller group? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Can LC Copy a group into Scroller group? - Solved
Can LC copy a group "ClipBoard_NO" into a specfic location
of a group "lorem" in the scrooler of this
stack with a button?
Small test stack is attached.
Thanks,
David
of a group "lorem" in the scrooler of this
stack with a button?
Small test stack is attached.
Thanks,
David
- Attachments
-
- Copy group_Into_group Example.livecode.zip
- (4.78 KiB) Downloaded 215 times
Last edited by DR White on Thu May 14, 2020 10:00 pm, edited 1 time in total.
Re: Can LC Copy a group into Scroller group?
Hi,
I see this is a new twist on the other thread. Try this in the button script of your sample stack:
Now this simply sets the loc of the new group to the loc of the target group. In the other thread I had the feeling that the scroll of the target group was also of importance. Is this still so/
Craig
I see this is a new twist on the other thread. Try this in the button script of your sample stack:
Code: Select all
on mouseUp
clone grp "clipBoard_NO" as "XYZ"
set the loc of grp "XYZ" to the loc of grp "scrollArea"
end mouseUp
Craig
Re: Can LC Copy a group into Scroller group?
Craig,
The location of the inserted group into the scroller group has to be specific. The inserted groups need to form a rung of
PLC (programmable Logic Controller) code and look something like:
|
|-----| |----------| |-------( )------|
Thanks
The location of the inserted group into the scroller group has to be specific. The inserted groups need to form a rung of
PLC (programmable Logic Controller) code and look something like:
|
|-----| |----------| |-------( )------|
Thanks
Re: Can LC Copy a group into Scroller group?
To any others here, note that the construction "last group" still is not supported by LiveCode. The handler:
fails, as it always has, because LC does not allow the keyWord "last" to work with groups. It has no issue with any other control. I thought this had been fixed, since this was the first attempt I made for Dr White.
Craig
Code: Select all
on mouseUp
clone grp "clipBoard_NO"
set the loc of last group to the loc of grp "scrollArea"
end mouseUp
Craig
Re: Can LC Copy a group into Scroller group?
I figured as much all along. But you have given no information at all about how those locs are to be set. I had thought that it involved the scroll of the group.The location of the inserted group into the scroller group has to be specific.
Are successive clones to be stacked somehow? What property of any kind is to be the measure of setting these locs? I just don't have a clue.
Craig
Re: Can LC Copy a group into Scroller group?
Hi all,
here a workaround:
Klaus
here a workaround:
Bestdunbarx wrote: ↑Thu May 14, 2020 2:21 pmTo any others here, note that the construction "last group" still is not supported by LiveCode:Code: Select all
on mouseUp clone grp "clipBoard_NO" set the loc of grp (the num of grps) to the loc of grp "scrollArea" end mouseUp
Klaus
Re: Can LC Copy a group into Scroller group?
The user will scroll to the insertion point and touch the point that the group will be inserted.
Re: Can LC Copy a group into Scroller group?
Dr. White.
Aha.
It is your intention that the user clone the group, then scroll, and then click at the desired loc. The clone jumps to the clickLoc.
So are we done if the loc of the last group (which can only be identified with either Klaus' kluge or the naming thing that I wrote about) is set to the clickLoc?
Craig
Aha.
It is your intention that the user clone the group, then scroll, and then click at the desired loc. The clone jumps to the clickLoc.
So are we done if the loc of the last group (which can only be identified with either Klaus' kluge or the naming thing that I wrote about) is set to the clickLoc?
Craig
Re: Can LC Copy a group into Scroller group?
The clone command puts the long name or ID in the "it" variable.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Can LC Copy a group into Scroller group?
Yes.
Why are you using "clone" instead of "copy"?
I don't understand how it would be done.
Could you use the stack that I attached and show me an example?
Thanks
- Attachments
-
- Copy group_Into_group Example.livecode.zip
- (4.81 KiB) Downloaded 203 times
Re: Can LC Copy a group into Scroller group?
Both would work. I used "clone" because that command allows you to name the new, er, copy at creation time.Why are you using "clone" instead of "copy"?
Put this into the script of group "scrollArea":
Code: Select all
on mouseUp
put the clickLoc into tLoc
clone grp "clipBoard_NO" as "XYZ"
set the loc of grp "XYZ" to tLoc
end mouseUp
Craig
Re: Can LC Copy a group into Scroller group?
Did not work.
After the the group is cloned to location, it dose not scroll with the scroller.
It's like it did not become part of the scrolling group.
After the the group is cloned to location, it dose not scroll with the scroller.
It's like it did not become part of the scrolling group.
Re: Can LC Copy a group into Scroller group? - Solved
Craig and Klaus,
Thanks so much your help. You provided me with the
information to get me to the code below that seems to work.
on mouseUp
put the clickLoc into tLoc
clone grp "clipBoard_NO" as "XYZ"
copy grp "XYZ" to grp "scrollArea"
set loc of grp "XYZ" to tLoc
end mouseUp
The LC Team is the BEST,
David
Thanks so much your help. You provided me with the
information to get me to the code below that seems to work.
on mouseUp
put the clickLoc into tLoc
clone grp "clipBoard_NO" as "XYZ"
copy grp "XYZ" to grp "scrollArea"
set loc of grp "XYZ" to tLoc
end mouseUp
The LC Team is the BEST,
David
Re: Can LC Copy a group into Scroller group?
David.
Glad you found a way. I did not know about the new group having to scroll after it was created. Know that you can "copy" a control directly into any group. See the dictionary. This will shorten your handler a bit.
Craig
Glad you found a way. I did not know about the new group having to scroll after it was created. Know that you can "copy" a control directly into any group. See the dictionary. This will shorten your handler a bit.
Craig