Newbie question more related to buttons than networking
Newbie question more related to buttons than networking
- Subject: Newbie question more related to buttons than networking
- From: "David V. Baker" <email@hidden>
- Date: Thu, 27 Jun 2002 23:28:57 -0400
Hello,
I apologize for an ignorance/newbie question and for inappropriately
submitting a GUI/theory question to this list. (I still hope you will
consider helping.)
I've been watching this list for a few months and gotten some good tips
and I've had such success with my networking programming so far that I
just don't have any networking questions yet. (Having never touched
OpenTransport code before, I started off writing my client code with
familiar BSD sockets and then was aple to duplicate my success with
proper OT calls--even two different ways.)
My task now is to create an arbitrary number of buttons (probably
BevelButtons, they're beautiful) with pop-up menus. The pop-up menus
under the Bevels will contain an arbitrary (but not too many) number of
dynamic items. (They'll be based on the results of my networking code.)
I have learned that using InterfaceBuilder, I can easily create a few
BevelButtons and I can programatically change the pop-up items and even
figure out which pop-up item was selected. My difficulty has been
duplicating that success "from scratch" for an arbitrary number of
buttons. I have experimented enough to know that I can create a new
Window, Control, Port, BevelButton and set the location and title, but
I'm still having real trouble getting it to pop-up with the dynamic
menu I think I've created.
I love all the sample code available, but it is still difficult to find
examples of exactly what I am trying to do all in one place (of
course).
So my real question is: is there any way to "steal" (or even just
*see*) the gracious (and complete) code that InterfaceBuilder generates
for one button and re-use it for an arbitrary number of buttons?
I considered using IB to create some arbitrary maximum number (10 or
20?) of BevelButtons and then try to fiddle with their visibility in
order to only show as many as I need given the configuration. I have
not yet really tried to explore this theory yet, though.
If there are other ways, theories, ideas, or tips I can consider, I
will appreciate them.
Thanks.
Dave
p.s. Other details if it matters or if you're curious: I only use OSX
myself, although I'm trying to stick with Carbon for now because this
app would be useful on OS9, too. I know C/C++, I don't know Objective
C. I know networking--I've been writing protocols, clients, servers,
and doing low-level testing of networking equipment for years (starting
with an AppleTalk test suite in 1993 :-), but I do not have any real
GUI development experience. (Outside of a little X windows a bunch of
years ago.) I have already spent more time in Project Builder than in
any other IDE I've touched over the years, but I still do most all my
typing in emacs. (I just wish I could set my M-x compile command to
Project Builder's compiler. :-)
--
-----------------------------------------------------------------
David V. Baker Voice/Cell:617-331-1642 Fax: 603-806-8545
mailto:email@hidden www.whysheep.com
By making needed adjustments, you hand your people
a powerful edge. You can't guarantee their
success; they don't sell insurance for that, but
you're giving them the best possible chance.
pg 158, Finding a Way To Win, Bill Parcells
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.