comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » object programming question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Object Programming [message #75964 is a reply to message #57167] Wed, 11 May 2011 12:12 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 5/11/11 1:04 PM, David Fanning wrote:
> Folks,
>
> I guess it has been awhile since I did some extensive
> object programming, but goodness, IDL doesn't like it
> when you make mistakes!
>
> I suppose I crashed IDL 25-30 times already today, both
> IDL 7.1.1 and IDL 8.1. It seems as though if put a breakpoint
> in an object program and then do a .RESET from the IDL
> command line that IDL is certain to crash.
>
> The error I was tracking down looked something like this:
>
> FUNCTION foo, x, y
>
> obj = Obj_New('foo', x, y)
>
> RETURN, obj
>
> END

Wait (never mind my other post), you are passing two parameters to
Foo::init!

> Both routines are written in such a way that you can
> pass one or two parameters. If I pass a single parameter:
>
> IDL> obj = FOO(data)
>
> The object INIT method was reporting that I was
> passing *two* parameters (I was checking with N_Params())
> and my program was getting into trouble because I assumed
> y was defined in the code. It was actually passing an
> undefined variable into the object INIT method. Is this
> how IDL has always worked? I could have sworn I've done
> this many, many times in the past without difficulty, but
> perhaps I wasn't using N_Params() to check parameters
> in that code.
>
> Anyway, lesson for today: Don't make a mistake when you are
> writing IDL object programs!

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating an ordered 'blob' ROI from a messy 'criss-crossed' ROI....
Next Topic: Object Programming

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 13:03:37 PDT 2025

Total time taken to generate the page: 1.67877 seconds