Quantcast
Channel: FiveTech Software tech support forums
Viewing all articles
Browse latest Browse all 26212

Problem with Preview from trichedit

$
0
0
Dear Antonio, on my class mypad I use two methods to return me the active window child and the richedit control [code=fw:2p7aerp6][/code:2p7aerp6] and [code=fw:2p7aerp6][/code:2p7aerp6] when I show the preview of the window child ( ::WndChild():preview() ) I use this button from bar DEFINE BUTTON RESOURCE "RTFPreview" OF ::oBar1 ; MESSAGE "Displays full pages" ; TOOLTIP "Print Preview" NOBORDER ; WHEN ( ::WndActive() .and. [b:2p7aerp6]::WndChild():Len() > 0 ) [/b:2p7aerp6]; ACTION ::WndChild():Preview( ::oWndMain ) [b:2p7aerp6]it make error [/b:2p7aerp6] Application =========== Path and name: F:\VERSIONI_RTFPAD\FivePad\FivePad.Exe (32 bits) Size: 3,452,416 bytes Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) FiveWin Version: FWHX 16.03 Windows version: 6.1, Build 7600 Time from start: 0 hours 0 mins 8 secs Error occurred at: 26/04/16, 13:20:36 Error description: Error BASE/1004 Class: '[b:2p7aerp6]NIL' has no exported method: LEN[/b:2p7aerp6] Args: [ 1] = U Stack Calls =========== Called from: => LEN( 0 ) Called from: Source\TFivePad.prg => (b)TFIVEPAD:SETBAR( 960 ) on cuurent trichedit I saw this method METHOD Len() INLINE RELen( ::hWnd ) I think make error because the function ::WndChild() return the ocontrol on tmdiclild and when I open the rpreview window it found many controls into how I can resolve it ? if I rename the command DEFINE BUTTON RESOURCE "RTFPreview" OF ::oBar1 ; MESSAGE "Displays full pages" ; TOOLTIP "Print Preview" NOBORDER ; WHEN ( ::WndActive() ) ; // .and. ::WndChild():Len() > 0 ); ACTION ::WndChild():Preview( ::oWndMain ) the rpreview is opened and then make another error Error description: Error BASE/1004 Class: 'NIL' has no exported method: CANCUT [code=fw:2p7aerp6][/code:2p7aerp6] on these lines of setbar method METHOD SetBar() CLASS Tmypad LOCAL oBar, oCursor, oClp DEFINE CURSOR oCursor HAND DEFINE CLIPBOARD oClp OF ::oWndMain FORMAT TEXT DEFINE BUTTONBAR oBar OF ::oWndMain 3D SIZE 26, 84 oBar:bLClicked := { || NIL } oBar:bRClicked := { || NIL } @ -1, -1 BUTTONBAR ::oBar1 OF oBar 3D SIZE oBar:nWidth - 1, 29 ; BUTTONSIZE 26, 27 [b:2p7aerp6] DEFINE BUTTON RESOURCE "RTFCut" OF ::oBar1 GROUP ; MESSAGE "Cuts the selection and puts it on the Clipboard" ; TOOLTIP "Cut" NOBORDER ; WHEN ( ::WndActive() .and. ::WndChild:CanCut() ) ; <------------------ ACTION ( ::WndChild():Cut(), ::WndChild():SetFocus() ) DEFINE BUTTON RESOURCE "RTFCopy" OF ::oBar1 ; MESSAGE "Copies the selection and puts it on the Clipboard" ; TOOLTIP "Copy" NOBORDER ; WHEN ( ::WndActive() .and. ::WndChild():CanCopy() ) ; ACTION ( ::WndChild():Copy(), ::WndChild():SetFocus() ) DEFINE BUTTON RESOURCE "RTFPaste" OF ::oBar1 ; MESSAGE "Inserts Clipboard contents" ; TOOLTIP "Paste" NOBORDER ; WHEN ( ::WndActive() .and. ::WndChild:CanPaste() ) ; ACTION ( ::WndChild():Paste(), ::WndChild():SetFocus() ) DEFINE BUTTON RESOURCE "RTFUndo" OF ::oBar1 GROUP ; MESSAGE "Reverses the last action" ; TOOLTIP "Undo" NOBORDER ; WHEN ( ::WndActive() .and. ::WndChild():CanUndo() ) ; ACTION ( ::WndChild:Undo(), ::WndChild():SetFocus() ) DEFINE BUTTON RESOURCE "RTFRedo" OF ::oBar1 ; MESSAGE "Carries out the previously undone action" ; TOOLTIP "Redo" NOBORDER ; WHEN ( ::WndActive() .and. ::WndChild():CanRedo() ) ; ACTION ( ::WndChild():Redo(), ::WndChild():SetFocus() )[/b:2p7aerp6] why ? thanks

Viewing all articles
Browse latest Browse all 26212

Trending Articles