Andy, Blair,
while porting my treemap package which used my own home grown tooltips package I discovered that D6 allready includes most of the stuff I needed. I found Tooltip>>registerView: whose intention seems to be to register a view with the tooltip for text callbacks (it's the only method in the systems which sends #textCallback). However my first attempte where not successfull. The first I hit was Tooltip>>registerView which does not set TTF_SUBCLASS. AFAIK this is needed for implementing text callbacks. The second is just a "visual" thing: TTF_CENTERTIP is used which does not make real sense in this context. So if you change the source to the following everything works: registerView: aView self ttmAddTool: ((TOOLINFOA new) uFlags: ##(TTF_IDISHWND | TTF_SUBCLASS); textCallback; hwnd: aView asParameter; uId: aView asParameter; yourself) I attached a sample class which demonstrates the use of callback tooltips. I decided to implement #onTipDetailsRequired: on the presenter side altough this can also be implemented on the View side (as I did for treemaps). As this is an RFE ... should I enter it into the bug database? Regards, Udo "Filed out from Dolphin Smalltalk X6"! Shell subclass: #TooltipShell instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' classInstanceVariableNames: ''! TooltipShell guid: (GUID fromString: '{DE62466C-9142-4CF0-B72A-341AAD10661C}')! TooltipShell comment: ''! !TooltipShell categoriesForClass!MVP-Presenters! ! !TooltipShell methodsFor! onTipDetailsRequired: aNMTTDISPINFOA aNMTTDISPINFOA text: self view cursorPosition displayString. ^0! onViewOpened self view toolTipWindow: ((Tooltip new) isBalloon: true; create; registerView: self view; yourself). super onViewOpened! ! !TooltipShell categoriesFor: #onTipDetailsRequired:!public! ! !TooltipShell categoriesFor: #onViewOpened!public! ! |
Udo,
> while porting my treemap package which used my own home grown > tooltips package I discovered that D6 allready includes most of the > stuff I needed. > > I found Tooltip>>registerView: whose intention seems to be to > register a view with the tooltip for text callbacks (it's the only > method in the systems which sends #textCallback). > > However my first attempte where not successfull. The first I hit was > Tooltip>>registerView which does not set TTF_SUBCLASS. AFAIK this is > needed for implementing text callbacks. > > The second is just a "visual" thing: TTF_CENTERTIP is used which does > not make real sense in this context. > > So if you change the source to the following everything works: > registerView: aView > self ttmAddTool: ((TOOLINFOA new) > uFlags: ##(TTF_IDISHWND | TTF_SUBCLASS); > textCallback; > hwnd: aView asParameter; > uId: aView asParameter; > yourself) > > I attached a sample class which demonstrates the use of callback > tooltips. I decided to implement #onTipDetailsRequired: on the > presenter side altough this can also be implemented on the View side > (as I did for treemaps). > > As this is an RFE ... should I enter it into the bug database? Yes. Mark it as an enhancement request. -- Andy Bower Dolphin Support www.object-arts.com |
Andy Bower wrote:
>>As this is an RFE ... should I enter it into the bug database? > Yes. Mark it as an enhancement request. Done CU, Udo |
Free forum by Nabble | Edit this page |