[BLACKBOX] FW: [BLACKBOX] Cursor re-focus

From: Campbell, Robert (SELEX GALILEO, UK) <robert.d.campbell{([at]})nowhere.xy>
Date: Thu, 25 Feb 2010 11:32:49 -0000

----boundary-LibPST-iamunique-247739380_-_-
Content-type: text/plain

 
Doug

I haven't tested this, there is an element of guesswork, you should
expect some to do some trial-and-error, but ...


1) Controllers.FocusView will give you your Text document (I think).

If it gives you the wrong Focus (ie your Form Tool) then:

2) Controllers.SetCurrentPath will sort that out.

The variable Controllers.path may be useful.

3) LibMisc.CloseViewWindow shows how to find the Window containing a
known View.

4) LibMisc.SetToTop shows how to bring the found Window to the Top.


Cheers

Robert



>> -----Original Message-----
>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy

>> G. Danforth
>> Sent: 24 February 2010 23:36
>> To: BLACKBOX{([at]})nowhere.xy
>> Subject: Re: [BLACKBOX] Cursor re-focus
>>
>> *** WARNING ***
>>
>> This message has originated outside your organisation,
>> either from an external partner or the Global Internet.
>> Keep this in mind if you answer this message.
>>
>> Robert,
>> Thanks for the pointer to SetToTop.
>> I am looking at the code right now.
>> Here are my questions without having done any programing around that
>> code.
>> (1) title - how do I get the title of the document on which I am
>> currently working if that document can be any? If the focus had not
>> changed then I could use the win from
>> Windows.dir.First() but I just clicked in the form for (I
>> assume) the form will be the first window?
>> Your code is nice since it doesn't depend upon who is the current
>> focus but it does depend upon knowing the title of the document being

>> edited.
>>
>> (2) who's on first - somehow I need a handle on the document that is
>> active just before I push a button in a form. Hmm, perhaps a
>> services task that stores the last frontFocus would work but that
>> seems like a kludge. But if one did that then when the button is
>> pushed it could query the module which stored the previsous
>> frontFocus and then after inserting the character into the document
>> (how in hell's name does the framework know where to put the
>> character with the forward message since I am now deep inside the
>> form
>> code?) to then return the focus to that document?
>>
>> -Doug
>>
>>
>>
>> Maybe the routine LibMisc.SetToTop might be
useful, or give you
>> ideas.
>>
>>
>>
>> Look it this - I suspect it is close to what you are asking for.
>>
>>
>> Robert
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-247739380_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwICBccGFyDQpEb3VnXHBhcg0KXHBhcg0KSSBoYXZl
bid0IHRlc3RlZCB0aGlzLCB0aGVyZSBpcyBhbiBlbGVtZW50IG9mIGd1ZXNzd29yaywgeW91IHNo
b3VsZFxwYXINCmV4cGVjdCBzb21lIHRvIGRvIHNvbWUgdHJpYWwtYW5kLWVycm9yLCBidXQgLi4u
XHBhcg0KXHBhcg0KXHBhcg0KMSkgQ29udHJvbGxlcnMuRm9jdXNWaWV3IHdpbGwgZ2l2ZSB5b3Ug
eW91ciBUZXh0IGRvY3VtZW50IChJIHRoaW5rKS5ccGFyDQpccGFyDQpJZiBpdCBnaXZlcyB5b3Ug
dGhlIHdyb25nIEZvY3VzIChpZSB5b3VyIEZvcm0gVG9vbCkgdGhlbjpccGFyDQpccG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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKlxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwg
c2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBM
SVNUUy5PQkVST04uQ0hcfX0ACi0t
----boundary-LibPST-iamunique-247739380_-_---
Received on Thu Feb 25 2010 - 12:32:49 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:34 UTC