Author Topic: Return type of object is LispFunction now fails  (Read 8077 times)

0 Members and 1 Guest are viewing this topic.

gvandermerwe

  • Guest
Re: Return type of object is LispFunction now fails
« Reply #15 on: April 03, 2008, 08:36:40 PM »
Received the following response from Autodesk......just FYI

Hi Gareth,

Sorry for the delay. I have contacted our AutoCAD .NET experts for the another workaround, unfortunately, to return a resbuf containing true or false is the available workaround currently, for it returns   (T) and not T , you need call a additional operation to extract the T from (T) in your lisp routine, we are really Sorry for the inconvenience.

As you know we have logged this issue as change request  1064365 : API: Return type of object is LispFunction throws exception in AutoCAD 2009, our engineering are already aware of it  and should fix it. I will inform you  if there is any update about this issue. Thanks for your support.
 
Regards,
Hongxian Qin
Developer Technical Services
http://adn.autodesk.com

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Return type of object is LispFunction now fails
« Reply #16 on: April 03, 2008, 08:43:55 PM »


so we need a workaround to the current interfaces untill the change request is confirmed, THEN we need another workaround to suit the new return type.


I'm bloody speechless ...


If I produced code like that I'd be sued out of existance.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8801
  • AKA Daniel
Re: Return type of object is LispFunction now fails
« Reply #17 on: April 03, 2008, 09:55:03 PM »
I like how they log it as a “change request” more like a “Fix your mistakes request” :pissed:

sinc

  • Guest
Re: Return type of object is LispFunction now fails
« Reply #18 on: April 04, 2008, 08:27:13 AM »
The part I like is where they ask you to determine "the expected revenue impact for Autodesk" for the bug...   :ugly:

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Return type of object is LispFunction now fails
« Reply #19 on: April 04, 2008, 12:01:00 PM »
Wait, its only a return of true that does not work, right?
You can still return nil, integer, real, string....

So if you have a routine returning a number, return nil or a number.
If you have one returning true or nil, retrun 1 or nil.
This is actually really minor.

I think people thought any "bare" return value was a no go.
Its only the atom_T one that does not work.
Given that, just use 1 (or "a" or "wow" or whatever, anything but nil) instead of T in your lisp.
No one will be checking the number, its existance says it all.
James Maeding

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Return type of object is LispFunction now fails
« Reply #20 on: April 04, 2008, 12:02:43 PM »
just noticed Sinc's motto "I think I Cad...", is that from the little train that Cad...sorry back to work.
James Maeding

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8801
  • AKA Daniel
Re: Return type of object is LispFunction now fails
« Reply #21 on: April 05, 2008, 12:10:20 PM »
Wait, its only a return of true that does not work, right?
You can still return nil, integer, real, string....

Ok Well, I am confused, I *assumed* that 2009, you either need to return a TypedValue Or a ResultBuffer, where as 2007 and 2008 you would return a boxed object, the object could have the type of ResultBuffer, int, string, double or bool.  Anyone have a chance to play yet?

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Return type of object is LispFunction now fails
« Reply #22 on: April 07, 2008, 02:26:34 PM »
No, you can return unboxed types still except atom_t.
That took me a while to realize too.
So its really not that bad for most, only if you depend on things returning atom_t, and absolutely nothing other than that to work.
I bet most people would even be fine returning (T) in place of T.  Heck, return anything to indicate T.
Boolean type returns are either nil or something form lisp's point of view using (if ...).
I'm sure some people do check for (if (= return T)...) as opposed to (if return...) but maybe they should change their code habits.
So most are in pretty good shape IMO.
James Maeding