Hello Enrico,

It's just a guess (since i cannot test currently), but perhaps using a scope
resolution message can help here

>         RETURN ::GET:SetPos( nPos )

Just a thought, not tested

Kind regards,

frank

.oO enjoyed to see .prg level related code snippets again in this forum ;-)

----- Original Message ----- 
From: "Enrico Maria Giordano" <[email protected]>
To: "Harbour Project Main Developer List." <[email protected]>
Sent: Sunday, February 22, 2009 6:32 PM
Subject: Re: [Harbour] TGet: setting cursor position to ::nMaxLen + 1


>
> -----Messaggio Originale----- 
> Da: "Enrico Maria Giordano" <[email protected]>
> A: "Harbour Project Main Developer List." <[email protected]>
> Data invio: domenica 22 febbraio 2009 18.12
> Oggetto: Re: [Harbour] TGet: setting cursor position to ::nMaxLen + 1
>
> Third problem. I'd want something like this:
>
> #include "Hbclass.ch"
>
>
> #xcommand OVERRIDE METHOD <!Message!> [IN] CLASS <!Class!> WITH [METHOD] ;
>                           <!Method!> [SCOPE <Scope>] => ;
>           __clsModMsg( <Class>():classH, #<Message>, @<Method>(), ;
>                        IIF( <.Scope.>, <Scope>, HB_OO_CLSTP_EXPORTED ) )
>
>
> FUNCTION MAIN()
>
>     LOCAL GetList := {}
>
>     LOCAL cVar := SPACE( 35 )
>
>     OVERRIDE METHOD _Pos CLASS GET WITH EMAG_SetPos
>
>     @ 1, 1 GET cVar
>
>     GetList[ 1 ]:SetFocus()
>     GetList[ 1 ]:Pos = 5
>     GetList[ 1 ]:Display()
>
>     READ
>
>     RETURN NIL
>
>
> STATIC FUNCTION EMAG_SETPOS( nPos )
>
>     LOCAL Self := QSELF()
>
>     IF nPos > ::nMaxLen
>         ::nPos = nPos
>         ::TypeOut := .T.
>     ELSE
>         RETURN ::SetPos( nPos )
>     ENDIF
>
>     RETURN nPos
>
> but I get the following error:
>
> Error BASE/1004  Message not found: GET:SETPOS
> Called from __ERRRT_SBASE(0)
> Called from GET:ERROR(0)
> Called from (b)HBOBJECT(0)
> Called from GET:MSGNOTFOUND(0)
> Called from GET:SETPOS(0)
> Called from GET:_POS(41)
> Called from GET:SETFOCUS(0)
> Called from MAIN(28)
>
> Any ideas?
>
> EMG
>
> --
> EMAG Software Homepage:     http://www.emagsoftware.it
> The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
> The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
> The EMG Music page:         http://www.emagsoftware.it/emgmusic
>
> _______________________________________________
> Harbour mailing list
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to