Re: RE-CREATION OF V/286 APP IN DOLPHIN



Rambo,

Thanks for the video. Aside from the MVP question, as a
beginner with Dolphin I'm unsure what you mean when you say the
application should be subclassed from ShellView -- Ok for the small
app you demonstrate but for my app which has a context far beyond the
design of a custom window, do I need to 'hang' everything from
ShellView ? I installed my main code as a sub-class of Object (not
packaged) before addressing the MVP aspect.
Should I proceed on that basis or do I need to re-jig my main code ?

I've forgotten how the frameworks in V/286 worked but in the Dolphin development environment it is possible to have several (many) applications installed in the system that can be launched from their own system folder icons.

When launching an app, it is typical that it would have one main window that effectively "owns" all the application objects and any further top level windows that are created. Normally, when the main window is closed the app shuts down. This transfers well to the deployed scenario where double clicking the EXE creates the main window (this is done in a RuntimeSessionManager subclass that you install) and closing this terminates the EXE.

So it would be fine to have your application objects subclassed below Object but who creates the instances of these and hangs onto them? Normally, I would say that your main window would do this.

If you don't have the concept of a main window (maybe for a headless server) then the above doesn't apply. Typically, then, your main application object would be owned by the subclass of RuntimeSession manager that is invoked when a deployed application is started. In this case, because you can't install your own session manager at development time, you have to come up with alternative arrangements during debugging.

On a more trivial note the only significant problem I had while
installing my old methods in Dolphin was a Menu function illustrated
by the appended code. This generates the Menu, displays it and returns
the selection. The fromStrings: method in Dolphin will only accept
restricted arguments, does not display or return a selection, or am I
missing something ? Otherwise I could use a Prompter which seems
clumsy.

Well, if you use MVP you can create menu hierarchies in the View Composer. If you are following the approach in the video then you'll need to build the menus manually. The following code demonstrates how to do this.

====
ShellView subclass: #TestWindow
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
classInstanceVariableNames: ''!
TestWindow guid: (GUID fromString: '{45739C3B-F235-4C0F-AE46-E7306EEEC93C}')!
TestWindow comment: ''!
!TestWindow categoriesForClass!MVP-Views! !
!TestWindow methodsFor!

fileOpen
"Open a file. For now put up a message"

MessageBox notify: 'File Open Requested'!

onFullyCreated
| mb fileMenu |
super onFullyCreated.
self caption: 'Menu Demo'.
mb := MenuBar new.
self menuBar: mb.

"Create the file menu"
fileMenu := mb addSubmenu: 'File'.
fileMenu
addCommand: #fileOpen description: '&Open...';
addSeparator;
"Note that #exit is implemented by our superclass"
addCommand: #exit description: 'E&xit'! !
!TestWindow categoriesFor: #fileOpen!commands!public! !
!TestWindow categoriesFor: #onFullyCreated!private! !

====

Also I need to display a simple message on screen when my App reaches
a particular state.

The #fileOpen method above shows ho to do this using a windows MessageBox.

Best regards

Andy Bower
.



Relevant Pages

  • Re: Reading the .Tag property of a control
    ... The app starts to SubMain where a system hook is installed. ... The hook is monitoring for WH_CALLWNDPROC messages sent to this app. ... Since we have a style word stored, subclass this window ...
    (microsoft.public.vb.general.discussion)
  • getting RBN_CHEVRONPUSHED message, another way?
    ... I have found that the Internet browser (the main frame window), ... The only way to catch the RBN_CHEVRONPUSHED message, is to subclass the main ... Since it is not "my app" per say. ...
    (microsoft.public.vc.atl)
  • Re: wm_paint not enough?
    ... Subclass a CStatic and use that. ... On the dialog app, I am using a disabled edit control to display some graphic output. ... Also if another window is dragged on top of the dialog box and then minimized, ...
    (microsoft.public.vc.mfc)
  • Re: MORE Lyle Blake Info......
    ... standard button control to send a message to the parent window to quit. ... Each subclass you create should have only 1 subclass procedure. ... I never make a DLL when I can use a Unit. ... >Windowas the DLL will terminate, but not the main App. ...
    (comp.lang.pascal.delphi.misc)
  • Re: scrolling in textbox Options
    ... Getting into subclass optimizing might be more than ... Basically, the way it works is that each window (form, ... When you use something like a textbox the messages ... Sub Main and a module-based close-down then you might need ...
    (microsoft.public.vb.general.discussion)