Re: [NTLK] [PROG] Getting a protoPicker to display..

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Thu Nov 11 2004 - 22:41:48 PST


Aux environs du 11/11/04 à 1:32 -0500, sous le titre "[NTLK] [PROG]
Getting a protoPicker to display..", Jim Witte prit sa plus belle
plume pour écrire les mots suivants:
>Programming question (hence the subject line),
>
> How do I get a protoPicker to actually display? I've got a very
>simple app, with a protoFloatNGo base, with a protoPicker and a
>protoStaticText in it. When I created the protoPicker, it shows up
>with a 'bounds' slot all set to zeros, which it apparently sets to
>match viewBounds in the afterScript (why doesn't it just use viewBounds
>like eery other proto?) However, it doesn't display when I compile it
>(nor does any protoPicker child view show up in ViewFrame). I've tried
>manually setting the bounds slot, and disabling the afterScript, which
>doesn't work.

The protoPicker is a popup picker. Read the Programmer's Guide and
Reference. It is explained there why bounds is used for the system to
display the popup picker at the correct place from the parent's view
(a button or something).

> What the new proto would do is to add a little arrow at the right
>edge of the text line if the line was longer than the view width.. :)
>(by rewriting the makePickLine method) I still don't quite know how to
>get the proto into *only* the appropriate line of simpleMail - unless I
>wanted to alter all the protoPickers, where a global modification would
>work (can I redirect a magic pointer in NS?)

You cannot "redirect" a magic pointer in NS. So what you need is to
clone stuff or be smart, for example like i++ that patches the NS
function DoPopup.

>func(arg1, arg2, arg3)
>begin
> local Local1, local2, local3;
> Arg1 := :LocalBox();
> [..]
>
>Why is Arg1 an l-value for an assignment function? Why have it as a
>parameter if it's going to immediately be replaced? And it's *called*
>with a first parameter of :LocalBox() anyway from the
>viewSetupChildrenScript, wasting a call to LocalBox!

Is it Simon's code?
Ask him! :)

Paul

-- 
Ministre plénipotentiaire en disponibilité.
Baignoire à vendre.
http://www.kallisys.com/
http://newton.kallisys.net:8080/
-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Fri Nov 12 2004 - 00:30:00 PST