Login  Register

Updating a shell from a created subshell?

Posted by gregarican on Feb 23, 2006; 2:07pm
URL: https://forum.world.st/Updating-a-shell-from-a-created-subshell-tp3377638.html

I have a shell that presents the user with a menu bar. The various menu
bar commands create other shells which are associated with contact
record management tasks. For example I have a method in the main shell
which opens up a contact record. Here's the code:

openContact
        "Lookup an existing CRM contact record."
        contactRecord := CrmContactModel new.
        CrmLookupShell showOn: contactRecord.

I created an instance variable for the CrmContactModel so that I can
enable or disable the various menu bar commands depending if a matching
record was found or not. The main shell's #queryCommand method checks
things out based on this instance variable. This all works fine and
dandy.

My question is my CrmLookupShell needs to update the main shell with
the found contact data. For example, I would like to update the caption
in the main shell to include the contact record's last name and home
phone number. How can I reference the main shell from a method within
the CrmLookupShell that's created?