2014년 12월 11일 목요일

Working With Blocks Editor


i'm create an Application that is Collecting informations of Emegency or Medical Centers of some Country . These informations is too big . and i using with some "Elements from string" and a lot of "If" to connect to their numbers to make a call . these ( if , texts and ... ) getting Blocks Editor very slow . How can i solve this problem ? this is only my way to Build this app . is there anyway to get blocks editor so fast with the fast Scrolling Page ? could you show me another way or tell me how to speed up blocks editor ?

--
You have not posted any images of your blocks "Empire."   So we have to guess about your issue.


Are you having issues of refreshing the Android or emulator screen when you change your code?  The Companion takes a while to refresh the graphics screen.  The solution is to not code with a live device.   Do not Connect>Emulator, do not Connect>AI Companion...instead do not connect and code without connecting.  Doing this makes it easier to use the blocks in large apps or in apps with lots of layouts, buttons etc.

or

Are you having issues with populating a ListPicker?    How are you loading the ListPicker?   Directly from a csv file?   Using storage within a TinyDB and then converting to a list?   You might be able to use a ContactPicker or a PhoneNumberPicker instead of doing what you are doing with your code.  We on the forum do not know how you are coding, how large the list might be ...100's or numbers; 1000's or what.

Share some blocks, explain the problem in more detail and someone will provide suggestions to help improve the performance.

Some 'slowness' might be hardware issues: the cpu speed of your PC, the speed of your Internet connection, the operating system on your PC, the live virus checker etc.    You did not mention what equipment you are using to code.  These could be a factor.

--
use lists instead of multiple if statements

--
Hi again . i don't find my correct Answer . if you have a lot of lists in your Excel ( About 600 or 750 with names , Address and ... ) and you want to import them to App Inventor Ultimate 2.2 ( Offline Server ) , that way i know is this :
Using Listpicker with Elements From Strings , and if you want to make a call with each "Texts" from Elements From String ; you should use one "Phone Call" with each "if" + "Phonecall Number" + Texts ( Numbers ) to make a call . if you want to create many Options like ( Maps and ... ) you should use "ActivityStarter" and if your data is very high , you should set Many "Data Uri" . Because , your data in list is too large . Okay !?

i'm want to know , is there anyway to import my data from my Excel file and define them to make a call and a lot options WITH SHORT CODES . Because if you use a lot of "if" , App Inventor in Blocks Editor will be very slow in Scrolling and ... 

if i don't use "if" how can i define for each data to make call after click in Listpicker ?

so really , why AI2U will be slow if you use many if or ... ? if you programming in another Programs , your interface or base cannot be slow . in Additional , your base is too slow ; but your ( App ) is so good and so fast .

The Interface of Programmer should be so fast , maybe App Inventor should think about theses problems and release new version with these changes :
* Find my commands or statements in Blocks Editor with Search ( Ctrl + F ) without scrolling 
* High Capacity for Commands or Codes if you use a lot of ( if and etc ) without slow
* Fast Scrolling with a lot of Codes
* Importing Data like ( Excel or txt files ) to a listpicker and ...

i'm want the best Answer to solve my problem . sorry for my opinion .
i hope my idea , help to you and a lot of people to create new ideas and Projects .
But , Thanks a lot MIT and Google for these Free Abilities and Softwares .

--
you already received "the best answer", but without YOU doing some work, you will not be able to do it...


use lists instead of multiple if statements, 
How to work with Lists by Saj

--
let's assume, you have a list of names you display in the listpicker
now let's further assume, you have a second list of the phone numbers listNumber.

To get the corresponding phone number, just use the following block in the listpicker.afterPicking event


set Phonecall.Phonenumber to select list item listNumber
                                                                     listpicker.selectionIndex
hope that helps

--
Okay , i'm working on it later . if i get problems , i will be post .

--
Hi again and i'm so sorry to make you angry . Because , i'm don't understand what's mean : "but without YOU doing some work, you will not be able to do it..."
and Thanks for this :

set Phonecall.Phonenumber to select list item listNumber
                                                                     listpicker.selectionIndex

but , i'm want to know can i upload a text or excel file in listpicker and how to use the best way to show each items in every ElementsFromStrings without using a lot of "if" for { Calls , Events after click ( like show Address after clicks of names ) , Maps and ... } ? Because , the lenght of Statements or Codes is too Large and big cause it's make App Inventor so Weak and Slow .

--
convert your excel file into csv format and import it using the file component
you might want to show us a screenshot of what you have tried and learned from the previous answers?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--
Hi Taifun . i know how to get screenshot . but , when my blocks editor is too large , how can i get screenshot from "Viewer" window ?

--
Hello , i can't open Blocks Editor ! that error is :

notes = Browser: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 foundIn = nls-574-g789b0ce faultData = java.lang.IndexOutOfBoundsException projectId = -1
also , after refresh :

Server error: could not load file. Please try again later!
Please help , what should i do ?

--
You might have coding errors in your blocks.  In the Blocks editor, look in the lower 
left corner of the window for the yellow and red triangle icons. If the red icon has a value larger than 0, 
you have a serious coding error.  Find the block in your code that has a red triangle and 
fix it.   Red triangles always inhibit creating an apk or running a project in the 
emulator or possibly creating an aia file.     Yellow triangles are more forgiving, 
however, sometimes, these need to be fixed because they trip an internal warning and not billing puzzle piece sockets are left un-filled.
Check for coding errors, then try running/compiling again.

--
Hi again , that's not my same problem . The main problem is :
i can't open blocks editor with the error of " Report a bug " .
can i send you my source file ( .bky ) ? or tell me how can i find the problem with editing by notepad++ ? or introduce a programming book of AI to me , to programming my app with Notepad++ then build that file with App Inventor to "apk" . i want to know that codes that Compatible with App Inventor . Please help me , i can't wait anymore.

--
Maybe you need an example of how to filter
a table of data, generally coded so that
it will handle a lot of data with a small
number of blocks?
You will also need to find an example of how to load data into
your app, either from a csv formatted file in its Media section
or from the Web.  Search this forum for that.

--

댓글 없음:

댓글 쓰기