"b" is not a application,since it needn't the menubar the the dock
icon.
It just want to show a window with some controls to tell the user that
something happened about "a".
This strikes me as a classic example of asking the wrong question.
You want a second application to put up a window, and you assume the
only way to do it is to stick an executable in your bundle, so now
you asking how to make that approach work. Wrong question. Right
question is: What's the best way to include an application that will
watch in the background for an event in another application (about
which you should be more specific) and display a window, without
appearing in the menubar or the Dock? This kind of question lets
people offer the best approach to your primary goal, which may be
very different than your current approach.
IIRC from discussions in the past, the system expects any application
that's displaying a window to be in a bundle, so whatever approach
you take is going to require the monitoring application to be in a
bundle.
Larry
and the "b" main function like this:
int main(...)
{
while(1)
{
//wait something happened on "a"
// and I don't want a menubar and a dock icon about
"b" are shown at this time
break;
}
createnewwindow();
.............
return 0;
}
I have tried the CFUserNotification, but its controls are not enough.
I want some control like memo( can input multi-line text),but it
only has
edit text. and I can't modify the control attribute,like I want to
control
the font family the font size,etc.
2007/5/25, Peter S Lau < email@hidden>:On 5/25/2007 1:54 AM,
"周章林" < email@hidden> wrote:
> I have put 2 executable file in one bundle, that is "a" and "b",
> and the key CFBundleExecutable's value is "a", so when I
> double click the bundle from Finder, the "a" is executed.If
something
> happened, the "a" will fork and exec "b", the problem is "b"
can't create
> any window use Carbon API, it said: RegisterProcess failed.
> But if I don't put them in the bundle,the "b" can create and show
window
> as well.
So "b" is also a bundled Carbon application?
If so, you should Launch Services API to launch "b" from within the
bundle
application "a" ('cos the Info.plist says so), instead of the (I am
guessing
here) unix's fork and exec.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden