Re: [BLACKBOX] Cursor re-focus

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

----boundary-LibPST-iamunique-585026913_-_-
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.

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
>> Of Douglas 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-585026913_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwICBccGFyDQpEb3VnXHBhcg0KXHBhcg0KSSBoYXZl
bid0IHRlc3RlZCB0aGlzLCB0aGVyZSBpcyBhbiBlbGVtZW50IG9mIGd1ZXNzd29yaywgeW91XHBh
cg0Kc2hvdWxkIGV4cGVjdCBzb21lIHRvIGRvIHNvbWUgdHJpYWwtYW5kLWVycm9yLCBidXQgLi4u
XHBhcg0KXHBhcg0KXHBhcg0KMSkgQ29udHJvbGxlcnMuRm9jdXNWaWV3IHdpbGwgZ2l2ZSB5b3Ug
eW91ciBUZXh0IGRvY3VtZW50IChJIHRoaW5rKS5ccGFyDQpccGFyDQpJZiBpdCBnaXZlcyB5b3Ug
dGhlIHdyb25nIEZvY3VzIChpZSB5b3VyIEZvcm0gVG9vbCkgdGhlbjpccGFyDQpccGFyDQoyKSBD
b250c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liZSwg
c2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBM
SVNUUy5PQkVST04uQ0hcfX0AaCBi
----boundary-LibPST-iamunique-585026913_-_---
Received on Thu Feb 25 2010 - 10:36:47 UTC

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