Article View: comp.sys.next.programmer
Article #465Using nibs
From: Ron Pomeroy x(Coop)
Date: Thu, 06 Aug 1992 00:09
Date: Thu, 06 Aug 1992 00:09
45 lines
1625 bytes
1625 bytes
Hello netters,
I'm still fairly new to the appkit so bear with me.
In the example WhatADrag/Controller.m we have the following method:
- displayInfoPanel:sender
{
if (!infoPanel) {
[NXApp loadNibSection:"InfoPanel.nib" owner:self];
}
[infoPanel makeKeyAndOrderFront:NULL];
return self;
}
suppose I don't check to see if infoPanel exists:
- displayInfoPanel:sender
{
// if (!infoPanel) {
[NXApp loadNibSection:"InfoPanel.nib" owner:self];
// }
[infoPanel makeKeyAndOrderFront:NULL];
return self;
}
Now when I hit the Info button in the menu (in the compiled app),
displayInfoPanel:sender is sent and the nib is unarchived again and again.
My question is - do all of the instances have the same id (i.e. "infoPanel) ?
What I would like to be able to do is compose an object in interface builder,
save it as a nib, dynamically (programatically) create copies of that nib, but
each with a unique id. Kinda' like using a nib for a class definition. Is
this possible?
--
Ronald Pomeroy
Advanced Micro Devices
CAM Applications Group
Austin, Texas
rpomeroy@aunext3.amd.com
Technical Details
Message-ID:
<1992Aug6.000907.1895@dvorak.amd.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!veritas!amdcad!dvorak.amd.com!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!veritas!amdcad!dvorak.amd.com!usenet From: rpomeroy@aunext3.cam.amd.com (Ron Pomeroy x(Coop)) Newsgroups: comp.sys.next.programmer Subject: Using nibs Message-ID: <1992Aug6.000907.1895@dvorak.amd.com> Date: 6 Aug 92 00:09:07 GMT Sender: usenet@dvorak.amd.com (Usenet News) Reply-To: rpomeroy@aunext3.cam.amd.com Distribution: usa Organization: Advanced Micro Devices, Inc.; Austin, Texas Lines: 45