An external library thing

The new external library feature is nice, but not always (maybe even not most of the time) usuable as one would think at first sight. When importing a library (with the zip-extract) the external library lands nicely inside the Scriptcase installation, but when this external library uses internal requires or includes it doesn’t work. You have to replace al those internal require-calls with the SC-macro sc_include_library. Not a big thing when the external library is small, but not very usuable for a big external library with internal require-calls all over the place at all sorts of levels.

I second that! It should be improved in that area.

Yes, It is Important +1

Hello,

You have some include in the php file. So, the include not works when you extract the zip in the External Libraries?

We extract the zip that has a php file with include, it’s worked normally using the macro sc_include_library.

Could you explain the steps to simulate it?


Best regard,
Netmake Team

The attached Pear Ldap library is imported from the zip into the project. Then the file LDAP2.php is included in the code with the macro sc_include_library(“prj”, “NetLDAP2”, “Net/LDAP2.php”, true, true); in the On_Execute of a blank application. Then all require_onces inside the Pear Library fail unless you replace them with sc_include_library calls.

If I handle this in a wrong way I’m very curious to hear a solution without editing the Pear Ldap library. Dynamically extending the include_path with ini_get and ini_set? Not what you would expect from this new feature.

Pear Ldap.zip (69.1 KB)

Just in case anyone else is suffering from brain fade…
Here are our notes on how to use external Materialize CSS
Materialize was uploaded from standard zip file
Any enquiries welcome

/**
* Notes 
* Docs incorrect - use "sys" as target rather than "Scriptcase"
* Make sure to do full build of all applications to enable library
* Make sure library is enabled under Tools>External Libraries


$stylePath = sc_url_library("sys", "materialize", "materialize");
echo "<a href='$stylePath/css/materialize.css'>css</a><br/>";
echo "<a href='$stylePath/js/materialize.js'>js</a><br/>";

Can you give more info - what is materialize, and why do you use it with SC?

OIC, thanks.

They say “good” things on that page:

  • Simplifies life for developers
  • Speeds up development
  • Easy to work with.

I wonder if it worthwhile for me as a Scriptcase developer to spend time with it.
Anyone using it? Please share your experience.

Materialize CSS is just like Bootstrap, but it’s based on Google Material Design. I think it’d only be useful in blank applications, as you need to use specifics HTML elements/classes and JavaScript functions.

I’ve used it to build mobile app, and I really liked it.

It’s 4 months later now since I posted this external library thing problem. Silence since then from Netmake.