Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[GOODIE] US NotifyShell

3 views
Skip to first unread message

Don Rylander

unread,
Feb 14, 2002, 3:58:37 PM2/14/02
to
Udo,
"Udo Schneider" <Udo.Sc...@homeaddress.de> wrote in message
news:3c3d0bd2@tobjects....
> This package allows you to use the traybar in a very easy way. It is based
> on Ian's TaskbarIcon Package.
>
> Just create your Application Shell as subclass of NotifyShell (or mutate
> existing ones) and
> respond to the triggered events.
>
> Comments are highly appreciated.
>
Thanks for doing this. I was hoping to try it out sooner, but I only now got
round to it. It works great! I have a couple of additions and a change that
made it a bit simpler for me to use, particularly in dynamically changing the
tray icon or tip text. I also made the view hide itself when it's minimized,
so that it doesn't show up in the taskbar. I included them below, in case they
might be useful to the general public.

Don

>
> Udo
>
>
>
>
>
>


!ShellNotifyView methodsFor!

basicInitializeNotifyStruct

notifyStruct

uID: 1;

icon: notifyIcon;

message: notifyMessage;

tipText: notifyTipMessage displayString.

! !

!ShellNotifyView categoriesFor:
#basicInitializeNotifyStruct!initializing!private! !

!ShellNotifyView methodsFor!

initializeNotifyStruct

notifyStruct := NOTIFYICONDATA new.

notifyMessage := self class registerMessage: 'Dolphin Shell Notification'.

self basicInitializeNotifyStruct.! !

!ShellNotifyView categoriesFor: #initializeNotifyStruct!initializing!private! !

!ShellNotifyView methodsFor!

modifyNotifyIcon

self basicInitializeNotifyStruct.

^ShellLibrary default shell_NotifyIcon: NIM_MODIFY pnid: notifyStruct.! !

!ShellNotifyView categoriesFor: #modifyNotifyIcon!*-unclassified!private! !

!ShellNotifyView methodsFor!

onViewMinimized: aSizeEvent

"Private - ShellNotifyView handler for window minimize. Hide the window, then

hand off to super."

self hide.

^super onViewMinimized: aSizeEvent! !

!ShellNotifyView categoriesFor: #onViewMinimized:!event handling!private! !

Marc Nijdam

unread,
Mar 1, 2002, 1:27:58 PM3/1/02
to
"Don Rylander" <Don.Ry...@NOSPAM.FordConsultingGroup.com> wrote in message news:<a4h8dv$ao1h$1...@ID-57705.news.dfncis.de>...

> Udo,
> "Udo Schneider" <Udo.Sc...@homeaddress.de> wrote in message
> news:3c3d0bd2@tobjects....
> > This package allows you to use the traybar in a very easy way. It is based
> > on Ian's TaskbarIcon Package.
> >
> > Just create your Application Shell as subclass of NotifyShell (or mutate
> > existing ones) and
> > respond to the triggered events.
> >
> > Comments are highly appreciated.
> >
> Thanks for doing this. I was hoping to try it out sooner, but I only now got
> round to it. It works great! I have a couple of additions and a change that
> made it a bit simpler for me to use, particularly in dynamically changing the
> tray icon or tip text. I also made the view hide itself when it's minimized,
> so that it doesn't show up in the taskbar. I included them below, in case they
> might be useful to the general public.
>
> Don
>
> >
> > Udo
> >
> >

Great! just what I was looking for! But I can't find the original
package anywhere on the newsgroup or web-sites. Could you send this to
me, or point me at the right place to get it?

Thanks,

Marc

Udo Schneider

unread,
Mar 2, 2002, 1:45:27 PM3/2/02
to
"Don Rylander" <Don.Ry...@NOSPAM.FordConsultingGroup.com> schrieb im
Newsbeitrag news:a4h8dv$ao1h$1...@ID-57705.news.dfncis.de...

> Thanks for doing this. I was hoping to try it out sooner, but I only now
got
> round to it. It works great! I have a couple of additions and a change
that
> made it a bit simpler for me to use, particularly in dynamically changing
the
> tray icon or tip text. I also made the view hide itself when it's
minimized,
> so that it doesn't show up in the taskbar. I included them below, in case
they
> might be useful to the general public.

Don,

thanks for the extensions. I'll add them to the package.

Udo

Udo Schneider

unread,
Mar 2, 2002, 1:46:56 PM3/2/02
to

"Marc Nijdam" <marc_...@yahoo.com> schrieb im Newsbeitrag
news:37512eae.02030...@posting.google.com...

> Great! just what I was looking for! But I can't find the original
> package anywhere on the newsgroup or web-sites. Could you send this to
> me, or point me at the right place to get it?


Marc,

you can find a package with Dons extensions at
http://www.homeaddress.de/US%20NotifyShell.pac .

Udo

Marc Nijdam

unread,
Mar 6, 2002, 10:10:04 PM3/6/02
to
"Udo Schneider" <Udo.Sc...@homeaddress.de> wrote in message news:<a5r6k9$9lrgc$1...@ID-88021.news.dfncis.de>...

I really, really hope I don't upset either of you with the fact that
I've taken a slightly different approach to TaskbarIcon. I didn't
attach a ShellView to it, since I like the smaller applet approach of
the taskbar icons. I also extended NOTIFYICONDATA to support 2000/XP
based notification balloons and triggers on these. Check out the
following link to see what I mean.

http://www.swiki.net/~men/men/1

Udo Schneider

unread,
Mar 7, 2002, 4:54:30 AM3/7/02
to

"Marc Nijdam" <marc_...@yahoo.com> schrieb im Newsbeitrag
news:37512eae.0203...@posting.google.com...

> I really, really hope I don't upset either of you with the fact that
> I've taken a slightly different approach to TaskbarIcon. I didn't
> attach a ShellView to it, since I like the smaller applet approach of
> the taskbar icons. I also extended NOTIFYICONDATA to support 2000/XP
> based notification balloons and triggers on these. Check out the
> following link to see what I mean.
>
> http://www.swiki.net/~men/men/1

Marc,

sorry if I wrote like I was upset. I'm definitely not. I'll take a look at
your package. Especially the
balloon support is very interesting.

Udo

Marc Nijdam

unread,
Mar 23, 2002, 7:41:23 PM3/23/02
to
Hope you liked what you found... I've uploaded another version at

http://men.swiki.net/

which is actually smaller since it maps most of the normal messages to
view-like messages.

Still working on the presenter as well. I'd like it to do pop-up menus
by default, but having trouble creating a pop-up that behaves like the
oher taskbar icons.

Marc

"Udo Schneider" <Udo.Sc...@homeaddress.de> wrote in message news:<a67dcn$bfd3h$1...@ID-88021.news.dfncis.de>...

Ian Bartholomew

unread,
Mar 29, 2002, 3:11:17 PM3/29/02
to
Marc,

> Hope you liked what you found... I've uploaded another version at

Thanks for posting this, and to Udo and Don for the other versions, it's
saved me a lot of fiddling around. It took me a while to work out how to use
it (perhaps including a short demo might help?) but once I had done so it
works very well.

FYI, the only problem I've seen is that, and I'm not really sure why, the
Taskbar icon in a deployed application is occasionally getting sent WM_USER
messages that it doesn't know how to deal with, which causes a Dolphin VM
error report. Editing TaskbarIcon>>dispatchRegistered: Param:lParam: to
prevent attempts to dispatch messages that it can't handle seems to solve
the problem (so far).

Regards
Ian

Marc Nijdam

unread,
Apr 3, 2002, 3:35:36 AM4/3/02
to
"Ian Bartholomew" <new...@iandb.org.uk> wrote in message news:<FT3p8.153130$2q2.12...@bin4.nnrp.aus1.giganews.com>...

> Marc,
>
> > Hope you liked what you found... I've uploaded another version at
>
> Thanks for posting this, and to Udo and Don for the other versions, it's
> saved me a lot of fiddling around. It took me a while to work out how to use
> it (perhaps including a short demo might help?) but once I had done so it
> works very well.

Useful feedback. I'll see if I can add a better example in both the
package and class comment. I haven't had much time to work on the
presenter side of TaskbarIcon, since I was toying with popup menus in
taskbars. Still having problems making a popup menu out of the taskbar
behave like other menus there. Are any of you trying to do something
similar?

> FYI, the only problem I've seen is that, and I'm not really sure why, the
> Taskbar icon in a deployed application is occasionally getting sent WM_USER
> messages that it doesn't know how to deal with, which causes a Dolphin VM
> error report. Editing TaskbarIcon>>dispatchRegistered: Param:lParam: to
> prevent attempts to dispatch messages that it can't handle seems to solve
> the problem (so far).

Funky... Looks like the dispatched might get confused on the actual
current focus of the application (or icon) since the icon is actually
a full handle (unlike in Udo's example). I'm assuming that you're not
seeing any adverse side-effects by ignoring unhandled messages? I'll
mod this in the package and upload a new version soon...

Thanks for the feedback,

Marc

Ian Bartholomew

unread,
Apr 3, 2002, 4:41:21 AM4/3/02
to
Marc,

> Useful feedback. I'll see if I can add a better example in both the
> package and class comment. I haven't had much time to work on the
> presenter side of TaskbarIcon, since I was toying with popup menus in
> taskbars. Still having problems making a popup menu out of the taskbar
> behave like other menus there. Are any of you trying to do something
> similar?

Not at the moment. I really just need to show/hide a permanantly running
Dolphin application, it hasn't got anything that could usefully be done from
a pop up menu. I'll have a play if I get a chance.

> Funky... Looks like the dispatched might get confused on the actual
> current focus of the application (or icon) since the icon is actually
> a full handle (unlike in Udo's example).

Yes, that sounds very possible. I seem to recall that the walkback often
happened after closing a dialog - where the view with focus was changing.

> I'm assuming that you're not
> seeing any adverse side-effects by ignoring unhandled messages?

I would have said no, now I'm not so sure. In the last couple of days my
system (running XP) has twice performed a full reboot while I was in the
middle of doing something - I can't remember it happening before when I was
running my application using the "normal" task bar. The application in
question wakes up every 15 seconds to do a check so it could possibly be
some timing coincidence between the various views and the taskbar icon that
causes the problem.

It may, of course, be something completely unconnected.

I'll let you know if I come across anything relevant

Ian


Don Rylander

unread,
Apr 3, 2002, 12:16:38 PM4/3/02
to
Marc,
"Marc Nijdam" <marc_...@yahoo.com> wrote in message
news:37512eae.02040...@posting.google.com...

> "Ian Bartholomew" <new...@iandb.org.uk> wrote in message
news:<FT3p8.153130$2q2.12...@bin4.nnrp.aus1.giganews.com>...
[...]

> taskbars. Still having problems making a popup menu out of the taskbar
> behave like other menus there. Are any of you trying to do something
> similar?
[...]

I build dynamically a pop-up menu for the tray icon. In general it works fine.
The only problem is that disabled menu items do not display as such; they still
look enabled, even though the behave properly (clicking on a disabled item
makes the "don't do that" sound, and nothing else happens). I hate to admit
it, but I haven't had a chance to look at the differences between your package
and Udo's; once my little app was doing its job, it was time to move on to the
next hugely important major initiative ;-). Anyway, I briefly experimented
with using just a ShellPresenter (instead of NotifyShell) with both a ShellView
and Udo's ShellNotifyView, but, as I recall (a *big* caveat), there was some
problem with popping up the menu in the right location and setting command
targets properly. I didn't spend much time going down that path before
deciding it was simpler to implement the way Udo had originally done it, since
that made it simpler to get the menu to pop up in the right place and to get
command queries to follow the right path. If this sounds like something that
might help with your problem, let me know, and I'll try to give you more
detail.

Don


0 new messages