lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Matthias Amberg
hi people i have (for my viewpoint) a strange problem with d8.5 this line: if go_game_engine.pl_winners.count()=1 then throws an error saying expected THEN ??? if i write this (count without the brackets): if go_game_engine.pl_winners.count=1 then it work perfectly why?? it

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Colin Holgate
if i put go_game_engine.pl_winners.count() in the watcher it works perfectly In dot syntax count is a property and not a function. It is also a function in old syntax. You're using mixed syntax which is mostly dot syntax, and so the part that is older syntax is causing a problem. You can

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Tab Julius
Well, to begin with it would help if you described how you defined count - is it a property, or is it a function on an object? If it's a property, then it makes certain sense. The 'expected then' is because it hit the parentheses that it didn't expect, because you wouldn't have parentheses

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Florian Bogeschdorfer
Am 20.12.2002 10:48 Uhr schrieb Matthias Amberg unter [EMAIL PROTECTED]: The main thing one has to learn when it comes to Director syntax is not WHY but HOW. There are so many strange things (MM doesn't consider them as bugs) about what works and what not, that you should be satisfied with having

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Matthias Amberg
thank you all for your replies I have to say that I am still confused but on a higher level :-) if i put go_game_engine.pl_winners.count() in the watcher it works perfectly In dot syntax count is a property and not a function. It is also a function in old syntax. You're using mixed syntax

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread pranavn
Count is a list function as well as a property. So... nameList.count or nameList.count() or count(nameList) are all valid. Pranav Negandhi Software Engineering Learnet India Limited, Mumbai. Phone: 91-22-859 8042 Ext: 316 http://www.learnetindia.com snip Whereas YOUR count is PROBABLY a

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Matthias Amberg
I think your real confusion stems from the fact that you are using a reserved word (count) for a similar need, but you have it structured differently. nah it's exactly what Pranav described the go_game_engine.pl_winners is a list (declared as a property insida the game_engine object) so i

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Kerry Thompson
this line: if go_game_engine.pl_winners.count()=1 then throws an error saying expected THEN ??? if i write this (count without the brackets): if go_game_engine.pl_winners.count=1 then it work perfectly why?? count is a property, not a function. By putting the parentheses after

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Kerry Thompson
count is a property, not a function. Before I get trounced, I should amend that to say it is a property in your context (dot syntax). It does also, of course, exist as a function. but it needs an argument. Cordially, Kerry Thompson [To remove yourself from this list, or to change to

Re: lingo-l can someone explain this (count count() ) ??

2002-12-20 Thread Irv Kalb
Others have done a good job at explaining this Lingo syntax error. I would like suggest that you use a different approach altogether. One of the cardinal rules of object oriented programming is that you never reach into an object and access its properties by name. Rather than trying to get