|
Post by pablosl on Feb 27, 2019 20:58:21 GMT -5
Hello,
I've been searching if somebody tested sucessfully: test_toolbar.bas ??
The statement LOADMASKED fails to find "bmp\pizza.bmp" and others bmp's. I assume the bitmaps must be masked like the sprites.
I have modified the snippet a lite bit, without luck!.
loadmasked "new", "SPRITES\pizza.bmp"
loadmasked "open", "SPRITES\pizza.bmp"
toolbar #tbtest, _
"new", [newFile], "New file" , _
"open", [openFile], "Open file" menu #tbtest, "File", "Open file", [openFile]
open "toolbar test" for window as #tbtest
wait I get this error:
"Unhandled exception: BitBLT on images with different pixel depths."
- Pablo
|
|
|
Post by donnybowers on Feb 28, 2019 22:43:05 GMT -5
I had similar results on Linux. I had to change the filenames because the files listed in the program didn't exist in the directories (also in Linux file names are case sensitive):
'toolbar example loadmasked "new", "bmp/NEW.BMP" loadmasked "open", "bmp/OPEN.BMP" loadmasked "save", "bmp/SAVE.BMP" loadmasked "quit", "bmp/QUITBTTN.BMP" loadmasked "pizza", "SPRITES/pizza.BMP" toolbar #tbtest, _ "new", [newFile], "New file", _ "open", [openFile], "Open file", _ "save", [saveFile], "Save file", _ |,_ "quit", [quit], "Quit", _ "pizza", [pizza], "Yummy!" menu #tbtest, "File", "Open file", [openFile] open "toolbar test" for window as #tbtest wait [openFile] notice "opening..." wait
I get the same error. Here's the error log:
==2019/2/28==22:37:40==BEGIN RUNTIME DIAGNOSTIC DUMP Note: this file stored in VisualWorks #source (UTF-8) encoding
Cause of Dump: Unhandled exception: BitBLT on images with different pixel depths. 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: 1060 Context Stack: [1] MainwinIOPortal(Object)>>error: [2] MainwinIOPortal>>runtimeError: [3] BranchingProgramDirector(Director)>>runtimeError: [4] [] in BranchingProgramDirector>>innerDirect [5] BlockClosure>>cull: [6] Error(GenericException)>>performHandler: [7] Error(GenericException)>>propagatePrivateFrom: [8] Error(GenericException)>>propagateFrom: [9] Error(GenericException)>>propagate [10] Error(GenericException)>>raiseSignal [11] Error class(GenericException class)>>raiseErrorString: [12] Depth24Image(Object)>>error: [13] Depth24Image(Image)>>copyBitsAtX:y:from:atX:y:width:height:rule: [14] Depth24Image(Image)>>copy:from:in:rule: [15] LoadimageMaskedFrame>>animate: [16] optimized [] in BranchingProgramDirector>>innerDirect [17] BlockClosure>>on:do: [18] BranchingProgramDirector>>innerDirect [19] BranchingProgramDirector>>direct: [20] BranchingProgramDirector(Director)>>for:direct: [21] BranchingProgramDirector>>for:direct: [22] Program>>runWithDirector: [23] optimized [] in Program>>runForked [24] BlockClosure>>on:do: [25] optimized [] in Process class>>forBlock:priority:
------------------------------------------------------------ Unhandled Exception: class: UnhandledException creator: UnhandledException errorString: Unhandled exception: BitBLT on images with different pixel depths. parameter: an Error
==2019/2/28==22:37:40==END RUNTIME DIAGNOSTIC DUMP
|
|
|
Post by metro on Mar 1, 2019 0:14:01 GMT -5
I had similar results on Linux. I had to change the filenames because the files listed in the program didn't exist in the directories (also in Linux file names are case sensitive): 'toolbar example loadmasked "new", "bmp/NEW.BMP" loadmasked "open", "bmp/OPEN.BMP" loadmasked "save", "bmp/SAVE.BMP" loadmasked "quit", "bmp/QUITBTTN.BMP" loadmasked "pizza", "SPRITES/pizza.BMP" toolbar #tbtest, _ "new", [newFile], "New file", _ "open", [openFile], "Open file", _ "save", [saveFile], "Save file", _ |,_ "quit", [quit], "Quit", _ "pizza", [pizza], "Yummy!" menu #tbtest, "File", "Open file", [openFile] open "toolbar test" for window as #tbtest wait [openFile] notice "opening..." wait
Can we set some ground rules regarding the naming of bitmaps, us Linux users will be having issues with case..We either choose all UPPER or all lower including file extension....I prefer all lower myself. but happy to comply with consensus
|
|
|
Post by Rod on Mar 1, 2019 7:47:36 GMT -5
There will be many legacy files to deal with. Perhaps the solution is for Windows users to start thinking case sensitive and get the file names correctly coded.
|
|
|
Post by donnybowers on Mar 5, 2019 22:49:45 GMT -5
There will be many legacy files to deal with. Perhaps the solution is for Windows users to start thinking case sensitive and get the file names correctly coded. If a Windows user wants their program's files to be cross-platform they will need to consider this difference between Windows and Unix systems. If they're just doing stuff for their own use, solely on Windows, it really doesn't matter. If you're using Linux and you want to run some of the example programs like test_toolbar.bas, you'll need to fix the file names because that was an example program from LB4, which was written in Windows. These cross-platform considerations (like file naming protocols) didn't matter with LB4 since it was strictly for Windows. If you were running it under Wine you were probably aware of the issue, but under Windows only it didn't matter.
|
|