FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Garbage characters in tool tip for tray icon

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
Kramer



Joined: 02 Sep 2004
Posts: 1

PostPosted: Wed Oct 26, 2005 7:21 pm    Post subject: Garbage characters in tool tip for tray icon Reply with quote

First off, let me say to all involved, thank you for this SWT port. I've been playing around with it and it is quite stable and functional.


In the process of playing around with the toolkit, when using the setToolTipText function for a TrayItem, there seems to be garbage characters that fill up the tool tip. Not sure what characters they are, but when displayed, they look like boxes.

Here's the code I used:

Code:

TrayItem trayItem = new TrayItem(tray, SWT.NONE);
trayItem.setToolTipText(String.fromChar("SWT TrayItem"));


If you can't reproduce it from that, let me know and I'll see if I can scrounge up something more.

Thanks again,
Kramer
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Fri Oct 28, 2005 9:26 am    Post subject: Reply with quote

Hi, Kramer:
I added a system tray to the "hello world" example, using the same code codes as yours. I built it on WinXP and run it both in XP and Win2K, and it works OK. I have committed the example to svn. You can get it here :
http://svn.dsource.org/projects/dwt/downloads/win32/examples/traytest.rar

If you still have problem. Send your source code to me : shawn666.liu(a)gmail.com.

- Shawn
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Tue Nov 15, 2005 2:28 am    Post subject: Reply with quote

This phenomena is reproduced. And the problem may be very strange.

I built the program at home with both WindowXP and Windows2000 platform. It works perfect. No garbage characters appear. They are both Chinese version OS.

When I build the program at office (Win2000 English version), the garbage appears. When I run the program built with Chinese platform on English platform, the garbage still there.

There must be some thing wrong with the character processing. I will try to detect it later.

- Shawn
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Wed Nov 16, 2005 10:42 am    Post subject: Reply with quote

The bug fixed !

D spec says that the initial value of char is 0xFF, wchar is 0xFFF. I forgot to set the inital memory of TrayItem tooltip. The system showes all the 64 characters in the memory and causes the garbag.

I have made a new TrayIcon example which has the following features:

1) Right click context menu
2) Double click to show or hide main window
3) Minimize and Close to tray
4) Animated tray icon. (Enable/Disable)

I will submit the update soon.

Thanks for help to trace the bug.

- Shawn
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group