Hi David,

Obviously Aaron answered your primary question, and luckily it was short and 
clear (as clear as these things usually get anyway <grin>).

But, you had a secondary question related to the onStateChange event handler 
generated by the FrameWork script, and how and why it works as it does,  and 
why it wasn't helping you with this issue (so I thought I'd try tackling it):

The confusion is that various objects have various properties defined as their 
"states".  In this case, the state of the browsemode object was what you were 
interested in, but the code generated for every app from the framework is for 
the state of the sharedObjects object, and these two states are completely 
different (not related at all).

The sharedObjects state which keeps changing, is related to how many and which 
objects it has available for your app to share.  Every time your app gets a new 
object to share (or loses one), this fires the sharedObjects onStateChange 
event, and this is what the framework generates code to handle.  Nothing more 
other than here's another object which you can share if you need to.

As for the browsemode object onStateChange, the state changing is exactly the 
one you were interested in: when it goes into and out of browse mode.  Each of 
these two objects happens to have an event named the same, but not related to 
each other at all.

I think from the questions I get, the sharedObjects onStateChange event 
confuses just about every one, so I thought I'd have a try with this email to 
see if I can help at all; if anyone still is confused or has questions, now's a 
good time.

Hth,

Chip


-----Original Message-----
From: David [mailto:[email protected]] 
Sent: Wednesday, October 15, 2014 2:12 AM
To: [email protected]
Subject: Browse Mode Buffer, Please help

Hey listers.
I have been playing around with some coding this morning, but seem to be 
stuck. Maybe I do not fully comprehend the meaning of what I am doing. :)

I have a piece of a script, which only should kick into action, whenever 
Browse Mode is working. That is, it should not perform anything, 
whenever you are in things like Notepad or Word. But when you are 
reading a website, independent on whether it is under Internet Explorer 
or Firefox or (if possible) in your Email program, and Browse Mode is 
turned On, the code should kick in.

I have been scrolling through the manual, and I found the enumeration named
     BrowseModeState
and
     BMSActive.
I guess, somehow I should do a testing on these, to see when my code 
would be needed. And that is where I hoped for your assistance.

Just to make room for as little misunderstanding as possible, this 
script would be running globally, quietly sitting in the background, and 
only jump into action when the user is working under Browse Mode. If 
only I could figure the way of doing this ongoing testing. I thought of 
the OnStateChange sub, but am afraid I do not fully grasp the way it 
works, even after looking at the code produced by the Framework app.

If anyone please could throw up a couple of lines showing me the needed 
testing, or could point me to a code that would samplify this behavior. 
Right offhand, I am not aware what app from the Central would hold code 
that would perform equally, or I could have downloaded it and tried to 
figure how to work around this one.

Thanks for any input.


-- 
David

Reply via email to