On Mon, 29 Mar 1999, Richard Hartman wrote:
> Does every control (let's say just buttons) in an
> application have to have a unique ID, or just every
> button in a form?
>
> The examples in the O'Reilly book have different
> IDs for the "OK" button on each form. I'd figure
> you could just define "#define btnOK xxx" once
> and use the same ID on each form since you never have
> more than one form up at the same time anyway.
>
> So: do you need a "btnClientFormOK", "btnDeleteFormOK",
> etc, or is just one "btnOK" id enough?
Unless my memory is playing me wrong (it wouldn't be the first time), each
control object is a separate resource in the UI resource file on the
development end. That means you can only have one object of a particular
type of a particular ID. It would probably work to have the identical
object on two forms, though.
But that's only the Mac resource side -- the PalmOS stores controls as
part of the form, not as separate objects, so there is unlikely to be any
sort of collision.
Is Constructor still generating a pseduo-Mac resource fork that the
PilotRez tool is boiling down to the actual PalmOS resources? If so, then
you shouldn't duplicate Control IDs (I'm not sure what Constructor will do
if you try). If Constructor is now generating the PalmOS resources
directly, it might not be an issue.
Of course, if you didn't use the common Palm-style event handling loop,
you might be worried about handling events for various forms in the same
branch of code -- but that's your own look-out. :-)
--
Kenneth Albanowski ([EMAIL PROTECTED], CIS: 70705,126)