Great news !
Thank you very much

. Kiffi, you're just a master (of the univers, of course, like Fred ^^)!
I will try it today, and improve my painting program. I will create a little game too in some days.
EDIT :
I have tried to create an "offline" version with pb2web.
Why ? to use it offline on Chromebook, proprietay system/PC like Hercule Ecafe, or to create Application multi-platform without compile on all platform ^^ and it works great !
On my netbook Hercule Ecafe (system based on ubuntu, modified by hercules), it works on chromium, but not in firefox (7.0.1 I think).
I have those error :
Code: Select all
Purepaint :
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMCanvasRenderingContext2D.fillStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://www.dracaena-studio.com/purebasic/paint/libraries/pb2web/pb2web.js :: <TOP_LEVEL> :: line 7757" data: no]
Canvas on Pb2web.de :
uncaught exception: [Exception... "Could not convert JavaScript argument - 0 was passed, expected object. Did you mean null? arg 0 [nsIDOMCanvasRenderingContext2D.strokeStyle]" nsresult: "0x80570035 (NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL)" location: "JS frame :: http://pb2web.de/demos/canvasgadget/libraries/pb2web/pb2web.js :: <TOP_LEVEL> :: line 229" data: no]
I don't know if it's usefull for you, Kiffi

.
Purepaint - version 0.1 Offline (I have change some lines on some files to use it offline) 1.8 Mo :
http://www.dracaena-studio.com/purebasi ... ffline.zip
EDIT :
OpenFileRequester()
I have tried, but I have an error with your example :
debug error :
Code: Select all
12:57:51.040: PB_Event_Upload_Complete: <?php
if (isset($_FILES['P2W_Upload'])) {
echo "Message From PHP:\n";
echo "Following file(s) received:\n";
print_r($_FILES['P2W_Upload']);
}
?>
12:57:51.036: PB_Event_Upload_Error: ERROR: unable to upload files
12:57:50.898: PB_Event_Upload_BeforeSend:
I have place the upload.php in the folder of pb2web, is that correct ?
How I do to open for example an image or a text file ?
The code :
Code: Select all
XIncludeFile "..\p2w.pbi"
P2W_Converter_SetProfile("pb2webtest")
UseJPEGImageDecoder()
UsePNGImageDecoder()
Procedure OpenFileRequesterCallback(UploadEvent, Message.s)
Select UploadEvent
Case #PB_Event_Upload_BeforeSend
Debug("PB_Event_Upload_BeforeSend: " + Message)
Case #PB_Event_Upload_Complete
Debug("PB_Event_Upload_Complete: " + Message)
Case #PB_Event_Upload_Error
Debug("PB_Event_Upload_Error: " + Message)
Case #PB_Event_Upload_Success
Debug("PB_Event_Upload_Success: " + Message)
Case #PB_Event_Upload_UploadProgress
Debug("PB_Event_Upload_UploadProgress: " + Message)
;Message -> position + ";" + total + ";" + percentComplete
Protected Position.s = StringField(Message, 1, ";")
Protected Total.s = StringField(Message, 2, ";")
Protected PercentageComplete.s = StringField(Message, 3, ";")
Debug "Position: " + Position
Debug "Total: " + Total
Debug "PercentageComplete: " + PercentageComplete + "%"
Debug "---"
EndSelect
EndProcedure
Procedure OpenOpenFileRequester()
; 1. Parameter: Ignored
; 2. Parameter: Upload-URL ;"http://localhost/pb2webtest/upload.php",
; 3. Parameter: Mime-Type (see: http://www.webmaster-toolkit.com/mime-types.shtml)
; 4. Parameter: MaxFileSize in bytes
; 5: 0 or #PB_Requester_MultiSelection (works only in browser with HTML5-Support)
; 6: A callback to get the upload events
OpenFileRequester("",
"upload.php",
"image/*",
10000,
#PB_Requester_MultiSelection,
@OpenFileRequesterCallback())
EndProcedure
LoadFont(0, "Arial", 14)
TextGadget(0, 10, 10, 250, 30, "Please copy 'upload.php' to your webserver before uploading.")
SetGadgetFont(0, 0)
FreeFont(0)
ButtonGadget(1, 10, 50, 250, 30, "OpenFileRequester()")
BindGadgetEvent(1, @OpenOpenFileRequester())
EventMenu() and BindGadgetEvent() for ButtonImageGadget() Works fine, thanks

.