|
Post by EurasianVixen on Jan 20, 2002 15:06:34 GMT -5
look for a space in "x" , use substring???., i can't really remember,,., anyways., once u find a space in String "x" , your index would be wherever the space is,,., then u take the values after that space to the length of the String x, ?? and turn it into an int? When the user types "get 2" for example, in your class it will read something like: else if (x.equals("get ")) But the problem is, even when you have "get " and a space, there is still the number at the end to take into consideration. Thus (x.equals("get ") won't work b/c it doesn't include the numer at the end! How do you change else if statement to get the enitre "get 2"??
|
|
|
Post by Observer on Jan 20, 2002 16:12:21 GMT -5
What I did was to see in A1Driver if what had been typed had the first few characters to be 'get'. Ie. by substring(0,3). Then if it did, I didn't worry about the rest of the string (and the the number) in A1Driver and just passed the whole string to be dealt with in URLList. So it doesn't matter if there's an extra character. if(s.subtstring(0,3).equals("get")) pass it to URLList.
|
|
|
Post by EurasianVixen on Jan 20, 2002 16:36:42 GMT -5
Ahh, ok thanks ;D I tried something similar to that before but I didn't write the specification in code properly so it messed up
|
|