Getting error "Chunk: source is not a container".

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
Tom
Posts: 11
Joined: Wed Feb 13, 2008 10:25 pm

Getting error "Chunk: source is not a container".

Post by Tom » Fri Mar 14, 2008 12:42 am

I want to have a "Previous Record" and "Next Record" button on a background for a stack. I know that if I just do a plain:
on mouseUp
go previous card -- or go next card for the "Next Record" button
end mouseUp

The stack will wrap to the last card if I'm on the first card of the stack.

But I don't want that to happen, so I use:
on mouseUp
if this first card then
exit mouseUp
else go previous card
end mouseUp

This generates the following error:
Type Chunk: source is not a container (highlighting "if this first card then")
Object Previous Record
Line if this first card then
Hint mouseUp


What is wrong? I've tried every variation I could think of and always get the same error. My real issue is that I don't understand what "Chunk: source is not a container" means.

Tom

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Mar 14, 2008 2:47 am

Hi Tom,

this is one of the cases, where Rev is not as english like as one might wish.

Try:

if the number of this card = the number of cards of this stack

Hope that helps,

Malte

Post Reply