Page 4 of 6

Posted: Mon Apr 10, 2006 8:18 pm
by Dare2
freak wrote:I plan to put all this code together into a library ...
I think that will be a big hit.

freak wrote:... but right now i just do not have the time.
I wonder why? ;) :)

Posted: Mon Apr 10, 2006 10:07 pm
by freak
I have put an updated version of the includefile that should work with PB4 beta9 at the
original location here:

http://freak.purearea.net/code/WebGadgetExtras.pb

Tell me if there are any problems.

Posted: Tue Apr 11, 2006 2:03 pm
by Dummy
this html code is not handeled correctly by link callback:

Code: Select all

<a href="page.htm"><img src="img.jpg"></a>

Posted: Tue Apr 11, 2006 2:40 pm
by freak
Dummy wrote:this html code is not handeled correctly by link callback:

Code: Select all

<a href="page.htm"><img src="img.jpg"></a>
A new version is uploaded.. should work now.

Posted: Wed Apr 12, 2006 5:12 pm
by real
@Freak:
Could you please give me the version for PB 3.94? I'm writing a tool which needs it - and PB 4 is not ready yet to be the compiler for that tool. :cry:

Posted: Wed Apr 12, 2006 6:22 pm
by freak
Sorry, i modified my sources for the v4 version, i do not have a 3.94 compatible one anymore.
Maybe somebody else still has the 3.94 version ?

Posted: Wed Apr 12, 2006 9:04 pm
by Flype
yes i have if you need - nearly october 2005 old.
http://www.penguinbyte.com/apps/pbwebst ... _pb394.zip

Posted: Thu Apr 13, 2006 6:53 am
by real
Big thanks!!! :)

Posted: Sat Apr 15, 2006 1:34 pm
by Lyon
I still have the 3.94 version too is somebody needs it.

I wish people would use some common sense and keep 3.94 versions of their libs, etc around and not just delete them and post 4.0 versions. Especially with PB where each new release breaks existing code, this is even more crucial.

Posted: Sat Apr 15, 2006 2:59 pm
by Num3
This is weird, cause this won't work!

Well it does if i load it before the callback, but if i call inside the web_callback, to catch special links it doesn't ...

Code: Select all

Procedure LoadHTM(FileName$)
  FileName$=OpenFileRequester("Select a file","","Html|*.htm,*.html",0)
  If OpenFile(0,FileName$)
    If WebGadget_Open(#WebGadget, 0) 
      Repeat
        string.s=ReadString(0)
        WebGadget_Write(string.s+Chr(10))
      Until Eof(0)
      WebGadget_Close()
    EndIf
  EndIf
  
EndProcedure
It always makes a white webpage, even the code is there!

Posted: Sun Apr 16, 2006 9:36 pm
by glubschi90
Works just fine on my PC but I've got one problem: If I use the Open, Write and Close-procedure inside a thread it doesn't work....

Example:

Code: Select all

id=OpenWindow(0,0,0,400,400,"Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)

CreateGadgetList(id)
WebGadget(0,0,0,400,400,"")

Procedure TestThread()
  
  Delay(3000)
  WebGadget_Open(0,0)
  WebGadget_Write("Test123")
  WebGadget_Close()
  
EndProcedure

CreateThread(@TestThread(),0)

Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
Chris :)

Posted: Sat Apr 22, 2006 1:56 am
by Beach
Flype wrote:yes i have if you need - nearly october 2005 old.
http://www.penguinbyte.com/apps/pbwebst ... _pb394.zip
I get a "Structure not found: IID" when I try to use the include above with PB 3.94. Flype (anyone), are you able to use the include file that is linked above in 3.94?

Also, thanks for including the 'WebGadgetJS.pb' file with the 'WebGadgetExtras.pb' file. I hope to use both of them.

Posted: Sat Apr 22, 2006 1:32 pm
by Flype
yes you're right.

So i've updated the archive including the missing stuff :

1/ Structure IID
2/ Label IID_IUnknown:

http://www.penguinbyte.com/apps/pbwebst ... _pb394.zip

Posted: Sat Apr 22, 2006 3:45 pm
by Beach
I'm still getting the same error. I do not see a structure for IID, in fact, WebGadgetsExtras.pb does not look like it has been altered at all. Can you confirm the archive listed has the added structure?

Man, I'm feeling like a dork here...

Posted: Sat Apr 22, 2006 3:55 pm
by freak
IID is just another name for the GUID structure. just write

Code: Select all

Structure IID Extends GUID: EndStructure