on openField

External developers... This forum's for you!

on openField

Postby sctell » Sun Jul 31, 2011 11:34 pm

I have an external with an overlay window and I want to ensure that the focus is given back to SC when a user clicks in a field.

At the moment I use this script which would have to be placed in each field, whilst not really a problem, it just means a little more work for the scripter:

Code: Select all
on openField
global gMyTable
put THTable("setFocusToSC",gMyTable) into tInfo
end openField


Is there anyway I can get my external notified that a openField has occurred in any field in the current card so that I can set the focus without the above script?


All the best

Terry
sctell
 
Posts: 1128
Joined: Sun Jul 06, 2008 10:41 am

Re: on openField

Postby johnjohnston1 » Mon Aug 01, 2011 12:43 am

Hi Terry,
Frontscript
A project could insert the script of an object into front. This would catch any openField messages before they get to anything else.

Cheers

John
User avatar
johnjohnston1
 
Posts: 196
Joined: Sun Jul 06, 2008 10:42 am
Location: Glasgow, UK

Re: on openField

Postby sctell » Mon Aug 01, 2011 3:03 am

Hi John,

It seems you can only insert a script that is attached to an object.

Is that correct?

And is there a way to stop the script from being deleted/removed?

All the best

Terry
sctell
 
Posts: 1128
Joined: Sun Jul 06, 2008 10:41 am

Re: on openField

Postby johnjohnston1 » Mon Aug 01, 2011 4:22 am

sctell wrote:Hi John,

It seems you can only insert a script that is attached to an object.

Is that correct?


Hi Terry,
can be any script, so script of proj, window et.
EG In my shared file I add this to shareInit
insert script of wd 1 of proj "jback" into back
so that when I upgrade SC I only need to add one line to sharedfile
sctell wrote:And is there a way to stop the script from being deleted/removed?
All the best

Terry


I guess you could have a handler in the sharedfile catching the remove message and not passing it if it is one you want to preserve. But if it is for an external it seems reasonable (to me) that you require users to manage the back script?

cheers

John
User avatar
johnjohnston1
 
Posts: 196
Joined: Sun Jul 06, 2008 10:42 am
Location: Glasgow, UK


Return to Xcode and the Internals Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest