PDA

View Full Version : Strange behaviour



Peter Crook
21-Jul-2009, 07:18 AM
Two of the views in an application have one image container in each. I was getting 'Error 51: Bad format in expression (operand)' when the Object command of the Image Container was executed in the 2nd view. If I changed the order in which the views were included no error occurred.:confused:

Peter

Vincent Oorsprong
21-Jul-2009, 08:50 AM
Peter,

If you can give a test workspace where it happens I hope I will be able to tell you what is wrong. I don't think it has anything to do with the cImageContainer, but let's see.

Peter Crook
21-Jul-2009, 09:36 AM
I don't think it has anything to do with the cImageContainer, but let's see.
Hi Vincent

You're right, it hasn't. If only I'd waited until I'd had my lunch before posting I'd have realised the problem.

In the view that has to come second for it to work I'd added a cDBImageContainer as an experiment when 0.9 first came out, and put the Use command immediately before it (ie within the view object). It worked so I left it in and thought no more about it.

In the view that had originally come second and had the problem the Use command was at the top of the package where it should be, but of course the file wasn't being included because of the earlier use command. But the object in that view couldn't access the code in the package because it hadn't been included at desktop level.:o

Thanks for taking the time to reply

Regards

Peter

Vincent Oorsprong
21-Jul-2009, 10:54 AM
Peter,

Is ok. One small correction; a USE statement outside the view but inside the component code is usually included in the client area and not at desktop level.

Peter Crook
22-Jul-2009, 08:45 AM
Peter,

Is ok. One small correction; a USE statement outside the view but inside the component code is usually included in the client area and not at desktop level.
Of course! Sloppy thinking on my part! What I was really getting at was that all views would be able to 'see' it.

Peter