In a vain interest in getting the Seaside Albatross extension package
that was written for Squeak to run on VW, I need a few things that Squeak has and am hoping that they exist for VW in one way or another: 1) Squeak has the ExternalWebBrowser package which is able to launch (and send URLs to) an external web browser. Unfortunately I'm not too sure if such a thing exists for VW or not.. I poked around the public store and found some items that sounded interesting, but thought I'd ask you all who likely know better than I.. In my case I am running on Linux or perhaps OSX if that's easier. 2) Kom on Squeak can listen for requests on an incoming port -- can I just use some form of the standard WebToolkit for that or would something else be better? Unfortunately, I'm not exactly sure how they're plugging into this mechanism in Squeak.. Of course, if you've tried doing this already, I'd love to hear about it.. MTIA! |
At 08:17 AM 3/21/2007, Rick Flower wrote:
>2) Kom on Squeak can listen for requests on an incoming port -- can >I just use some form of the standard WebToolkit for that or would >something else be better? Unfortunately, I'm not exactly sure how >they're plugging into this mechanism in Squeak.. What do you mean by "listen for requests"? TCP? HTTP? ...? If you want to build some kind of low-level server, you can use the OpenTalk framework. If you want support for web services (WSDL, SOAP), etc., there's a framework for that. If you want to handle HTTP requests with query variables, form data, etc., then you can use the Web Tookit. If the latter, a servlet is probably simplest. There are some very simple hacks that use VisualWave, but keep in mind that we will be replacing some of that code with OpenTalk in the future. HTH, M |
In reply to this post by Rick Flower
> In a vain interest in getting the Seaside Albatross extension package > that was written for Squeak to run on VW, I need a few things that > Squeak has and am hoping that they exist for VW in one way or another: > 1) Squeak has the ExternalWebBrowser package which is able to launch > (and send URLs to) an external web browser. Unfortunately I'm not too > sure if such a thing exists for VW or not.. I poked around the public > store and found some items that sounded interesting, but thought I'd ask > you all who likely know better than I.. In my case I am running on Linux > or perhaps OSX if that's easier. James Robertson made Browsing-Assist in public store to do that. It works on Windows, Linux and MacOSX. Cheers, Michael |
It also works on Linux/Unix, so long as you provide a path to the
browser/script At 09:20 PM 3/20/2007, you wrote: > > In a vain interest in getting the Seaside Albatross extension package > > that was written for Squeak to run on VW, I need a few things that > > Squeak has and am hoping that they exist for VW in one way or another: > > > 1) Squeak has the ExternalWebBrowser package which is able to launch > > (and send URLs to) an external web browser. Unfortunately I'm not too > > sure if such a thing exists for VW or not.. I poked around the public > > store and found some items that sounded interesting, but thought I'd ask > > you all who likely know better than I.. In my case I am running on Linux > > or perhaps OSX if that's easier. > >James Robertson made Browsing-Assist in public store to do that. It >works on Windows, Linux and MacOSX. > >Cheers, >Michael <Talk Small and Carry a Big Class Library> James Robertson, Product Manager, Cincom Smalltalk http://www.cincomsmalltalk.com/blog/blogView |
In reply to this post by Mark Roberts
Mark Roberts wrote:
> At 08:17 AM 3/21/2007, Rick Flower wrote: >> 2) Kom on Squeak can listen for requests on an incoming port -- can I >> just use some form of the standard WebToolkit for that or would >> something else be better? Unfortunately, I'm not exactly sure how >> they're plugging into this mechanism in Squeak.. > > What do you mean by "listen for requests"? TCP? HTTP? ...? > > If you want to build some kind of low-level server, you can use the > OpenTalk framework. If you want support for web services (WSDL, SOAP), > etc., there's a framework for that. If you want to handle HTTP > requests with query variables, form data, etc., then you can use the > Web Tookit. If the latter, a servlet is probably simplest. There are > some very simple hacks that use VisualWave, but keep in mind that we > will be replacing some of that code with OpenTalk in the future. > have to look at the code and see what the context is.. Thanks for the info! |
In reply to this post by jarober
Thanks.. I'll check it out as well!
James Robertson wrote: > It also works on Linux/Unix, so long as you provide a path to the > browser/script > > At 09:20 PM 3/20/2007, you wrote: > >> > In a vain interest in getting the Seaside Albatross extension package >> > that was written for Squeak to run on VW, I need a few things that >> > Squeak has and am hoping that they exist for VW in one way or another: >> >> > 1) Squeak has the ExternalWebBrowser package which is able to launch >> > (and send URLs to) an external web browser. Unfortunately I'm not too >> > sure if such a thing exists for VW or not.. I poked around the public >> > store and found some items that sounded interesting, but thought >> I'd ask >> > you all who likely know better than I.. In my case I am running on >> Linux >> > or perhaps OSX if that's easier. >> >> James Robertson made Browsing-Assist in public store to do that. It >> works on Windows, Linux and MacOSX. >> >> Cheers, >> Michael > > <Talk Small and Carry a Big Class Library> > James Robertson, Product Manager, Cincom Smalltalk > http://www.cincomsmalltalk.com/blog/blogView > > |
In reply to this post by Michael Lucas-Smith
At 10:20 AM 3/21/2007, Michael Lucas-Smith wrote:
>James Robertson made Browsing-Assist in public store to do that. It >works on Windows, Linux and MacOSX. Sounds interesting, so I just tried this on Windows from the jan07.3 build. Unfortunately, I got an MNU, below. Also, I notice there is a bunch of platform-specific stuff in the api protocol of BrowserLaunchService -- seems like most of these methods should be elsewhere. Unhandled exception: Message not understood: #controller UndefinedObject(Object)>>doesNotUnderstand: MinimalShellInterface class>>openFile:from: BrowserService.BrowserLaunchService>>win32AnyBrowser: BrowserService.BrowserLaunchService>>win32: BrowserService.BrowserLaunchService>>privateOpenBrowserOn: optimized [] in BrowserService.BrowserLaunchService>>openBrowserOn: BlockClosure>>on:do: optimized [] in Process class>>forBlock:priority: ---------------------------------------------------------------------- UndefinedObject(Object)>>doesNotUnderstand: Receiver: an UndefinedObject Arguments: aMessage = a Message with selector: #controller and arguments: #() Temporaries: excpt = a MessageNotUnderstood resumeValue = nil Context PC = 25 ---------------------------------------------------------------------- MinimalShellInterface class>>openFile:from: Receiver: a MinimalShellInterface class Instance Variables: superclass = Win32SystemSupport methodDict = a MethodDictionary[48] format = 16384 subclasses = nil instanceVariables = an Array[0] organization = ('types' #GUID #HDROP #HICON #HINSTANCE #HWND #LPCSTR #LPCTSTR #LPPOINT #LPSHELLEXECUTEINFO #LPTSTR #LPWORD #NOTIFYICONDATA #PNOTIFYICONDATA #POINT #PVOID #TCHAR #UINT) ('structs' #tagPOINT #_NOTIFYICONDATA) ('defines' #NIF_ICON #NIF_MESSAGE #NIF_TIP #NIM_ADD #NIM_DELETE #NIM_MODIFY #QUERY_NUM_OF_FILES #SW_SHOWNORMAL #WM_DROPFILES) ('API' #filesDroppedFromExternalEvent: #registerWindowForDrop: #unregisterWindowForDrop: #winDropObjectFrom:) ('procedures' #CreateIcon:with:with:with:with:with:with: #DragAcceptFiles:with: #DragFinish: #DragQueryFile:with:with:with: #DragQueryPoint:with: #DragQueryPointer:with: #ExtractAssociatedIcon:with:with: #ExtractIcon:with:with: #FindExecutable:with:with: #ShellAbout:with:with:with: #ShellExecute:with:with:with:with:with: #ShellExecuteA:with:with:with:with:with: #ShellExecuteEx: #Shell_NotifyIcon:with:) ('private' #extractFileAtIndex:fromDropHandle: #numOfFilesDroppedFrom:) name = #MinimalShellInterface classPool = a NameSpaceOfClass[0] environment = a NameSpace[114] includeFiles = an OrderedCollection[0] includeDirectories = a LinkedOrderedCollection[0] libraryFiles = a LinkedOrderedCollection[1] libraryDirectories = a LinkedOrderedCollection[0] virtual = false optimizationLevel = #full Arguments: aFilename = 'http://www.smalltalk-central.com/' aWindow = nil Temporaries: xif = a MinimalShellInterface hwnd = nil Context PC = 10 ---------------------------------------------------------------------- BrowserService.BrowserLaunchService>>win32AnyBrowser: Receiver: a BrowserService.BrowserLaunchService Instance Variables: activeWindow = nil launchNewWindow = false currentExternalBrowser = nil Arguments: link = 'http://www.smalltalk-central.com/' Temporaries: shellInterface = MinimalShellInterface Context PC = 12 ---------------------------------------------------------------------- BrowserService.BrowserLaunchService>>win32: Receiver: a BrowserService.BrowserLaunchService Instance Variables: activeWindow = nil launchNewWindow = false currentExternalBrowser = nil Arguments: link = 'http://www.smalltalk-central.com/' Context PC = 15 ---------------------------------------------------------------------- BrowserService.BrowserLaunchService>>privateOpenBrowserOn: Receiver: a BrowserService.BrowserLaunchService Instance Variables: activeWindow = nil launchNewWindow = false currentExternalBrowser = nil Arguments: link = 'http://www.smalltalk-central.com/' Temporaries: platform = nil method = nil cur = nil Context PC = 27 ---------------------------------------------------------------------- optimized [] in BrowserService.BrowserLaunchService>>openBrowserOn: Receiver: an UndefinedObject Temporaries: .self = a BrowserService.BrowserLaunchService .link = 'http://www.smalltalk-central.com/' Context PC = 7 ---------------------------------------------------------------------- BlockClosure>>on:do: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in BrowserService.BrowserLaunchService>>openBrowserOn: outerContext = nil copiedValues = an Array[2] Arguments: anExceptionSelector = TerminateException handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority: Context PC = 18 ---------------------------------------------------------------------- optimized [] in Process class>>forBlock:priority: Receiver: an UndefinedObject Temporaries: .aBlock = BlockClosure [] in BrowserService.BrowserLaunchService>>openBrowserOn: Context PC = 9 |
> At 10:20 AM 3/21/2007, Michael Lucas-Smith wrote: >>James Robertson made Browsing-Assist in public store to do that. It >>works on Windows, Linux and MacOSX. > Sounds interesting, so I just tried this on Windows from the jan07.3 build. > Unfortunately, I got an MNU, below. > Also, I notice there is a bunch of platform-specific stuff in the api > protocol of BrowserLaunchService -- seems like most of these methods > should be elsewhere. Ahh that stupid bug. YOu can change the cod ein that method to not need a window. The window pointer the function expects is allowed to be null and it works just fine. > Unhandled exception: Message not understood: #controller > UndefinedObject(Object)>>doesNotUnderstand: > MinimalShellInterface class>>openFile:from: > BrowserService.BrowserLaunchService>>win32AnyBrowser: > BrowserService.BrowserLaunchService>>win32: > BrowserService.BrowserLaunchService>>privateOpenBrowserOn: > optimized [] in BrowserService.BrowserLaunchService>>openBrowserOn: BlockClosure>>>on:do: > optimized [] in Process class>>forBlock:priority: > ---------------------------------------------------------------------- > UndefinedObject(Object)>>doesNotUnderstand: > Receiver: > an UndefinedObject > Arguments: > aMessage = a Message with selector: #controller and arguments: #() > Temporaries: > excpt = a MessageNotUnderstood > resumeValue = nil > Context PC = 25 > ---------------------------------------------------------------------- > MinimalShellInterface class>>openFile:from: > Receiver: > a MinimalShellInterface class > Instance Variables: > superclass = Win32SystemSupport > methodDict = a MethodDictionary[48] > format = 16384 > subclasses = nil > instanceVariables = an Array[0] > organization = ('types' #GUID #HDROP #HICON #HINSTANCE #HWND > #LPCSTR #LPCTSTR #LPPOINT #LPSHELLEXECUTEINFO #LPTSTR #LPWORD > #NOTIFYICONDATA #PNOTIFYICONDATA #POINT #PVOID #TCHAR #UINT) > ('structs' #tagPOINT #_NOTIFYICONDATA) > ('defines' #NIF_ICON #NIF_MESSAGE #NIF_TIP #NIM_ADD #NIM_DELETE > #NIM_MODIFY #QUERY_NUM_OF_FILES #SW_SHOWNORMAL #WM_DROPFILES) > ('API' #filesDroppedFromExternalEvent: #registerWindowForDrop: > #unregisterWindowForDrop: #winDropObjectFrom:) > ('procedures' #CreateIcon:with:with:with:with:with:with: > #DragAcceptFiles:with: #DragFinish: #DragQueryFile:with:with:with: > #DragQueryPoint:with: #DragQueryPointer:with: > #ExtractAssociatedIcon:with:with: #ExtractIcon:with:with: > #FindExecutable:with:with: #ShellAbout:with:with:with: > #ShellExecute:with:with:with:with:with: > #ShellExecuteA:with:with:with:with:with: #ShellExecuteEx: > #Shell_NotifyIcon:with:) > ('private' #extractFileAtIndex:fromDropHandle: #numOfFilesDroppedFrom:) > name = #MinimalShellInterface > classPool = a NameSpaceOfClass[0] > environment = a NameSpace[114] > includeFiles = an OrderedCollection[0] > includeDirectories = a LinkedOrderedCollection[0] > libraryFiles = a LinkedOrderedCollection[1] > libraryDirectories = a LinkedOrderedCollection[0] > virtual = false > optimizationLevel = #full > Arguments: > aFilename = 'http://www.smalltalk-central.com/' > aWindow = nil > Temporaries: > xif = a MinimalShellInterface > hwnd = nil > Context PC = 10 > ---------------------------------------------------------------------- > BrowserService.BrowserLaunchService>>win32AnyBrowser: > Receiver: > a BrowserService.BrowserLaunchService > Instance Variables: > activeWindow = nil > launchNewWindow = false > currentExternalBrowser = nil > Arguments: > link = 'http://www.smalltalk-central.com/' > Temporaries: > shellInterface = MinimalShellInterface > Context PC = 12 > ---------------------------------------------------------------------- > BrowserService.BrowserLaunchService>>win32: > Receiver: > a BrowserService.BrowserLaunchService > Instance Variables: > activeWindow = nil > launchNewWindow = false > currentExternalBrowser = nil > Arguments: > link = 'http://www.smalltalk-central.com/' > Context PC = 15 > ---------------------------------------------------------------------- > BrowserService.BrowserLaunchService>>privateOpenBrowserOn: > Receiver: > a BrowserService.BrowserLaunchService > Instance Variables: > activeWindow = nil > launchNewWindow = false > currentExternalBrowser = nil > Arguments: > link = 'http://www.smalltalk-central.com/' > Temporaries: > platform = nil > method = nil > cur = nil > Context PC = 27 > ---------------------------------------------------------------------- > optimized [] in BrowserService.BrowserLaunchService>>openBrowserOn: > Receiver: > an UndefinedObject > Temporaries: > .self = a BrowserService.BrowserLaunchService > .link = 'http://www.smalltalk-central.com/' > Context PC = 7 > ---------------------------------------------------------------------- BlockClosure>>>on:do: > Receiver: > a BlockClosure > Instance Variables: > method = CompiledBlock [] in > BrowserService.BrowserLaunchService>>openBrowserOn: > outerContext = nil > copiedValues = an Array[2] > Arguments: > anExceptionSelector = TerminateException > handlerBlock = BlockClosure [] in [] in Process > Context PC = 18 > ---------------------------------------------------------------------- > optimized [] in Process class>>forBlock:priority: > Receiver: > an UndefinedObject > Temporaries: > .aBlock = BlockClosure [] in > BrowserService.BrowserLaunchService>>openBrowserOn: > Context PC = 9 |
At 12:25 PM 3/22/2007, Michael Lucas-Smith wrote:
> > At 10:20 AM 3/21/2007, Michael Lucas-Smith wrote: > >>James Robertson made Browsing-Assist in public store to do that. It > >>works on Windows, Linux and MacOSX. > > > Sounds interesting, so I just tried this on Windows from the jan07.3 build. > > > Unfortunately, I got an MNU, below. > > > Also, I notice there is a bunch of platform-specific stuff in the api > > protocol of BrowserLaunchService -- seems like most of these methods > > should be elsewhere. > >Ahh that stupid bug. YOu can change the cod ein that method to not >need a window. The window pointer the function expects is allowed to >be null and it works just fine. OK, that problem is in Windows Goodies, not Browser-Assist. I fixed it and it seems to work. I did some minor cleanup and republished Browser-Assist. Only tested it on Windows, but the API for opening new vs. existing browsers doesn't look cross-platform. Also, the code includes references to these undeclared classes: #MacAEManager #SystemInterfaceModel. Overall impression: could be useful, but needs work/cleanup before it can be production code. M |
> I did some minor cleanup and republished Browser-Assist. I've just published ExternalWebBrowser to public store. This is a cleanup done by David Price of Browser-Assist. We tested it on Windows, Linux and MacOSX. All the BottomFeederisms are removed and there are no dependencies beyond itself. Cheers, Michael |
In reply to this post by jarober
I tried loading the latest Browsing-Assist from the public store, but when I
try to use it I get a DNU. Seems that SystemInterfaceModel is nil in the following method. BrowserLaunchService>>getDefaultBrowserPathFor: url "try two different tacks to get the default browser" | app paramIndex | app := SystemInterfaceModel getWinKey: '' using: #('http' 'shell' 'open' 'command') andRoot: #HKEY_CLASSES_ROOT. app isNil ifTrue: [app := SystemInterfaceModel getWinKey: '' using: #('htmlfile' 'shell' 'open' 'command') andRoot: #HKEY_CLASSES_ROOT]. app isNil ifTrue: [^nil]. paramIndex := app indexOfSubCollection: '%1' startingAt: 1. ^ paramIndex > 0 ifTrue: [ app copyReplaceFrom: paramIndex to: paramIndex + 1 with: url ] ifFalse: [ app, ' ', url] What do I need to load? Thanks, -Carl |
Okay, I found it. I needed to load RSS-Persistence. Now it works. :-)
Thanks for this stuff, James. -Carl Gundel, author of Liberty BASIC http://www.libertybasic.com ----- Original Message ----- From: "Carl Gundel" <[hidden email]> To: <[hidden email]> Sent: Tuesday, June 05, 2007 7:18 PM Subject: [7.4.1]Problem with Browsing-Assist >I tried loading the latest Browsing-Assist from the public store, but when >I try to use it I get a DNU. > > Seems that SystemInterfaceModel is nil in the following method. > > BrowserLaunchService>>getDefaultBrowserPathFor: url > "try two different tacks to get the default browser" > | app paramIndex | > app := SystemInterfaceModel > getWinKey: '' > using: #('http' 'shell' 'open' 'command') > andRoot: #HKEY_CLASSES_ROOT. > app isNil > ifTrue: [app := SystemInterfaceModel > getWinKey: '' > using: #('htmlfile' 'shell' 'open' 'command') > andRoot: #HKEY_CLASSES_ROOT]. > app isNil > ifTrue: [^nil]. > paramIndex := app indexOfSubCollection: '%1' startingAt: 1. > ^ paramIndex > 0 > ifTrue: [ app copyReplaceFrom: paramIndex to: paramIndex + 1 with: url ] > ifFalse: [ app, ' ', url] > > What do I need to load? |
Carl Gundel wrote:
> Okay, I found it. I needed to load RSS-Persistence. Now it works. :-) > > Might also be worth having a look at the ExternalWebBrowser package, which is based on Browsing-Assist, but with various clean ups and other fixes. David |
Free forum by Nabble | Edit this page |