|
Post by tenochtitlanuk on Feb 26, 2019 17:48:49 GMT -5
Wrote ( in LB5) code for a poster on JB forum and it fails
open "test.fil" for input as #fIn content$ =input$( #fIn, lof( #fIn)) close #fIn Runs fine in LB4.. is there a syntax change??
|
|
|
Post by Carl Gundel on Feb 26, 2019 18:10:35 GMT -5
It fails how exactly?
|
|
|
Post by donnybowers on Feb 26, 2019 21:46:08 GMT -5
I think I've mentioned this problem with reading a file with LOF in a couple of my posts:
filedialog "Open .bas file", "*.bas", fileName$ open fileName$ for input as #f txt$=input$(#f, lof(#f)) close #f
error log:
==2019/2/26==21:44:10==BEGIN RUNTIME DIAGNOSTIC DUMP Note: this file stored in VisualWorks #source (UTF-8) encoding
Cause of Dump: Unhandled exception: Message not understood: #readLimit Smalltalk Version: 'VisualWorks®, Pre-Release 8.3.2 (apr18.3) of April 20, 2018' Object Memory versionId: #[172 40 76 176 83 2 3 4 172 47 76 176] Class creating this dump: ErrorDumper ------------------------------------------------------------ Active Process Process named: 'Unnamed Process' Process priority: 50 Process identity hash: 11942 Context Stack: [1] optimized [] in Director>>direct: [2] BlockClosure>>cull: [3] MessageNotUnderstood(GenericException)>>performHandler: [4] MessageNotUnderstood(GenericException)>>propagatePrivateFrom: [5] MessageNotUnderstood(GenericException)>>propagateFrom: [6] MessageNotUnderstood(GenericException)>>propagate [7] MessageNotUnderstood(GenericException)>>raiseSignal [8] EncodedStream(Object)>>doesNotUnderstand: [9] BasicFile>>lengthOfFile [10] optimized [] in UndefinedObject>>unboundMethod [11] AssignFrame>>animate: [12] optimized [] in [] in Director>>direct: [13] OrderedCollection>>do: [14] optimized [] in Director>>direct: [15] BlockClosure>>on:do: [16] ProgramDirector(Director)>>direct: [17] ProgramDirector>>direct: [18] ProgramDirector(Director)>>for:direct: [19] ProgramDirector>>for:direct: [20] Program>>runWithDirector: [21] optimized [] in Program>>runForked [22] BlockClosure>>on:do: [23] optimized [] in Process class>>forBlock:priority:
------------------------------------------------------------ Unhandled Exception: class: UnhandledException creator: UnhandledException errorString: Unhandled exception: Message not understood: #readLimit parameter: a MessageNotUnderstood
==2019/2/26==21:44:10==END RUNTIME DIAGNOSTIC DUMP
|
|
cundo
Full Member
Muchas Gracias!!
Posts: 146
|
Post by cundo on Feb 27, 2019 11:58:35 GMT -5
I want to guess, something related to LOF? Something not yet implemented?
|
|
|
Post by tenochtitlanuk on Feb 27, 2019 13:17:18 GMT -5
Obviously, since the prog. is quite happy if file exists and you use the known length-of-file rather than LOF!!
|
|
cundo
Full Member
Muchas Gracias!!
Posts: 146
|
Post by cundo on Feb 27, 2019 16:18:42 GMT -5
Hi John, I was trying to understand the Error log, that is why I'm guessing. I did not test the code yet.
|
|