fbpx

What we need....

  • Wolfgang Riedmann
  • Wolfgang Riedmann's Avatar Topic Author
  • Offline
More
6 months 5 days ago #1 by Wolfgang Riedmann
What we need.... was created by Wolfgang Riedmann
Hi all,

after the long thread about a X# Tools library https://www.xsharp.info/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.info/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

Please Log in or Create an account to join the conversation.

More
6 months 5 days ago #2 by Dick
Replied by Dick on topic What we need....
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

Please Log in or Create an account to join the conversation.

  • Wolfgang Riedmann
  • Wolfgang Riedmann's Avatar Topic Author
  • Offline
More
6 months 5 days ago #3 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic What we need....
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

Please Log in or Create an account to join the conversation.

More
6 months 5 days ago - 6 months 5 days ago #4 by Dick
Replied by Dick on topic What we need....
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)
Last edit: 6 months 5 days ago by Dick.

Please Log in or Create an account to join the conversation.

  • Wolfgang Riedmann
  • Wolfgang Riedmann's Avatar Topic Author
  • Offline
More
6 months 5 days ago #5 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic What we need....
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

Please Log in or Create an account to join the conversation.

More
6 months 4 days ago #6 by Dick
Replied by Dick on topic What we need....
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

Please Log in or Create an account to join the conversation.

Moderators: Wolfgang Riedmann