Re: [NTLK] A couple of programming questions

From: brian.tiplady_at_astrazeneca.com
Date: Mon Jun 24 2002 - 04:14:04 EDT


Glad it was helpful. One point - this works if you want to replace a
built-in slot. If you want to modify it you have to clone a copy of the slot
and modify the copy.

Come back to me if you need more details - there is an example in the Newton
Prgrammer's Guide that I can look out for you.

-- B

-----Original Message-----
From: Jim Anderson [mailto:jiman_at_microsoft.com]
Sent: Fri 21 June 2002 20:52
To: newtontalk_at_newtontalk.net
Subject: Re: [NTLK] A couple of programming questions

Brian wrote:
> Yes, you can write code to overwrite pretty much anything.=20
> For example if you want to disable the Extras button so that=20
> nothing happens when you tap on it, you just execute the code
>=20
> GetRoot().extrasbutton.buttonClickScript :=3D func() begin
> end;
>=20
> The original contents of the buttonClickScript slot, being in=20
> ROM do not go away, of course. To get back to a functioning=20
> button, you use the
> RemoveSlot() function.=20
>=20
> Believe it or not, you own the whole Newton that you bought!

        Wow! Thanks! That's exactly what I want to do! That's one of
those things that is so simple and reasonable that you never think of
it. At least I don't think of things working that well (check my return
address, which is the shop I program at, for the full impact of that
statement).

Jim Anderson

Evil Overlord Rule 174:
If I am dangling over a precipice and the hero reaches his hand down to
me, I will not attempt to pull him down with me. I will allow him to
rescue me, thank him properly, then return to the safety of my fortress
and order his execution.

-- 
Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html
Read the Newton FAQ: http://www.guns-media.com/mirrors/newton/faq/
This is the NewtonTalk mailing list - http://www.newtontalk.net

-- Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html Read the Newton FAQ: http://www.guns-media.com/mirrors/newton/faq/ This is the NewtonTalk mailing list - http://www.newtontalk.net



This archive was generated by hypermail 2.1.2 : Wed Jul 03 2002 - 14:02:55 EDT