What we need....

This forum is meant for questions and discussions about the XSharp Tools libraries, which contain code written by XSharp users that they want to share with others,
The development team is not responsible for this code

Moderator: wriedmann

Post Reply
User avatar
wriedmann
Posts: 3773
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

What we need....

Post by wriedmann »

Hi all,

after the long thread about a X# Tools library https://www.xsharp.eu/forum/suggestions/759-additional-runtime-functions-and-classes I would thank the development team, specially Robert, for listening and giving us the infrastructure for this important project.
I'm pretty sure this project will help us to build a solid fundament for our X# applications.

What we need in the next weeks until the Github infrastructure is ready:
first, we need suggestions from you what you miss in the .NET Framework and what you think that our Tools Library should contain
second, if you have code that you think that should be contained in this library. Of course, if you contribute code, it must be under the "XSharp Open Software License" like all runtime code of X#: https://www.xsharp.eu/licensing/xsharp-open-software-license

Of course, the code should be documented like the code of the runtime itself. For a sample, please see here:
https://github.com/X-Sharp/XSharpPublic/tree/feature/Runtime/Runtime/XSharp.VO/Functions/Conversions.prg#L369

I hope, that this project will help all of us to be successful with X#!

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1861
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

What we need....

Post by ic2 »

Hello Wolfgang,

Just like many other programmers, I have a library with functions and methods which are not present in the normal VO runtime. I have divided those in functions we wrote ourselves and functions from others, usually from comp.lang...

These functions I consider the most important in being productive and, as often, it's a bit a matter of remembering that we have a function ready to perform a certain task, or a quick way to search for it and recognizor such a functions as the suitable solution. For me, this library is more important than most "New language features" even though, as written, I acknowledge it's good these are added by the team.

My question is: is that what you have in mind for the project? Below a random sample of such a simple function.

Dick

FUNCTION StrReplace(cOrg AS STRING, cString AS STRING, nFrom AS DWORD) AS STRING
//#s Replace in cOrg from position nFrom the content by cString (same length)
LOCAL cRet AS STRING
IF nFrom<>0
cRet:=Left(cOrg,(nFrom-1))+cString+SubStr2(cOrg,(nFrom+Len(cString)))
ELSE
cRet:=cOrg
ENDIF
RETURN cRet
User avatar
wriedmann
Posts: 3773
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

What we need....

Post by wriedmann »

Hi Dick,

IMHO this library does not should be a simple transport of VO functions and methods, but offer functionality we are used to to the Framework classes, like a name based binding to WinForms/WPF windows, or pictures to WinForms/WPF controls.

And I'm pretty sure there is a lot of needed functions like IsPropertyList() or IsProperty() or GetPropertyValue(), simple because properties in VO does not exist.

I already have several of these functions and classes because I needed them working on my X# projects.

I'm making a distinction between migrated VO applications (that probably would not need such a library because we can simply port our VO libraries) and new, pure :NET applications that need some successful concepts from the VO age.

But of course I'm open to discussions.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1861
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

What we need....

Post by ic2 »

Hello Wolfgang,
this library does not should be a simple transport of VO functions and methods,
Ok, clear. I've written a few functions not available in VO (or less efficient/well working, like zipping files >2Gb) in a Vulcan (now X#) lib. Part of it relies on a C# lib I created (usually because the solutions I needed I found in C# code samples).

These are a few functions/methods I use. Do you mean something like that?

Dick

SaveImageFromClipboard - Save jpg cFile from clipboard

IsValidEmail - Check if email string is a valid e-mail address

GetFileViaHttp - General function to get content of page via http

MakeZipFile - Zip a set of files via C# (supports >2 Gb files & zips)
User avatar
wriedmann
Posts: 3773
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

What we need....

Post by wriedmann »

Hi Dick,

the first 3 would qualify, the 4th not because depends on an external library not part of the X# runtime and not part of the .NET Framework.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1861
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

What we need....

Post by ic2 »

Hello Wolfgang,

I'll send you the first 3. But the ZIP method is not an external library. It's my own C# code. Of course it contains bits and pieces I found in samples or postings with Q&A, and that's the reason it's C#, but I wrote this myself.

Dick
Post Reply