[Grace-core] Objectdraw??

kim at cs.pomona.edu kim at cs.pomona.edu
Mon Jul 1 20:35:17 PDT 2013


I'm puzzled as this error message refers to items in the abstract syntax
tree representation in the compiler.  I use the following alias when I run
grace programs:

alias
mg="~kim/Documents/External_bus/GraceDesign/MiniGrace/minigrace/minigrace"

Obviously replace this with the path in your system to the executable.  If
I execute this in the grace-gtk directory (and my program is there) then
all is well with running the program from the guide.

You might try updating your implementation of minigrace in case something
got broken (though I'm at east one version behind as I can't update from
here for some reason).

Perhaps someone else on this list has run into an error message like this
before and can help?

Kim

> I've installed gtk and gotten the grace-gtk library to work and been able
> to write a grace program in grace-gtk. I have not been able to run the
> object draw library. To get a better idea of how the objectdraw library
> should function, I've run it's java implementation while I try get it
> working in grace.
>
>
> When running objectdraw in grace I get the following, some parts:
>
> Available methods are:
>   outer
>   kind
>   value
>   value:=
>   in
>   register
>   register:=
>   line
>   line:=
>   accept
>   map()before()after
>   map
>   pretty
>   toGrace
> Error around line 137: RuntimeError: Method lookup error: no iter in
> memberNode.
>   Called Block«minigrace:96».match (defined at unknown:0 in object at
> unknown:0) on line 104
>   Called Block«minigrace:96».applyIndirectly (defined at unknown:0 in
> object at unknown:0) on line 104
>   Called Block«minigrace:96»._apply (defined at minigrace:95 in object at
> unknown:0) on line 104
>   Called Module<genc>.compile (defined at genc:1758 in object at
> unknown:0) on line 97
>   Called NativePrelude.for()do (defined at unknown:0 in object at
> unknown:0) on line 1889
>   Called Block«genc:1889».apply (defined at unknown:0 in object at
> unknown:0) on line 84
>   Called Block«genc:1889»._apply (defined at genc:1885 in object at
> unknown:0) on line 84
>   Called Module<genc>.compilenode (defined at genc:1417 in object at
> unknown:0) on line 1896
>   Called Module<genc>.compileclass (defined at genc:372 in object at
> unknown:0) on line 1504
>   Called Module<genc>.compilenode (defined at genc:1417 in object at
> unknown:0) on line 389
>   Called Module<genc>.compiledefdec (defined at genc:997 in object at
> unknown:0) on line 1473
>   Called Module<genc>.compilenode (defined at genc:1417 in object at
> unknown:0) on line 1007
>   Called Module<genc>.compileobject (defined at genc:394 in object at
> unknown:0) on line 1507
>   Called NativePrelude.for()do (defined at unknown:0 in object at
> unknown:0) on line 438
>   Called Block«genc:438».apply (defined at unknown:0 in object at
> unknown:0) on line 438
>   Called Block«genc:438»._apply (defined at genc:438 in object at
> unknown:0) on line 438
>   Called Module<genc>.compilemethod (defined at genc:565 in object at
> unknown:0) on line 440
>   Called NativePrelude.for()do (defined at unknown:0 in object at
> unknown:0) on line 35
>   Called Block«genc:593».apply (defined at unknown:0 in object at
> unknown:0) on line 35
>   Called Block«genc:593»._apply (defined at genc:593 in object at
> unknown:0) on line 35
>   Called NativePrelude.for()do (defined at unknown:0 in object at
> unknown:0) on line 595
>   Called Block«genc:595».apply (defined at unknown:0 in object at
> unknown:0) on line 84
>   Called Block«genc:595»._apply (defined at genc:595 in object at
> unknown:0) on line 84
>   Called Module<genc>.escapeident (defined at genc:135 in object at
> unknown:0) on line 596
>   Called NativePrelude.for()do (defined at unknown:0 in object at
> unknown:0) on line 137
>   Called memberNode.iter (defined at <nowhere>:0 in object at ast:1068) on
> line 137
>     136:     var ns := ""
>     137:     for (s) do { c ->
>     138:         def o = c.ord
>
>
>
> When I try running figure 1 from "Using the Objectdraw Library in Grace",
> I get the above message plus the following:
>
> Syntax error: failed processing import of [objectdraw].
>   4: // class Clicker . size (width’:Number,height’:Number)
>   5: def Clicker : od.GraphicApplication = object {
> -----^
>   6:   inherits od.MkGraphicApplication.size(400,400)
>
>
> the message only starts showing up once the following line is included in
> objectdraw.grace:
>
> Drawable2D.at(location':Location)size(width':Number,height':Number)on(canvas':Canvas)
>                       -> Graphic2DObject{
>
>
> I'm sorry I don't come to you sooner about this. I thought there might
> have been something not installed properly, but I haven't found any
> indication of that. The error seems consistent between mac and debian.
>
>
>
> On Jun 25, 2013, at 11:08 AM, Kim Bruce wrote:
>
>> Hi Jameson,
>>
>> How is the objectdraw use going with Grace?  Let me know if you have any
>> questions.
>>
>> Kim
>>
>>
>>
>
>



More information about the Grace-core mailing list