[futurebasic] Print text in a window the user created

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2006 : Group Archive : Group : All Groups

From: Brian Heibert <bheibert@...>
Date: Mon, 26 Jun 2006 19:13:20 -0400
I have this local fn to parse my edit field
See below

and I have this
case "PRINT"
WINDOW #id
WINDOW OUTPUT #id
PRINT restOfCommand$

but it doesn't print the text the user types into the window the user  
created
how do I fix this?

Brian


local fn ParseEFLines( efID as long )
dim as handle  efH
dim as long    i, numLines
dim as str255  lineStr
dim as str255 lineStr2
dim PositionOfSpace
dim keyWord$
dim restOfCommand$
// Obtain handle to selected edit field
efH = TeHandle( efID )

// Test for valid handle
long if ( efH != 0 )
numLines = efH..teNLines%
// Test to see if EF contains any lines
long if ( numLines > 0 )
for i = 1 to numLines
lineStr = edit$( efID, i )
lineStr2 = lineStr + " "
positionOfSpace = INSTR( 1, linestr2$,  " " )
keyWord$ = UCASE$(  LEFT$( linestr2$, positionOfSpace - 1 )  )
restOfCommand$ = MID$( lineStr, positionOfSpace + 1 )
dim title$, num1,num2,num3,num4,id
select case keyWord$
case "BEEP"
beep
case "OUTPUTWIN"
id = RIGHT$(restOfCommand,10)
WINDOW #id
case "PRINT"
WINDOW #id
WINDOW OUTPUT #id
WINDOW #id
PRINT restOfCommand$
end select
next i
xelse
// Return error if EF has no lines to parse
numLines = -1
end if
xelse
// Return error if EF is not valid
numLines = -1
end if
end fn = numLines



Brian Heibert
bheibert@...