Unable to get height
the following code is in kotlin, but does anyone have an idea as to why i'm unable to get the height? thanks
23 Replies
⌛
This post has been reserved for your question.
Hey @taun! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
setSize(600,600) in case that matters
what's g and what's the error with the dot next to it?
ok so
g
may be null
because it's a Graphics?
should the parameter be nullable?i don't think so
then change the
Graphics?
to Graphics
if possibleyeah i removed it, the error from the dot disappeared
still unable to .height though
is it possible its using the second option?
if i do the scala option then i still get this as my only option
ok so is
MainFrame
an object?yes
Can you show it?
Can you use it outside of drawLine?
not really
i can but not alot of options
also not if you comment out the drawLine method?
maybe you need to declare
MainFrame
before GraphicsPanel
?don't think anything changed
what's the warning with MainFrame?
Do you import any MainFrame from somewhere else maybe?
you were correct, it was importing the scala one at the top
thank you so much
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@239353471285854208>.