TextCollectorView isEnabled

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TextCollectorView isEnabled

Gruenewald, Tom

Hello forum.
VisualWorks does not display "the correct cursor", if the mouse moves over a text editor or an input field. Maybe this is a setting. I don't know.
What I did to make this work: First I have create a new "text marker cursor" in the Cursor class, plus its accessing method #textMarker.

TextMarkerCursor := (self
imageArray: #(
2r0000111011110000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000111011110000)
maskArray: #(
2r0000111011110000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000000100000000
2r0000111011110000)
hotSpot: 7@8 name: 'textMarker').

Then I have added the following methods in the TextEditorController:

enterEvent: anEvent
self view isEnabled ifTrue: [Cursor textMarker show].
^super enterEvent: anEvent

exitEvent: anEvent
Cursor currentCursor = Cursor textMarker ifTrue: [Cursor normal show].
^super exitEvent: anEvent

Finished.

What makes me mad is the fact, that both the TextCollectorView (Transcript) and the TextEditorView are used by the controller class TextEditorController.
The TextCollectorView does not implement the method #isEnabled. What causes an exception, if the mouse moves over the transcript window.
Now I like to implement the method #isEnabled for the class TextCollectorView. How is the correct way to do that? I do not see a state value or an enable flag or something like that.
Or is there an another procedure?

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Reply | Threaded
Open this post in threaded view
|

Re: TextCollectorView isEnabled

Karsten Kusche
Hi Tom,

Now I like to implement the method #isEnabled for the class TextCollectorView. How is the correct way to do that? I do not see a state value or an enable flag or something like that.
Or is there an another procedure?


If there's no way to disable a TextCollectorView, why not implement the method to always return true?
Anyway, i think it's a pretty neat additon to have a text cursor that is shown, when the mouse is over a text view :-)

Kind Regards
Karsten



--
Karsten Kusche - Dipl. Inf. - [hidden email]
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: TextCollectorView isEnabled

Reinout Heeck-2
On 11/29/2010 2:02 PM, Karsten wrote:
Hi Tom,

Now I like to implement the method #isEnabled for the class TextCollectorView. How is the correct way to do that? I do not see a state value or an enable flag or something like that.
Or is there an another procedure?


If there's no way to disable a TextCollectorView, why not implement the method to always return true?

The textcollector view could be wrapped in a wrapper that manipulates visibility and enablement, so perhaps make the method that tiny bit smarter:

isEnabled
    |wrapper|
    wrapper := self findParent: [:each | each isKindOf: WidgetWrapper].
    ^wrapper ifNil: [true] ifNotNil: [wrapper isEnabled].


I imagine this could be implemented much higher in the class hierarchy above TextCollectorView


Reinout
-------

Anyway, i think it's a pretty neat additon to have a text cursor that is shown, when the mouse is over a text view :-)

Kind Regards
Karsten



--
Karsten Kusche - Dipl. Inf. - [hidden email]
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

-- 
*********************************************************************

Dit e-mailbericht is alleen bestemd voor de geadresseerde(n).

Gebruik door anderen is niet toegestaan. Indien u niet degeadresseerde(n) bent wordt u verzocht de verzender hiervan op de hoogte te stellen en het bericht te verwijderen. Door de elektronische verzending kunnen aan de inhoud van dit bericht geen rechten worden ontleend.

Soops B.V. is gevestigd te Amsterdam, Nederland, en is geregistreerd bij de Kamer van Koophandel onder nummer 33240368.
Soops B.V. levert volgens de Fenit voorwaarden, gedeponeerd te Den Haag op 8 december 1994 onder nummer 1994/189.
**********************************************************************

This e-mail message is intended to be exclusively for the addressee.

If you are not the intended recipient you are kindly requested not to make any use whatsoever of the contents and to notify the sender immediately by returning this e-mail message. No rights can be derived from this message.

Soops B.V. is a private limited liability company and has its seat at Amsterdam, The Netherlands and is registered with the Trade Registry of the Chamber of Commerce and Industry under number 33240368.
Soops B.V. delivers according to the General Terms and Conditions of Business of Fenit, registered at The Hague, The Netherlands on December 8th, 1994, under number 1994/189
**********************************************************************


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: TextCollectorView isEnabled

Gruenewald, Tom

Thank you Mr Heeck.
This is a good advice.

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


Inactive hide details for Reinout Heeck <vwnclist@soops.nl>Reinout Heeck <[hidden email]>



An


Kopie


Thema

    Re: [vwnc] TextCollectorView isEnabled

On 11/29/2010 2:02 PM, Karsten wrote:
    Hi Tom,

      Now I like to implement the method #isEnabled for the class TextCollectorView. How is the correct way to do that? I do not see a state value or an enable flag or something like that.
      Or is there an another procedure?


    If there's no way to disable a TextCollectorView, why not implement the method to always return true?

The textcollector view could be wrapped in a wrapper that manipulates visibility and enablement, so perhaps make the method that tiny bit smarter:

isEnabled
|wrapper|
wrapper := self findParent: [:each | each isKindOf: WidgetWrapper].
^wrapper ifNil: [true] ifNotNil: [wrapper isEnabled].


I imagine this could be implemented much higher in the class hierarchy above TextCollectorView


Reinout
-------
    Anyway, i think it's a pretty neat additon to have a text cursor that is shown, when the mouse is over a text view :-)

    Kind Regards
    Karsten



    --
    Karsten Kusche - Dipl. Inf. -
    [hidden email]
    Georg Heeg eK - Köthen
    Handelsregister: Amtsgericht Dortmund A 12812



    _______________________________________________
    vwnc mailing list
    [hidden email]
    http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
*********************************************************************

Dit e-mailbericht is alleen bestemd voor de geadresseerde(n).

Gebruik door anderen is niet toegestaan. Indien u niet degeadresseerde(n) bent wordt u verzocht de verzender hiervan op de hoogte te stellen en het bericht te verwijderen. Door de elektronische verzending kunnen aan de inhoud van dit bericht geen rechten worden ontleend.

Soops B.V. is gevestigd te Amsterdam, Nederland, en is geregistreerd bij de Kamer van Koophandel onder nummer 33240368.
Soops B.V. levert volgens de Fenit voorwaarden, gedeponeerd te Den Haag op 8 december 1994 onder nummer 1994/189.
**********************************************************************

This e-mail message is intended to be exclusively for the addressee.

If you are not the intended recipient you are kindly requested not to make any use whatsoever of the contents and to notify the sender immediately by returning this e-mail message. No rights can be derived from this message.

Soops B.V. is a private limited liability company and has its seat at Amsterdam, The Netherlands and is registered with the Trade Registry of the Chamber of Commerce and Industry under number 33240368.
Soops B.V. delivers according to the General Terms and Conditions of Business of Fenit, registered at The Hague, The Netherlands on December 8th, 1994, under number 1994/189
**********************************************************************

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

pic09467.gif (1K) Download Attachment