À (At) 14:38 +0100 13/12/02, Thomas Tempelmann écrivait (wrote) :
>After assigning the chosen soup entry to "x", I tried something like:
>
> x.removeslot 'MI:SilverWARE
>
>How close did I come to the correct way?
Not much :p
In NewtonScript you can send messages to objects (provided that they
implement it or inherit them) with the syntax
object:message(parameters)
Manipulation of frames are not messages sent to them but instead
global functions. To remove a slot, the function is called RemoveSlot
(this function works on arrays as well).
So you have to do:
RemoveSlot(x, '|MI:SilverWARE|);
(the pipes are here to protect the symbol, a column isn't a regular
character in a symbol).
With that you altered the copy in RAM of the entry. You'll need to
validate your change to the store by calling EntryChange or
EntryChangeXmit global functions.
E.g:
EntryChangeXmit(x, '|Thomas using ViewFrame|);
The Xmit version is the one preferred. It sends a notification to any
listener that registered. The second parameter is the symbol of the
application doing the change. Thomas using ViewFrame is fine. nil
means no notification at all. Again, there are pipes because spaces
aren't regular characters in symbols.
Paul
-- NPDS: http://newton.kallisys.net:8080/ Apache: http://www.kallisys.com/-- This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html Official Newton FAQ: http://www.chuma.org/newton/faq/
This archive was generated by hypermail 2.1.2 : Wed Jan 01 2003 - 10:02:22 EST