An option to turn "on"/"off" user libs
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
An option to turn "on"/"off" user libs
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.
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.
Last edited by techjunkie on Tue May 22, 2007 9:55 pm, edited 1 time in total.

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Re: An option to turn "on" and "off" use
@Freak: This is what I meant by my "Safe Mode" compile option. 

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Re: An option to turn "on" and "off" use
Aha - where is that thread?PB wrote:@Freak: This is what I meant by my "Safe Mode" compile option.

I would like a feature where you could check / uncheck specific user libs.

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Re: An option to turn "on" and "off" use
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.
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.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: An option to turn "on" and "off" use
I could tell you... but then i'd have to shoot youtechjunkie wrote:Aha - where is that thread?PB wrote:@Freak: This is what I meant by my "Safe Mode" compile option.![]()

quidquid Latine dictum sit altum videtur
> I could tell you... but then i'd have to shoot you
Jonny English? :roll:
Jonny English? :roll:

PB 4.30
Code: Select all
onErrorGoto(?Fred)
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
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...
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...
oh... and have a nice day.
I use PureLibManager: http://www.purebasic.fr/english/viewtopic.php?t=24658
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: An option to turn "on" and "off" use
freak wrote:I could tell you... but then i'd have to shoot you

Dare2 cut down to size
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Re: An option to turn "on" and "off" use
freak wrote:I could tell you... but then i'd have to shoot you




(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
ts-soft wrote:I use PureLibManager: http://www.purebasic.fr/english/viewtopic.php?t=24658



(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Works like a charm!techjunkie wrote:ts-soft wrote:I use PureLibManager: http://www.purebasic.fr/english/viewtopic.php?t=24658Will try it right away! Thanks!


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





(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Re: An option to turn "on" and "off" use
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).
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?"

-
- Addict
- Posts: 1675
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: An option to turn "on"/"off" user libs
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....
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....
