[racket-users] Re: Sending a file via HTML request.

2016-08-24 Thread Normal Loone
Sorry, I should have been clearer:

I want to send a file directly from DrRacket to a server. I have submit button 
as a plugin in DrRacket and it then should take the file and send it to the 
server (the file is known, doesnt need to be selected from user).

I tried the code from HTH Stephen, but problem is that the web application 
starts on DrRacket start and not when I press the button, how I wanted it.

So if someone could tell me a way to just directly send a file with DrRacket as 
an HTML request, I'd really appreciate that.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Sending a file via HTML request.

2016-08-23 Thread Normal Loone
No, I don't have it in JSON yet. How do I load a file into JSON in racket?

It's only a text file, although I like to get it zipped first.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Sending a file via HTML request.

2016-08-23 Thread Normal Loone
Yeah, my main problem is how do I pack the file into a JSON Object and then 
send it?

With (require net/http-client) I could already establish a connection with 
(http-conn-sendrecv! hc uri), but All I can send is the empty header of the 
http request. 

How do I add the HTML code or the file in the json object within it?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Sending a file via HTML request.

2016-08-21 Thread Normal Loone
Hallo,

I am trying to write a small web-based program in racket. The main task of it 
should be to send a specific file to a server. 

How do I best send it? Through a HTML request or on another way?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Mixin questions

2016-08-12 Thread Normal Loone
How do I call the methodes of each mixin? When I tried something like 
(define/public ...) the other mixins could not access these.


Am Donnerstag, 11. August 2016 20:19:02 UTC+2 schrieb Robby Findler:
> Although, with these two particular interfaces, there is no single
> class that implements both. You would instead have two separate mixins
> that would communicate by calling each others methods.
> 
> Robby

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Mixin questions

2016-08-11 Thread Normal Loone
Does that mean, I can not use inherit on tab% here? Because that's my problem I 
need functions from both classes but I can only inherit from one, the other 
always results in runtime errors. 

Is there a way to use more from-interfaces than just one? The they it's worded 
suggested that you can use more than one parent interface.

Like mainly, I want to use the function (current-tab) in frame% to figure out 
the opened tab and acquire the file name it is referencing. And then in tab% i 
want to override the function (break-callback) to print the filename out when 
ever a program is cancelled (for some reason break-call is a function in tab 
whereas execute-call is a function in frame...) 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Mixin questions

2016-08-10 Thread Normal Loone
The Documentation talks about range of classes, and I am not really sure what 
that means. 
Above would then be everything between frame and tab? But why cant I then not 
use frame functions in the implementation?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Mixin questions

2016-08-08 Thread Normal Loone
Hello, 
I am having problems with the from-interfaces for mixins.

I want to make a function that uses functions defined in drracket:unit:frame<%> 
but itself is called by a function defined in drracket:unit:tab<%>

So I just tried to make a mixin:

(define on-break-mixin
  (mixin (drracket:unit:frame<%>) (drracket:unit:tab<%>)
   (super-new)
(inherit get-current-tab) ;unit-frame function
(inherit get-defs) ; unit-tab function

   (define/override (break-callback)
  ...
  )


Yet, I get error messages on start-up that the stuff from unit-tab is not in 
any of the from-interfaces.

How can I access stuff from a superclass in the child class or vice versa?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Run Button interaction

2016-08-08 Thread Normal Loone
I tried using override instead of augment, and it works. 
Problem is: It overrides it now ofc, which means the program is no longer 
evaluated. 

I tired adding the standard call back in aka: 

(define/override (execute-callback)

  (my-own-programm)

  (ensure-rep-shown)
  (evaluate-from-port (get-interactions-text))
  )

but evaluate from port is not within any of the from-interfaces, not even 
drracket:rep:text<%> where it is listed in the documentation.

Also in the documentation there is this line:
This method must be called from the DrRacket main thread.
Does that mean I just cant use it in a plugin?

If anyone has another Idea how to acess the run button, I'd be grateful.
I don't actually need to access it directly, It be enough if everytime it is 
used my plugin gets a message. Don't need anything else form there. 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Run Button interaction

2016-08-04 Thread Normal Loone
I tried 

(define/augment (execute-callback)
...)

So I'd just use another additional function of mine when the run button is 
used, but execute-callback is apparently not augmentable? At least I got an 
error message stating that. 

Is there another function that you can modify?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Run Button interaction

2016-08-02 Thread Normal Loone
Hello,

I am writing a plugin that tracks the development of code. Currently I want to 
save the times the run button is pressed (i.e. the code is executed). 
How can I access when the run button is pressed?

Additionally I'd like to mark when the code is saved under a new name (as a new 
.rkt file).

Thanks in advance
Loone.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Writing text% to file

2016-06-27 Thread Normal Loone
Hello,

I currently want to write a program that includes writing out stuff written in 
the buffer. But I cant seem to write out strings stored in text% properly.
Example:

(define txt (new text%))
(send txt insert "hello world" 0 11)
(send txt find-first-snip)

creates "hello world" on the command line.

But neither 
(write-to-file (send txt find-first-snip) path)

(define fdatei (open-output-file path))
(write (send txt find-first-snip) fdatei)

(send txt write-to-file out-stream 0 'eof)

actually writes the string, but does only write name of the struct in the file.

So how exactly do I get to the plain String-text in text% to be able to write 
it in a file?

best regards,
Loone


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Accessing/ Manually saving Text in Buffer.

2016-05-11 Thread Normal Loone
Hello,

I want to write a plugin for DrRacket that saves all the text that is currently 
written in the Buffer (where you write the code) every time the person stops 
typing. The code will later be compared the progress calculated. 

How does one access the text written in the buffer? Are there any specific 
internal variables one can access?

thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Accessing Undo/Redo History directly?

2016-04-19 Thread Normal Loone
Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Accessing Undo/Redo History directly?

2016-04-15 Thread Normal Loone
Hello,

For my Bachelor I am supposed to create a pluggin for DrRacket that protocols 
in what order a user writes his code. 

Is there a easy way to access the previously written text (like the undo/redo 
history) within DrRacket without just recording each individual key-down?

best regards in advance!
-Loone.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.