Liberty BASIC Community Forum
« Here is a case for a Professional in Liberty Basic »

Welcome Guest. Please Login or Register.
Dec 12th, 2017, 07:58am


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Here is a case for a Professional in Liberty Basic  (Read 547 times)
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx Here is a case for a Professional in Liberty Basic
« Thread started on: Sep 20th, 2016, 1:44pm »

Hello again , here is Zabo :

my Database is nearly ready :

http://www.Hans-Schueren.de/database.bas

Functions : Mainwinapplication at the state

1. Search
2. Sort
3. Print
4. auto-Backup
5. Errorhandling
6. restore-function
7. up to 1000 Entries

The last function i want to implement is to add files
to any record in an individual folder.
For this reason i had have many good tips from cundo and other friendly members.
They suggest a code that i have also written in my program under :
case "F"
case "f"

The API call opens a window but i cannot see the files
because i am not able to write the proper path in the
code.
The path might be the following :

directory13$ is the name of the subfolder.
It contains 15 digits maximum.
The same 15 digits as the original record name is.
{the first 15}

So the code in the case "F" should make open a window
of the directory13$ name folder in the DefaultDir.
Then you can see all the files that are linked to the record in the database.
You can open the file.
Delete a file.
Rename a file.
And adding new files in that folder.

After every procedure , you close the window and back
to mainwin.


In short :

The case F or f opens the individual record folder
that already exists evertime you add a new record.
The name of the folder is evertime the first 15 digits
of the record.

All is implemented yet. (GUI comes later)

Only that function with the subdirectory is open.

So i need help , because its a API call , to make the program ready.

Only a little step , before the top of the mountain here.


WBR

Zabo




User IP Logged

bradley
New Member
Image


member is offline

Avatar

Smile!


PM

Gender: Male
Posts: 27
xx Re: Here is a case for a Professional in Liberty B
« Reply #1 on: Sep 20th, 2016, 3:30pm »

Hey - I looked at your code.

There are some things you can do to make this much simpler to maintain. The biggest change would be to convert the value the end user provides to an upper case string so you don't have to evaluate both upper and lower case string entries. do this with the UPPER$() function:

Example:

Code:
input y1$
y1$ = Upper(y1$)
 


y1$ will always be upper case from this point on - just evaluate upper case input values.

I will look more at your specific issue and advise.
User IP Logged

“To be is to do”—Socrates.
“To do is to be”—Jean-Paul Sartre.
“Do be do be do”—Frank Sinatra.
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx Re: Here is a case for a Professional in Liberty B
« Reply #2 on: Sep 21st, 2016, 01:19am »

Hello bradley ,

yes that is true. upper$.

You can see that my code is put together in a
"workshop assembly"
with the aim to put it all together in the shortest time.
Take all the ingredients that are existing at the workplace
and don't look at the details.

So uppercase$ and really line numbers and ifs and the
whole structure is not defined in detail.

Why ?

i want to use this mainwin code for a RAW CODE ,
to make the GUI application in the next step.

The only function that makes problems is the
files to record function.
There is a API call necessary.

Your statement is right.

When i pickup the code examples from the RAW CODE
then i make the fine tunes already together
with the GUI appearence.

Indeed the code then looks like very different from the
raw code mainwin example.

oh. i implement one new point. i forget.

When you make new record and take a free place
with the name "Free place to choose !" ,
there is no document folder for that because it is
a deleted record.
So i have to make a folder named "Free place to choose !" just before the user input the new record for that place.
If there is no folder , it can't be renamed. (Error)

WBR

Zabo



« Last Edit: Sep 21st, 2016, 01:33am by Zabo » User IP Logged

tsh73
Board Moderator

member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1708
xx Re: Here is a case for a Professional in Liberty B
« Reply #3 on: Sep 21st, 2016, 03:14am »

Quote:
and the whole structure is not defined in detail.

Really, receipt for failure.
Have fun.
User IP Logged

damned Dog in the Manger
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx Re: Here is a case for a Professional in Liberty B
« Reply #4 on: Sep 21st, 2016, 04:42am »

Hello tsh 73 ,

raw code mean chaos !

Reason : If you have the idea in mind you must
concentrate that it stay in mind.

Then transform it immediatelly.

If the timeframe is to long , write the
main structure on paper , to have a
entrance for it to make a new session.

Coding is logical thinking.
But if you think logical you cannot create
special things.

So my opinion for artist programming is that
the creation method and the assembly method
is a different part of the project.

Assembly is always structured and defined.
Planning for doing.

But without input ?

Creation means : chaos
The universe.


Even in the smallest project and program.


WBR

Zabo



User IP Logged

Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx Re: Here is a case for a Professional in Liberty B
« Reply #5 on: Sep 21st, 2016, 2:05pm »

I got it ,

here

input "record name : " ; record$

subfolder$ = record$

filedialog "Open FOLDER", subfolder$ , fileName$



That works. Unbelievable.

But the folder name is only diplayed in the title bar , so

you have to push the ENTER button.

Then the right folder opens and gives the files.

Again :

1. The user is searching a record in the database
2. He input the name as an array
3. The same name is searched as a foldername
with filedialog as above.
4. The right foldername is displayed.
5. The user push ENTER
6. Folder is open.

Ready to run !

User IP Logged

bradley
New Member
Image


member is offline

Avatar

Smile!


PM

Gender: Male
Posts: 27
xx Re: Here is a case for a Professional in Liberty B
« Reply #6 on: Sep 21st, 2016, 6:03pm »

on Sep 21st, 2016, 04:42am, Zabo wrote:
Reason : If you have the idea in mind you must
concentrate that it stay in mind.

Then transform it immediatelly.

If the timeframe is to long , write the
main structure on paper , to have a
entrance for it to make a new session.

Coding is logical thinking.
But if you think logical you cannot create
special things.

So my opinion for artist programming is that
the creation method and the assembly method
is a different part of the project.

Creation means : chaos
The universe.

Even in the smallest project and program.

Zabo



I suppose that is an approach. The world is full of patterns, not sure I have run across this one before. I am sure it will serve you poorly in the future, when approaching really big projects (or more importantly - working on programming teams).

Today's most popular approach is called "Agile" - worth looking into.

I have been programming for 36 years, some of it professionally, much of it as a hobbyist. I have managed programming projects and teams also.

I came up in the time of functional programming (as opposed to OOP) and we liked to use the iterative programming approach. I use it today.

But... What ever floats your boat - I guess. No one has a license on the right way to program.

...of course it would make helping you easier if your code were better polished when you are sharing for help, but that is just nit picking.

Go forth and CODE!
User IP Logged

“To be is to do”—Socrates.
“To do is to be”—Jean-Paul Sartre.
“Do be do be do”—Frank Sinatra.
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls