F fishwolf Well-Known Member Licensed User Longtime User May 12, 2016 #1 I have this error in many case during the debug java.lang.NumberFormatException: For input string: "23:59" i set TimeNext = "23:59" of if TimeNext == "23:59" if i clean the project, the error go away
I have this error in many case during the debug java.lang.NumberFormatException: For input string: "23:59" i set TimeNext = "23:59" of if TimeNext == "23:59" if i clean the project, the error go away
LucaMs Expert Licensed User Longtime User May 13, 2016 #2 fishwolf said: NumberFormatException Click to expand... Are you sure you have not declared TimeNext as "numeric" (Int, Long, ...)? fishwolf said: if TimeNext == "23:59" Click to expand... Strangely, "==" works; where can I find a list of operators (and key words)? [Should I open a new thread for this question?] Upvote 0
fishwolf said: NumberFormatException Click to expand... Are you sure you have not declared TimeNext as "numeric" (Int, Long, ...)? fishwolf said: if TimeNext == "23:59" Click to expand... Strangely, "==" works; where can I find a list of operators (and key words)? [Should I open a new thread for this question?]
F fishwolf Well-Known Member Licensed User Longtime User May 13, 2016 #3 LucaMs said: Are you sure you have not declared TimeNext as "numeric" (Int, Long, ...)? as string, if i remove the ":" work fine Strangely, "==" works; where can I find a list of operators (and key words)? [Should I open a new thread for this question?] Click to expand... i have the similar problem with < or >, if i remove ":" work fine i think that a string in this format it's confuse with date/time format Upvote 0
LucaMs said: Are you sure you have not declared TimeNext as "numeric" (Int, Long, ...)? as string, if i remove the ":" work fine Strangely, "==" works; where can I find a list of operators (and key words)? [Should I open a new thread for this question?] Click to expand... i have the similar problem with < or >, if i remove ":" work fine i think that a string in this format it's confuse with date/time format
Erel B4X founder Staff member Licensed User Longtime User May 13, 2016 #4 What is the type of TimeNext? Upvote 0
F fishwolf Well-Known Member Licensed User Longtime User May 13, 2016 #5 Erel said: What is the type of TimeNext? Click to expand... string Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 13, 2016 #6 Can you post the full error message from the logs? Can you upload the project? Upvote 0
F fishwolf Well-Known Member Licensed User Longtime User May 15, 2016 #7 Erel said: Can you post the full error message from the logs? Can you upload the project? Click to expand... Code: Copy Dim Item as Map Dim TimeMeteo As String Dim NameMeteo As String TimeMeteo = Item.Get("time") Log("TimeMeteo=" & TimeMeteo) If TimeMeteo >= "19:00" Or TimeMeteo <= "05:00" Then NameMeteo = "night_" Else NameMeteo = "day_" End If error Code: Copy TimeMeteo=01:00 An error occurred: (Line: 524) 524 java.lang.NumberFormatException: For input string: "19:00" i haven't other similar errors, now i must clean the project for each run. Code: Copy IndTimes=0 time=01:00 TimeNext= Error occurred on line: 44 (CustomListView) *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[2] Stack Trace: ( CoreFoundation __exceptionPreprocess + 182 libobjc.A.dylib objc_exception_throw + 44 CoreFoundation -[__NSPlaceholderArray initWithObjects:count:] + 405 CoreFoundation +[NSArray arrayWithObjects:count:] + 68 MeteoSpot -[b4i_forecasts _itemtimes::::::] + 769 MeteoSpot -[b4i_forecasts _showforecasts:] + 18683 MeteoSpot -[b4i_forecasts _jobdone:] + 4863 CoreFoundation __invoking___ + 29 CoreFoundation -[NSInvocation invoke] + 360 MeteoSpot +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 2069 MeteoSpot -[B4ICommon CallSubDebug4::::] + 894 MeteoSpot -[B4ICommon CallSubDebug2::::] + 350 MeteoSpot -[b4i_httpjob _complete::] + 887 MeteoSpot -[b4i_httputils2service _completejob::::] + 1723 MeteoSpot -[b4i_httputils2service _hc_responsesuccess::] + 771 CoreFoundation __invoking___ + 29 CoreFoundation -[NSInvocation invoke] + 360 MeteoSpot +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 2069 MeteoSpot -[B4IShell runMethod:] + 515 MeteoSpot -[B4IShell raiseEventImpl:method:args::] + 2519 MeteoSpot -[B4IShellBI raiseEvent:event:params:] + 1623 MeteoSpot __61-[B4IHttp URLSession:downloadTask:didFinishDownloadingToURL:]_block_invoke + 273 libdispatch.dylib _dispatch_client_callout + 14 libdispatch.dylib _dispatch_barrier_sync_f_slow_invoke + 54 libdispatch.dylib _dispatch_client_callout + 14 libdispatch.dylib _dispatch_main_queue_callback_4CF + 677 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14 CoreFoundation __CFRunLoopRun + 2256 CoreFoundation CFRunLoopRunSpecific + 443 CoreFoundation CFRunLoopRunInMode + 123 GraphicsServices GSEventRunModal + 192 GraphicsServices GSEventRun + 104 UIKit UIApplicationMain + 1526 MyApp main + 138 libdyld.dylib start + 1 ) Upvote 0
Erel said: Can you post the full error message from the logs? Can you upload the project? Click to expand... Code: Copy Dim Item as Map Dim TimeMeteo As String Dim NameMeteo As String TimeMeteo = Item.Get("time") Log("TimeMeteo=" & TimeMeteo) If TimeMeteo >= "19:00" Or TimeMeteo <= "05:00" Then NameMeteo = "night_" Else NameMeteo = "day_" End If error Code: Copy TimeMeteo=01:00 An error occurred: (Line: 524) 524 java.lang.NumberFormatException: For input string: "19:00" i haven't other similar errors, now i must clean the project for each run. Code: Copy IndTimes=0 time=01:00 TimeNext= Error occurred on line: 44 (CustomListView) *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[2] Stack Trace: ( CoreFoundation __exceptionPreprocess + 182 libobjc.A.dylib objc_exception_throw + 44 CoreFoundation -[__NSPlaceholderArray initWithObjects:count:] + 405 CoreFoundation +[NSArray arrayWithObjects:count:] + 68 MeteoSpot -[b4i_forecasts _itemtimes::::::] + 769 MeteoSpot -[b4i_forecasts _showforecasts:] + 18683 MeteoSpot -[b4i_forecasts _jobdone:] + 4863 CoreFoundation __invoking___ + 29 CoreFoundation -[NSInvocation invoke] + 360 MeteoSpot +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 2069 MeteoSpot -[B4ICommon CallSubDebug4::::] + 894 MeteoSpot -[B4ICommon CallSubDebug2::::] + 350 MeteoSpot -[b4i_httpjob _complete::] + 887 MeteoSpot -[b4i_httputils2service _completejob::::] + 1723 MeteoSpot -[b4i_httputils2service _hc_responsesuccess::] + 771 CoreFoundation __invoking___ + 29 CoreFoundation -[NSInvocation invoke] + 360 MeteoSpot +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 2069 MeteoSpot -[B4IShell runMethod:] + 515 MeteoSpot -[B4IShell raiseEventImpl:method:args::] + 2519 MeteoSpot -[B4IShellBI raiseEvent:event:params:] + 1623 MeteoSpot __61-[B4IHttp URLSession:downloadTask:didFinishDownloadingToURL:]_block_invoke + 273 libdispatch.dylib _dispatch_client_callout + 14 libdispatch.dylib _dispatch_barrier_sync_f_slow_invoke + 54 libdispatch.dylib _dispatch_client_callout + 14 libdispatch.dylib _dispatch_main_queue_callback_4CF + 677 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14 CoreFoundation __CFRunLoopRun + 2256 CoreFoundation CFRunLoopRunSpecific + 443 CoreFoundation CFRunLoopRunInMode + 123 GraphicsServices GSEventRunModal + 192 GraphicsServices GSEventRun + 104 UIKit UIApplicationMain + 1526 MyApp main + 138 libdyld.dylib start + 1 )
B billzhan Active Member Licensed User Longtime User May 16, 2016 #8 B4i ? You should use DateTime.GetHour(datestamp) to get the hour ( int 0-23) Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 16, 2016 #9 Please start a new thread in the correct forum with the full error message and the code that causes the error. Upvote 0
Please start a new thread in the correct forum with the full error message and the code that causes the error.