Hi Gopinath

Just one little thing to try in addition to all of the suggestions, check to
see that you are infact working with a parent script and not a movie script.
Right click (windows) or Option click (is that right?) on the mac on top of
the script castmember and choose castmember properties and make sure it says
parent script in the dialogue. I've seen errors like this crop up from time
to time when the script type was set wrong.  Just a suggestion.

Sincerely

Mark

--------------------------------------------
Mark R. Jonkman
Mark R. Jonkman Consulting
ADDRESS: 20 Windermere Crt., Guelph, ON, CANADA N1E 3L4
PHONE: 519-837-8509
EMAIL: [EMAIL PROTECTED]
--------------------------------------------

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Irv Kalb
> Sent: Sunday, December 31, 2000 12:55 AM
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l>appending a propList to another list
>
>
> At 5:57 AM +0400 12/31/00, gopinath wrote:
> >Hi Kerry and Ramesh,
> >
> >this is my script after all the help
> >
> >>property therecord, thedatabase
> >>  on new me
> >>  thedatabase=[:]
> >>  global RecordNUM
> >>  RecordNUM=RecordNUM+1
> >>  set recnum=RecordNUM
> >>  therecord=[#RecordNUM:recnum,#theword:" ",#themeaning:" "]
> >>  thedatabase.append(therecord))
> >>  put thedatabase
> >>  return thedatabase
> >>  end
> >it just doesn't work
> >the error is:
> >'handler not found in object'
> >This is NO project
> >I am just learning
> >so no hurry
> >I am using D7
> >regards
> >Gopinath
> >
>
> Gopinath,
>
> It looks like you are trying to build a database inside an object.
> If this is what you are trying to do, then I would make a few
> modifications.  For example, split out the adding a record from the
> "new" handler. Something like this (untested):
>
> -- Database parent script
> property thedatabase
> on new me
>     thedatabase = []  -- this is a simple linear list
>     return me
> end
>
> on addrecord me, theword, themeaning
>     therecord = [#theword: theword, #themeaning: themeaning]
>     thedatabase.append(therecord)  -- each record is itself a
> property list
> end
>
> First you create your database object like this:
>
> global gDatabaseObject
> gDatabaseObject = new(script "DataBase")
>
> Then when you want to add records to your database, you would do:
>
> global gDatabaseObject
> gDatabaseobject.addrecord("eat", "to consume food")
> gDatabaseobject.addrecord("type", "to press keys on a keyboard")
>
> Later, you could add more handlers to your object, for example:
>
> on findMeaning me, theWordToFind
>    nItems = count(thedatabase)
>    repeat with i = 1 to nItems
>      thisRecord = thedatabase[i]
>      if thisRecord.theword = theWordToFind then
>         return thisRecord.themeaning
>      end if
>    end repeat
>    alert("Could not find" && theWordToFind && "in the database")
> end
>
> And call it like this:
>
> theMeaning = gDatabaseobject.findMeaning("eat")
>
> Good luck.
>
> Irv
>
>
> --
> Lingo / Director / Shockwave development for all occasions.
>
>         (Over two millions lines of Lingo code served!)
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/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/LUJ/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