Page 1 of 1
An option to turn "on"/"off" user libs
Posted: Tue May 22, 2007 9:53 pm
by techjunkie
An option to turn "on"/"off" user libs "on the fly"
Very often when you try a snipet from the Forum, you have to temporarily rename a userlib's folder and restart PB, due to the fact that some functions, structures collides.
It would be a very handy feature if you could switch "on"/"off" userlibs from PB IDE.
Re: An option to turn "on" and "off" use
Posted: Tue May 22, 2007 9:55 pm
by PB
@Freak: This is what I meant by my "Safe Mode" compile option.

Re: An option to turn "on" and "off" use
Posted: Tue May 22, 2007 9:58 pm
by techjunkie
PB wrote:@Freak: This is what I meant by my "Safe Mode" compile option.

Aha - where is that thread?

but did Freak mean that all user libs should be "off" in "Safe Mode"? I'll guess so...
I would like a feature where you could check / uncheck specific user libs.
Re: An option to turn "on" and "off" use
Posted: Tue May 22, 2007 10:22 pm
by PB
I asked Freak to see if a compile option could be added (called "Safe Mode")
whereby no userlibs or custom residents files would be included when doing
the compile, to avoid situations where broken libs cause problems and so on.
But the consensus was that if some code needed a lib, then disabling it would
defeat the purpose of running the code, and I was asked for an example to
show when this might NOT be the case. So if you have an example, please
post it here as I've got nothing to back up my wish.

Re: An option to turn "on" and "off" use
Posted: Tue May 22, 2007 10:36 pm
by freak
techjunkie wrote:PB wrote:@Freak: This is what I meant by my "Safe Mode" compile option.

Aha - where is that thread?
I could tell you... but then i'd have to shoot you

Posted: Tue May 22, 2007 11:28 pm
by AND51
> I could tell you... but then i'd have to shoot you
Jonny English? :roll:

Posted: Tue May 22, 2007 11:36 pm
by Kaeru Gaman
a "safe mode"-option sounds REALLY good for me.
the point is, two years ago a Mate had problems
compiling my code that was written without using libs,
but he had an additional "2D-drawing" lib installed,
and it produced an error.
that was a point for me when I became a "Lib Hater".
if there had been a "safe mode" option, I would never have learned to hate UserLibs...
just an example.
the "copy that expansionless file to the folder and it will be always present"-way is not very emancipated....
it's not very practicable to rename the Lib-folder to compile without them...
Posted: Wed May 23, 2007 12:28 am
by ts-soft
Re: An option to turn "on" and "off" use
Posted: Wed May 23, 2007 12:29 am
by Dare
freak wrote:I could tell you... but then i'd have to shoot you


Re: An option to turn "on" and "off" use
Posted: Wed May 23, 2007 5:56 pm
by techjunkie
Posted: Wed May 23, 2007 5:57 pm
by techjunkie

Will try it right away! Thanks!

Posted: Wed May 23, 2007 6:06 pm
by techjunkie
techjunkie wrote:

Will try it right away! Thanks!

Works like a charm!

but I'll guess I have to switch to jaPBe, so I don't have to Restart Compiler myself... (I'm soooo lazy!

)
[EDIT]
I think I'm getting old...

I already had PureLIBManager in my PB folder - just forgot about it...

I think the few brain cells that I have left are occupied with other stuff than PB...

Re: An option to turn "on" and "off" use
Posted: Sun Feb 13, 2011 1:17 pm
by C64
I think a commandline option like "/safemode" (or "/nativemode") would be good for the times when you need to run PureBasic in its native form without third-party libraries and residents and so on (like PB said) for testing, because at the moment you need to have a separate clean install of PureBasic (in another folder and use "/portable") if you want to test something without going to the hassle of moving out those libraries and other stuff. That way I could have a batch file in my PureBasic folder to launch another instance of PureBasic just like it was freshly installed. Would be awesome! And the workload to add it would be minimal.
Team, please seriously consider doing this. Especially for when we help newbies here, one of the first things we can ask them when they have "buggy" code is: "Have you tried that snippet in safe mode?"

Just so we know that an outdated (or faulty) third-party library isn't causing their "bug" (assuming they aren't using one with their code).
Re: An option to turn "on"/"off" user libs
Posted: Mon Feb 14, 2011 5:02 pm
by Zach
I don't understand why they don't switch it so that you have to explicitly call a library, in order to load/use it.
At that point you could even stick the thing in its own Namespace, and even if you loaded two libraries that might not play nice, the Namespace separation would cancel out the conflict??
Or maybe I'm just having a Python relapse....
