Tharwat Posted May 16, 2011 Posted May 16, 2011 Why did you consider it nil since the getpoint function would return the coordinates to it to insert the text unless the user may press *cancel* ? (cons 10 (trans (getpoint "\n Text Location :") 1 0)) Text Location :(10 12.3418 9.67425 0.0) Quote
Lee Mac Posted May 16, 2011 Posted May 16, 2011 Because getpoint returns nil if the user fails to pick a point, try pressing enter at the prompt. Quote
Tharwat Posted May 16, 2011 Posted May 16, 2011 Because getpoint returns nil if the user fails to pick a point, try pressing enter at the prompt. I did not think that a user might press enter instead of locating the text in front of their eyes . So now , to include the *getpoint* within the if that would force the (princ) to quite calmly without nil or error at the end . Waw ..... Regards. Quote
Lee Mac Posted May 16, 2011 Posted May 16, 2011 I did not think that a user might press enter instead of locating the text in front of their eyes . Good programming means to account for every eventuality. Quote
Tharwat Posted May 16, 2011 Posted May 16, 2011 Good programming means to account for every eventuality. Great , I would never forget this sentence . Thank you Lee . Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.