Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 11:55 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How do I clear a dropzone?
PostPosted: April 20th, 2008, 9:41 pm 
Offline

Joined: March 21st, 2006, 10:37 pm
Posts: 31
Location: Grantham, Lincolnshire,UK
I have a bizaar problem. I am showing 6 boxes, each contains a question. I then drag other boxes onto the questions to compare the results. I've got all this aspect working.

After all 6 questions have a dropped object, I hide all 12 objects (which magically resets the 6 answer boxes to their original position).

I do this 2/3 times and after a few times around of hiding and showing the boxes, one of the question boxes becomes undroppable. It's as though it still thinks there's a dropped item.

How can I clear the dropzone in script, or see if there is an object dropped in it already??? Or is there something I'm missing.


For this message zesmail has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 20th, 2008, 9:51 pm 
Offline

Joined: March 21st, 2006, 10:37 pm
Posts: 31
Location: Grantham, Lincolnshire,UK
Just to confirm my suggestion of the problem - I made the dropzones take 2 items maximum and i've not had a problem since. The only problem is I only ever want 1 item!!!


For this message zesmail has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 23rd, 2008, 12:06 am 
Offline

Joined: March 21st, 2006, 10:37 pm
Posts: 31
Location: Grantham, Lincolnshire,UK
*bump*


For this message zesmail has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 23rd, 2008, 1:32 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
show us what you have done to get the problem.

Paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 23rd, 2008, 7:30 pm 
Offline

Joined: March 21st, 2006, 10:37 pm
Posts: 31
Location: Grantham, Lincolnshire,UK
// Hides all the original fields
function HideOriginals()
{
Original01.Hide()
Original02.Hide()
Original03.Hide()
Original04.Hide()
Original05.Hide()
Original06.Hide()
}


// Hides all the translation fields
function HideTranslations()
{
Translation01.Hide()
Translation02.Hide()
Translation03.Hide()
Translation04.Hide()
Translation05.Hide()
Translation06.Hide()
}


// Shos the items
function ShowItems(count)
{

if (count >= 1)
{
Original01.Show(true)
}
if (count >= 2)
{
Original02.Show(true)
}
if (count >= 3)
{
Original03.Show(true)
}
if (count >= 4)
{
Original04.Show(true)
}
if (count >= 5)
{
Original05.Show(true)
}
if (count >= 6)
{
Original06.Show(true)
}


if (count >= 1)
{
Translation01.Show(true)
}
if (count >= 2)
{
Translation02.Show(true)
}
if (count >= 3)
{
Translation03.Show(true)
}
if (count >= 4)
{
Translation04.Show(true)
}
if (count >= 5)
{
Translation05.Show(true)
}
if (count >= 6)
{
Translation06.Show(true)
}

}


Thats what I do. After a few times of dropping the Translations onto the Originals, one of the boxes (different every time) becomes undroppable.

However, if I allow 2+ items I never get a problem. The issue is, I only ever want one item to be dropped on an original at any one time.


For this message zesmail has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 23rd, 2008, 9:45 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Not clear how 'count' gets set.

If you allowed only 1 dropped object, and also check the option for dropped objects to be allowed to drag-off (drag wrong answer off)... that will enforce only one.

It's confusing to me. Is 'count' used to track number dropped objects OR number of true answers. How is 'count' really set?

I don't know the meaning of 'original' and 'translation', but if that corresponds to 'Question' and 'Result', then the 1st series might need tests for >=0 thru >=4 plus a =5 (that is 6, zero indexed). Then the 'Results' get displayed for >=1 thru >=5, plus the last at =6.
(that could be all 'wrong'... i'm reading between the lines, making assumptions here)

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 23rd, 2008, 11:54 pm 
Offline

Joined: March 21st, 2006, 10:37 pm
Posts: 31
Location: Grantham, Lincolnshire,UK
Count is just a count of visible objects from another bit of code. If there are 6 visible objects, all 6 'Translations' are shown. If there are 4 visible objects, 4 Translations are shown.

You are correct in thinking Translations are answers and Originals are questions.

This is all quite irrelevant to the issue though.

Just occasionally a dropbox will not accept any items, even though it is empty.


For this message zesmail has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 23rd, 2008, 11:57 pm 
Offline

Joined: March 21st, 2006, 10:37 pm
Posts: 31
Location: Grantham, Lincolnshire,UK
Actually, I think I know why it's happening.

The items position is reset on .Show(true). If I am only showing 4 items of 6, then there are two items who's positions are not reset, and therefor the boxes are not getting emptied and will not accept another item.

So how do i reset a position without showing it?


Thanks!


For this message zesmail has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group