IGlass and BMax 1.20 Update
BlitzMax Forums/BlitzMax Programming/IGlass and BMax 1.20 Update
| ||
Anyone else notice their module of iGlass magically getting blown away out of the pub folder after updating to BMax 1.20? When I tried compiling my app, I got: Compile Error: Can't find interface for module 'pub.igl' So I checked the pub folder and sure enough IGlass was gone. I'm pretty sure that I didn't just up and erase it soooo.......going to keep an eye out for more strangeness... [edit] And now that I've put the igl.mod back in the pub folder and compile my app, I get: Compile Error: Incbin can only be used in main program block Charming. |
| ||
Confirmed. Mine did the exact same thing. Gone. Seems like its related to the fact that the IGlass mod is in the Pub folder and not in its own. My other modules outside of the Pubs folder are fine. |
| ||
Well, I emailed Filax and we'll see if we can get his attention!! :) If you replace the folder in there it at least sees it again, but then that wierd error shows up. |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=59113 |
| ||
Hey Khomy! Yeah I saw that in the updates: "+ (BCC) Fixed Incbin so it doesn't matter where it is in code." Yet I get: Compile Error: Incbin can only be used in main program block Shouldn't the update mean that I shouldn't get that error?? It's in an Included file. |
| ||
Do you get that error when you compile the module or a source file that uses it? |
| ||
Hi, "+ (BCC) Fixed Incbin so it doesn't matter where it is in code." Sorry, not well worded. By this I meant that incbins can now be declared lower down in the source file than where they are used - this used to be impossible. Incbins in an included file should be OK - as long as the included file is included in the 'main' file, eg: '----- x.bmx ----- Include "y.bmx" Print InbinLen( "t.txt" ) '----- y.bmx ----- Incbin "t.txt" You can't, however, use Incbin inside a If/For/Type/While etc. The reason for this is that it implies a level of scoping that just doesn't exist - Incbined filenames are always global, so the Incbins should be too. |
| ||
Ahhhhhhhhhhhhhhh OK. Well, I might not wait for Filax, and just see if I can whip it up myself in the source. Thanks for the reply Mark! |
| ||
Sorry Mark But you tired me with your changes.... This feature is stupid :( why i can't do an incbin under a function ???? This stuff work perfectly before ? Sometime,i seriously think of leaving the blitz world... Note to customer's : Don't panic, check your mail box :) |
| ||
Bless you Filax! |
| ||
:) |
| ||
why i can't do an incbin under a function ???? Because, as Mark said, IncBin has a global scope (or no scope, I suppose, it's just there), so using it in a function would imply some sort of scope inaccessible on a global level. |
| ||
Sure, but .... |
| ||
Don't make me hit you with a chair. |
| ||
? :/ |
| ||
If it has no scope why can't it be used in a function? I don't understand. Surely one can use globals whose scope is similar in functions. It's more about program flow than domain really. |
| ||
Well, thanks filax first, actually I don't recommend the incbin thing, if possible, use 3rd party packers like BBCruncher or MoleBox. I found the incbin works slow on some machines, don't know why but it did happen, and moleboxed program loads faster. |
| ||
If it has no scope why can't it be used in a function? I don't understand. Surely one can use globals whose scope is similar in functions. It's more about program flow than domain really. If you declare a global in a function, then it is global only within the scope of that function. |
| ||
I agree with Noel. There is nothing to be gained from declaring an IncBin inside a function, and there is something to be lost: transparency and comprehension. |
| ||
It would be nice to be able to use it in loops with variables though...For local n=0 to 9 IncBin "sprite" + n + ".png" NextNothing that can't be generated with a few lines of code, but still. |
| ||
It would be nice to be able to use it in loops with variables though... For local n=0 to 9 IncBin "sprite" + n + ".png" Next Nothing that can't be generated with a few lines of code, but still. Nice as it would be, it's probably best to write a seperate script or program to generate the code for stuff like that. |
| ||
Hi Filax, I am one of your customer but I didn't receive any update... Thanks for sending me this at repeatuntil AT free.fr. Merci ! |
| ||
dangit, I changed my email addy again and forgot to tell filax, lol. |