Documentation

90 views
Skip to first unread message

Andrei

unread,
Mar 23, 2011, 7:34:15 AM3/23/11
to SSharp
Hi,

I've just noticed that documentation from http://www.orbifold.net/SSharp/Help/
and http://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent
differ.

For example, ContextEnabledEvents is only mentioned in the former, and
for me it was a very important thing to know about.
Could you please merge the two?

Thanks!

piter....@gmail.com

unread,
Mar 23, 2011, 4:46:58 PM3/23/11
to SSharp
Hi Andrei,

Please rely only on documentation located at:
http://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent

It will containt the most recent documentation, supported by the
latest source, which you could obtain from:
https://github.com/PetroProtsyk/SSharp

Web site http://www.orbifold.net/SSharp/Help/ is no longer supported.

Regards,
Petro

On 23 Бер, 12:34, Andrei <nites...@gmail.com> wrote:
> Hi,
>
> I've just noticed that documentation fromhttp://www.orbifold.net/SSharp/Help/
> andhttp://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent

Andrei

unread,
Mar 23, 2011, 6:48:37 PM3/23/11
to SSharp
OK, thanks is that property still available in the latest version?

On Mar 23, 10:46 pm, "Piter.Prot...@gmail.com"
<piter.prot...@gmail.com> wrote:
> Hi Andrei,
>
>  Please rely only on documentation located at:
>    http://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent
>
>  It will containt the most recent documentation, supported by the
> latest source, which you could obtain from:
>  https://github.com/PetroProtsyk/SSharp
>
>  Web sitehttp://www.orbifold.net/SSharp/Help/is no longer supported.

piter....@gmail.com

unread,
Mar 24, 2011, 4:29:32 AM3/24/11
to SSharp
No, all events in the latest version should be context enabled

On Mar 23, 11:48 pm, Andrei <nites...@gmail.com> wrote:
> OK, thanks is that property still available in the latest version?
>
> On Mar 23, 10:46 pm, "Piter.Prot...@gmail.com"
>
>
>
> <piter.prot...@gmail.com> wrote:
> > Hi Andrei,
>
> >  Please rely only on documentation located at:
> >    http://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent
>
> >  It will containt the most recent documentation, supported by the
> > latest source, which you could obtain from:
> >  https://github.com/PetroProtsyk/SSharp
>
> >  Web sitehttp://www.orbifold.net/SSharp/Help/isno longer supported.
>
> > Regards,
> >  Petro
>
> > On 23 Бер, 12:34, Andrei <nites...@gmail.com> wrote:
>
> > > Hi,
>
> > > I've just noticed that documentation fromhttp://www.orbifold.net/SSharp/Help/
> > > andhttp://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent
> > > differ.
>
> > > For example, ContextEnabledEvents is only mentioned in the former, and
> > > for me it was a very important thing to know about.
> > > Could you please merge the two?
>
> > > Thanks!- Hide quoted text -
>
> - Show quoted text -

Andrei

unread,
Mar 30, 2011, 6:45:50 AM3/30/11
to SSharp
OK, but if ContextEnabledEvents is not available anymore, how to
enable that behaviour in the latest version?

I need to have an event handler see a variable initialized outside.
Otherwise, it's tedious to pass variables to events(I am using a
UserData property in the event handler parameter object)

What options do I have?

Thanks.

On Mar 24, 11:29 am, "Piter.Prot...@gmail.com"
<piter.prot...@gmail.com> wrote:
> No, all events in the latest version should be context enabled
>
> On Mar 23, 11:48 pm, Andrei <nites...@gmail.com> wrote:
>
>
>
>
>
>
>
> > OK, thanks is that property still available in the latest version?
>
> > On Mar 23, 10:46 pm, "Piter.Prot...@gmail.com"
>
> > <piter.prot...@gmail.com> wrote:
> > > Hi Andrei,
>
> > >  Please rely only on documentation located at:
> > >    http://www.protsyk.com/scriptdotnet/wiki/index.php?title=ManualContent
>
> > >  It will containt the most recent documentation, supported by the
> > > latest source, which you could obtain from:
> > >  https://github.com/PetroProtsyk/SSharp
>
> > >  Web sitehttp://www.orbifold.net/SSharp/Help/isnolonger supported.

Andrei

unread,
Mar 30, 2011, 8:32:23 AM3/30/11
to SSharp
I got the latest source code version from hithub and I compiled S#.
However, the events don't seem to work anymore

function OnClick(s,e)
{
MessageBox.Show('Hello');
}

Button2.Click += OnClick;

Any idea?

Thanks

Andrei

unread,
Mar 30, 2011, 11:59:54 AM3/30/11
to SSharp
I got the latest source code from github and I searched for
UnsubscribeAllEvents string.
It is not used in the entire source code.

What is the current behavior of the events?

Events are not working anymore.
Here is an example:

function onTimerTick(s, e)
{
MessageBox.Show("OnTimer");
}

t = new DispatcherTimer();
t.Interval = new TimeSpan(0,0,3);
t.Tick += onTimerTick;
t.Start();


I appreciate any help.

Thanks

piter....@gmail.com

unread,
Mar 30, 2011, 2:26:46 PM3/30/11
to SSharp
In the latest code look at unit tests:
ProblemWithGlobalScope, ProblemWithGlobalScopeWithAsyncEvents
in FixedBugs.cs

You will see how events work. Note, that when using RunCode, all event
subscriptions will be cleaned just after script execution.
If you want to use events:

1) Create Script object using Script.Compile
2) Execute Script
3) Keep Script object alive (do not dispose) while it should to
handle events
4) When you dispose Script object, all event subscriptions will be
cleared

Andrei

unread,
Mar 31, 2011, 3:20:43 AM3/31/11
to SSharp
it works, thank you!

On Mar 30, 9:26 pm, "Piter.Prot...@gmail.com"
Reply all
Reply to author
Forward
0 new messages