2017년 1월 9일 월요일

Runtime error: function is in list? cannot accept the following arguments


So I'm trying to have a multi screen app that uses the is in list? function on the CardView screen (file attached), however I'm using a tinyDB.getvalue for the thing to test and it seemed to work, but it would say that there was an error where after the value it would say that there was also an empty string after it, and it said that it could not accept those arguments. This is for a school computer science project and it is really important, so please help out! Thanks in advance!


--
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks  including a screenshot of your error message...


To download the aia file, upload it to  App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...

--
thanks for the feedback and i will try to make a better post another time

-- 
So I'm trying to have a multi screen app that uses the is in list? function on the CardView screen (file attached), however I'm using a tinyDB.getvalue for the thing to test and it seemed to work, but it would say that there was an error where after the value it would say that there was also an empty string after it, and it said that it could not accept those arguments, and in the blocks following the ones attached, it would add the item to the list if it was not there already, but because of this error, the item was also not added to the list. This is for a school computer science project and it is really important, so please help out! Thanks in advance!

project error message.png 표시 중

is in list function blocks.PNG 표시 중


-- 
i have made another post hopefully it is easier to help me now

-- 
From your screen shots, you did not have any kind of list in global cardsfront.

I did not look in your .aia file.

Be sure that global cardsfront is initialized to empty list.
Not to blanks or empty string!

Don't fall into the common trap of accepting blank string as the not found value from TinyDB if you are retrieving a list from TinyDB.
If you want a list from TinyDB, ask for create empty list as the default.

--
So I'm trying to have a multi screen app that uses the is in list? function on the CardView screen (file attached), however I'm using a tinyDB.getvalue for the thing to test and it seemed to work, but it would say that there was an error where after the value it would say that there was also an empty string after it, and it said that it could not accept those arguments, and following the blocks in the picture is that if it was not there then it would add it to the list cards_front, but because of this error it was not added to the list. This is for a school computer science project and it is really important, so please help out! 

is in list function blocks.PNG 표시 중

project error message.png 표시 중


-- 
So my cardsfront variable was initialized to an empty list and I changed the empty string in the valueIfTagNotThere to create empty list (though I haven't tested to see if there error is still there yet, I'm not too sure it would work since the value in the tinyDB is not a list but a regular variable), however following this test I have a procedure that adds the item to the list if it is not there, and if I am using the same getvalue from the TinyDB (it is not a list, just a regular variable), then should I set the valueIfTagNotThere to an empty string? Cause if I set it to create an empty list then it would end up making a list inside the list cardsfront, but if I have an empty string then there would just be an empty space, so I'm not sure what value i should put for the valueIfTagNotThere.

-- 
Use a create empty list block for valueIfTagNotThere.

-- 
The revisions that have been suggested so far have not fixed the problem, so I hope someone is willing to take the time to download the aia file so that they can know more about how this problem should be fixed.

-- 
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks...

To download the aia file, upload it to  App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...

-- 
I looked at V3 .aia

You are not following recommended screen management .
Never open Screen1.
For every screen open, there should be  screen close.
See the FAQ Screens section or read the last few posts in this board from every body and his brother who made this error.

Your CardView left and right buttons are not handling end cases properly.
Pay attention to falling off the edge,
and don't go past the end if at the end.
You are testing redundantly too.

Pay attention to CardIndex when there are no cards yet.

-- 
Ok so I have changed my screen management to the tribblehunter method and if possible could you please take a look at a more recent version of the app? I have decided to take out the is in list? function and used a different approach, however it is not seeming to work very well, and I currently do not have access to a device or the emulator. Also, I'm not too sure how to fix the left and right buttons, so could you please give some guidance. This is becoming a rather urgent problem as I have to make a pitch video for the app, and have to present it on Thursday. Thanks in advance!


-- 
to find out what's going on, use Do it to debug your blocks, see also tip 4 here

--
Change the less than or equal test in the right button to a strict less than comparison,
or else you will fall off the n+1 end.

-- 
Also, see the Companion and Emulator section of this FAQ for alternative emulators ...

-- 
For some reason the tribblehunter method is not working properly, so I am just going to use open a new screen; not sure if that really matters. Thank you for sharing the information about emulators!

-- 


댓글 없음:

댓글 쓰기