forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Underscore character in %eb edit box !!

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Sun Sep 28, 2014 2:26 pm    Post subject: Underscore character in %eb edit box !! Reply with quote

Hi Paul,

I'm waiting since long time for a response to my question:

Independently from keyboard type (English, Spanish, German), in my %eb edit box

Code:
WINIO@ (%23.11?`^eb[no_border,undo,hscrollbar,vscrollbar,report_right_clicks]@ &', ....


I cannot type underscore characters "_"
The old DOS method with holding left Alt button down while typing "95" at the numerical keypad creates the "_" character. However, it is too complicated for practical use, an not possible on many notebooks.

This is really disturbing, because my customers are using frequently this character to define e.g. photo or point names like 23_012 or C_4711 which have to be entered in this box.

Please help!
Erwin
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Sun Sep 28, 2014 3:28 pm    Post subject: Reply with quote

Can you give more details. I am using a standard UK keyboard and the under-score character appears as expected - i.e. it appears in a %eb box when I press the shift and minus key thus _
Back to top
View user's profile Send private message AIM Address
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Mon Sep 29, 2014 9:10 am    Post subject: Reply with quote

Hi Paul,

as well on my keyboard shift and minus key should result in underscore. This key is neighbor of the right shift key on my keyboard.

I tried to isolate a small example from my code and found, that under some (un-identified) circumstances this key combination was acting like ctrl+v (paste).

Then I found the source of the problem: The accelerator key Shift+Ins. Without that line everything works fine.

Code:

    WINAPP '..\icons\rc_bbman.rc'

    PROGRAM BgoPara                    ! Parameter settings for .....

    USE      GlobalData
    USE      BgoParaData
    IMPLICIT NONE
    INCLUDE    <win32api.ins>
    INCLUDE    <clearwin.ins>
       :
       :

    MA = WINIO@ ('%ac[Ctrl+z]&',   'EDIT_UNDO')
    MA = WINIO@ ('%ac[Ctrl+c]&',    CB_COPY)
    MA = WINIO@ ('%ac[Ctrl+v]&',    CB_INSERT)
    MA = WINIO@ ('%ac[Shift+Del]&', CB_CUT)
!>> MA = WINIO@ ('%ac[Shift+Ins]&', CB_PASTE)    <<<<
    MA = WINIO@ ('%sh', HD_IMAGE)


Code:

 MODULE BgoParaData

    IMPLICIT NONE
       :
       :

    TYPE EB_EDIT_INFO                  ! Edit boxes for points and photos
       INTEGER   EB_H_POSITION
       INTEGER   EB_V_POSITION
       INTEGER   EB_LAST_LINE
       INTEGER, POINTER ::   EB_BUFFER
       INTEGER   EB_BUFFER_SIZE
       INTEGER   EB_MAX_BUFFER_SIZE
       INTEGER   EB_CURRENT_POSITION
       INTEGER   EB_SELECTION
       INTEGER   EB_N_SELECTED
       INTEGER   EB_VK_KEY
       INTEGER   EB_VK_SHIFT
       INTEGER   EB_ACTIVE
       INTEGER   EB_MODIFIED
       INTEGER   EB_CLOSING
       INTEGER   EB_USER_COLOURS
       INTEGER   EB_UNDO
       INTEGER   EB_LIMITED_HSCROLLBAR
       INTEGER   EB_NO_FRAME
       INTEGER   EB_NO_CURSOR_SNAP
       INTEGER   EB_REPORT_DOUBLE_CLICK
       INTEGER   EB_REPORT_RIGHT_CLICK
       INTEGER   EB_RESERVED(3)
    END TYPE EB_EDIT_INFO

    INTEGER      IBOX1(24), IBOX2(24), NREBOX
    TYPE (EB_EDIT_INFO) :: BOX1, BOX2
    EQUIVALENCE  (BOX1, IBOX1)
    EQUIVALENCE  (BOX2, IBOX2)

 END MODULE BgoParaData


    INTEGER FUNCTION CB_PASTE ()
    USE      BgoParaData
    IMPLICIT NONE
    INCLUDE    <clearwin.ins>

    IF (NREBOX .EQ. 1) THEN                 ! Select box 1 or 2
       CALL EDIT_CLIPBOARD_PASTE@ (IBOX1)
       CALL NEXT_EDIT_OPERATION@  (IBOX1)
    ELSE IF (NREBOX .EQ. 2) THEN
       CALL EDIT_CLIPBOARD_PASTE@ (IBOX2)
       CALL NEXT_EDIT_OPERATION@  (IBOX2)
    ENDIF

    CB_PASTE = 1
    RETURN
    END


Can you reproduce this or identify a fault in my code?

Erwin
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Mon Sep 29, 2014 2:17 pm    Post subject: Reply with quote

If you were able to present a working program then I might be able to comment.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Sep 29, 2014 2:44 pm    Post subject: Reply with quote

Erwin,

If it is too long for a forum post, put it on Dropbox or similar.

Eddie
Back to top
View user's profile Send private message
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Tue Oct 14, 2014 10:15 am    Post subject: Reply with quote

Here my example:

Code:
    WINAPP
!-----------------------------------------------------------
    MODULE BgoParaData

    IMPLICIT NONE
    INTEGER        KONTROL

    TYPE EB_EDIT_INFO
       INTEGER   EB_H_POSITION
       INTEGER   EB_V_POSITION
       INTEGER   EB_LAST_LINE
       INTEGER, POINTER ::   EB_BUFFER
       INTEGER   EB_BUFFER_SIZE
       INTEGER   EB_MAX_BUFFER_SIZE
       INTEGER   EB_CURRENT_POSITION
       INTEGER   EB_SELECTION
       INTEGER   EB_N_SELECTED
       INTEGER   EB_VK_KEY
       INTEGER   EB_VK_SHIFT
       INTEGER   EB_ACTIVE
       INTEGER   EB_MODIFIED
       INTEGER   EB_CLOSING
       INTEGER   EB_USER_COLOURS
       INTEGER   EB_UNDO
       INTEGER   EB_LIMITED_HSCROLLBAR
       INTEGER   EB_NO_FRAME
       INTEGER   EB_NO_CURSOR_SNAP
       INTEGER   EB_REPORT_DOUBLE_CLICK
       INTEGER   EB_REPORT_RIGHT_CLICK
       INTEGER   EB_RESERVED(3)
    END TYPE EB_EDIT_INFO

    INTEGER      IBOX2(24), NREBOX
    TYPE (EB_EDIT_INFO) :: BOX1, BOX2
    EQUIVALENCE  (BOX2, IBOX2)

    END MODULE BgoParaData
!-----------------------------------------------------------
    PROGRAM BgoPara

    USE      BgoParaData
    IMPLICIT NONE
    INCLUDE    <win32api.ins>
    INCLUDE    <clearwin.ins>
    INTEGER    CB_EDIT2, CB_PASTE
    EXTERNAL   CB_EDIT2, CB_PASTE
    INTEGER    MA

    MA = WINIO@ ('%ca@&', 'EditorTest')
    MA = WINIO@ ('%bg&', RGB@(135,215,230))
    MA = WINIO@ (' %`bg[white]&')
    MA = WINIO@ ('%30.11?`^eb[no_border,undo,hscrollbar, &
         & vscrollbar,report_right_clicks]@ &', '*',     &
         & 0, IBOX2, CB_EDIT2, 'Edit box.')

    MA = WINIO@ ('%ac[Shift+Ins]&', CB_PASTE)

    MA = WINIO@ ('%lw', KONTROL)

    BOX2%EB_H_POSITION = 1
    BOX2%EB_V_POSITION = 1
    BOX2%EB_MODIFIED   = 0
    END
!-----------------------------------------------------------
    INTEGER FUNCTION CB_EDIT2 ()

    USE      BgoParaData
    IMPLICIT NONE

    NREBOX = 2
    CB_EDIT2 = 0
    RETURN
    END FUNCTION CB_EDIT2
!-----------------------------------------------------------

    INTEGER FUNCTION CB_PASTE ()

    USE      BgoParaData
    IMPLICIT NONE
    INCLUDE    <clearwin.ins>

    CALL EDIT_CLIPBOARD_PASTE@ (IBOX2)
    CALL NEXT_EDIT_OPERATION@  (IBOX2)

    CB_PASTE = 1
    RETURN
    END FUNCTION CB_PASTE
!-----------------------------------------------------------


Take some text into the paste buffer and then try to enter the "_" underscore character into the edit box.

Erwin
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Tue Oct 14, 2014 11:01 am    Post subject: Reply with quote

ClearWin+ is translating the underscore to the accelerator [Shft+Ins].
I think that I can probably fix this but for now you could use something else like [Ctrl+V].

I notice that the paste is at the beginning of the text but I am hoping that the fix for this will be in your code.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Oct 14, 2014 11:14 am    Post subject: Reply with quote

Oddly enough, if you delete the line associated with the paste callback you can insert the underscore character - but then you can't paste (UK keyboard).

I've been using Windows since version 1.0, and I still use the copy, cut and paste chords of Ctrl+Ins, Ctrl+Del and Shift+Ins. However, some versions of Windows ago the standard chords became Ctrl+C, Ctrl+X and Ctrl+V (for examples see the edit menu shortcuts in apps like Word etc in recent versions of Windows). It makes me think that Shift+Ins may not be reassignable with Clearwin+ %ac because of something in Windows rather than a bug in Clearwin+. On the other hand, Shift+Ins still works in other Windows apps.

Ctrl+V certainly works in place of Shift+Ins and allows creating an underscore when I modify your code.

I couldn't find where the standard key sequences changed, but there seem to be a lot of them! (See for example: http://www.howtogeek.com/115664/42-text-editing-keyboard-shortcuts-that-work-almost-everywhere/ )

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Thu Jan 22, 2015 10:11 am    Post subject: Reply with quote

This bug has now been fixed for the next release.
I plan to upload a beta DLL soon for users to test.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
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