But wouldn't [#someProp:0] or [#someProp:VOID] still report that a valid value is there when he seems to be saying that it isn't?

roymeo

At 12:11 AM 10/22/2002 -0500, you wrote:
Lots of hoops for a simple concept. use findPos()

> Can you store a zero in your list to show the absence of an object,
> rather than storing VOID as the value?
>
> If you can do that, then as Tab said, you can tell the difference
> between you conditions. You need two checks, first to see if the if
> the property exists, then if the property exists then you need to
> check if the value is 0. Something like this:
>
>
> on GetMyValue someProp, aPropList
> theValue = getAProp(aPropList, someProp)
> if voidp(theValue) then
> alert("No such property" && someProp)
> return #errorNoSuchProperty -- or do whatever you want for this case
> end if
> if theValue = 0 then
> alert("No object available for" && someProp)
> return #errorNoSuchObject -- or do whatever you want for this case
> end if
> return theValue -- OK, return the value
> end
>
>
> Irv

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]


Reply via email to