Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Nested classes
Thu, May 30 2013 1:08 PMPermanent Link

matthewk

The help page entitled "External_Interfaces" explains how to use "class property" to declare nested classes. And it works for constructing an instance of a class, but I can't seem to use it with "is" or to cast another object.

  if myObj1 is myObj2.nestedClass1.nestedClass2 then begin
fails with:
  [Error] myUnit.wbs (249,32): Expected then but instead found .

and:

  myVar := myObj2.nestedClass1.nestedClass2(myObj1).someFunction;
fails with:
  [Error] myUnit.wbs (252,47): There is no function or procedure declaration that matches the nestedClass2(myObj1).someFunction reference

Should this work, or am I going about it the wrong way?
Thu, May 30 2013 1:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

>> The help page entitled "External_Interfaces" explains how to use "class
>> property" to declare nested classes. And it works for constructing an
>> instance of a class, but I can't seem to use it with "is" or to cast
>> another object. >>

You're not going to be able to do that.  The "class property" technique is
just a trick for the external JS references, it doesn't actually make
EWB/Object Pascal be able to use nested class namespaces.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, May 31 2013 5:48 AMPermanent Link

matthewk

OK. Is there a workaround? Or is it just not possible?
Fri, May 31 2013 3:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< OK. Is there a workaround? Or is it just not possible? >>

It's not possible.  There simply is no concept of nested classes like this
in Object Pascal.

Tim Young
Elevate Software
www.elevatesoft.com


Mon, Jun 3 2013 12:35 PMPermanent Link

matthewk

I'm trying to use CKEditor's dom.walker class (http://docs.ckeditor.com/#!/api/CKEDITOR.dom.walker). It returns instances of CKEDITOR.dom.node. I want to get the text of the nodes, which I think requires me to test whether each one is an instance of CKEDITOR.dom.element (http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element) before casting to that and calling its getText() function. If I can't do this, I think it will be a show-stopper for me. Can anyone help?
Tue, Jun 4 2013 8:15 AMPermanent Link

Mark Brooks

Slikware

Avatar

matthewk wrote:

I'm trying to use CKEditor's dom.walker class (http://docs.ckeditor.com/#!/api/CKEDITOR.dom.walker). It returns instances of CKEDITOR.dom.node. I want to get the text of the nodes, which I think requires me to test whether each one is an instance of CKEDITOR.dom.element (http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element) before casting to that and calling its getText() function. If I can't do this, I think it will be a show-stopper for me. Can anyone help?

Matthew,

Are you trying to utilise CKEditor within an EWB application? If so, do you merely need to (a) populate the editor and (b) retrieve its content?

Mark
Tue, Jun 4 2013 9:46 AMPermanent Link

matthewk

Yes, I am trying to use CKEditor in an EWB application, and any restrictions on how I can use it are likely to persuade me not to use EWB. I know I can get the entire content by calling the editor's getData() function, but I fully expect that I will want finer control than that as development of the application progresses.
Tue, Jun 4 2013 12:17 PMPermanent Link

Mark Brooks

Slikware

Avatar

>>matthewk wrote:

>>Yes, I am trying to use CKEditor in an EWB application, and any restrictions on how I can use it are likely to >>persuade me not to use EWB. I know I can get the entire content by calling the editor's getData() function, but I >>fully expect that I will want finer control than that as development of the application progresses.

Ok. I have successfully integrated CKEditor, from the perspective of instantiation, content population and content retrieval. If you have yet to achieve this then let me know and I'll post the details. Beyond that I can't offer much more help at the moment since this has been sufficient for my application.

Cheers
Mark
Image