You are not logged in.

juan

Beginner

  • "juan" started this thread

Posts: 20

Date of registration: Dec 11th 2008

  • Send private message

1

Sunday, December 14th 2008, 7:32pm

File operations don't work for me

Hello Manuel.
Thank you very much for your work. This is the program for that I was waiting. :)
When I try to translate a program, file operations like; "Open", "Close", "Dir", etc. return a error.
Best regards from Spain.

This post has been edited 1 times, last edit by "juan" (Dec 14th 2008, 9:03pm)


Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

2

Sunday, December 14th 2008, 7:48pm

Could you send me your source code with your error message?

juan

Beginner

  • "juan" started this thread

Posts: 20

Date of registration: Dec 11th 2008

  • Send private message

3

Sunday, December 14th 2008, 8:59pm

Re: File operations don't work for me

Of course:

If Dir(file) <> "" Then '<- Compile error. Class: 'declara' line: 290. Function or variable not defined!
(Jabaco highlights the "Dir" word )

Close #1 ' <- Compile error. Class: 'declara' line: 360. Function or variable not defined!
(Jabaco highlights "#1")

Open file For output as #1 ' <- Compile error. Class: 'declara' line: 361. Expected: End of statement
(Jabaco highlights the "For" word )

Thank you. :)

Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

4

Sunday, December 14th 2008, 9:05pm

ok - the qbasic / visual basic implementation is not-so-clean in my opinion. i changed the syntax a little bit:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
Public Sub Command1_Click()
Dim myFile As VBFileHandler
   ' write
   myFile = Open("C:\test.txt", Random, ReadAndWrite, Shared)
   Call write(myFile, "testtesttest")
   Call Close(myFile)
   'read
   myFile = Open("C:\test.txt", Random, ReadAndWrite, Shared)
   MsgBox readline(myFile)
   Call Close(myFile)
End Sub

juan

Beginner

  • "juan" started this thread

Posts: 20

Date of registration: Dec 11th 2008

  • Send private message

5

Monday, December 15th 2008, 7:06pm

It works now!, many thanks, Manuel.

juan

Beginner

  • "juan" started this thread

Posts: 20

Date of registration: Dec 11th 2008

  • Send private message

6

Monday, December 15th 2008, 7:07pm

form.Show d'ont work?

Hello Manuel.
I have a new problem; when I try to show a form:
frmSplash.Show '<- Compile error. Class: 'declara' line:379. Expected Static method
I suppose, I should make no more questions, and wait the Jabaco Documentation. isn't it? ;)
Best regards.

Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

7

Monday, December 15th 2008, 8:21pm

Quoted

Hello Manuel.
I have a new problem; when I try to show a form:
frmSplash.Show '<- Compile error. Class: 'declara' line:379. Expected Static method
I suppose, I should make no more questions, and wait the Jabaco Documentation. isn't it? ;)
Best regards.

you try to call a class, but you need a instance for the class. try:

Jabaco Source

1
2
Dim mySplash As New frmSplash
mySplash.Show()


i'm thinking about a documentation and i will publish a system to do that very soon. will be very cool if you could write down your problems and make a documentation for other users :)

juan

Beginner

  • "juan" started this thread

Posts: 20

Date of registration: Dec 11th 2008

  • Send private message

8

Monday, December 15th 2008, 10:32pm


i'm thinking about a documentation and i will publish a system to do that very soon. will be very cool if you could write down your problems and make a documentation for other users :)
Ok, it's perfect :)

Rate this thread
WoltLab Burning Board