Home Notices Documents Classes Download Others Rice
Classes  >  noticeeventargs  >  Data
noticeeventargs class : Data getter

Description

Gets a string data attached to the event.

Syntax

noticeeventargsInstance.Data

Arguments

None

Return value

ClassDescription
stringA string data attached to the event.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

...

3:

open fitter handle()

4:

// any initialization code...

5:

endfitter

6:

...

7:

open method void handler(noticeeventargs nea)

8:

...

9:

string data = nea.Data;

10:

...

11:

endmethod

12:

...

13:

endclass

Handler assignment is as follows.

1:

browser b = new browser();

2:

handle h = new handle();

3:

ehswitch ehs = b.Notice(h,"handler(noticeeventargs)");

4:

ehs.Start(); // Starts handling.

The handler invocation from JavaScript is as follows.

1:

...

2:

var event = new MessageEvent('cookerNotice', { data : 'some data' });

3:

document.dispatchEvent(event); // Calls the handler written by Rice.

4:

...

In this case, the Data getter of the argument is "some data".

Notes

The noticeeventargs will appear as an argument of the notice event handler.

Links for reference

None

Copyright © Rice All rights reserved.