Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 0ebae16

Browse files
Use it instead of the last control as the result of clone + some more tweaks
1 parent 16cac52 commit 0ebae16

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,7 +3474,7 @@ on revIDECreateObject pObjectTypeID, pTarget, pLoc
34743474
end revIDECreateObject
34753475

34763476
on revIDECloneObject pLongID
3477-
if word 1 of pLongID is "card" or word 1 of pLongID is "stack"then
3477+
if word 1 of pLongID is "card" or word 1 of pLongID is "stack" then
34783478
clone pLongID
34793479
else
34803480

@@ -3485,12 +3485,10 @@ on revIDECloneObject pLongID
34853485
add 20 to item 1 of tLoc
34863486
add 20 to item 2 of tLoc
34873487

3488-
put revIDECardOfObject(pLongID) into tTarget
3489-
if not exists(tTarget) then return __revIDEError("Cannot create object. Target does not exist:" && tTarget)
3490-
3491-
3488+
if not exists(pLongID) then return __revIDEError("Cannot create object. Target does not exist:" && pLongID)
3489+
34923490
clone pLongID
3493-
put the long ID of the last control into tCreatedControlID
3491+
put the long ID of it into tCreatedControlID
34943492
set the loc of tCreatedControlID to tLoc
34953493
end if
34963494
end revIDECloneObject

0 commit comments

Comments
 (0)