[Gambas-user] Question - how to just run part of ones larger program
Rolf-Werner Eilert
eilert-sprachen at ...221...
Tue Nov 22 11:53:23 CET 2011
Am 22.11.2011 11:19, schrieb richard terry:
> On Tuesday 22 November 2011 21:14:41 Benoît Minisini wrote:
>> Le 22/11/2011 11:11, richard terry a écrit :
>>> On Tuesday 22 November 2011 19:18:19 Benoît Minisini wrote:
>>>> Le 22/11/2011 08:02, richard terry a écrit :
>>>>> On Tuesday 22 November 2011 17:32:22 nando wrote:
>>>>>> You could run a second copy from the first. Place a specific word on
>>>>>> the command line as a parameter so that the copy will understand to
>>>>>> show the specific screen desired and perhaps hide other menus. You
>>>>>> can tailor startup to do something specific based on command line
>>>>>> parameter(s).
>>>>>
>>>>> I'm sure there was something on the list a year or so ago, which meant
>>>>> you could start off from somewhere, maybe benoit will reply.
>>>>>
>>>>> richard
>>>>
>>>> I don't understand what you need exactly. Can you elaborate?
>>>
>>> ok, thanks for replying, not sure this will make sense
>>>
>>> In my project, I have a file I just called modStartup. This brings up a
>>> logon- screen and provided the user types in a valid adress/database
>>> name, username and password it logs on to the program.
>>>
>>> What happens then depends on the 'role' of the user, for example in my
>>> role as a clinical user the interface options presented are different
>>> from the clerical user.
>>>
>>> The clerical staff, get an outlook style menu on the left side, and each
>>> 'section' lets them do things , eg allocate scanned documents, enter
>>> details into the patient database, use the document finder if a patient
>>> rings up and wants to know if something is back, or to make an
>>> appointment using the appointments module.
>>>
>>> Now, what they don't like is having to switch to a different tab of their
>>> main program to use the appointment module - they want this to be a
>>> 'stand alone' program which they can resize, and then just sit side by
>>> side on their wide- screen, along with the rest of their clerical tasks,
>>> which they are happy to flick back and forth between, but as their day
>>> consists of being on the phone on/off making appointments, they want that
>>> visually available to them at all times.
>>>
>>> I could re-design the gui but for various reasons don't want to. I could
>>> just change the code slightly, make an executable just presenting the
>>> appointments module, then change it back when developing the main
>>> program.
>>>
>>> So the question is, if it makes any sense at all, (aside from making a
>>> different project tree, or a 'different executable with changed code) is
>>> there anyway of telling gambas to arbitrarily execute one particular bit
>>> of code or another, or form according to (as someone suggested) some
>>> sort of flag - in this case just pointing to the appointments module and
>>> 'hiding everything else'.
>>>
>>> Still don't think that will make much sense, but we'll see.
>>>
>>> thanks.
>>>
>>> richard
>>
>> I don't see why showing the appointment GUI in its own window instead
>> being embedded in the main window should be a problem.
>
> Obviously lots of ways around it, obviously my question made no intelligent
> sense I guess.
>
To me, it does. Another idea: what do you need to show the appointment
module? Is there a container that keeps all the necessary parts such as
TableView, ComboBoxes, Buttons or whatever you need? That would make it
easy to produce a copy of them within their own window and have the code
(the events part of code) decide whether to cope with them or with those
in the main window.
You could simply set a button into the main window allowing the user to
choose if she/he wants to have the separate appointment window. If you
kept all important code out of the event SUBs, it should be easy to jump
to it from the additional window. All you need is a central place for
these routines that do the job and a flag that tells them the additional
window is there or not.
Hope you understand what I mean...
Rolf
More information about the User
mailing list