My problem with keyword TYPE

In this category you can exchange your programming questions and solutions.
Post Reply
PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

My problem with keyword TYPE

Post: # 1188Post PaPi
Thu Jun 12, 2014 3:03 pm

There are this program (from fnybasic help), but does not work as it should. According to the fnxcompiler:
"error 8 line 16 `LEFT` not declared/unknown"
Why? "left" is a propertie of panel, also propertie of mypanel too, on my opinion.
The program:
[code]
type mypanel as panel
  dim isvisible as boolean `see this as an extra propertie
  isvisible=false `default value
  sub getvisible `this would be an extra method
    isvisible=visible `variable is mypanel.visible
  end sub
end type


object myform as form
  autosize=true
  center
  object newpanel as mypanel
    left=0:top=0
    width=500:height=500
  end object ` mypanel
  showmodal
end object ` MyForm

newpanel.getvisible
showmessage newpanel.isvisible
[end code]


Post Reply